From fc9af029ad8683806201fc8c5e8daced875f73ed Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Tue, 27 Apr 2010 00:58:54 +0000 Subject: bibleref 1.09 (26apr10) git-svn-id: svn://tug.org/texlive/trunk@18014 c570f23f-e606-0410-a88d-b1316a301751 --- Master/texmf-dist/doc/latex/bibleref/README | 4 +- .../doc/latex/bibleref/bibleref-manual.html | 118 ++++++++++-- Master/texmf-dist/doc/latex/bibleref/bibleref.pdf | Bin 107336 -> 175140 bytes Master/texmf-dist/doc/latex/bibleref/sample.pdf | Bin 61794 -> 121045 bytes Master/texmf-dist/doc/latex/bibleref/sample.tex | 2 +- .../texmf-dist/source/latex/bibleref/bibleref.dtx | 201 +++++++++++++++++++-- .../texmf-dist/source/latex/bibleref/bibleref.ins | 6 +- Master/texmf-dist/tex/latex/bibleref/bibleref.sty | 28 ++- 8 files changed, 326 insertions(+), 33 deletions(-) diff --git a/Master/texmf-dist/doc/latex/bibleref/README b/Master/texmf-dist/doc/latex/bibleref/README index 7af2ae7633d..865a600318b 100644 --- a/Master/texmf-dist/doc/latex/bibleref/README +++ b/Master/texmf-dist/doc/latex/bibleref/README @@ -1,6 +1,6 @@ -LaTeX Class File : bibleref v 1.08 +LaTeX Class File : bibleref v 1.09 -Last Modified : 6 Feb 2010 +Last Modified : 26 Apr 2010 Author : Nicola Talbot diff --git a/Master/texmf-dist/doc/latex/bibleref/bibleref-manual.html b/Master/texmf-dist/doc/latex/bibleref/bibleref-manual.html index 3f51b8a0759..cbd7f02c93c 100644 --- a/Master/texmf-dist/doc/latex/bibleref/bibleref-manual.html +++ b/Master/texmf-dist/doc/latex/bibleref/bibleref-manual.html @@ -7,8 +7,8 @@ original version by: Nikos Drakos, CBLU, University of Leeds Jens Lippmann, Marek Rouchal, Martin Wilck and others --> -bibleref.sty v1.08: a LATEX2e package for typesetting bible references - +bibleref.sty v1.09: a LATEX2e package for typesetting bible references + @@ -22,7 +22,7 @@ original version by: Nikos Drakos, CBLU, University of Leeds -

bibleref.sty v1.08: a LATEX2e package for +

bibleref.sty v1.09: a LATEX2e package for typesetting bible references

Nicola Talbot
@@ -36,7 +36,7 @@ Norwich. Norfolk. NR4 7TJ. United Kingdom
http://theoval.cmp.uea.ac.uk/~nlct/

-

6 Feb 2010

+

26th April 2010


