diff options
author | Karl Berry <karl@freefriends.org> | 2016-09-12 22:05:59 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2016-09-12 22:05:59 +0000 |
commit | bf0276244b309394ef514101adfee31ba31d09b1 (patch) | |
tree | 9d3aedf29f434d01742abf0cd50b6c34b0a663f5 /Master/texmf-dist/tex/latex/bibleref | |
parent | d3e311a66f04c196f3d327b98ffbd6de7fd251ca (diff) |
bibleref (11sep16)
git-svn-id: svn://tug.org/texlive/trunk@42049 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/bibleref')
-rw-r--r-- | Master/texmf-dist/tex/latex/bibleref/bibleref-xidx.sty | 283 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/bibleref/bibleref.sty | 27 |
2 files changed, 306 insertions, 4 deletions
diff --git a/Master/texmf-dist/tex/latex/bibleref/bibleref-xidx.sty b/Master/texmf-dist/tex/latex/bibleref/bibleref-xidx.sty new file mode 100644 index 00000000000..01755c677b8 --- /dev/null +++ b/Master/texmf-dist/tex/latex/bibleref/bibleref-xidx.sty @@ -0,0 +1,283 @@ +%% +%% This is file `bibleref-xidx.sty', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% bibleref.dtx (with options: `bibleref-xidx.sty,package') +%% +%% bibleref.dtx +%% Copyright 2011 Nicola Talbot +%% +%% This work may be distributed and/or modified under the +%% conditions of the LaTeX Project Public License, either version 1.3 +%% of this license of (at your option) any later version. +%% The latest version of this license is in +%% http://www.latex-project.org/lppl.txt +%% and version 1.3 or later is part of all distributions of LaTeX +%% version 2005/12/01 or later. +%% +%% This work has the LPPL maintenance status `maintained'. +%% +%% The Current Maintainer of this work is Nicola Talbot. +%% +%% This work consists of the files bibleref.dtx and bibleref.ins and the derived files bibleref-xidx.sty, bibleref.sty, sample-categories.tex, sample-indextools.tex, sample-xidx.tex, sample.tex, sample.ist. +%% +%% \CharacterTable +%% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z +%% Lower-case \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z +%% Digits \0\1\2\3\4\5\6\7\8\9 +%% Exclamation \! Double quote \" Hash (number) \# +%% Dollar \$ Percent \% Ampersand \& +%% Acute accent \' Left paren \( Right paren \) +%% Asterisk \* Plus \+ Comma \, +%% Minus \- Point \. Solidus \/ +%% Colon \: Semicolon \; Less than \< +%% Equals \= Greater than \> Question mark \? +%% Commercial at \@ Left bracket \[ Backslash \\ +%% Right bracket \] Circumflex \^ Underscore \_ +%% Grave accent \` Left brace \{ Vertical bar \| +%% Right brace \} Tilde \~} +\NeedsTeXFormat{LaTeX2e} +\ProvidesPackage{bibleref-xidx}[2011/01/19 v1.0 (NLCT) Extended indexing support for bibleref] +\newif\if@br@indexchapters +\@br@indexchapterstrue +\newif\if@br@indexverses +\@br@indexversestrue +\DeclareOption{verses}{\@br@indexchapterstrue\@br@indexversestrue} +\DeclareOption{noverses}{\@br@indexversesfalse} +\DeclareOption{chapters}{\@br@indexchaptersfalse} +\DeclareOption{nochapters}{\@br@indexchaptersfalse\@br@indexversesfalse} +\DeclareOption*{\PassOptionsToPackage{\CurrentOption}{bibleref}} +\ProcessOptions +\RequirePackage{bibleref} +\def\@bibleverse(#1:{% + \def\@bv@chidxsort{}% + \def\@bv@chidxentry{}% + \@br@chsty{#1}% + \@@bibleverse +} +\def\@bibleverser-(#1:{% + \def\@bv@chidxsort{}% + \def\@bv@chidxentry{}% + \@br@chsty{#1}% + \@@bibleverse +} +\def\@@bibleverse#1){% + \def\@bv@tmp{#1}% + \ifx\@bv@tmp\@empty + \@bvx@dochindex + \else + \BRchvsep + \@br@vrsty{#1}% + \fi + \new@ifnextchar(% + {\BRchsep\@bibleverse}% + {\new@ifnextchar-% + {\protect\BRvrsep\@bibleverser}% + {\@end@@bibleverse}% + }% +} +\newcommand*{\@brx@dochsep}{% + \@bvx@chdo{\protect\BRvsep}% +} +\renewcommand*{\@br@chsty}[1]{% + \let\@brx@chsep\@empty + \@for\@brx@thisch:=#1\do{% + \@bvx@dochindex + \@brx@chsep + \expandafter\@@br@chsty\@brx@thisch-\@nil\end + \let\@brx@chsep\@brx@dochsep + }% +} +\newcommand*{\@brx@dovssep}{% + \@bvx@vsdo{\protect\BRvsep}% +} +\renewcommand*{\@br@vrsty}[1]{% + \let\@brx@vssep\@empty + \@for\@brx@thisvs:=#1\do{% + \def\@bv@vsidxentry{}% + \def\@bv@vsidxsort{}% + \@brx@vssep + \expandafter\@@br@vrsty\@brx@thisvs-\@nil\end + \let\@brx@vssep\@brx@dovssep + \@bvx@dovsindex + }% +} +\def\@@br@vrsty#1-#2\end{% + \ifx\@nil#2\relax + \@do@verse{#1}% + \else + \@do@verserange{#1}#2% + \fi +} +\renewcommand{\@do@verse}[1]{% + \@nodo@verse{#1}% + \expandafter\@bvx@vsdo\expandafter{\@br@tmp}% + \@bv@addtovsidxsort{-000}% +} +\def\@@br@chsty#1-#2\end{% + \ifx\@nil#2\relax + \@do@chapter{#1}% + \else + \@do@chapterrange{#1}#2% + \fi +} +\newcommand{\@do@chapter}[1]{% + \@nodo@chapter{#1}% + \@bvx@chdo{\protect\BRchapterstyle{#1}}% + \@bv@addtochidxsort{-000}% +} +\renewcommand*{\@nodo@chapter}[1]{% + \ifnum0#1<10\relax + \@bv@setchidxsort{00#1}% + \else + \ifnum0#1<100\relax + \@bv@setchidxsort{0#1}% + \else + \@bv@setchidxsort{#1}% + \fi + \fi +} +\def\@do@chapterrange#1#2-\@nil{% + \@nodo@chapter{#1}% + \@bvx@chdo{\protect\BRchapterstyle{#1}}% + \@bv@addtochidxsort{-}% + \@bvx@chadddo{\protect\BRvrsep}% + \@nodo@chapter{#2}% + \@bvx@chadddo{\protect\BRchapterstyle{#2}}% +} +\renewcommand*{\@nodo@verse}[1]{% + \br@stripverse{#1}% + \ifnum\@br@versenum<10\relax + \@bv@addtovsidxsort{00#1}% + \else + \ifnum\@br@versenum<100\relax + \@bv@addtovsidxsort{0#1}% + \else + \@bv@addtovsidxsort{#1}% + \fi + \fi + \ifx\@br@versesuffix\@empty + \protected@edef\@br@tmp{% + \protect\BRversestyle{\@br@versenum}% + }% + \else + \protected@edef\@br@tmp{% + \protect\BRversestyle{\@br@versenum}% + \protect\BRversesuffixstyle{\@br@versesuffix}% + }% + \fi +} +\def\@do@verserange#1#2-\@nil{% + \@nodo@verse{#1}% + \expandafter\@bvx@vsdo\expandafter{\@br@tmp}% + \@bv@addtovsidxsort{-}% + \@bvx@vsadddo{\protect\BRvrsep}% + \@nodo@verse{#2}% + \expandafter\@bvx@vsadddo\expandafter{\@br@tmp}% +} +\newcommand*{\@bv@setvsidxsort}[1]{% +\if@bv@idx + \protected@edef\@bv@vsidxsort{#1}% +\fi +} +\newcommand*{\@bv@addtovsidxsort}[1]{% +\if@bv@idx + \@bv@tmpa={#1}% + \@bv@tmpb=\expandafter{\@bv@vsidxsort}% + \protected@edef\@bv@vsidxsort{\the\@bv@tmpb\the\@bv@tmpa}% +\fi +} +\newcommand*{\@bv@setvsidx}[1]{% +\if@bv@idx + \def\@bv@vsidxentry{#1}% +\fi +} +\newcommand*{\@bv@addtovsidx}[1]{% +\if@bv@idx + \@bv@tmpa={#1}% + \@bv@tmpb=\expandafter{\@bv@vsidxentry}% + \protected@edef\@bv@vsidxentry{\the\@bv@tmpb\the\@bv@tmpa}% +\fi +} +\newcommand*{\@bv@setchidx}[1]{% +\if@bv@idx + \def\@bv@chidxentry{#1}% +\fi +} +\newcommand*{\@bv@addtochidx}[1]{% +\if@bv@idx + \@bv@tmpa={#1}% + \@bv@tmpb=\expandafter{\@bv@chidxentry}% + \protected@edef\@bv@chidxentry{\the\@bv@tmpb\the\@bv@tmpa}% +\fi +} +\newcommand*{\@bv@setchidxsort}[1]{% +\if@bv@idx + \protected@edef\@bv@chidxsort{#1}% +\fi +} +\newcommand*{\@bvx@chdo}[1]{#1\@bv@setchidx{#1}} +\newcommand*{\@bvx@vsdo}[1]{#1\@bv@setvsidx{#1}} +\newcommand*{\@bvx@chadddo}[1]{#1\@bv@addtochidx{#1}} +\newcommand*{\@bvx@vsadddo}[1]{#1\@bv@addtovsidx{#1}} +\let\@bv@org@bible@verse\@bible@verse +\renewcommand*{\@bible@verse}{% + \def\@bv@chidxentry{}% + \@bv@org@bible@verse +} +\renewcommand*{\@end@@bibleverse}{% + \ifx\@bv@chidxentry\@empty + \@bvx@dobkindex + \else + \if@br@indexchapters + \else + \@bvx@dobkindex + \fi + \fi + \@bv@idxfalse + \@bv@restore +} +\newcommand*{\@bvx@dochindex}{% +\if@br@indexchapters + \ifx\@bv@chidxentry\@empty + \else + \if@bv@idx + \expandafter\@do@bibleref@map\@@bv@idxsort\relax + \@do@biblerefindex + {\@@bv@idxsort\relax @\@bv@mainidxentry + !\@bv@chidxsort @\@bv@chidxentry + |\@bv@idxpgformat}% + \fi + \fi +\fi +} +\newcommand*{\@bvx@dovsindex}{% +\if@br@indexverses + \ifx\@bv@vsidxentry\@empty + \else + \if@bv@idx + \expandafter\@do@bibleref@map\@@bv@idxsort\relax + \@do@biblerefindex + {\@@bv@idxsort\relax @\@bv@mainidxentry + !\@bv@chidxsort @\@bv@chidxentry + !\@bv@vsidxsort @\@bv@vsidxentry + |\@bv@idxpgformat}% + \fi + \fi +\else + \@bvx@dochindex +\fi +} + +\newcommand*{\@bvx@dobkindex}{% + \if@bv@idx + \expandafter\@do@bibleref@map\@@bv@idxsort\relax + \@do@biblerefindex + {\@@bv@idxsort\relax @\@bv@mainidxentry|\@bv@idxpgformat}% + \fi +} +\endinput +%% +%% End of file `bibleref-xidx.sty'. diff --git a/Master/texmf-dist/tex/latex/bibleref/bibleref.sty b/Master/texmf-dist/tex/latex/bibleref/bibleref.sty index 9a60b44749a..d0650b859ca 100644 --- a/Master/texmf-dist/tex/latex/bibleref/bibleref.sty +++ b/Master/texmf-dist/tex/latex/bibleref/bibleref.sty @@ -21,7 +21,7 @@ %% %% The Current Maintainer of this work is Nicola Talbot. %% -%% This work consists of the files bibleref.dtx and bibleref.ins and the derived files bibleref-xidx.sty, bibleref.sty, sample-categories.tex, sample-multind.tex, sample-xidx.tex, sample.tex, sample.ist, bibleref.perl. +%% This work consists of the files bibleref.dtx and bibleref.ins and the derived files bibleref-xidx.sty, bibleref.sty, sample-categories.tex, sample-indextools.tex, sample-xidx.tex, sample.tex, sample.ist. %% %% \CharacterTable %% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z @@ -39,7 +39,7 @@ %% Grave accent \` Left brace \{ Vertical bar \| %% Right brace \} Tilde \~} \NeedsTeXFormat{LaTeX2e} -\ProvidesPackage{bibleref}[2011/01/19 1.14 (NLCT)] +\ProvidesPackage{bibleref}[2016/09/10 1.15 (NLCT and MR)] \RequirePackage{ifthen} \RequirePackage{fmtcount} \RequirePackage{amsgen} @@ -830,8 +830,14 @@ defined}{}}} {\@end@@bibleverse}% } \def\@bibleverse(#1:{% - \@br@chsty{#1}% - \@@bibleverse + \def\@bv@tmp{#1}% + \ifx\@bv@tmp\@empty + \def\@bv@bvmacro{\@@bibleversenosep}% + \else + \@br@chsty{#1}% + \def\@bv@bvmacro{\@@bibleverse}% + \fi + \@bv@bvmacro } \def\@bibleverser-(#1:{% \def\@bv@tmp{#1}% @@ -863,6 +869,19 @@ defined}{}}} {\@end@@bibleverse}% }% } +\def\@@bibleversenosep#1){% + \def\@bv@tmp{#1}% + \ifx\@bv@tmp\@empty + \else + \@br@vrsty{#1}% + \fi + \new@ifnextchar(% + {\@bv@do{\protect\BRchsep}\@bibleverse}% + {\new@ifnextchar-% + {\@bv@do{\protect\BRvrsep}\@bibleverser}% + {\@end@@bibleverse}% + }% +} \newcommand*{\@end@@bibleverse}{% \if@bv@idx \expandafter\@do@bibleref@map\@@bv@idxsort\relax |