忽略 LawTeX 引用中的括号

忽略 LawTeX 引用中的括号

LawTeX包 (这里) 包括bluebook.sty自动化法律引用。

在法律写作中,“ID。“用于重复紧接在前的引文。但有一个例外(蓝皮书规则 4.1)。在例外中,ID。当插入引文时,仍可用于指代“前面的”引文。在本文中

这是第一句。 图顿诉美国,460 US 660, 663 (1983)(引用拉尔斯顿诉罗宾逊,454 US 201,206 (1981))。这是第二句。 ID。

ID。最后忽略了括号内的引用,即拉尔斯顿,而是引用前面的引文,即塔顿

问题

在中LawTeX,有人能看到一种自动识别的方法,从而忽略括号,以便得到ID。跟随它?

例子

假设我们有兴趣打印以下文本:

这是第一句。 图顿诉美国,460 US 660, 663 (1983)。这是第二句。 ID。

然后我们可以写:

\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}

但是,如果我们想添加一个括号并打印

这是第一句。 图顿诉美国,460 US 660, 663 (1983)(引用拉尔斯顿诉罗宾逊,454 US 201,206 (1981))。这是第二句。 ID。

然后使用

\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}

第二\pincite塔顿\pincite引用不知道拉尔斯顿引文在括号中,因此应忽略。它产生:

这是第一句。 图顿诉美国,460 US 660, 663 (1983)。这是第二句。 塔顿,460 美国,663。

答案1

bluebook.sty不容易被黑客入侵。使用起来很简单,\citecase但内部宏却非常可怕,因为任何熟悉蓝皮书的恐怖之处众所周知,法律引用方面的规则过于规范,毫无意义地复杂化,主要是为了确保只有行家将能够破译它们(从而彻底摧毁引用的意义)。

这个包基于通过一个非常简单的输入做了一些非常有趣的事情\citecase,尽管这是一种相当特殊的方法(我认为)。

因此,无论如何,这意味着:(1)不可能被bluebook.sty黑客入侵,以至于它自动识别出后续引用嵌入在括号中,因此不应该弄乱同上-tracker,而无需对软件包进行彻底改造;并且 (2) 我们需要复制(并重命名)一个长达 132 行的宏,以便注释掉两个“有问题”的行。所以请耐心等待。

这又是您的示例,但请注意我创建了一个新命令:

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

它取决于命令的修改形式\@bbsource,我将其称为\paren@bbsource。最终,我们需要修改的只是下面文件的第 118 行和第 120 行,我们注释掉了以下行:

\xdef\@bbLastSource{#1}

\protected@xdef\@bbLastPinPage{#2}

其目的是存储当前使用引用的值\pincite及其精确位置。

综合起来:

\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@Type\endcsname%
        \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 \numexpr\thefootnote-\LastNote{#1}+1\relax > \forcelongevery \) \or
                    \( \boolean{@bbInFootnote} \and \numexpr\thefootnote-\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{\@bbSignal\FillIn{}{\@vol}{ }\emph{\@Id}\@Period}} %I eliminated this because I found cases where there was no way to have a period after the Id.
                    {\@autofootnote{\@bbSignal\FillIn{}{\@vol}{ }\emph{\@Id\@Period}}}%
                    {\@autofootnote{\@bbSignal\FillIn{}{\@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{\not\equal{\@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%
    \def\pin##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 图片

免责声明:我没有蓝皮书所以我无法核实上述引文的准确性。(我陷入暴政麦吉尔指南但是,所以我可以理解并表示同情……)

相关内容