TransWikia.com

Biblatex, Oscola, footcite: punctuation

TeX - LaTeX Asked on October 24, 2020

I’m quite happy using the Oscola style. However, I do get a strange result using footcite: in addition to the dot added by footcite there is another dot after ibid («ibid..» or, eg, «ibid., 3.») which I cannot explain. My preamble is as follows

documentclass[a4paper,english]{book}
usepackage[style=oscola]{biblatex}
usepackage{babel,newcent,textcomp}
usepackage[style=british]{csquotes}
addbibresource{disstryout.bib}
defbibenvironment{bibliography}

% arara: pdflatex: {options: "-file-line-error-style"}
% arara: biber

newcommand{latin}[1]{{it #1}}

Thanks very much for your support! (I’m new to Tex but eager to learn.)
J

2 Answers

The root of all evil, so to speak, lies in oscola.bbx, more specifically the redefinition of postnote (l. 1670)

renewbibmacro*{postnote}{%
  ifboolexpr {test {iffieldundef{postnote}} or
               test {iftoggle{cbx@postnoteprinted}}}%
    {midsentence}%<---- that's the little bugger
    {ifboolexpr{test {ifnumequal{value{bbx@suppresspostnotedelim}}{1}}}
       {setunit{addspace}%
        bbx@resetpostnotedelim}
       {setunit{postnotedelim}}%
     usebibmacro{postnotepagination}}%
     globaltoggletrue{cbx@postnoteprinted}}

You can add the following to your preamble

makeatletter
renewbibmacro*{postnote}{%
  ifboolexpr {test {iffieldundef{postnote}} or
               test {iftoggle{cbx@postnoteprinted}}}%
    {}%<---- nothing to see here
    {ifboolexpr{test {ifnumequal{value{bbx@suppresspostnotedelim}}{1}}}
       {setunit{addspace}%
        bbx@resetpostnotedelim}
       {setunit{postnotedelim}}%
     usebibmacro{postnotepagination}}%
     globaltoggletrue{cbx@postnoteprinted}}
makeatother

if you notice any adverse effect or insist on midsentence, you can exchange the marked empty pair of curly braces {} for {midsentencenopunct}.

The MWE

documentclass{scrartcl}
usepackage[utf8]{inputenc}
usepackage[ngerman]{babel}
usepackage[babel]{csquotes}
usepackage[
    backend=biber,
    style=oscola,
    natbib=true,
    sorting=nyt,
    maxbibnames=10,
    maxcitenames=2
]{biblatex}

addbibresource{biblatex-examples.bib}

makeatletter
renewbibmacro*{postnote}{%
  ifboolexpr {test {iffieldundef{postnote}} or
               test {iftoggle{cbx@postnoteprinted}}}%
    {}
    {ifboolexpr{test {ifnumequal{value{bbx@suppresspostnotedelim}}{1}}}
       {setunit{addspace}%
        bbx@resetpostnotedelim}
       {setunit{postnotedelim}}%
     usebibmacro{postnotepagination}}%
     globaltoggletrue{cbx@postnoteprinted}}
makeatother

begin{document}
  Gofootcite{wilde} and againfootcite[123]{wilde} that's itfootcite{wilde}.
  printbibliography
end{document}

then yields enter image description here


Edit

The situation is more complicated than I thought. Punctuation is one of the features that is language dependent, so the output here looks different in different language. (You might notice that the MWE above used ngerman, which is probably not what you want.)

So an american document (and an english one for that matter) will without modifications yield the following

enter image description here

As you can see, there is an awful lot of double punctuation. You will find that footnote 8, however, does not suffer from double punctuation, this seems to be down to the way oscola handles postnotes in the first cite. If footnote 7 had contained a postnote, then footnote 8 would have gotten the superfluous comma (try it!).

A british document, meanwhile, looks like this

enter image description here

Note that there is no double punctuation, but the "ibid" is not (always) followed by a dot.

In an american (or english) document the following modifications seem to acheive what you want.

makeatletter
renewbibmacro*{footcite}{%
  bbx@resetpostnotedelim%<----- reset the tracker here ...
  usebibmacro{cite:citepages}%
  globaltogglefalse{cbx:loccit}%
  ifboolexpr {test {ifciteseen} or test {ifciteibid}}
    {ifboolexpr {test {iffieldundef{shorthand}} 
                  or test {bbx@ifnottrackingcites}}
       {ifthenelse{ifciteibidANDNOTiffirstonpage}
          {usebibmacro{footcite:ibid}bbx@unsetpostnotedelim}%<-- ... so we can set it here
          {usebibmacro{footcite:note}}}%
       {usebibmacro{footcite:shorthand}}}
    {usebibmacro{footcite:full}%
     usebibmacro{footcite:save}}}
    
renewbibmacro*{postnote}{%
  ifboolexpr {test {iffieldundef{postnote}} or
               test {iftoggle{cbx@postnoteprinted}}}%
    {}%
    {ifboolexpr{test {ifnumequal{value{bbx@suppresspostnotedelim}}{1}}}
       {setunit{addspace}%
        bbx@resetpostnotedelim}
       {setunit{postnotedelim}}%
     usebibmacro{postnotepagination}}%
  globaltoggletrue{cbx@postnoteprinted}}
makeatother

The MWE

documentclass[american]{scrartcl}
usepackage[utf8]{inputenc}
usepackage{babel}
usepackage{csquotes}
usepackage[backend=biber, style=oscola]{biblatex}
addbibresource{biblatex-examples.bib}

makeatletter
renewbibmacro*{footcite}{%
  bbx@resetpostnotedelim
  usebibmacro{cite:citepages}%
  globaltogglefalse{cbx:loccit}%
  ifboolexpr {test {ifciteseen} or test {ifciteibid}}
    {ifboolexpr {test {iffieldundef{shorthand}} 
                  or test {bbx@ifnottrackingcites}}
       {ifthenelse{ifciteibidANDNOTiffirstonpage}
          {usebibmacro{footcite:ibid}bbx@unsetpostnotedelim}
          {usebibmacro{footcite:note}}}%
       {usebibmacro{footcite:shorthand}}}
    {usebibmacro{footcite:full}%
     usebibmacro{footcite:save}}}
    
renewbibmacro*{postnote}{%
  ifboolexpr {test {iffieldundef{postnote}} or
               test {iftoggle{cbx@postnoteprinted}}}%
    {}
    {ifboolexpr{test {ifnumequal{value{bbx@suppresspostnotedelim}}{1}}}
       {setunit{addspace}%
        bbx@resetpostnotedelim}
       {setunit{postnotedelim}}%
     usebibmacro{postnotepagination}}%
  globaltoggletrue{cbx@postnoteprinted}}
makeatother

begin{document}
  Gofootcite[8]{wilde} and againfootcite[123]{wilde} that's itfootcite{wilde}.
  
  And anotherfootcite[4]{baez/article} citefootcite{baez/article}, again footcite[23]{baez/article}.
  
  The Greek philosophersfootcite{aristotle:anima} must have knownfootcite[9]{aristotle:anima} somethingfootcite{aristotle:anima}.
  
  printbibliography
end{document}

yields

enter image description here

Correct answer by moewe on October 24, 2020

Thanks, I now have the result I was looking for, ie multiple authors or editors are separated by an and without any comma if there are not more than three names, and if there are more than three names, the first is given followed by an et al without punctuation.

The code is as follows, and as it is certainly rather messy I'd be grateful for any suggestions:

documentclass[english]{memoir}
usepackage[utf8]{inputenc}
usepackage[english,latin]{babel}
usepackage[backend=biber,style=oscola,maxnames=3]{biblatex}
usepackage[style=british]{csquotes}
usepackage{imakeidx}
DisemulatePackage{index}

renewcommand*{multinamedelim}{addspacebibstring{and}space}
renewcommand*{finalnamedelim}{addspacebibstring{and}space}
renewcommand*{finalandcomma}{}

AtBeginBibliography{
  renewcommand*{finalnamedelim}{
    addspacebibstring{and}space}
    renewcommand*{finalandcomma}{}
}

renewbibmacro*{name:andothers}{
    ifboolexpr{
    test {ifnumequal{value{listcount}}{value{liststop}}}
    and
    test ifmorenames
  }
    {ifnumgreater{value{liststop}}{1}
       {finalandcomma}
       {}
     andothersdelimbibstring{andothers}}
    {}}

newtoggle{incitation}
pretocmd{citesetup}{toggletrue{incitation}}{}{}
pretocmd{bibsetup}{togglefalse{incitation}}{}{}
newcommand{biband}{iftoggle{incitation}{and}{and}}

DefineBibliographyStrings{english}{ibidem={ibid}}
DefineBibliographyStrings{english}{seenote = {see n}}
DefineBibliographyStrings{english}{editor = {ed}}
DefineBibliographyStrings{english}{editors = {eds}}
DefineBibliographyStrings{english}{andothers = {et al}}

makeatletter
renewbibmacro*{footcite}{%
  bbx@resetpostnotedelim
  usebibmacro{cite:citepages}%
  globaltogglefalse{cbx:loccit}%
  ifboolexpr {test {ifciteseen} or test {ifciteibid}}
    {ifboolexpr {test {iffieldundef{shorthand}} 
                  or test {bbx@ifnottrackingcites}}
       {ifthenelse{ifciteibidANDNOTiffirstonpage}
          {usebibmacro{footcite:ibid}bbx@unsetpostnotedelim}
          {usebibmacro{footcite:note}}}%
       {usebibmacro{footcite:shorthand}}}
    {usebibmacro{footcite:full}%
     usebibmacro{footcite:save}}}

renewbibmacro*{postnote}{%
  ifboolexpr {test {iffieldundef{postnote}} or
               test {iftoggle{cbx@postnoteprinted}}}%
    {}
    {ifboolexpr{test {ifnumequal{value{bbx@suppresspostnotedelim}}{1}}}
       {setunit{addspace}%
        bbx@resetpostnotedelim}
       {setunit{postnotedelim}}%
     usebibmacro{postnotepagination}}%
  globaltoggletrue{cbx@postnoteprinted}}
makeatother

renewbibmacro*{byeditor+others}{%
  ifnameundef{editor}
    {}
    {printnames[byeditor]{editor}%
     setunit{addspace}%
     usebibmacro{byeditor+othersstrg}%
     clearname{editor}%
     newunit}%
  usebibmacro{byeditorx}%
  usebibmacro{bytranslator+others}}

usepackage{xpatch}
xpatchbibmacro{byeditor+othersstrg}{printtext}{printtext[parens]}{}{}

Answered by Jonas on October 24, 2020

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP