Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using usefullcite=false, no postnotes in first citations of articles or chapters #137

Open
jackymendez opened this issue Dec 6, 2024 · 3 comments
Labels

Comments

@jackymendez
Copy link

Hi David, thanks very much for all your work on an amazing package.

The style guide I am writing under is based on SBLHS, but to save space, it wants the first citation of an item to follow the same short citation format as subsequent citations. Thus, I am using usefullcite=false.

However, when I do so, I seem to be missing postnotes (specific page numbers) for the first (and only the first) citations of item types such as @Article and @incollection - it seems to work fine with @book. I have tried cycling through all the options for citepages and that seems to have no impact.

Here is my MWE:

\documentclass[12pt]{article}

\begin{filecontents}{mybib.bib}

@book{wraybealKings2014,
  title = {1 \& 2 Kings},
  author = {Wray Beal, Lissa M.},
  date = {2014},
  series = {ApOTC},
  number = {9},
  publisher = {Apollos},
  location = {Nottingham}
}

@incollection{williamsLyingSpirits2002,
  title = {Lying Spirits Sent by God? The Case of Micaiah's Prophecy},
  shorttitle = {Lying Spirits},
  booktitle = {The Trustworthiness of God: Perspectives on the Nature of Scripture},
  author = {Williams, Peter J.},
  editor = {Helm, Paul and Trueman, Carl R.},
  date = {2002},
  pages = {58--66},
  publisher = {Apollos},
  location = {Leicester}
}

@article{weissEthicsDeception2017,
  title = {The Ethics of Deception in Biblical Narrative},
  shorttitle = {Ethics of Deception},
  author = {Weiss, Shira},
  date = {2017},
  journaltitle = {JJE},
  volume = {3},
  number = {1},
  pages = {1--27}
}

\end{filecontents}


\usepackage[style=sbl, doi=false, usefullcite=false]{biblatex} 
\addbibresource{mybib.bib}


\begin{document}

Citing a book for the first time.\autocite[285]{wraybealKings2014}
Journal article for the first time.\autocite[8]{weissEthicsDeception2017}
Chapter in an edited volume for the first time.\autocite[65--66]{williamsLyingSpirits2002}

Subsequent citations seem to be fine.\autocites[4]{weissEthicsDeception2017}[60]{williamsLyingSpirits2002}

\printbiblist{abbreviations}
\printbibliography

\end{document} 
Screenshot 2024-12-06 at 5 54 39 PM Screenshot 2024-12-06 at 5 54 43 PM

My desired output for citation 2 would be:
Weiss, “Ethics of Deception,” 8.

Any advice? Apologies if I have missed something simple!

(Incidentally I also don't understand why it's not picking up the shorttitle fields in my MWE; that part of it works fine in my main doc and my .bib file is formatted exactly the same.)

@dcpurton
Copy link
Owner

dcpurton commented Dec 7, 2024

Thanks for this! I'll take a look for you

@dcpurton dcpurton added the bug label Dec 8, 2024
@dcpurton
Copy link
Owner

dcpurton commented Dec 8, 2024

You are not missing something simple. I don't think this has ever worked. But it definitely should.

A proper fix requires a bit more effort because I guess output should depend on the value of citepages, but you can get your desired output by adding this patch:

\usepackage{xpatch} % for \xpatchbibmacro

\xpatchbibmacro{cite}
{\ifciteseen{}{\iffieldundef{pages}{}{\booltrue{suppresspostnote}}}}
{\ifciteseen{}{\iffieldundef{pages}{}{%
   \iftoggle{blx@usefullcite}
     {\booltrue{suppresspostnote}}
     {}}%
  }}
{}
{}

Perhaps to avoid surprises for when this gets properly implemented, also add citepages=omit to your options. (Although at present this makes no difference.)

I'm not sure why the shorttitle isn't appearing in your MWE. It works ok for me. If you can figure out what is wrong, submit another issue.

So I get this now:

\documentclass[12pt]{article}

\begin{filecontents}{mybib.bib}

@book{wraybealKings2014,
  title = {1 \& 2 Kings},
  author = {Wray Beal, Lissa M.},
  date = {2014},
  series = {ApOTC},
  number = {9},
  publisher = {Apollos},
  location = {Nottingham}
}

@incollection{williamsLyingSpirits2002,
  title = {Lying Spirits Sent by God? The Case of Micaiah's Prophecy},
  shorttitle = {Lying Spirits},
  booktitle = {The Trustworthiness of God: Perspectives on the Nature of Scripture},
  author = {Williams, Peter J.},
  editor = {Helm, Paul and Trueman, Carl R.},
  date = {2002},
  pages = {58--66},
  publisher = {Apollos},
  location = {Leicester}
}

@article{weissEthicsDeception2017,
  title = {The Ethics of Deception in Biblical Narrative},
  shorttitle = {Ethics of Deception},
  author = {Weiss, Shira},
  date = {2017},
  journaltitle = {JJE},
  volume = {3},
  number = {1},
  pages = {1--27}
}

\end{filecontents}


\usepackage[style=sbl, doi=false, usefullcite=false, citepages=omit]{biblatex} 
\addbibresource{mybib.bib}

\usepackage{xpatch}

\xpatchbibmacro{cite}
{\ifciteseen{}{\iffieldundef{pages}{}{\booltrue{suppresspostnote}}}}
{\ifciteseen{}{\iffieldundef{pages}{}{%
   \iftoggle{blx@usefullcite}
     {\booltrue{suppresspostnote}}
     {}}%
  }}
{}
{}

\begin{document}

\null\vfill

Citing a book for the first time.\autocite[285]{wraybealKings2014}
Journal article for the first time.\autocite[8]{weissEthicsDeception2017}
Chapter in an edited volume for the first time.\autocite[65--66]{williamsLyingSpirits2002}

Subsequent citations seem to be fine.\autocites[4]{weissEthicsDeception2017}[60]{williamsLyingSpirits2002}

\printbiblist{abbreviations}
\printbibliography

\end{document} 

tex542

@jackymendez
Copy link
Author

Brilliant, the patch is working great. Thank you very much!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants