0

I have been making a Texas lawyer .bbx and .cbx, and, in doing that, I created a citation style called courtrule. For example, Rule 4 of the Texas Rules of Civil Procedure is cited like Tex. R. Civ. P. 4. However, because there are hundreds of different rules, I want to have a general \cite{} where I can pass the rule number as a postnote, i.e., \cite[4]{TRCP} will cause this:

In-text: Tex. R. Civ. P. 4

In-bibliography: Tex. R. Civ. P. 4

At the moment, when I write \cite[4]{TRCP}, it does the correct in-text citation, but it does not print the postnote in the bibliography. Additionally, I will cite multiple different rules, so I might have \cite[500]{TRCP} as well as \cite[4]{TRCP}. I want the bibliography to make a new entry for each different postnote. Is that possible?

This is my bibliography driver code now:

\DeclareBibliographyDriver{courtrule}{%
  \usebibmacro{begentry}%
  \printfield{title}\addspace\printfield{postnote}\hspace{-0.7ex}
 \dotfill\usebibmacro{pageref}%
}

But that just makes the bibliography print Tex. R. Civ. P. without the number. [EDIT: I have learned it's because the postnote field is not available in the bibliography]

I know I'm doing it wrong, but I don't know how to do it right.

9
  • Welcome to tex.se.
    – Cicada
    Apr 5, 2023 at 5:57
  • In the manual (texdoc biblatex): "[Postnote is] The postnote argument passed to a citation command. This field is specific to citations and not available in the bibliography."
    – Cicada
    Apr 5, 2023 at 5:59
  • Tricky: Generally speaking, if you want separate bibliography entries, you need separate .bib entries.
    – moewe
    Apr 5, 2023 at 6:02
  • It sounds as if you need (a) each rule to act as if it were its own standalone bibentry; or (b) accumulate the postnotes (excluding repeats, ibids and locits??) and print a custom list. A crossref= field for the rule as a child entry (e.g. trcp123,rule={TRCP123},crossref={trcp}...) would point to, and inherit from, the parent entry (e.g., trcp,title={Tex. R. Civ. P.}...) and not need an actual postnote.
    – Cicada
    Apr 5, 2023 at 6:12
  • One way to accumulate is to use gappto (from etoolbox) to globally append to \somemacro during citation, and then print the contents of \somemacro at the end of the document. A custom expl3 command could also do this (plus sort and cleanup). What's your timeline/timeframe?
    – Cicada
    Apr 5, 2023 at 6:23

1 Answer 1

2

Index the citations.

toa

A quick, five-minute proof of concept using out-of-the-box Biblatex, the title= and author= fields for storing the authority and law report(s) respectively, and \citetitle and \citeauthor citation commands to retrieve that information.

Usage, for bibentry X:

\citetitle{X}, \citeauthor{X}\index[indexname]{\citetitle{X}, \citeauthor{X}}

With (numeric) pinpoint:

\citetitle{X}, \citeauthor[45]{X}\index[indexname]{\citetitle{X}, \citeauthor[45]{X}}

Tricky part with indexing is getting index sort keys right, and not unintentionally adding/removing blank spaces in the index entries when using different commands to add an (i.e., the same) item.

With alphanumeric pinpoints, the index sort key (and citation prefix) has to be added manually.

For example, to bring r 45(a) into the rules index/table (and into the citation in the text, if there is a citation):

\citetitle[r 45(a)]{tcpr}\index[rules]{r 045@\citetitle[r 45(a)]{tcpr}}

The MWE has some more details.

It is a multi-step process (see Toolchain in the MWE).

Remember to run with shell escape on.

MWE

%Toolchain:
%(pdf/xe/lua)latex with shell escape
%biber
%latex
%splitindex -s plainindexstyle.ist
%latex
%latex

\begin{filecontents*}[overwrite]{\jobname.bib}
@misc{tcpr,  %misc: just for demo
  title = {TCPR},
  pagination = {rule}, %bibstring to apply if postnote is digits
    }
@misc{auth1, 
  title = {A v B},
  author = {{4 LR 456}},
    }
@misc{auth2c, 
  title = {The Dog Co. v. The Cat Co.},
  author = {{4 LR 458}},
    }
@misc{auth3c, 
  title = {U.S. v. U.S.},
  author = {{102 U.S.X.C. 123}},
    }
    
\end{filecontents*}

%style file for index
\begin{filecontents*}{plainindexstyle.ist}
delim_0 "\\space\\dotfill\\space "
delim_1 "\\space\\dotfill\\space "
delim_2 "\\space\\dotfill\\space "
delim_n ", "
delim_r "--"
delim_t ""
encap_prefix "\\"
encap_infix "{"
encap_suffix "}"

\end{filecontents*}




\documentclass{article}
\newcommand\rulesep{\rule{0.4\textwidth}{.4pt}}
%------------------

\title{Creating a Table of Rules}
\author{}
\date{}


\usepackage[splitindex,noautomatic,nonewpage]{imakeidx}

\newcommand\abibname{authortitle}
\newcommand\abibstyle{style=\abibname}
\usepackage[
    \abibstyle , 
    indexing=cite,
    citetracker=true,
    ibidtracker=false,
    pagetracker=true,
%   idemtracker=true,
%   opcittracker=true,
%   loccittracker=true,
%   autocite=footnote,
%   datezeros=true,
        ]{biblatex}

\addbibresource{\jobname.bib}
        
\NewBibliographyString{atparagraph,rule}        
\DefineBibliographyStrings{english}{%
atparagraph = {at para},
rule = {r},
}
%=================
%indexing


\newcommand\pagerefindexnote{\noindent\small\mdseries $\to$ References are to page numbers.}


\makeindex

\makeindex[name=rulesa,title=Table of TCP Rules,columns=3,columnseprule,intoc]
\makeindex[name=cases,title={\normalsize Cases},columns=1]
\makeindex[name=rules,title={\normalsize Rules},columns=1]




\usepackage[
                final=true,
                bookmarks,
            colorlinks=true,        
            allcolors = black,  
            citecolor=blue, 
            hyperindex=false,       
]{hyperref}



% variations instead of having \cite...\index... all the time
\newcommand{\icite}[1]{\cite[#1]{tcpr}\index[rulesa]{r~#1}}

\newcommand{\iicite}[2]{\cite[#1]{tcpr}\index[rulesa]{r~#2@r~#1}}

\newcommand{\iiicite}[3]{\cite[#1]{tcpr}\index[rulesa]{r~#3@r~#2{#1}}}

\newcommand{\ivcite}[4]{\cite[#1]{tcpr}\index[rulesa]{r~#3@r~#2{#1}|#4}}


\newcommand{\vcite}[2]{\cite[#1]{tcpr}\index[rulesa]{#2}}


%some wrapper commands for convenience
%%\imki@wrindexentry{names}{Charles}{26} - this is an imakeidx macro
\makeatletter
\newcommand{\addindexitem}[3]{%
\imki@wrindexentry{#1}{#2}{#3}}
\makeatother

\newcommand{\textformat}[1]{\textsf{\textbf{#1}}}

\newcommand\yq{\begin{quotation}}
\newcommand\yqq{\end{quotation}}

\newcommand\yc{\begin{center}}
\newcommand\ycc{\end{center}}

\newcommand\yi{\begin{itemize}}
\newcommand\yii{\end{itemize}}

\newcommand\yis{\item[\space]}

\newcommand\zzz[2]{\cite[#1]{tcpr}\index[rules]{r #2@\citetitle[#1]{tcpr}}}
%1=rule2=sortkey

%------------------
\begin{document}

\maketitle
\newpage
\tableofcontents
\newpage
\index{p} %seems general index is expected/assumed??
%\printindex

\indexprologue{\pagerefindexnote}

%\addindexitem{cases}{     @\textit{Case}|textit}{Page(s)}
%\addindexitem{rules}{     @\textit{Rule}|textit}{Page(s)}

\printindex[rulesa]

\newpage

Index the citations.

Use multiple indices, one for each category of authority.


\yc
\bfseries
TABLE OF AUTHORITIES
\ycc

\hfill\textbf{Page(s)}

\printindex[cases]

\printindex[rules]


\newpage
\section{Text}

\cite[4]{tcpr}\index[rulesa]{4}

xxx

\section{More Text}
xxx
\newpage
\cite[4]{tcpr}\index[rulesa]{4}

\cite[123]{tcpr}\index[rulesa]{123}

\iicite{5}{006}, \iicite{15}{015}, \iicite{52}{052}, \iicite{502}{502}, \iicite{12}{012}.

\cite[4556]{tcpr}\index[rulesa]{4556}

\iicite{53}{053}


\iiicite{14}{\textit}{014}

\iiicite{16}{\textbf}{016}


\iiicite{18}{}{018}{textbf}

\vcite{19}{r~019@r~19|textformat}

\vcite{19(a)}{r~019a@r~19!(a)} versus \vcite{r~19(a)}{r~019a@r~19!(a)}


\vcite{55(b)}{r~055b@r~55(b)|see{52(a)}}

\vcite{55(c)}{r~055c@r~55(c)!see{52(a)}}


\vcite{52(a)}{r~052a@r~52(a)}



\newpage

\vcite{52(a)}{r~052a@r~52(a)}

$\to$ \textbackslash index\{indexentry\}

An \verb.indexentry. is formatted as:

\yq
\yc
a@b|c
\ycc
where
\yi
\yis a = sortkey
\yis b = index display key(s), up to three levels
\yi
\item[·] level1!level2!level3
\yii
\yis c = page number format command name (without the backslash)
\yi
\item[·] can be \verb,see{...},
\yii
\yii
\yc
e.g., 052@52|textbf
\ycc

Sort the item as 052, print 52, and make the page number bold.

\textbf{References}: Do \verb.texdoc makeindex. to bring up both \verb,makeindex.pdf, and \verb,ind.pdf, manuals.
\yqq

\cite[457]{auth1}\index[cases]{\citetitle{auth1}, \citeauthor[457]{auth1}}


\cite[45]{tcpr}\index[rules]{r 045@\citetitle[45]{tcpr}}
\zzz{123}{123}
\zzz{200}{200}
\cite{auth2c}\index[cases]{\citetitle{auth2c}, \citeauthor{auth2c}}

\newpage
\cite{auth2c}\index[cases]{\citetitle{auth2c}, \citeauthor{auth2c}}
\cite{auth2c}\index[cases]{\citetitle{auth2c}, \citeauthor{auth2c}}
\cite{auth3c}\index[cases]{\citetitle{auth3c}, \citeauthor{auth3c}}
\zzz{123}{123}
\zzz{200}{200}
\zzz{201}{201}

\zzz{r 212(a)}{212(a)}
versus
\cite[r 212(a)]{tcpr}\index[rules]{r 212(a)@\citetitle [r 212(a)]{tcpr}}%note the space


\newpage

\cite{auth3c}\index[cases]{\citetitle{auth3c}, \citeauthor{auth3c}}
\zzz{123}{123}

\newpage
\cite{auth3c}\index[cases]{\citetitle{auth3c}, \citeauthor{auth3c}}
\zzz{85}{085}
\zzz{85}{085}

\newpage
\cite{auth2c}\index[cases]{\citetitle{auth2c}, \citeauthor{auth2c}}
\cite{auth3c}\index[cases]{\citetitle{auth3c}, \citeauthor{auth3c}}

\newpage
\cite{auth2c}\index[cases]{\citetitle{auth2c}, \citeauthor{auth2c}}
\zzz{123}{123}
\zzz{85}{085}

\citetitle[r 45(a)]{tcpr}\index[rules]{r 045@\citetitle[r 45(a)]{tcpr}}



\bigskip
\hfill\rulesep\hfill\ %\hrule%{0.8\linewidth}
\bigskip

%===============================================

\end{document}


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .