TransWikia.com

Ignoring parentheticals in LawTeX citations

TeX - LaTeX Asked by Pat W. on November 30, 2020

The LawTeX package (here) includes bluebook.sty to automate legal citations.

In legal writing, the term “Id.” is used to repeat the immediately preceding citation. But there’s an exception (Bluebook Rule 4.1). In the exception, Id. may still be used to refer to the “preceding” citation when a parenthetical citation intervenes. In this text

Here is sentence one. Tuten v. United States, 460 U.S. 660, 663 (1983) (quoting Ralston v. Robinson, 454 U.S. 201,206 (1981)). Here is sentence two. Id.

the Id. at the end ignores the parenthetical citation, which is Ralston, and refers instead to the preceding citation, which is Tuten.

Question

In LawTeX, can anyone see an automated way to recognize, and thus ignore the parenthetical, so as to get Id. to follow it?

Example

Say we’re interested in printing the following text:

Here is sentence one. Tuten v. United States, 460 U.S. 660, 663 (1983). Here is sentence two. Id.

Then we can write:

providecommand{documentclassflag}{}
documentclass[12pt,documentclassflag]{lawbrief} 
usepackage[margin=1in]{geometry}
usepackage{newcent,microtype,setspace,xcolor}
usepackage[hyperindex=false,linkbordercolor=white,pdfborder={0 0 0}]{hyperref}

citecase{Tuten v. United States, 460 U.S. 660 (1983)}
citecase{Ralston v. Robinson, 454 U.S. 201 (1981)}

begin{document}

Here's sentence one.  pincite{Tuten}{663}.  
Here's sentence two.  pincite{Tuten}{663}.

end{document}

However, if we instead want to include a parenthetical and print

Here is sentence one. Tuten v. United States, 460 U.S. 660, 663 (1983) (quoting Ralston v. Robinson, 454 U.S. 201,206 (1981)). Here is sentence two. Id.

then when using

providecommand{documentclassflag}{}
documentclass[12pt,documentclassflag]{lawbrief} 
usepackage[margin=1in]{geometry}
usepackage{newcent,microtype,setspace,xcolor}
usepackage[hyperindex=false,linkbordercolor=white,pdfborder={0 0 0}]{hyperref}

citecase{Tuten v. United States, 460 U.S. 660 (1983)}
citecase{Ralston v. Robinson, 454 U.S. 201 (1981)}

begin{document}

Here's sentence one.  pincite{Tuten}{663} (quoting pincite{Ralston}{206}).  
Here's sentence two.  pincite{Tuten}{663}.

end{document}

the pincite for the second Tuten citation doesn’t know the pincite for the Ralston quotation is in a parenthetical and thus should be ignored. It produces:

Here is sentence one. Tuten v. United States, 460 U.S. 660, 663 (1983). Here is sentence two. Tuten, 460 U.S. at 663.

One Answer

bluebook.sty is not easily hackable. The simplicity with which you can use citecase means the internal macros are hellish because, as anyone familiar with the horror that is the Bluebook knows, the rules surrounding legal citations are overly prescriptive, pointlessly complicated, and serve mainly to ensure that only the cognoscenti will be able to decipher them (thereby completely destroying the point of citations in the first place).

This package does some very interesting things based on a very simple input via citecase, though it is a rather idiosyncratic approach (I think).

So, anyway, what this means is: (1) it is impossible for bluebook.sty to be hacked in such a way that it automatically recognizes that a subsequent citation is embedded in a parenthetical and therefore should not foul up the idem-tracker without a complete overhaul of the package; and (2) we need to copy (and rename) a massive 132-line macro in order to comment out the two 'offending' lines. So bear with me.

Here's your example again, but note that I created a new command:

