-
Notifications
You must be signed in to change notification settings - Fork 6
/
bluebook.sty
1141 lines (1056 loc) · 50.9 KB
/
bluebook.sty
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
%===============================================================================
% bluebook.sty - Automated Bluebook citations
% Copyright (C) 2009-2013 Christopher De Coro
%
% This file is part of the LaWTeX package, for more information, see:
% Project Homepage: http://www.cs.princeton.edu/~cdecoro/lawtex/
% Code Repository: https://sourceforge.net/projects/lawtex/
%
% This program is free software: you can redistribute it and/or modify
% it under the terms of the GNU General Public License as published by
% the Free Software Foundation, either version 3 of the License, or
% (at your option) any later version.
%
% This program is distributed in the hope that it will be useful,
% but WITHOUT ANY WARRANTY; without even the implied warranty of
% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
% GNU General Public License for more details.
%
% You should have received a copy of the GNU General Public License
% along with this program. If not, see <http://www.gnu.org/licenses/>.
%===============================================================================
%TODO:
%If short cite to "supra" is in same note, omit "note"
%Make SetIndexName work for all source types (currently just statutes)
%NOTE: This file is self-documented, and when all lines marked with %% are pulled
% out into their own file, they form a valid latex document. To make the docs:
% cat bluebook.sty | sed -n 's/^\%\%\(.*\)/\1/p' > bluebook-doc.tex; pdflatex bluebook-doc.tex
%=========================BEGIN DOCUMENTATION PREAMBLE==========================
%%\parskip=6pt
%%\parindent=1.5em
%%\leftskip=0em
%%\frenchspacing
%%\font\parasymbolfont=phvr at 10pt
%%\font\sectionsymbolfont=pncr at 10pt
%=========================END DOCUMENTATION PREAMBLE===========================
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{bluebook}[2011/11/11 Legal Bluebook-style Citations]
\RequirePackage{ifthen}
\RequirePackage{ifxetex}
\RequirePackage{ifluatex}
%Needed to fix some notational changes between pdftex and the other engines
\ifthenelse{\boolean{xetex}}{%
\let\pdfshellescape\shellescape
}{%
\ifluatex
\RequirePackage{pdftexcmds}
\let\pdfshellescape\pdf@shellescape
\else
\fi
}
\RequirePackage{multind}
\RequirePackage{xstring}
\RequirePackage{xspace}
\RequirePackage{url}
%\def\url@leostyle{\@ifundefined{selectfont}{\def\UrlFont{\sf}}{\def\UrlFont{\small\ttfamily}}}
\def\url@leostyle{\def\UrlFont{\footnotesize\ttfamily}}
\urlstyle{leo}
%Internal global variables
\newcommand{\@bbSignal}{}
\newcommand{\@bbLastSource}{} %Holds the last source, used for determining Id
\newcommand{\@bbLastPinPage}{} %Holds the pin page of the last source, used for determining Id
\newcommand{\@bbLastVol}{} %Holds the pin page of the last source, used for determining Id
\newboolean{@bbCapNextSource} %Used by the intro signals to supress capitalization of the next Id
\setboolean{@bbCapNextSource}{true} %By default, Id is capitalized
\newboolean{@bbInFootnote} %We redefine \footnote to set this
\newboolean{@bbLawReviewMode}
\setboolean{@bbLawReviewMode}{false}
\newcounter{@bbSequentialIds}
%Helper rountines - we should consider if these need to be renamed to avoid clashes
\def\Def#1#2{\expandafter\def\csname#1\endcsname{#2}}
\def\EDef#1#2{\expandafter\edef\csname#1\endcsname{#2}}
\def\ProtectedEDef#1#2{\expandafter\protected@edef\csname#1\endcsname{#2}}
\def\XDef#1#2{\expandafter\xdef\csname#1\endcsname{#2}}
\def\ProtectedXDef#1#2{\expandafter\protected@xdef\csname#1\endcsname{#2}}
\def\GDef#1#2{\expandafter\gdef\csname#1\endcsname{#2}}
\def\Call#1{\csname#1\endcsname}
\def\SafeUnskip{\ifvmode\relax\else\unskip\fi}
\def\globalsetboolean#1#2{\globaldefs=1\setboolean{#1}{#2}\globaldefs=0\relax}
\def\ifempty#1#2#3{\if\relax\expandafter\detokenize\expandafter{#1}\relax #2\else #3\fi}
\def\ifpin#1{\ifempty{##2}{}{#1}}
\def\FillIn#1#2#3{\noexpand\edef\@tmp{#2}\ifempty{\@tmp}{}{#1#2#3}}
\def\IfFootnote#1{\ifthenelse{\boolean{@bbInFootnote}}{#1}{}}
%% \section{Defining Sources}\vspace{-8pt}
%%
%%\citecase[Steel Seizure Case]{Youngstown Sheet & Tube Co. v. Sawyer, 343 U.S. 579 (1952)}
%%\cmd{citecase}[Short Name]{Standard Case Citation}[Defines a new case citation, using standard citation form.]
%% \begin{Example}
%% %\citecase{Lochner v. New York, 198 U.S. 45 (1905)}
%% %\citecase[Steel Seizure Case]
%% %{Youngstown Sheet & Tube Co. v. Sawyer, 343 U.S. 579 (1952)}
%% \cite[l]{Lochner}. \\
%% \pincite{Lochner}{48}. \\
%% \pincite{Steel Seizure Case}{602}. \\
%% \pincite{Lochner}{52}. \\
%% \See \pincite{Steel Seizure Case}{625}.
%% \end{Example}
%% \noindent In order to cite legal sources in the body of the text, first include a _\citecase_ command with the
%% case citation to define the case as a source. At the point in the text where the citation should appear, use
%% _\cite_ or _\pincite_, passing the short name as an argument. Spacing and commas are important (extra spaces will be preserved).
%%
%% By default, the first party is used for the short name of the case, unless that party is
%% ``United States,'' ``State,'' ``Commonwealth,'' or ``People,'' in which case the second party is used.
%% To override the choice of short name, set the optional parameter.
%%
%% With case citations that differ from the standard format, you may need to use the _\newcase_ command.
%% For example, in ``\emph{Marbury v. Madison}, 5 U.S. (1 Cranch), 137 (1803)'', the extra parentheses around
%% the ``(1~Cranch.)'' will throw off the parser. See the way that this is cited below.
%%
\newcommand{\citecase}[2][]{%
%Find the first space and paren, and cut it and everything else after as the parenthetical
\StrPosition{#2}{ (}[\@parenpos]%
\StrGobbleLeft{#2}{\numexpr \@parenpos-1}[\@paren]%
\StrLeft{#2}{\numexpr \@parenpos-1 }[\@withoutparen]%
%
%With the parenthetical gone, we look for the LAST comma, and assume the citation is there to the end
\StrCount{\@withoutparen}{,}[\@commacount]%
\StrPosition[\@commacount]{\@withoutparen}{,}[\@lastcommapos]%
\StrGobbleLeft{\@withoutparen}{\@lastcommapos}[\@citation]%
\StrLeft{\@withoutparen}{\numexpr \@lastcommapos-1}[\@withoutcitation]%
\edef\casename{\@withoutcitation}
%
%Looking only at the citation, assume that from the LAST space to the end is the start page
\StrCount{\@citation}{ }[\@spacecount]%
\StrPosition[\@spacecount]{\@citation}{ }[\@lastspacepos]%
\StrGobbleLeft{\@citation}{\@lastspacepos}[\@startpage]%
\StrLeft{\@citation}{\numexpr \@lastspacepos-1}[\@reporter]%
%
%The reporter may have a leading space, if so, chop it
\StrChar{\@reporter}{1}[\@firstchar]%
\IfEq{\@firstchar}{ }{\StrGobbleLeft{\@reporter}{1}[\@reporter]}{}%
%
%\chopcitation{\withoutparen}{\withoutcitationiii}{\reporteriii}{\startpageiii}
%\chopcitation{\withoutcitationiii}{\withoutcitationii}{\reporterii}{\startpageii}
%\chopcitation{\withoutcitationii}{\withoutcitation}{\reporter}{\startpage}
%
%The parenthetical may have a leading space, if so, chop it
\StrChar{\@paren}{1}[\@firstchar]%
\IfEq{\@firstchar}{ }{\StrGobbleLeft{\@paren}{1}[\@paren]}{}%
%
%Finally, cut out the second party
\IfSubStr{\@withoutcitation}{ v. }{\StrBefore{\@withoutcitation}{ v. }[\@firstpartyname]}{\edef\@firstpartyname{\@withoutcitation}}%
\IfSubStr{\@withoutcitation}{ v. }{\StrBehind{\@withoutcitation}{ v. }[\@secondpartyname]}{}%
%
%By default, the shortname is set to the first party
\edef\@shortname{\@firstpartyname}%
%
%If first party is United States, State, People, or Commonwealth use second party as short name
\IfEq{\@firstpartyname}{United States}{\edef\@shortname{\@secondpartyname}}{}%
\IfEq{\@firstpartyname}{State}{\edef\shortname{\@secondpartyname}}{}%
\IfEq{\@firstpartyname}{People}{\edef\shortname{\@secondpartyname}}{}%
\IfEq{\@firstpartyname}{Commonwealth}{\edef\shortname{\@secondpartyname}}{}%
%
%If a short name is given explicitly, use that to override
\IfEq{#1}{}{}{\edef\@shortname{#1}}%
%
\newcase{\@shortname}{\@withoutcitation}{\@reporter}{\@startpage}{\@paren}%
}
%%
%%\cmd{newcase}{Short Name}{Full Name}{Reporter}{Starting Page}{Parenthetical}[Defines a new case citation.]
%% \newcase{Marbury}{Marbury v. Madison}{5 U.S. (1 Cranch)}{137}{(1803)}
%% \begin{Example}
%% %\newcase{Marbury}{Marbury v. Madison}{5 U.S. (1 Cranch)}{137}{(1803)}
%% \pincite{Marbury}{140}.
%% \end{Example}
%%
%% \noindent The _\newcase_ command is equivalent to the _\citecase_ command (which in fact calls _\newcase_ internally).
%% Generally, it is simpler to use the _\citecase_ command, but _\newcase_ is necessary for case citations that differ from the usual,
%% such as \textit{Marbury}, above, because of the parentheses around the ``(1 Cranch)''.
%%
%%% Actually invoke the commands for the documentation:
%%
\newcommand{\newcase}[6][empty]{
\EDef{#2@Type}{Case}
\EDef{#2@IndexType}{Case}
\EDef{#2@ShortName}{#2}
\ProtectedEDef{#2@FullName}{#3}
\EDef{#2@Reporter}{#4}
\EDef{#2@StartPage}{#5}
\EDef{#2@Parenthetical}{#6}
\newboolean{#2@FirstUse}
\setboolean{#2@FirstUse}{true}
\XDef{#2@LastNote}{0}
}
%%
%%\cmd{newbook}{Short Name}{Authors}{Title}{Parenthetical}[Define a new book citation.]
%% \begin{Example}
%% \newbook{Prosser and Keaton}{William Lloyd Prosser & W. Page Keaton}
%% {The Law of Torts}{(2nd ed., 1953)}
%% \newbook{Schelling}{Thomas Schelling}
%% {A Process of Residential Segregation: Neighborhood Tipping,
%% {\upshape\it reprinted in} Economic Foundations of Property Law {\upshape 307,}}
%% {(Bruce A. Ackerman ed., 1975)}
%% \pincite{Schelling}{308} \\
%% \pincite{Prosser and Keaton}{vol. 2, 15}. \\
%% \pincite{Prosser and Keaton}{vol. 2, 345}. \\
%% \pincite{Prosser and Keaton}{vol. 4, 876}. \\
%% \pincite{Schelling}{310}.
%% \end{Example}
%%
%% \noindent This command introduces a new book citation. Such citations are first written with a
%% long name that includes [volume] author, title, citation and parenthetical. Subsequent invocations will use the short name given by the first argument,
%% which is also used as the argument to _\cite_, followed by \textit{supra}. In law-review mode, this is further followed by ``note n,'' the first
%% footnote in which the article was cited. Note that any _\textit_ or _\emph_ and their braces are stripped out of the short name (see _\newarticle_ for an example).
%%
%% To cite a particular volume, use a pincite in the form _\pincite_\arg{Short Name}\{vol. 1, 123\}. That is, it must start with ``vol.''
%% followed by exactly one space, then the number followed by a comma and another space.
%%
%% This command is also used for a \textit{reprinted in} citation. Note the use of _\upshape_ and _\it_ (or equivalent) that is necessary
%% to ensure the correct formatting.
%%
\newcommand{\newbook}[4]{
\begingroup
\def\textit##1{##1}
\def\emph##1{##1}
\def\textsc##1{##1}
\xdef\@HandleName{#1}
\XDef{\@HandleName @Type}{Book}
\XDef{\@HandleName @IndexType}{Other}
\XDef{\@HandleName @Authors}{#2}
\ProtectedXDef{\@HandleName @Title}{#3}
\GDef{\@HandleName @Parenthetical}{#4}
%
\globaldefs=1
\newboolean{\@HandleName @FirstUse}
\setboolean{\@HandleName @FirstUse}{true}
\globaldefs=0
\endgroup%
%
\XDef{\@HandleName @LastNote}{0}%
\GDef{\@HandleName @ShortName}{#1}%
}
%%
%%\cmd{newarticle}{Short Name}{Authors}{Title}{Journal}{Start Page}{Parenthetical}[Define a new article citation.]
%% \begin{Example}
%% \newarticle{Note, \textit{The Ministerial Exception}}
%% {Note}{The Ministerial Exception To Title VII}
%% {121 Harv. L. Rev.}{1776}{(2009)}
%% \newarticle{Ward}{Barbara Ward}{Progress for a Small Planet}
%% {Harv. Bus. Rev.}{Sept.--Oct. 1979, at 89}{}
%% \cite[l]{Note, The Ministerial Exception}. \\
%% \pincite{Ward}{90}. \\
%% \pincite{Note, The Ministerial Exception}{1800}.
%% \end{Example}
%%
%% \noindent This command introduces a new law-review article-type citation. Such citations are first written with a
%% long name that includes author, title, citation and parenthetical. Subsequent invocations will use the short name given by the first argument,
%% which is also used as the argument to _\cite_, followed by \textit{supra}. In law-review mode, this is further followed by ``note n,'' the first
%% footnote in which the article was cited. Note that any _\textit_ or _\emph_ and their braces are stripped out of the short name.
%%
%% Note that in law review mode, the journal name is by default set in \textsc{Small Caps}, which is the Bluebook standard for
%% consecutivly-paginated journals. To produce standard type, use the
%% form of _{{\upshape Harv. L. Rev.}}_ when defining the citation.
%%
\newcommand{\newarticle}[6]{
\begingroup
\def\textit##1{##1}
\def\emph##1{##1}
\xdef\@HandleName{#1}
\XDef{\@HandleName @Type}{Article}
\XDef{\@HandleName @IndexType}{Other}
\XDef{\@HandleName @Authors}{#2}
\XDef{\@HandleName @Title}{#3}
\ProtectedXDef{\@HandleName @Reporter}{#4}
\XDef{\@HandleName @StartPage}{#5}
\XDef{\@HandleName @Parenthetical}{#6}
%
\globaldefs=1
\newboolean{\@HandleName @FirstUse}
\setboolean{\@HandleName @FirstUse}{true}
\globaldefs=0
\endgroup%
%
%\XDef{#2@LastNote}{0}%
\XDef{\@HandleName @LastNote}{0}%
\GDef{\@HandleName @ShortName}{#1}%
}
\newcommand{\newcollection}[2]{
\begingroup
\def\textit##1{##1}
\def\emph##1{##1}
\def\textsc##1{##1}
\xdef\@HandleName{#1}
\XDef{\@HandleName @Type}{Collection}
\XDef{\@HandleName @IndexType}{}%The collection itself is not listed in the index
\XDef{\@HandleName @Title}{#1}
\GDef{\@HandleName @Parenthetical}{#2}
%
\globaldefs=1
\provideboolean{\@HandleName @FirstUse}
\setboolean{\@HandleName @FirstUse}{true}
\globaldefs=0
\endgroup%
%
\XDef{\@HandleName @LastNote}{0}%
\GDef{\@HandleName @ShortName}{#1}%
}
%%
%%\cmd{newincollection}{Short Name}{Authors}{Article Title}{Collection Title}{Page}{Parenthetical}[Defines a new article/chapter-in-collection citation.]
%%
%% \begin{Example}
%% \newincollection{Allen, \textit{Oration}}{John Allen}
%% {Oration Upon The Beauties Of Liberty}
%% {Political Sermons of the American Founding Era}{vol. 1, 58}
%% {(Ellis Sandoz ed., 1991)}
%% \newincollection{Mather}{Moses Mather}{America's Appeal To The Impartial World}
%% {Political Sermons of the American Founding Era}{vol. 1, 103}
%% {(Ellis Sandoz ed., 1991)}
%%
%% \pincite{Allen, Oration}{62}. \\
%% \pincite{Mather}{103}. \\
%% \pincite{Allen, Oration}{78}. \\
%% \pincite{Mather}{119}. \\
%% \end{Example}
%%
%% Note that the parenthetical will be placed after the collection title, and therefore not printed if the collection itself is cited a second time. Note additionally
%% that if the parenthetical changes across definitions for multiple documents in the collection, whichever source is actually cited first defines the parenthetical that is used.
%%
\newcommand{\newincollection}[6]{
\tracingmacros=2
\begingroup
\def\textit##1{##1}
\def\emph##1{##1}
\def\textsc##1{##1}
\xdef\@HandleName{#1}
\XDef{\@HandleName @Type}{InCollection}
\XDef{\@HandleName @IndexType}{Other}
\XDef{\@HandleName @Authors}{#2}
\XDef{\@HandleName @Title}{#3}
\XDef{\@HandleName @CollectionTitle}{#4}
\GDef{\@HandleName @StartPage}{#5}
\GDef{\@HandleName @Parenthetical}{#6}
%\XDef{\@HandleName @FullName}{#1}
%
\globaldefs=1
\newboolean{\@HandleName @FirstUse}
\setboolean{\@HandleName @FirstUse}{true}
\globaldefs=0
\endgroup%
%
\XDef{\@HandleName @LastNote}{0}%
\GDef{\@HandleName @ShortName}{#1}%
%
\newcollection{#4}{#6}%
}
%%
%%\cmd{newinsingleauthorcollection}{Short Name}{Author}{Title}{Collection Title}{Page}{Parenthetical}[Defines a citation to a single-author collection.]
%%
%% \begin{Example}
%% \newinsingleauthorcollection{Holmes}{Oliver Wendell Holmes}
%% {Law in Science and Science in Law}{Collected Legal Papers}
%% {210}{(1920)}
%% \pincite{Holmes}{vol. 1, 120}. \\
%% \pincite[s]{Holmes}{vol. 1, 133}.
%% \end{Example}
%%
%% \noindent This command is similar to _\newincollection_, for collections whose documents are all from the same author. The Bluebook specifies that these should
%% be cited like a book, and therefore with the volume number before the author, and the author's name in small caps.
%%
\newcommand{\newinsingleauthorcollection}[6]{
\tracingmacros=2
\begingroup
\def\textit##1{##1}
\def\emph##1{##1}
\def\textsc##1{##1}
\xdef\@HandleName{#1}
\XDef{\@HandleName @Type}{InSingleAuthorCollection}
\XDef{\@HandleName @IndexType}{Other}
\XDef{\@HandleName @Authors}{#2}
\XDef{\@HandleName @Title}{#3}
\XDef{\@HandleName @CollectionTitle}{#4}
\GDef{\@HandleName @StartPage}{#5}
\GDef{\@HandleName @Parenthetical}{#6}
%\XDef{\@HandleName @FullName}{#1}
%
\globaldefs=1
\newboolean{\@HandleName @FirstUse}
\setboolean{\@HandleName @FirstUse}{true}
\globaldefs=0
\endgroup%
%
\XDef{\@HandleName @LastNote}{0}%
\GDef{\@HandleName @ShortName}{#1}%
%
\newcollection{#4}{#6}%
}
%%
%%\cmd{newstatute}{Short Name}{Parenthetical}[Define a new statute citation.]
%% \begin{Example}
%% \newstatute{42 U.S.C.}{(2006)}
%% \newstatute{Administrative Procedure Act}{(2006)}
%% \pincite{Administrative Procedure Act}{\S 1, 5 U.S.C. \S 551}. \\
%% \pincite{Administrative Procedure Act}{\S 2}. \\
%% \pincite{42 U.S.C.}{\S 1983}.
%% \end{Example}
%%
\newcommand{\newstatute}[2]{
\begingroup
\xdef\@HandleName{#1}
\XDef{\@HandleName @Type}{Statute}
\XDef{\@HandleName @IndexType}{Statute}
\XDef{\@HandleName @ShortName}{#1}
\XDef{\@HandleName @IndexName}{#1 !}
\XDef{\@HandleName @Parenthetical}{#2}
\globaldefs=1
\newboolean{\@HandleName @FirstUse}
\setboolean{\@HandleName @FirstUse}{true}
\globaldefs=0
\endgroup
%
\XDef{\@HandleName @LastNote}{0}%
}
%%
%%\cmd{newmisc}{Short Name}{Full Name}[Define a general source by explicitly providing long and short citations.]
%% \begin{Example}
%% \newmisc{Bill of Rights 1689}{Act Declaring the Rights and Liberties of the
%% Subject and Settling the Succession of the Crown (Bill of Rights),
%% 1 W. & M., sess. 2 c. 2\pin{, }{} (1689)}
%%
%% \pincite{Bill of Rights 1689}{\S 2}. \\
%% \pincite[s]{Bill of Rights 1689}{\S 3}.
%% \end{Example}
%%
%% \noindent The long cite may have the command _\Pin_\arg{Text Before}\arg{Text After}, which in the case of
%% a pincite, will insert the cite at the given location, surrounded by the text as indicated.
%
\newcommand{\newmisc}[2]{
\Def{#1@Type}{Misc}
\Def{#1@IndexType}{Other}
\EDef{#1@ShortName}{#1}
\Def{#1@FullName}{#2}
\newboolean{#1@FirstUse}
\setboolean{#1@FirstUse}{true}
}
%Helper routine to chop up a citation string into its constituent parts
%I think this was for multiple-reporter cites, but it is not yet implemented
\newcommand{\chopcitation}[4]{
%With the parenthetical gone, we look for the LAST comma, and assume the citation is there to the end
\StrCount{#1}{,}[\commacount]%
\StrPosition[\commacount]{#1}{,}[\lastcommapos]%
\StrGobbleLeft{#1}{\lastcommapos}[\citation]%
\StrLeft{#1}{\numexpr \lastcommapos-1}[#2]%
%
%Looking only at the citation, assume that from the LAST space to the end is the start page
\StrCount{\citation}{ }[\spacecount]%
\StrPosition[\spacecount]{\citation}{ }[\lastspacepos]%
\StrGobbleLeft{\citation}{\lastspacepos}[#4]%
\StrLeft{\citation}{\numexpr \lastspacepos-1}[\reporter]%
%
%The reporter may have a leading space, if so, chop it
\StrChar{\reporter}{1}[\firstchar]%
\IfEq{\firstchar}{ }{\StrGobbleLeft{\reporter}{1}[#3]}{}%
}
%%\section{Citing Sources}
%%
%%\noindent\texttt{\large\bf\textbackslash{}[pin]cite} --- Cite a legal source using Bluebook style
%%
%%\noindent Usage:
%%
%% \texttt{\textbackslash{}cite}[\textit{Formatting}]\{\textit{Short Name}\} \\
%% \hspace*{\parindent}\texttt{\textbackslash{}pincite}[\textit{Formatting}]\{\textit{Short Name}\}\{\textit{Pin Page}\}
%%
%% \begin{Example}
%% \cite[l]{Marbury}. \\
%% \pincite[i]{Marbury}{117}. \\
%% \pincite[s]{Marbury}{117}. \\
%% \pincite{Steel Seizure Case}{602}. \\
%% \pincite{Marbury}{122}. \\
%% \See \pincite[n]{Steel Seizure Case}{625}. \\
%% \Cf \pincite[s]{Steel Seizure Case}{625}.
%% \end{Example}
%%
%% \noindent The optional first argument forces a particular citation form, which is useful where the correct form cannot be determined automatically
%% (\textit{e.g.}, the rule that one may not use \Id. in the next citation after a string cite), or that one does not capitalize id.
%% when it appears in the middle of a sentence (although when using the signal macros _\See_, _\Seealso_, etc.) this will be
%% handled automatically. These options consist of a single letter, from the list as follows:
%%
%% \noindent
%% _l_ - Force long form citation, regardless if the source has appeared before. \\
%% _s_ - Force short form citation, even if this is the first cite to this source. \\
%% _n_ - Force reporter and page number-only citation (for cases only). \\
%% _I_ - If and only if ``\textit{id.}'' is used, force it to be capitalized. \\
%% _i_ - If and only if ``\textit{Id.}'' is used, force it to be non-capitalized. \\
%% _!_ - Record a cite at this location (and thus to the ToA / record Supra), but do not actually print anything. \\
%% _*_ - Print the citation here, but do not record it to the table of authorities.
%%
%The command \@absorbperiod will remove the . from the token stream.
%If this invocation is followed by a period, we remove it from the stream, but tell \bbsource to add it later (with flag "p")
%Otherwise, \bbsource should not add a period, and use xspace to keep any space afterwards
\def\@startcitation{}
\def\@absorbperiod.{}
%\def\absorbcomma,{}
\renewcommand{\cite}[2][]{\@startcitation\@ifnextchar.{\@bbsource{#2}{}{#1.}\@absorbperiod}{\@bbsource{#2}{}{#1}\xspace}}
\newcommand{\pincite}[3][]{\@startcitation\@ifnextchar.{\@bbsource{#2}{#3}{#1.}\@absorbperiod}{\@bbsource{#2}{#3}{#1}\xspace}}
%%
%%\cmd{Id, \textbackslash{}id}[Pin Page][Cite the previous source]
%% \begin{Example}
%% \pincite{Marbury}{140}. \\
%% \See \id[140]. \\
%% \Id[141].
%% \end{Example}
%%
%% \noindent The effect is to repeat the previous cite, including the previous pin page (unless the optional argument is used
%% to cite a different page). _\Id_ should generally be followed by a period or other punctuation, as the trailing period
%% will not be added automatically.
%%
\newcommand{\Id}[1][]{\@ifnextchar.{\@bbId{#1}{I.}\@absorbperiod}{\@bbId{#1}{I}}}
\newcommand{\id}[1][]{\@ifnextchar.{\@bbId{#1}{i.}\@absorbperiod}{\@bbId{#1}{i}}}
\def\@bbId#1#2{\@bbsource{\@bbLastSource}{\ifempty{#1}{\@bbLastPinPage}{#1}}{#2}}
%%\cmd{citetext}{Arbitrary text}[Automatically place law review citations in footnotes.]
%%
%% \noindent The purpose of this command is primarily to work with automatic footnotes in law review mode.
%% Whatever text is passed as its argument will automatically be put in a footnote, if it is not already in
%% a footnote (in which case _\citetext_ does nothing). If you are not using law review mode, this command
%% is not necessary. You would ordinarily put a space between the closing punctuation and the _\citetext_,
%% the macro will automatically remove that space, if appropriate.
%%
\def\citetext#1{\@autofootnote{#1}}
%\newcommand{\@citetext}[2] {%
%\ifthenelse{\not \boolean{@bbLawReviewMode} \or \boolean{@bbInFootnote}}%
%{%
%\ifthenelse{\equal{\detokenize{#1}}{\@bbLastSource}}
%{\emph{Id}}
%{\xdef\@bbLastSource{\detokenize{#1}}#1}#2%
%}
%{%
%\SafeUnskip\footnote{%
%\ifthenelse{\equal{\detokenize{#1}}{\@bbLastSource}}
%{\emph{Id.}abcd}
%{\xdef\@bbLastSource{\detokenize{#1}}#1}%
%#2}%
%}%
%}
%%\cmd{citeclause}{Arbitrary Text}[Cite arbitrary text in an intra-sentence citation clause]
%%
%%\noindent Example:
%%
%% \begin{quote}\texttt{It is the role of the judicial department to say what the law is \\ \textbackslash{}citeclause\{\textbackslash{}see \textbackslash{}cite\{Marbury\}\} and the present case is no exception.}\end{quote}
%%
%%\noindent Result (Normal Mode):
%%
%% \begin{quote}It is the role of the judicial department to say what the law is, \see \cite[s]{Marbury}, and the present case is no exception.\end{quote}
%%
%%\noindent Result (Law Review mode):
%%
%% \begin{quote}It is the role of the judicial department to say what the law is,\footnote{\See \cite[s]{Marbury}} and the present case is no exception.\end{quote}
%%
%% \noindent This function is probably not necessary for production use, but allows the samples to have one source code for both
%% normal and lawreview mode. When using a citation clause in the middle of a sentence, use _\citeclause_ at the location,
%% WITHOUT any surrounding punctutation. In standard mode, _\citeclause_ will add surrounding commas, unless the following
%% character is a period, in which case it add a preceding comma and leaves the period to follow, as-is.
%%
%% In lawreview mode, _\citeclause_ will insert a preceding comma, and insert a footnote with the cited text immediately
%% after the comma, with no punctuation following -- UNLESS the following character is a period. In the latter case,
%% _\citeclause_ will add only a preceding period, with the footnote immediately following. Also, if the first token of the
%% citation clause is one of %% the pre-defined lowercase citation signals (_\see, \cf_ etc.), it will be automatically
%% converted to the uppercase equivalent.
%%
%% Note that in either case, _\citeclause_ is not able to properly handle a citation for a quote, in which case the punctuation
%% should go inside the closing ''. In that case, you will either need to make the change manually when changing between
%% normal and lawreview modes, or use the _\PeriodOrComma_ macro. The latter is a Period in lawreview, and a Comma normally.
%%
%% If you're thinking this is more hassle than its worth, you're right. Feel free to just write out the correct form manually.
\def\@absorb#1{}
\def\absorb{\aftergroup\@absorb}
\def\@CapLeadingSignal{\futurelet\@NextToken\@@CapLeadingSignal}
\def\@@CapLeadingSignal{\begingroup%
\ifx\@NextToken\see\See\globalsetboolean{@bbCapNextSource}{false}\absorb\else%
\ifx\@NextToken\seealso\Seealso\globalsetboolean{@bbCapNextSource}{false}\absorb\else%
\ifx\@NextToken\seeeg\Seeeg\globalsetboolean{@bbCapNextSource}{false}\absorb\else%
\ifx\@NextToken\cf\Cf\globalsetboolean{@bbCapNextSource}{false}\absorb\else%
\ifx\@NextToken\butsee\Butsee\globalsetboolean{@bbCapNextSource}{false}\absorb\else%
\ifx\@NextToken\butcf\Butcf\globalsetboolean{@bbCapNextSource}{false}\absorb\else%
\ifx\@NextToken\accord\Accord\globalsetboolean{@bbCapNextSource}{false}\absorb\else%
\ifx\@NextToken\contra\Contra\globalsetboolean{@bbCapNextSource}{false}\absorb\else%
\ifx\@NextToken\id\Id\absorb\else%
\relax\fi\fi\fi\fi\fi\fi\fi\fi\fi\endgroup}
\newcommand{\citeclause}[1]{%
\ifthenelse{\boolean{@bbLawReviewMode} \and \not \boolean{@bbInFootnote}}
{%
%In the case that we are in the body text in law review mode,
%add a comma, then the footnote UNLESS the next char is a period
\@ifnextchar.{%
\unskip{.}\footnote{\@CapLeadingSignal#1.}\@absorbperiod}
{%
\unskip,\footnote{\@CapLeadingSignal#1.} }%
}{%
%In the case that we will be inserting a citation in the flow of the text,
%surround the citation with commas, UNLESS a period follows, in which case only add a leading comma
\@ifnextchar.{\unskip, #1}{\unskip, #1,\xspace}%
}%
}
%%
%%%\cmd{@autofootnote}{Put argument in a footnote, if in lawreview mode}
%
\newcommand{\@autofootnote}[1] {%
\ifthenelse{\not \boolean{@bbLawReviewMode} \or \boolean{@bbInFootnote}}%
{%
#1%
}
{%
\SafeUnskip\footnote{#1}%
}%
}
%%
%%~\par
%%
%%\noindent
%%\begingroup\raggedright\hyphenpenalty=10000\hangindent=1.5em
%%\texttt{\bf \textbackslash{}Reporter, \textbackslash{}ShortName, \textbackslash{}FullName, \textbackslash{}StartPage, \textbackslash{}Parenthetical, \textbackslash{}Authors, \textbackslash{}BookTitle, \textbackslash{}SrcType, \textbackslash{}SupraNote, \textbackslash{}LastNote} \par\noindent
%%\endgroup
%% Usage: \\
%% _\Reporter_\arg{Short Name}, _\StartPage_\arg{Short Name}, \emph{etc.}
%%
%%\begin{Example}
%% \FullName{Steel Seizure Case} \\
%% \Reporter{Marbury} \\
%% \StartPage{Marbury}
%%\end{Example}
%%
%% \noindent These functions are predominantly helper functions used elsewhere in the code; they print components of the source. If the field
%% that you have selected is inapplicable to the source, latex will give an error. Most should be clear by their name; _\Prefix_ is the
%% leading number of a statute source, if applicable (such as the ``42'' in ``42 U.S.C. \S 1983''). _\SrcType_ is one of ``Case,'' ``Book,''
%% ``Statute,'' or ``Other.'' _\SupraNote_ is the first footnote in which a source appears. _\LastNote_ is the most recent note
%% in which a source appears.
%%
\newcommand{\Reporter}[1]{\Call{#1@Reporter}}
\newcommand{\ShortName}[1]{\Call{#1@ShortName}}
\newcommand{\FullName}[1]{\Call{#1@FullName}}
\newcommand{\StartPage}[1]{\Call{#1@StartPage}}
\newcommand{\Parenthetical}[1]{\Call{#1@Parenthetical}}
\newcommand{\Authors}[1]{\Call{#1@Authors}}
\newcommand{\Title}[1]{\Call{#1@Title}}
\newcommand{\CollectionTitle}[1]{\Call{#1@CollectionTitle}}
\newcommand{\Sec}[1]{\Call{#1@Section}}
\newcommand{\Vol}[1]{\Call{#1@Volume}}
\newcommand{\Prefix}[1]{\Call{#1@Prefix}}
\newcommand{\SrcType}[1]{\Call{#1@Type}}
\newcommand{\SupraNote}[1]{\Call{#1@SupraNote}}
\newcommand{\LastNote}[1]{\Call{#1@LastNote}}
%%
%% \cmd{SetIndexType}{Short Name}{New Index Type}[Change a source's destination index / table of authorities]
%%
%% \noindent This command set the destination index for the source provided as their argument. The default index files are ``Case''
%% ``Statute'' and ``Other,'' for cases, statutes, and everything else, respectively. _\SetIndexType_ can be used to alter the index file.
%% Note in particular that if _\SetIndexType_ is set to an empty string, indexing will be disabled for the given source.
%% The current index for a source can be queried with _\IndexType_.
%%
\newcommand{\IndexType}[1]{\Call{#1@IndexType}}
\newcommand{\SetIndexType}[2]{\EDef{#1@IndexType}{#2}}
%%
%% \cmd{SetIndexName}{Short Name}{Name To Appear In Index}[Change the appearance of a source in the index / table of authorities]
%%
%% \noindent This can be used to provide additional detail in the Table of Authorities that would not be appropriate in the flow of the text.
%% For example, consider the Federal Rules of Civil Procedure:
%%
%% _\newstatute{Fed. R. Civ. P.}{}_ \\
%% \hspace*{\parindent}_\SetIndexName{Fed. R. Civ. P.}{Federal Rules of Civil Procedure !Rule }_
%%
%% \noindent The second line ensures that ``Federal Rules of Civil Procedure'' will be written long form in the Table, and that each rule will
%% be a subentry under this heading, to be preceded by ``Rule.'' Currently, this has effect only for statutes.
%%
\newcommand{\IndexName}[1]{\Call{#1@IndexName}}
\newcommand{\SetIndexName}[2]{\EDef{#1@IndexName}{#2}}
%\newcommand{\@bbLink}[1]{\href{http://web2.westlaw.com/find/default.wl?rs=WLW9.11&cite=77 US 1&vr=2.0&mt=LawSchoolPractitioner}{#1}}
%\href{http://web2.westlaw.com/find/default.wl?rs=WLW9.11&cite=77\%20US\%201&vr=2.0&mt=LawSchoolPractitioner}{text}
%http://web2.westlaw.com/find/default.wl?ifm=NotSet&rp=%2ffind%2fdefault.wl&sv=Split&utid=1&rs=WLW9.10&cite=421+US+1&fn=_top&mt=LawSchoolPractitioner&vr=2.0&pbc=9B14F39A
\newcommand{\@bbLink}[1]{#1}
\newcommand{\@bbCaseIndexCite}[2]{{\CF\@bbLink{\FullName{#1}}},\idxbreak\ \Reporter{#1}~\StartPage{#1} \Parenthetical{#1}}
%\newcommand{\@bbBookIndexCite}[2]{\Authors{#1},\idxbreak\ \FillIn{}{\@vol}{ }{\em\Title{#1}} \Parenthetical{#1}}
\newcommand{\@bbBookIndexCite}[2]{\Authors{#1},\idxbreak\ {\em\Title{#1}} \Parenthetical{#1}}
%\newcommand{\@bbStatuteIndexCite}[2]{\ShortName{#1} !#2}
\newcommand{\@bbStatuteIndexCite}[2]{\IndexName{#1}#2}
\newcommand{\@bbArticleIndexCite}[2]{\Authors{#1}, {\ATF\Title{#1}},\idxbreak\ {\JTF\Reporter{#1}}~\StartPage{#1} \Parenthetical{#1}}
\newcommand{\@bbInCollectionIndexCite}[2]{\Authors{#1}, \Title{#1}}
\newcommand{\@bbInSingleAuthorCollectionIndexCite}[2]{\Authors{#1}, \Title{#1}}
%\newcommand{\@bbMiscIndexCite}[2]{{\def\pin##1##2{}\FullName{#1}}}
\def\@bbMiscIndexCite#1#2{\FullName{#1}}
%Long-form citation, with and without a pin cite
\newcommand{\@bbCaseLongCite}[2]{{\CF\FullName{#1}},\ \Reporter{#1}~\StartPage{#1}\FillIn{, }{#2}{} \Parenthetical{#1}}
\newcommand{\@bbStatuteLongCite}[2]{\ShortName{#1} #2\FillIn{ }{\Parenthetical{#1}}{}}
\newcommand{\@bbBookLongCite}[2]{\FillIn{}{\@vol}{ }{\BAF\Authors{#1}}, {\BTF\Title{#1}}\FillIn{ }{#2}{}\ \Parenthetical{#1}}
\newcommand{\@bbArticleLongCite}[2]{\Authors{#1}, {\ATF\Title{#1}}, {\JTF\Reporter{#1}} \StartPage{#1}\FillIn{, }{#2}{} \Parenthetical{#1}\unskip}
%\newcommand{\@bbInCollectionLongCite}[2]{\Authors{#1}, {\ATF\Title{#1}} \emph{in} \@vol{\BTF\CollectionTitle{#1}} \StartPage{#1}\FillIn{, }{#2}{} \Parenthetical{#1}}
\newcommand{\@bbInCollectionLongCite}[2]{\Authors{#1}, {\ATF\Title{#1}}, \emph{in} \@bbsource{\CollectionTitle{#1}}{\StartPage{#1}, #2}{}}
\newcommand{\@bbInSingleAuthorCollectionLongCite}[2]{\FillIn{}{\@vol}{ }{\BAF\Authors{#1}}, {\ATF\Title{#1}}, \emph{in} \@bbsource{\CollectionTitle{#1}}{\StartPage{#1}, #2}{}}
\newcommand{\@bbCollectionLongCite}[2]{\FillIn{}{\@vol}{ }{\BTF\Title{#1}}\FillIn{, }{#2}{} \Parenthetical{#1}}
\def\@bbMiscLongCite#1#2{{\def\pin##1##2{\FillIn{##1}{#2}{##2}}\FullName{#1}}}
%Short-form citation, with and without a pin cite
\newcommand{\@bbCaseShortCite}[2]{{\em\ShortName{#1}}, \ifdefined\@bbCaseSupra{{\em supra}, }\fi\Reporter{#1}\penalty100\ifempty{#2}{\ \StartPage{#1}}{\ at~#2}}
\newcommand{\@bbBookShortCite}[2]{\FillIn{}{\@vol}{ }{\BTF\ShortName{#1}}, {\em supra}\IfFootnote{ note \SupraNote{#1}}\ifpin{, at #2}}
\newcommand{\@bbStatuteShortCite}[2]{\ShortName{#1} #2}
\newcommand{\@bbArticleShortCite}[2]{\ShortName{#1}, {\em supra}\IfFootnote{ note \SupraNote{#1}}\ifpin{, at #2}}
\newcommand{\@bbInCollectionShortCite}[2]{\ShortName{#1}, {\em supra}\IfFootnote{ note \SupraNote{#1}}\ifpin{, at #2}}
\newcommand{\@bbInSingleAuthorCollectionShortCite}[2]{\FillIn{}{\@vol}{ }{\BTF\ShortName{#1}}, {\em supra}\IfFootnote{ note \SupraNote{#1}}\ifpin{, at #2}}
\newcommand{\@bbCollectionShortCite}[2]{\FillIn{}{\@vol}{ }{\BTF\Title{#1}}, \emph{supra}\IfFootnote{ note \SupraNote{#1}},\ifpin{ at #2}}
\newcommand{\@bbMiscShortCite}[2]{\ShortName{#1}\ifpin{ #2}}
%Reporter-number-only citation, with and without a pin cite
\newcommand{\@bbReporterOnlyCite}[1]{\Reporter{#1} \StartPage{#1}}
\newcommand{\@bbReporterOnlyPinCite}[2]{\Reporter{#1}\penalty100\ at~#2}
%Dispatch a call to the type-specific citation form
%\newcommand{\@bbIndexCite}[2]{{\protect\frenchspacing\Call{@bb\SrcType{#1}IndexCite}{#1}{#2}}}
\newcommand{\@bbIndexCite}[2]{\Call{@bb\SrcType{#1}IndexCite}{#1}{#2}}
\newcommand{\@bbLongCite}[2]{{\protect\frenchspacing\Call{@bb\SrcType{#1}LongCite}{#1}{#2}}}
\newcommand{\@bbShortCite}[2]{{\protect\frenchspacing\Call{@bb\SrcType{#1}ShortCite}{#1}{#2}}}
%Inner command that performs the citations
% #1 is cite handle, #2 is pin or blank, #3 can include any of 'lsniIp'
\newcommand{\@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}%
%\xdef\@bbLastPinPage{\detokenize{#2}}%
\protected@xdef\@bbLastPinPage{#2}%
\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%
}
%%
%%~\par
%%
%%\noindent
%%\begingroup\raggedright\hyphenpenalty=10000\hangindent=1.5em
%%\texttt{\bf \textbackslash{}See, \textbackslash{}Seealso, \textbackslash{}Seeeg, \textbackslash{}Seegenerally, \textbackslash{}Cf, \textbackslash{}Butsee, \textbackslash{}Butseeeg, \textbackslash{}Butcf, \textbackslash{}Compare, \textbackslash{}Contra, \textbackslash{}Accord} --- Introductory Signals
%%\endgroup
%%
%% \begin{Example}
%% \See \pincite{Marbury}{117}. \\
%% \Seealso \pincite{Marbury}{120}. \\
%% \Cf \pincite{Lochner}{602}.
%% \end{Example}
%%
%% \noindent These commands insert the italicized signal word in front of the citation,
%% and cause the cite command to automatically handle correct capitalization of an ``\textit{id.},'' should one be used.
%% Each command has both a capitalized (_\See_, _\Cf_, etc.) and a non-capitalized (_\see_, _\cf_, etc.) version.
%% Also, in law review mode, they will correctly appear in the footnote with the citation, obviating the need to wrap
%% every source in a _\footnote_ command.
%\newcommand{\See}{\def\@bbSignal{\emph{See} }\setboolean{@bbCapNextSource}{false}}
%\newcommand{\Seealso}{\def\@bbSignal{\emph{See also} }\setboolean{@bbCapNextSource}{false}}
%\newcommand{\Seeeg}{\def\@bbSignal{\emph{See}, \emph{e.g.}, }\setboolean{@bbCapNextSource}{false}}
%\newcommand{\Seegenerally}{\def\@bbSignal{\emph{See}, \emph{generally}, }\setboolean{@bbCapNextSource}{false}}
%\newcommand{\Cf}{\def\@bbSignal{\emph{Cf.\@} }\setboolean{@bbCapNextSource}{false}}
%\newcommand{\Butsee}{\def\@bbSignal{\emph{But see} }\setboolean{@bbCapNextSource}{false}}
%\newcommand{\Contra}{\def\@bbSignal{\emph{Contra} }\setboolean{@bbCapNextSource}{false}}
%
%\renewcommand{\see}{\def\@bbSignal{\emph{see} }\setboolean{@bbCapNextSource}{false}}
%\newcommand{\seealso}{\def\@bbSignal{\emph{see also} }\setboolean{@bbCapNextSource}{false}}
%\newcommand{\seeeg}{\def\@bbSignal{\emph{see}, \emph{e.g.}, }\setboolean{@bbCapNextSource}{false}}
%\newcommand{\seegenerally}{\def\@bbSignal{\emph{see}, \emph{generally}, }\setboolean{@bbCapNextSource}{false}}
%\newcommand{\cf}{\def\@bbSignal{\emph{cf.\@} }\setboolean{@bbCapNextSource}{false}}
%\newcommand{\butsee}{\def\@bbSignal{\emph{but see} }\setboolean{@bbCapNextSource}{false}}
%\newcommand{\contra}{\def\@bbSignal{\emph{contra} }\setboolean{@bbCapNextSource}{false}}
%In normal mode, introductory-signal macros can be used whenever an italicized \see, \cf, etc. is desired. That is, there is no need for them
%to be placed in front of a citation. In law-review mode, however, because of the behavior where they are pulled into the footnotes, they can only
%be used before a citation, or in the text of a footnote (preferably in a _\citetext_ or _\citeclause_, both of which will prevent the signal
%from affecting subsequent citations). Otherwise, they will be stored and inserted in front of the \emph{following} citation,
%however much later that may be, which is almost certainly not what was intended.
%\def\@DefSignal#1{\def\@bbtemp{#1}\futurelet\@NextToken\@@DefSignal}
%\def\@@DefSignal{\ifx\@NextToken\cite \@SetNextSignal{\@bbtemp}\else%
%\ifx\@NextToken\pincite \@SetNextSignal{\@bbtemp}\else%
%\ifx\@NextToken\Id \@SetNextSignal{\@bbtemp}\else%
%\ifx\@NextToken\id \@SetNextSignal{\@bbtemp}\else%
%\@bbtemp\xspace\fi\fi\fi\fi}
%\def\@SetNextSignal#1{\def\@bbSignal{#1 }\globalsetboolean{@bbCapNextSource}{false}}
\def\@DefSignal#1{%
\ifthenelse{\not \boolean{@bbLawReviewMode} \or \boolean{@bbInFootnote}}%
{\globalsetboolean{@bbCapNextSource}{false}#1\xspace}%
{\globalsetboolean{@bbCapNextSource}{false}\def\@bbSignal{#1 }}%
}
\newcommand{\See}{\@DefSignal{\emph{See}}}
\newcommand{\Seealso}{\@DefSignal{\emph{See also}}}
\newcommand{\Seeeg}{\@DefSignal{\emph{See, e.g.},}}
\newcommand{\Seegenerally}{\@DefSignal{\emph{See generally}}}
\newcommand{\Cf}{\@DefSignal{\emph{Cf.\@}}}
\newcommand{\Butsee}{\@DefSignal{\emph{But see}}}
\newcommand{\Butseeeg}{\@DefSignal{\emph{But see, e.g.},}}
\newcommand{\Butcf}{\@DefSignal{\emph{But cf.\@}}}
\newcommand{\Compare}{\@DefSignal{\emph{Compare}}}
\newcommand{\Accord}{\@DefSignal{\emph{Accord}}}
\newcommand{\Contra}{\@DefSignal{\emph{Contra}}}
\renewcommand{\see}{\@DefSignal{\emph{see}}}
\newcommand{\seealso}{\@DefSignal{\emph{see also}}}
\newcommand{\seeeg}{\@DefSignal{\emph{see, e.g.},}}
\newcommand{\cf}{\@DefSignal{\emph{cf.\@}}}
\newcommand{\butsee}{\@DefSignal{\emph{but see}}}
\newcommand{\butseeeg}{\@DefSignal{\emph{but see, e.g.},}}
\newcommand{\butcf}{\@DefSignal{\emph{but cf.\@}}}
\newcommand{\compare}{\@defSignal{\emph{Compare}}}
\newcommand{\accord}{\@defSignal{\emph{Accord}}}
\newcommand{\contra}{\@defSignal{\emph{Contra}}}
\newcommand{\etseq}{\emph{et seq.}}
%%
%%\section{Miscellaneous}
%%
%%
%% \noindent
%%_\S, \P_ --- Section and Paragraph symbols ``\S\unskip, \P\unskip,'' preserving following space.
%%
\let\RealSectionSymbol=\S
\let\RealParaSymbol=\P
\protected\def\S{\RealSectionSymbol\xspace}
\protected\def\P{\RealParaSymbol\xspace}
\xspaceaddexceptions{\S \P}
%%
%% \noindent
%%_\ldots, \ldotss_ --- Non-breaking 3-dot and 4-dot Ellipses ``\ldots , \ldotss''
%%
%% \noindent
%%_\ellipsedotspacing_ --- Gap between dots in _\ldots_ (default \ellipsedotspacing)
%%
\newcommand{\ellipsedotspacing}{2.5pt}
\def\ldots{\hbox{.\hspace{\ellipsedotspacing}.\hspace{\ellipsedotspacing}.}\xspace}
\def\ldotss{\hbox{.\hspace{\ellipsedotspacing}.\hspace{\ellipsedotspacing}.\hspace{\ellipsedotspacing}.}\xspace}