dcpurton / biblatex-sbl

Society of Biblical Literature (SBL) style files for biblatex
24 stars 5 forks source link

For citepages=separate, print "here" followed by page number without parentheses #131

Open jjmccollum opened 1 year ago

jjmccollum commented 1 year ago

The "Citing Page Numbers for Chapters and Articles" entry of the SBL Handbook of Style: Explanations, Clarifications, and Expansions webpage (https://sblhs2.com/2018/02/08/citing-page-numbers-for-chapters-and-articles/), offers two points on when and how to cite specific page numbers (i.e., in a postnote) in a first citation of an article or book section:

  1. If your chapter or journal article includes a complete bibliography, we recommend that your reference include only the page number(s) being cited.
  2. If, however, your volume or journal article does not include a complete bibliography, you should provide the entire page range in the footnote, using “here” to indicate the page number being cited.

My concern in this issue is point 2. Using the example from the webpage, suppose I have the following bibliographic entry:

@inbook{Geurts2017,
    author = {Geurts, Bart},
    title = {Presupposition and Givenness},
    booktitle = {The Oxford Handbook of Pragmatics},
    editor = {Huang, Yan},
    location = {Oxford},
    publisher = {Oxford University Press},
    date = {2017},
    pages = {180--198}
}

And suppose that I cite this entry for the first time with a specific page number in the postnote via \autocite[181]{Geurts2017}. The webpage suggests that the output should look as follows:

Bart Geurts, "Presupposition and Givenness," in The Oxford Handbook of Pragmatics, ed. Yan Huang (Oxford: Oxford University Press, 2017), 180–98, here 181.

I am aware that biblatex-sbl accommodates the citation of the postnote with the citepages=separate option, but I would like to change the thiscite string to here, remove the parentheses around the postnote, and instead place a comma and space before the postnote. Based on the discussion at https://tex.stackexchange.com/questions/102711/complex-formatting-of-page-numbers-postnote-in-biblatex-citations, I can at least change "esp." to "here" with the following line:

\DefineBibliographyStrings{english}{thiscite = {here}}

But I haven't yet managed to replace the parentheses around the postnote with a preceding comma and space, and the advice from the TeX Stack Exchange thread did not seem to work. I'm not necessarily asking for a change to the biblatex-sbl code, but I would love to know how I might patch things locally to get the desired behavior.

dcpurton commented 1 year ago

Yeah, I changed to this for version 2.

I'll take a look for how it could be fixed in this version.

dcpurton commented 1 year ago

@jjmccollum, can you give this kind of thing a go?

\documentclass{article}
\begin{filecontents}[overwrite]{\jobname.bib}
@inbook{Geurts2017,
  author = {Geurts, Bart},
  title = {Presupposition and Givenness},
  booktitle = {The Oxford Handbook of Pragmatics},
  editor = {Huang, Yan},
  location = {Oxford},
  publisher = {Oxford University Press},
  date = {2017},
  pages = {180--198}
}
\end{filecontents}
\usepackage[style=sbl,citepages=separate]{biblatex}
\addbibresource{\jobname.bib}
\DefineBibliographyStrings{english}{thiscite = {here}}
\renewbibmacro*{pages}{%
  \iffieldundef{pages}
    {\ifbool{bbx@inset}
       {}
       {\printfield{postnote}%
        \global\booltrue{suppresspostnote}}}
    {\printfield{pages}%
     \ifboolexpr{
       test {\iffieldundef{postnote}}
       or
       bool {bbx@inset}
     }
       {}
       {\newunit%
        \iffieldpages{postnote}
          {\bibstring{thiscite}
           \setunit{\addspace}}
          {}%
        \printfield{postnote}}}}
\begin{document}
\null\vfill
Filler text \autocite[181]{Geurts2017}.
\end{document}

tex351

jjmccollum commented 1 year ago

That worked perfectly! You should be fine to close the issue. Thanks again, and I'm excited to hear that there's a version 2 in the works!

dcpurton commented 1 year ago

Great. I'll leave open and fix in this version (just not make default until version 2)

dcpurton commented 1 year ago

Thanks again, and I'm excited to hear that there's a version 2 in the works!

When I get back to it! I just spent a bucket load of time on https://github.com/dcpurton/scripture