PaulStanley / oscola-biblatex

Oscola is a style file for the biblatex bibliography system.
9 stars 8 forks source link

Repeated citations for `comdoc` entrysubtype #9

Open nt1n16 opened 4 years ago

nt1n16 commented 4 years ago

Repeated citations of reports with the entrysubtype=comdoc field set do not behave as documented in oscola-biblatex p. 72:

Subsequent references will use simply the com number, as oscola requires.

producing instead the full citation.

[Update: Edited to post proposed fix as a comment.]

nt1n16 commented 4 years ago

Looking at oscola.cbx it appears this is a known issue awaiting a fix. After posting a question on stackexchange, user moewe was kind enough to suggest a temporary fix (for which I'm really grateful): A redefinition of footcite:note to point to a new bib macro cite:comdoc when entrysubtype=comdoc. The fix produced the desired COM number on subsequent citations. However, since OSCOLA p.5 requires to

provide a crosscitation in brackets to the footnote in which the full citation can be found

I have added in cite:comdoc a cross-reference to the full citation. So the two bib macros are defined like this:

\renewbibmacro*{footcite:note}{%
    \ifboolexpr{test {\ifentrytype{legislation}}
        or ( test {\ifentrytype{legal}} 
        and ( not test {\iffieldequals{entrysubtype}{\treatysubtype}} ))}%
    {\usebibmacro{cite:short}}%
    {\ifboolexpr{ test {\ifentrytype{commentary}} 
            or  ( test {\ifentrytype{legal}} and not test {\iffieldequals{entrysubtype}{\treatysubtype}}) }%
        {\usebibmacro{footcite:full}}%
        {\ifboolexpr{ ( test {\ifentrytype{jurisdiction}} 
                and 
                ( not test {\iffieldundef{userc}} 
                and not test {\iffieldundef{postnote}} )) 
                or (test {\ifentrytype{legal}} 
                and test {\iffieldequalstr{type}{parliamentary}} )}
            {\usebibmacro{cite:full}}%
            {\ifboolexpr{ ( test {\ifentrytype{report}} and test {\iffieldequalstr{entrysubtype}{comdoc}} )}
                {\usebibmacro{cite:comdoc}}
                {\usebibmacro{footcite:note:old}}}}}}%

\newbibmacro{cite:comdoc}{%
    {\printfield{number}%
        \setunit*{\addspace}}%
    \printtext[parens]{%
        \midsentence
        \bibstring{seenote}\addnbspace%
        \ref{cbx@\csuse{cbx@f@\thefield{entrykey}}}%
        \iftoggle{cbx:pageref}%
        {\ifsamepage{\the\value{instcount}}%
            {\csuse{cbx@f@\thefield{entrykey}}}%
            {}%
            {\addcomma\space\bibstring{page}\addnbspace%
                \pageref{cbx@\csuse{cbx@f@\thefield{entrykey}}}}}
        {}}}

So far it doesn't seem like this breaks anything else in oscola-biblatex.

PaulStanley commented 4 years ago

Thanks. I have just merged two more critical changes, but I will look at this one too.