newcommand{parenpincite}[3][]{%
  @startcitation@ifnextchar.{paren@bbsource{#2}{#3}{#1.}@absorbperiod}{paren@bbsource{#2}{#3}{#1}xspace}}

It depends on a modified form of the command @bbsource, which I have called paren@bbsource. Ultimately, all we need to modify comes at lines 118 and 120 in the file below, where we comment out the lines:

xdef@bbLastSource{#1}

and

protected@xdef@bbLastPinPage{#2}

which are meant to store the value of the citation of the current use of pincite and its pinpoint.

Putting it all together:

providecommand{documentclassflag}{}
documentclass[12pt,documentclassflag]{lawbrief}
usepackage[margin=1in]{geometry}
usepackage{newcent,microtype,setspace,xcolor}
usepackage[hyperindex=false,linkbordercolor=white,pdfborder={0 0 0}]{hyperref}

makeatletter

newcommand{parenpincite}[3][]{%
@startcitation@ifnextchar.{paren@bbsource{#2}{#3}{#1.}@absorbperiod}{paren@bbsource{#2}{#3}{#1}xspace}}

%Inner command that performs the citations
% #1 is cite handle, #2 is pin or blank, #3 can include any of 'lsniIp'
newcommand{paren@bbsource}[3]
{%
    %Check that this source is defined
    ifcsname #1@Typeendcsname%
        relax%
    else
        errmessage{No source named #1 has been defined}
    fi%
%
%
    %If user has passed "!", temporarily set autofootnote to do nothing
    %It is the case that all printing commands go through autofootnote
    let@@autofootnote=@autofootnote%
    IfSubStr{#3}{!}{def@autofootnote##1{}}{}%
%
    %If we are going to put this in an autofootnote, we want to take out the preceeding space
    %Additionally, add a period if a '.' has been set in the flags (which means that a period followed cite), add a period.
    %This period, if it exists, will be stored in @Period, which is used later on
    def@Period{}%
    ifthenelse{not boolean{@bbLawReviewMode} or boolean{@bbInFootnote}}{}{SafeUnskip}%
    IfSubStr{#3}{.}{def@Period{.}}{}%
%
    provideboolean{@forceLong}%
    provideboolean{@forceShort}%
    IfSubStr{#3}{l}{setboolean{@forceLong}{true}}{setboolean{@forceLong}{false}}%
    IfSubStr{#3}{s}{setboolean{@forceShort}{true}}{setboolean{@forceShort}{false}}%
%
    %If ``n'' is provided in optional arg, force reporter and page number only (just for Cases)
    IfSubStr{#3}{n}
    {%
        ifthenelse{equal{#2}{}}
            {@autofootnote{@bbSignal@bbReporterOnlyCite{#1}}}
            {@autofootnote{@bbSignal@bbReporterOnlyPinCite{#1}{#2}}}%
%
        %By definition, this last cite cannot be an "id", so reset the id counter
        setcounter{@bbSequentialIds}{0}%
    }
    {%
        %Pull the volume number out of the pincite, or see if provided
        %The reason it is so messy looking is to deal with the fact that we do not want to fully expand the pincite,
        %  in case it contains formatting or other non-expandable control sequences
        protected@edef@fullpin{#2}%
        expandarg%
        StrBetween{@fullpin}{vol. }{, }[@vol]%
        edef@fullvol{vol. @vol, }%
        StrDel{@fullpin}{@fullvol}[@pin]%
        fullexpandarg%
%show@pin
%
        %If this authority has not been seen before, or we have not seen it in N notes, use complete form
        ifthenelse{boolean{#1@FirstUse} or boolean{@forceLong} or%
            ( boolean{@bbLawReviewMode} and ( equal{SrcType{#1}}{Case} or equal{SrcType{#1}}{Statute} ) and
                (  ( not boolean{@bbInFootnote} and numexprthefootnote-LastNote{#1}+1relax > forcelongevery ) or
                    ( boolean{@bbInFootnote} and numexprthefootnote-LastNote{#1}relax > forcelongevery )
                )
            ) }%
        {%
%show@pin
            @autofootnote{@bbSignal@bbLongCite{#1}{@pin}@Period}%
            setcounter{@bbSequentialIds}{0}%
            ifthenelse{boolean{#1@FirstUse}}{XDef{#1@SupraNote}{thefootnote}}{}%
        }
        {%
            %If this is the second occurance of this authority in a row, use Id
            ifthenelse{equal{@bbLastSource}{#1} and not boolean{@forceShort}%
                and value{@bbSequentialIds} < maxsequentialids}
            {%
                %We only display the volume if it exists, and is DIFFERENT from the last; otw clear out
                ifthenelse{equal{@vol}{@bbLastVol}}{edef@vol{}}{}%
%
                %Choose either id/Id based on the capitalization flag
                def@Id{ifthenelse{boolean{@bbCapNextSource} and equal{@vol}{}}{Id}{id}}%
%
                %The capitalization can be overridden based on the optional argument
                IfSubStr{#3}{I}{def@Id{Id}}{}%
                IfSubStr{#3}{i}{def@Id{id}}{}%
%
                %Choose either ``at'' or just a space based on the type of authority
                %def@At{ifthenelse{equal{SrcType{#1}}{Statute}}{~}{~at~}}%
                %ALTERNATE: Use "at" iff the pin is numeric
                def@At{~}%
                IfInteger{@pin}{def@At{~at~}}{}%
%
                %If the exact page as well (or there is no pincite), just use id; otherwise use Id. with pin cite
                ifthenelse{equal{@bbLastPinPage}{#2} or equal{}{#2} }
                    %{@autofootnote{@bbSignalFillIn{}{@vol}{ }emph{@Id}@Period}} %I eliminated this because I found cases where there was no way to have a period after the Id.
                    {@autofootnote{@bbSignalFillIn{}{@vol}{ }emph{@Id@Period}}}%
                    {@autofootnote{@bbSignalFillIn{}{@vol}{ }emph{@Id.}@At@pin@Period}}%
                stepcounter{@bbSequentialIds}%
            }%
            {%
                %If this is not the second-in-a-row occurence of this authority, use short form
                @autofootnote{@bbSignal@bbShortCite{#1}{@pin}@Period}%
                setcounter{@bbSequentialIds}{0}%
            }%
        }%
    }%
%
    %Indicate that this source has been used, so subsequent uses use short form
    %This gets into the internals of ifthen.sty, basically setboolean calls the macro <Boolean-Variable-Name><true-or-false>
    %By default, setboolean is local to the group; we do the following to make the change global
    globalsetboolean{#1@FirstUse}{false}%
%
    %Store the last used source, as well as pinpage and volume (if present) in that source, for determining Id
    %xdef@bbLastSource{#1}%  <--- NOTE: THIS LINE WAS COMMENTED OUT !!!
    %xdef@bbLastPinPage{detokenize{#2}}%
    % protected@xdef@bbLastPinPage{#2}% <--- NOTE: THIS LINE WAS COMMENTED OUT !!!
    ifthenelse{notequal{@vol}{}}{xdef@bbLastVol{@vol}}{}%
%
    %If in law review mode, store the footnote number, so we can force long cites after 5 footnotes
    XDef{#1@LastNote}{thefootnote}%
%
    %Record this use into the index, pagenumber is the command that will be used to format
%PREVIOUSLY THIS WAS FULLNAME, WHY THE CHANGE
    %index{Call{#1@IndexType}}{FullName{#1}@@bbIndexCite{#1}{#2}|pagenumber}%
    %index{Call{#1@IndexType}}{ShortName{#1}@@bbIndexCite{#1}{#2}|pagenumber}%
    %index{Call{#1@IndexType}}{ShortName{#1}@@bbIndexCite{#1}{#2}}%
    begingroup%
    defpin##1##2{}%
    IfSubStr{#3}{*}{}{%
        ifempty{IndexType{#1}}{}{%
            index{IndexType{#1}}{@bbIndexCite{#1}{#2}}%
        }%
    }%
    endgroup%
%
    %Assume that we will capitalize the next Id, unless a signal word comes between
    globalsetboolean{@bbCapNextSource}{true}%
    def@bbSignal{}%
%
    %Make sure to restore autofootnote (in case "!" was passed in, in which case it was redefined to do nothing)
    let@autofootnote=@@autofootnote%
}
makeatother

citecase{Tuten v. United States, 460 U.S. 660 (1983)}
citecase{Ralston v. Robinson, 454 U.S. 201 (1981)}

begin{document}

Here's sentence one.  pincite{Tuten}{663} (quoting parenpincite{Ralston}{206}).
Here's sentence two.  pincite{Tuten}{663}. 

Here's pincite{Ralston}{206} to reset the tracker. Here's sentence one again:  pincite{Tuten}{663} (quoting parenpincite{Ralston}{206}).  
Here's sentence two, showing the verb|Id.| plus the unique pinpoint: pincite{Tuten}{664}.

end{document}

LawTeX picture

Disclaimer: I do not own a copy of the Bluebook so I cannot verify the accuracy of the above citations. (I am stuck with the tyranny of the McGill Guide, however, so I can relate and commiserate....)

Correct answer by jon on November 30, 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