@@ -45,13 +45,20 @@ Contents +
+
  • Acknowledgements @@ -147,7 +154,7 @@ Styles are listed in Table 1.

    - +
    Table 1: Bible Citation Styles (can be used as package option or in the argument to @@ -197,6 +204,17 @@ Revelation to Apoc, do (Note that you shouldn't do \setbookname{Rev}{Apoc}) +

    +You can add a book using + +

    +\addbiblebook{name}{title} +

    +For example: +

    +\addbiblebook{Susanna}{Story of Susanna}
    +
    +

    @@ -252,21 +270,97 @@ use the optional argument to \ibibleverse. For example:

    +

    +Separate Scripture Index +

    + +

    +If you want a separate index for bible verses, in addition to +a general index, you can redefine \biblerefindex. +This command defaults to \index, but can be changed to +the appropriate indexing command. For example, suppose you +are using the multind package and you want a general +index and a scripture index, you can do something like: +

    +\documentclass{article}
    +\usepackage{bibleref}
    +\usepackage{multind}
    +
    +\makeindex{scripture}
    +\makeindex{general}
    +
    +\renewcommand{\biblerefindex}{\index{scripture}}
    +
    +In the document, you can use \ibibleverse as before, and +the scripture index is displayed using +
    +\printindex{scripture}{Scripture Index}
    +
    +You will then need to run makeindex on the file +scripture.idx. See the multind documentation +for further details. + +

    + +

    +Changing the Sort Order +

    + +

    +The bible reference entries will be sorted alphabetically by +makeindex. However you may prefer the entries to be sorted +according to their order in the bible. This can either be done +using xindy instead of makeindex and creating your +own custom alphabet (see xindy manual for details) or you +can use bibleref's mapping command. + +

    + +

    +\biblerefmap{label}{new sort key} +

    +For example, in the preamble: +

    +\biblerefmap{Genesis}{01}
    +\biblerefmap{Exodus}{02}
    +\biblerefmap{Leviticus}{03}
    +\biblerefmap{Numbers}{04}
    +\biblerefmap{Deuteronomy}{05}
    +...
    +
    +When you run makeindex, the references will now be sorted +in numerical order. + +

    +If you want to subdivide the index into, say, old and new +testament, you can add this to the mapping. For example: +

    +\biblerefmap{Genesis}{1@Old Testament!01}
    +\biblerefmap{Exodus}{1@Old Testament!02}
    +\biblerefmap{Leviticus}{1@Old Testament!03}
    +\biblerefmap{Numbers}{1@Old Testament!04}
    +\biblerefmap{Deuteronomy}{1@Old Testament!05}
    +...
    +\biblerefmap{Matthew}{2@New Testament!01}
    +\biblerefmap{Mark}{2@New Testament!02}
    +...
    +
    + +

    +

    Acknowledgements

    Many thanks to all the useful comments from comp.text.tex, especially from Jesse Billett, Brooks Moses and Ulrich M. Schwarz. -

    -



    Nicola L. C. Talbot. School of Computing Sciences. University of East Anglia. -Last Modified: 2010-02-06 +Last Modified: 2010-04-26
    diff --git a/Master/texmf-dist/doc/latex/bibleref/bibleref.pdf b/Master/texmf-dist/doc/latex/bibleref/bibleref.pdf index 888b1fb7b35..e21234741ff 100644 Binary files a/Master/texmf-dist/doc/latex/bibleref/bibleref.pdf and b/Master/texmf-dist/doc/latex/bibleref/bibleref.pdf differ diff --git a/Master/texmf-dist/doc/latex/bibleref/sample.pdf b/Master/texmf-dist/doc/latex/bibleref/sample.pdf index 0ebf28cafb7..1424d1b6f0a 100644 Binary files a/Master/texmf-dist/doc/latex/bibleref/sample.pdf and b/Master/texmf-dist/doc/latex/bibleref/sample.pdf differ diff --git a/Master/texmf-dist/doc/latex/bibleref/sample.tex b/Master/texmf-dist/doc/latex/bibleref/sample.tex index df3925508c1..de3c7185695 100644 --- a/Master/texmf-dist/doc/latex/bibleref/sample.tex +++ b/Master/texmf-dist/doc/latex/bibleref/sample.tex @@ -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.sty, sample.tex, bibleref.perl. +%% This work consists of the files bibleref.dtx and bibleref.ins and the derived files bibleref.sty, sample-multind.tex, sample.tex, bibleref.perl. %% %% \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 diff --git a/Master/texmf-dist/source/latex/bibleref/bibleref.dtx b/Master/texmf-dist/source/latex/bibleref/bibleref.dtx index 8dc3359c8c9..9d3b8c60841 100644 --- a/Master/texmf-dist/source/latex/bibleref/bibleref.dtx +++ b/Master/texmf-dist/source/latex/bibleref/bibleref.dtx @@ -12,7 +12,7 @@ % -author "Nicola Talbot" % -dir "source" % bibleref -% Created on 2010/2/6 14:11 +% Created on 2010/4/26 11:18 %\fi %\iffalse %<*package> @@ -56,7 +56,6 @@ \RecordChanges \PageIndex \CodelineNumbered -\OnlyDescription \newcommand{\sty}[1]{\textsf{#1}} \newcommand*{\ics}[1]{\cs{#1}\SpecialMainIndex{#1}} @@ -80,15 +79,17 @@ } +\newcommand*{\app}[1]{\texttt{#1}} -\CheckSum{1656} +\OnlyDescription +\CheckSum{1719} \begin{document} \DocInput{bibleref.dtx} \end{document} % %\fi -%\title{bibleref.sty v1.08: a \LaTeXe\ package for +%\title{bibleref.sty v1.09: a \LaTeXe\ package for %typesetting bible references} %\author{Nicola Talbot\\[10pt] %School of Computing Sciences\\ @@ -96,7 +97,7 @@ %Norwich. Norfolk. NR4 7TJ.\\ %United Kingdom\\ %\url{http://theoval.cmp.uea.ac.uk/~nlct/}} -%\date{6 Feb 2010} +%\date{26th April 2010} %\maketitle %\tableofcontents % @@ -190,6 +191,16 @@ %(\textbf{Note} that you shouldn't do %\verb|\setbookname{Rev}{Apoc}|) % +%\DescribeMacro{\addbiblebook} +%You can add a book using +%\begin{definition} +%\cs{addbiblebook}\marg{name}\marg{title} +%\end{definition} +%For example: +%\begin{verbatim} +%\addbiblebook{Susanna}{Story of Susanna} +%\end{verbatim} +% %\section{Defining New Styles} % %You can define a new style using the command @@ -232,16 +243,79 @@ %\end{verbatim} %(Note there is no backslash.) % +%\subsection{Separate Scripture Index} +% +%If you want a separate index for bible verses, in addition to +%a general index, you can redefine \DescribeMacro{\biblerefindex}\cs{biblerefindex}. +%This command defaults to \cs{index}, but can be changed to +%the appropriate indexing command. For example, suppose you +%are using the \sty{multind} package and you want a general +%index and a scripture index, you can do something like: +%\begin{verbatim} +%\documentclass{article} +%\usepackage{bibleref} +%\usepackage{multind} +% +%\makeindex{scripture} +%\makeindex{general} +% +%\renewcommand{\biblerefindex}{\index{scripture}} +%\end{verbatim} +%In the document, you can use \cs{ibibleverse} as before, and +%the scripture index is displayed using +%\begin{verbatim} +%\printindex{scripture}{Scripture Index} +%\end{verbatim} +%You will then need to run \app{makeindex} on the file +%\texttt{scripture.idx}. See the \sty{multind} documentation +%for further details. +% +%\subsection{Changing the Sort Order} +% +%The bible reference entries will be sorted alphabetically by +%\app{makeindex}. However you may prefer the entries to be sorted +%according to their order in the bible. This can either be done +%using \app{xindy} instead of \app{makeindex} and creating your +%own custom alphabet (see \app{xindy} manual for details) or you +%can use \sty{bibleref}'s mapping command. +% +%\DescribeMacro{\biblerefmap} +%\begin{definition} +%\cs{biblerefmap}\marg{label}\marg{new sort key} +%\end{definition} +%For example, in the preamble: +%\begin{verbatim} +%\biblerefmap{Genesis}{01} +%\biblerefmap{Exodus}{02} +%\biblerefmap{Leviticus}{03} +%\biblerefmap{Numbers}{04} +%\biblerefmap{Deuteronomy}{05} +%... +%\end{verbatim} +%When you run \app{makeindex}, the references will now be sorted +%in numerical order. +% +%If you want to subdivide the index into, say, old and new +%testament, you can add this to the mapping. For example: +%\begin{verbatim} +%\biblerefmap{Genesis}{1@Old Testament!01} +%\biblerefmap{Exodus}{1@Old Testament!02} +%\biblerefmap{Leviticus}{1@Old Testament!03} +%\biblerefmap{Numbers}{1@Old Testament!04} +%\biblerefmap{Deuteronomy}{1@Old Testament!05} +%... +%\biblerefmap{Matthew}{2@New Testament!01} +%\biblerefmap{Mark}{2@New Testament!02} +%... +%\end{verbatim} +% %\section{Acknowledgements} %Many thanks to all the useful comments from comp.text.tex, %especially from Jesse~Billett, Brooks~Moses and Ulrich~M.~Schwarz. % -%\StopEventually{\phantomsection -%\addcontentsline{toc}{section}{Index}\PrintIndex -%} -% % % +%\StopEventually{} %\section{The Code} %\iffalse % \begin{macrocode} @@ -251,7 +325,7 @@ % Declare package % \begin{macrocode} \NeedsTeXFormat{LaTeX2e} -\ProvidesPackage{bibleref}[2010/02/06 1.08 (NLCT)] +\ProvidesPackage{bibleref}[2010/04/26 1.09 (NLCT)] % \end{macrocode} % Need to do some conditional stuff % \begin{macrocode} @@ -1008,12 +1082,28 @@ defined}{}}} % Redefines the title of book \meta{fullname}. % \begin{macrocode} \newcommand*{\setbooktitle}[2]{% -\@ifundefined{br@#1}{\PackageError{biberef}{Unknown +\@ifundefined{br@#1}{\PackageError{bibleref}{Unknown book `#1'}{}}{% \expandafter\def\csname br@#1\endcsname{#2}}} % \end{macrocode} %\end{macro} % +%\begin{macro}{\addbiblebook} +%\changes{1.09}{2010/04/26}{new} +% Add a book. +% \begin{macrocode} +\newcommand*{\addbiblebook}[2]{% + \@ifundefined{br@#1}% + {% + \expandafter\def\csname br@#1\endcsname{#2}% + }% + {% + \PackageError{bibleref}{Book `#1' already defined}{}% + }% +} +% \end{macrocode} +%\end{macro} +% %\begin{macro}{\biblerefstyle} %\begin{definition} %\cs{biblerefstyle}\marg{style} @@ -1114,15 +1204,47 @@ Unknown biblerefstyle '#1'}{}}{\csname brs@#1\endcsname}} %\begin{macro}{\@end@@bibleverse} % This controls what to do at the end of the final % verse. +%\changes{1.09}{2009/04/26}{replaced \cs{index} with \cs{biblerefindex}} % \begin{macrocode} \newcommand*{\@end@@bibleverse}{% \if@bv@idx -\index{\@@bv@idxsort\relax @\@bv@idxentry|\@bv@idxpgformat}% + \expandafter\@do@bibleref@map\@@bv@idxsort\relax + \biblerefindex{\@@bv@idxsort\relax @\@bv@idxentry|\@bv@idxpgformat}% \@bv@idxfalse \fi } % \end{macrocode} %\end{macro} +%\begin{macro}{\biblerefindex} +% Allow user to modify index command in case multiple indices +% are required. +%\changes{1.09}{2009/04/26}{new} +% \begin{macrocode} +\newcommand*{\biblerefindex}{\index} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\biblerefmap} +% Map the sort key to something else. Overwrites previous mapping +% for the given key. +%\changes{1.09}{2009/04/26}{new} +% \begin{macrocode} +\newcommand*{\biblerefmap}[2]{% + \expandafter\def\csname @bibleref@map@#1\endcsname{#2}% +} +% \end{macrocode} +%\end{macro} +% +%\begin{macro}{\@do@bibleref@map} +% \begin{macrocode} +\def\@do@bibleref@map#1\relax{% + \@ifundefined{@bibleref@map@#1}{}{% + \expandafter\let\expandafter\@@bv@idxsort + \csname @bibleref@map@#1\endcsname + }% +} +% \end{macrocode} +%\end{macro} % %\begin{macro}{\@bv@do} % Do argument and add to idx @@ -1204,6 +1326,61 @@ Unknown biblerefstyle '#1'}{}}{\csname brs@#1\endcsname}} %\fi %\iffalse % \begin{macrocode} +%<*sample-multind.tex> +% \end{macrocode} +%\fi +%\subsection{Sample Document with Multiple Indices} +% \begin{macrocode} +\documentclass{article} + +\usepackage{bibleref} +\usepackage{multind} + +\makeindex{scripture} +\makeindex{general} + +\renewcommand{\biblerefindex}{\index{scripture}} + +\biblerefmap{Genesis}{1@Old Testament!1} +\biblerefmap{Exodus}{1@Old Testament!2} +\biblerefmap{Leviticus}{1@Old Testament!3} +\biblerefmap{Numbers}{1@Old Testament!4} +\biblerefmap{Deuteronomy}{1@Old Testament!5} + +\biblerefmap{Tobit}{2@Apocrypha!3} + +\biblerefmap{Matthew}{3@New Testament!1} +\biblerefmap{Mark}{3@New Testament!2} +\biblerefmap{Luke}{3@New Testament!3} +\biblerefmap{John}{3@New Testament!4} +\biblerefmap{Acts}{3@New Testament!5} +\biblerefmap{Romans}{3@New Testament!6} +\biblerefmap{Corinthians1}{3@New Testament!7} + +\begin{document} +Something for the general index\index{general}{something}. + +An old testament reference \ibibleverse{Genesis}(1:1-10). +A new testament reference \ibibleverse{ICor}. + +Something else for the general index\index{general}{another}. + +Another old testament reference \ibibleverse{Ex}. +Another new testament reference \ibibleverse{Matt}. + +\ibibleverse{Tobit} + +\printindex{scripture}{Scripture Index} +\printindex{general}{General Index} +\end{document} +% \end{macrocode} +%\iffalse +% \begin{macrocode} +% +% \end{macrocode} +%\fi +%\iffalse +% \begin{macrocode} %<*sample.tex> % \end{macrocode} %\fi diff --git a/Master/texmf-dist/source/latex/bibleref/bibleref.ins b/Master/texmf-dist/source/latex/bibleref/bibleref.ins index 82224879641..4f423c625e7 100644 --- a/Master/texmf-dist/source/latex/bibleref/bibleref.ins +++ b/Master/texmf-dist/source/latex/bibleref/bibleref.ins @@ -1,4 +1,4 @@ -% bibleref.ins generated using makedtx version 0.94b 2010/2/6 14:11 +% bibleref.ins generated using makedtx version 0.94b 2010/4/26 11:18 \input docstrip \preamble @@ -18,7 +18,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.sty, sample.tex, bibleref.perl. + This work consists of the files bibleref.dtx and bibleref.ins and the derived files bibleref.sty, sample-multind.tex, sample.tex, bibleref.perl. \endpreamble @@ -26,6 +26,8 @@ \generate{\file{bibleref.sty}{\usepreamble\defaultpreamble \usepostamble\defaultpostamble\from{bibleref.dtx}{bibleref.sty,package}} +\file{sample-multind.tex}{\usepreamble\defaultpreamble +\usepostamble\defaultpostamble\from{bibleref.dtx}{sample-multind.tex,package}} \file{sample.tex}{\usepreamble\defaultpreamble \usepostamble\defaultpostamble\from{bibleref.dtx}{sample.tex,package}} \file{bibleref.perl}{\nopreamble\nopostamble\from{bibleref.dtx}{bibleref.perl}} diff --git a/Master/texmf-dist/tex/latex/bibleref/bibleref.sty b/Master/texmf-dist/tex/latex/bibleref/bibleref.sty index 47e0a6960a8..106a78854f0 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.sty, sample.tex, bibleref.perl. +%% This work consists of the files bibleref.dtx and bibleref.ins and the derived files bibleref.sty, sample-multind.tex, sample.tex, bibleref.perl. %% %% \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}[2010/02/06 1.08 (NLCT)] +\ProvidesPackage{bibleref}[2010/04/26 1.09 (NLCT)] \RequirePackage{ifthen} \RequirePackage{fmtcount} \newcommand*{\BRbooknumberstyle}[1]{#1 } @@ -591,9 +591,18 @@ chapter \numberstringnum{##1}}% \PackageError{bibleref}{bible ref style '#1' already defined}{}}} \newcommand*{\setbooktitle}[2]{% -\@ifundefined{br@#1}{\PackageError{biberef}{Unknown +\@ifundefined{br@#1}{\PackageError{bibleref}{Unknown book `#1'}{}}{% \expandafter\def\csname br@#1\endcsname{#2}}} +\newcommand*{\addbiblebook}[2]{% + \@ifundefined{br@#1}% + {% + \expandafter\def\csname br@#1\endcsname{#2}% + }% + {% + \PackageError{bibleref}{Book `#1' already defined}{}% + }% +} \newcommand*{\biblerefstyle}[1]{% \@ifundefined{brs@#1}{\PackageError{bibleref}{% Unknown biblerefstyle '#1'}{}}{\csname brs@#1\endcsname}} @@ -636,10 +645,21 @@ Unknown biblerefstyle '#1'}{}}{\csname brs@#1\endcsname}} {\@ifnextchar-{\@bv@do{\BRvrsep}\@bibleverser}{\@end@@bibleverse}}} \newcommand*{\@end@@bibleverse}{% \if@bv@idx -\index{\@@bv@idxsort\relax @\@bv@idxentry|\@bv@idxpgformat}% + \expandafter\@do@bibleref@map\@@bv@idxsort\relax + \biblerefindex{\@@bv@idxsort\relax @\@bv@idxentry|\@bv@idxpgformat}% \@bv@idxfalse \fi } +\newcommand*{\biblerefindex}{\index} +\newcommand*{\biblerefmap}[2]{% + \expandafter\def\csname @bibleref@map@#1\endcsname{#2}% +} +\def\@do@bibleref@map#1\relax{% + \@ifundefined{@bibleref@map@#1}{}{% + \expandafter\let\expandafter\@@bv@idxsort + \csname @bibleref@map@#1\endcsname + }% +} \newcommand{\@bv@do}[1]{#1\@bv@addtoidx{#1}} \newtoks\@bv@tmpa \newtoks\@bv@tmpb -- cgit v1.2.3