diff options
Diffstat (limited to 'Master/texmf-dist/tex/latex/bibleref/bibleref.sty')
-rw-r--r-- | Master/texmf-dist/tex/latex/bibleref/bibleref.sty | 74 |
1 files changed, 57 insertions, 17 deletions
diff --git a/Master/texmf-dist/tex/latex/bibleref/bibleref.sty b/Master/texmf-dist/tex/latex/bibleref/bibleref.sty index cfccc0d5b7e..c9c3d7ee263 100644 --- a/Master/texmf-dist/tex/latex/bibleref/bibleref.sty +++ b/Master/texmf-dist/tex/latex/bibleref/bibleref.sty @@ -5,7 +5,7 @@ %% The original source files were: %% %% bibleref.dtx (with options: `bibleref.sty,package') -%% Copyright (C) 2005 Nicola Talbot, all rights reserved. +%% Copyright (C) 2006 Nicola Talbot, all rights reserved. %% If you modify this file, you must change its name first. %% You are NOT ALLOWED to distribute this file alone. You are NOT %% ALLOWED to take money for the distribution or use of either this @@ -27,7 +27,7 @@ %% Grave accent \` Left brace \{ Vertical bar \| %% Right brace \} Tilde \~} \NeedsTeXFormat{LaTeX2e} -\ProvidesPackage{bibleref}[2005/09/28 1.02 (NLCT)] +\ProvidesPackage{bibleref}[2006/07/30 1.06 (NLCT)] \RequirePackage{ifthen} \RequirePackage{fmtcount} \newcommand*{\BRbooknumberstyle}[1]{#1 } @@ -108,7 +108,7 @@ \def\br@IThessalonians{\BRepistlenumberstyle{1}\BRepistletothe Thessalonians}% \def\br@IIThessalonians{\BRepistlenumberstyle{2}\BRepistletothe Thessalonians}% \def\br@ITimothy{\BRepistlenumberstyle{1}\BRepistleto Timothy}% -\def\br@IITimothy{\BRepistlenumberstyle{2}\BRepistletoTimothy}% +\def\br@IITimothy{\BRepistlenumberstyle{2}\BRepistleto Timothy}% \def\br@Titus{\BRepistleto Titus}% \def\br@Philemon{\BRepistleto Philemon}% \def\br@Hebrews{\BRepistletothe Hebrews}% @@ -122,7 +122,7 @@ \def\br@Revelation{\BRbookof Revelation}} \brfullname \newcommand{\brabbrvname}{% -\def\br@Gensis{Gn\BRperiod}% +\def\br@Genesis{Gn\BRperiod}% \def\br@Exodus{Ex\BRperiod}% \def\br@Leviticus{Lv\BRperiod}% \def\br@Numbers{Nb\BRperiod}% @@ -196,7 +196,7 @@ \def\br@Jude{Jude}% \def\br@Revelation{Rv\BRperiod}} \newcommand{\braltabbrvname}{% -\def\br@Gensis{Gen\BRperiod}% +\def\br@Genesis{Gen\BRperiod}% \def\br@Exodus{Exod\BRperiod}% \def\br@Leviticus{Lev\BRperiod}% \def\br@Numbers{Num\BRperiod}% @@ -589,37 +589,77 @@ Unknown biblerefstyle '#1'}{}}{\csname brs@#1\endcsname}} \def\@@br@vrsty#1-#2\end{% \@do@verses#1,\relax\end -\ifx#2\@nil +\ifx\@nil#2\relax \else -\BRvrsep +\@bv@do{\BRvrsep}% \@@br@vrsty#2\end% \fi} \def\@do@verses#1,#2\end{% -\ifthenelse{\equal{#1}{}}{}{\BRversestyle{#1}}% -\ifx\relax#2% +\ifthenelse{\equal{#1}{}}{}{\@bv@do{\BRversestyle{#1}}}% +\ifx\relax#2\@empty \else -\BRvsep +\@bv@do{\BRvsep}% \@do@verses#2\end \fi } \newcommand{\bibleverse}[1]{% \@ifundefined{br@#1}{\PackageError{bibleref}{Unknown book '#1'}{% -}}{\BRbooktitlestyle{\csname br@#1\endcsname}}% -\@ifnextchar({\BRbkchsep \@bibleverse}\relax +}}{\@bv@idxsort{\csname br@#1\endcsname}% +\def\@bv@chidxsort{}% +\@bv@do{\BRbooktitlestyle{\csname br@#1\endcsname}}}% +\@ifnextchar({\BRbkchsep\@bv@addtoidx{!}\@bibleverse}{\@end@@bibleverse}% } \def\@bibleverse(#1:{% \ifthenelse{\equal{#1}{}}{}{% -\BRchapterstyle{#1}}% +\ifthenelse{\equal{\@bv@chidxsort}{}}{% +\def\@bvchidxsort{#1}\@bv@addtoidx{#1@}}{}% +\@bv@do{\BRchapterstyle{#1}}}% \@@bibleverse} \def\@bibleverser-(#1:{% \ifthenelse{\equal{#1}{}}{}{% -\BRchapterstyle{#1}}% +\@bv@do{\BRchapterstyle{#1}}}% \@@bibleverse} \def\@@bibleverse#1){% -\ifthenelse{\equal{#1}{}}{}{\BRchvsep\@br@vrsty{#1}}% -\@ifnextchar({\BRchsep\@bibleverse}% -{\@ifnextchar-{\BRvrsep\@bibleverser}\relax}} +\ifthenelse{\equal{#1}{}}{}{\@bv@do{\BRchvsep}\@br@vrsty{#1}}% +\@ifnextchar({\@bv@do{\BRchsep}\@bibleverse}% +{\@ifnextchar-{\@bv@do{\BRvrsep}\@bibleverser}{\@end@@bibleverse}}} +\newcommand{\@end@@bibleverse}{% +\if@bv@idx +\index{\@@bv@idxsort\relax @\@bv@idxentry|\@bv@idxpgformat}% +\@bv@idxfalse +\fi +} +\newcommand{\@bv@do}[1]{#1\@bv@addtoidx{#1}} +\toksdef\@bv@tmpa=0 +\toksdef\@bv@tmpb=2 +\newcommand{\@bv@addtoidx}[1]{% +\if@bv@idx +\@bv@tmpa={#1}% +\@bv@tmpb=\expandafter{\@bv@idxentry}% +\edef\@bv@idxentry{\the\@bv@tmpb\the\@bv@tmpa}% +\fi} +\newcommand{\@bv@addtoidxsort}[1]{% +\if@bv@idx +\@bv@tmpa={#1}% +\@bv@tmpb=\expandafter{\@@bv@idxsort}% +\edef\@@bv@idxsort{\the\@bv@tmpb\the\@bv@tmpa}% +\fi} +\newif\if@bv@idx +\@bv@idxfalse +\newcommand{\@bv@idxsort}[1]{% +\if@bv@idx +{\def\BRbooknumberstyle##1##2\relax{##2##1}% +\def\BRepistlenumberstyle##1##2\relax{##2##1}% +\def\BRgospel{}\def\BRbookof{}\def\BRepistleto{}% +\def\BRepistletothe{}\def\BRepistleof{}% +\xdef\@@bv@idxsort{#1\relax}% +}% +\fi} +\newcommand{\ibibleverse}[1][\bvidxpgformat]{% +\def\@bv@idxpgformat{#1}% +\@bv@idxtrue\def\@bv@idxentry{}\bibleverse} +\newcommand{\bvidxpgformat}{textrm} \endinput %% %% End of file `bibleref.sty'. |