From 295b453abefbb11e8491968ce857079ce2b76087 Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Fri, 2 Nov 2012 23:54:18 +0000 Subject: biblatex 2.3 (1nov12) git-svn-id: svn://tug.org/texlive/trunk@28161 c570f23f-e606-0410-a88d-b1316a301751 --- .../latex/biblatex/examples/20-indexing-basic.pdf | Bin 182797 -> 0 bytes .../latex/biblatex/examples/20-indexing-basic.tex | 74 ----------- .../latex/biblatex/examples/20-indexing-single.pdf | Bin 0 -> 182797 bytes .../latex/biblatex/examples/20-indexing-single.tex | 74 +++++++++++ .../biblatex/examples/21-indexing-advanced.pdf | Bin 184600 -> 0 bytes .../biblatex/examples/21-indexing-advanced.tex | 142 --------------------- .../biblatex/examples/21-indexing-multiple.pdf | Bin 0 -> 184600 bytes .../biblatex/examples/21-indexing-multiple.tex | 142 +++++++++++++++++++++ .../biblatex/examples/22-indexing-subentry.pdf | Bin 0 -> 88891 bytes .../biblatex/examples/22-indexing-subentry.tex | 87 +++++++++++++ .../latex/biblatex/examples/biblatex-examples.bib | 6 +- 11 files changed, 307 insertions(+), 218 deletions(-) delete mode 100644 Master/texmf-dist/doc/latex/biblatex/examples/20-indexing-basic.pdf delete mode 100644 Master/texmf-dist/doc/latex/biblatex/examples/20-indexing-basic.tex create mode 100644 Master/texmf-dist/doc/latex/biblatex/examples/20-indexing-single.pdf create mode 100644 Master/texmf-dist/doc/latex/biblatex/examples/20-indexing-single.tex delete mode 100644 Master/texmf-dist/doc/latex/biblatex/examples/21-indexing-advanced.pdf delete mode 100644 Master/texmf-dist/doc/latex/biblatex/examples/21-indexing-advanced.tex create mode 100644 Master/texmf-dist/doc/latex/biblatex/examples/21-indexing-multiple.pdf create mode 100644 Master/texmf-dist/doc/latex/biblatex/examples/21-indexing-multiple.tex create mode 100644 Master/texmf-dist/doc/latex/biblatex/examples/22-indexing-subentry.pdf create mode 100644 Master/texmf-dist/doc/latex/biblatex/examples/22-indexing-subentry.tex (limited to 'Master/texmf-dist/doc/latex/biblatex/examples') diff --git a/Master/texmf-dist/doc/latex/biblatex/examples/20-indexing-basic.pdf b/Master/texmf-dist/doc/latex/biblatex/examples/20-indexing-basic.pdf deleted file mode 100644 index fa30d6b1a1b..00000000000 Binary files a/Master/texmf-dist/doc/latex/biblatex/examples/20-indexing-basic.pdf and /dev/null differ diff --git a/Master/texmf-dist/doc/latex/biblatex/examples/20-indexing-basic.tex b/Master/texmf-dist/doc/latex/biblatex/examples/20-indexing-basic.tex deleted file mode 100644 index d905168b33e..00000000000 --- a/Master/texmf-dist/doc/latex/biblatex/examples/20-indexing-basic.tex +++ /dev/null @@ -1,74 +0,0 @@ -% -% This file demonstrates indexing with the 'makeidx' package. -% This file is processed as follows: -% -% latex file -% bibtex/biber file -% latex file -% makeindex file -% latex file -% -% Note that the file name suffix may be omitted. It's 'latex file' -% and not 'latex file.tex'. -% -\documentclass[a4paper]{article} -\usepackage[T1]{fontenc} -\usepackage[american]{babel} -\usepackage{csquotes} -% -% We set the 'indexing' package option ('indexing' is similar to -% 'indexing=true') to enable indexing in both citations and the -% bibliography. It is rather unusual to add bibliography entries to -% the index so you will normally use 'indexing=cite' instead. The -% only reason we're indexing the bibliography in this example is to -% get a larger index. For a change, let's also use the 'authortitle' -% style in this example. -\usepackage[indexing,style=authortitle,backend=biber]{biblatex} -\addbibresource{biblatex-examples.bib} -% -% The 'makeidx' package provides indexing facilities on a fairly -% basic level. It is highly advisable to use the 'index' package -% instead, even if you do not need the additional facilities -% provided by this package, such as multiple indexes. The reason is -% that the \index command defined by this package is more robust -% than the basic command provided by 'makeidx'. -\usepackage{makeidx} -% We need to enable indexing globally by way of \makeindex. -% Otherwise, no index is created at all, regardless of the -% 'indexing' option of biblatex. -\makeindex -% -% Note that biblatex uses makeindex's 'actual' operator to pass the -% 'indexsorttitle' field to makeindex. The default character used -% is '@'. If the makeindex style uses a different character, i.e., -% if the .ist file contains a line like this -% -% actual '=' -% -% you need to redefine \actualoperator accordingly: -% -% \renewcommand*{\actualoperator}{=} -% -\begin{document} - -\section*{Indexing with the \texttt{makeidx} package} - -% We add the contents of the entire bib file to the bibliography. -% Note that \nocite does not add anything to the index on its own. -\nocite{*} - -% We cite a few items. These citations will be added to the index. -\cite{piccato,gaonkar,malinowski,coleridge,gerhardt,cicero} - -% We also add an explicit index entry. -\index{Example entry} - -\clearpage - -% We print the printbibliography... -\printbibliography -% ...and the index -\raggedright -\printindex - -\end{document} diff --git a/Master/texmf-dist/doc/latex/biblatex/examples/20-indexing-single.pdf b/Master/texmf-dist/doc/latex/biblatex/examples/20-indexing-single.pdf new file mode 100644 index 00000000000..fa30d6b1a1b Binary files /dev/null and b/Master/texmf-dist/doc/latex/biblatex/examples/20-indexing-single.pdf differ diff --git a/Master/texmf-dist/doc/latex/biblatex/examples/20-indexing-single.tex b/Master/texmf-dist/doc/latex/biblatex/examples/20-indexing-single.tex new file mode 100644 index 00000000000..d905168b33e --- /dev/null +++ b/Master/texmf-dist/doc/latex/biblatex/examples/20-indexing-single.tex @@ -0,0 +1,74 @@ +% +% This file demonstrates indexing with the 'makeidx' package. +% This file is processed as follows: +% +% latex file +% bibtex/biber file +% latex file +% makeindex file +% latex file +% +% Note that the file name suffix may be omitted. It's 'latex file' +% and not 'latex file.tex'. +% +\documentclass[a4paper]{article} +\usepackage[T1]{fontenc} +\usepackage[american]{babel} +\usepackage{csquotes} +% +% We set the 'indexing' package option ('indexing' is similar to +% 'indexing=true') to enable indexing in both citations and the +% bibliography. It is rather unusual to add bibliography entries to +% the index so you will normally use 'indexing=cite' instead. The +% only reason we're indexing the bibliography in this example is to +% get a larger index. For a change, let's also use the 'authortitle' +% style in this example. +\usepackage[indexing,style=authortitle,backend=biber]{biblatex} +\addbibresource{biblatex-examples.bib} +% +% The 'makeidx' package provides indexing facilities on a fairly +% basic level. It is highly advisable to use the 'index' package +% instead, even if you do not need the additional facilities +% provided by this package, such as multiple indexes. The reason is +% that the \index command defined by this package is more robust +% than the basic command provided by 'makeidx'. +\usepackage{makeidx} +% We need to enable indexing globally by way of \makeindex. +% Otherwise, no index is created at all, regardless of the +% 'indexing' option of biblatex. +\makeindex +% +% Note that biblatex uses makeindex's 'actual' operator to pass the +% 'indexsorttitle' field to makeindex. The default character used +% is '@'. If the makeindex style uses a different character, i.e., +% if the .ist file contains a line like this +% +% actual '=' +% +% you need to redefine \actualoperator accordingly: +% +% \renewcommand*{\actualoperator}{=} +% +\begin{document} + +\section*{Indexing with the \texttt{makeidx} package} + +% We add the contents of the entire bib file to the bibliography. +% Note that \nocite does not add anything to the index on its own. +\nocite{*} + +% We cite a few items. These citations will be added to the index. +\cite{piccato,gaonkar,malinowski,coleridge,gerhardt,cicero} + +% We also add an explicit index entry. +\index{Example entry} + +\clearpage + +% We print the printbibliography... +\printbibliography +% ...and the index +\raggedright +\printindex + +\end{document} diff --git a/Master/texmf-dist/doc/latex/biblatex/examples/21-indexing-advanced.pdf b/Master/texmf-dist/doc/latex/biblatex/examples/21-indexing-advanced.pdf deleted file mode 100644 index 940b0590293..00000000000 Binary files a/Master/texmf-dist/doc/latex/biblatex/examples/21-indexing-advanced.pdf and /dev/null differ diff --git a/Master/texmf-dist/doc/latex/biblatex/examples/21-indexing-advanced.tex b/Master/texmf-dist/doc/latex/biblatex/examples/21-indexing-advanced.tex deleted file mode 100644 index fef863a4516..00000000000 --- a/Master/texmf-dist/doc/latex/biblatex/examples/21-indexing-advanced.tex +++ /dev/null @@ -1,142 +0,0 @@ -% -% This file demonstrates indexing with the 'index' package. -% This file is processed as follows: -% -% latex file -% bibtex/biber file -% latex file -% makeindex -o file.ind file.idx (= makeindex file) -% makeindex -o file.nnd file.ndx -% makeindex -o file.tnd file.tdx -% latex file -% -% Note that the file name suffix may be omitted. It's 'latex file' -% and not 'latex file.tex'. Also note that '-t ' is optional. -% -\documentclass[a4paper]{article} -\usepackage[T1]{fontenc} -% -% The 'index' package provides advanced indexing facilities with -% support for multiple indexes. -\usepackage{index} -\usepackage[american]{babel} -\usepackage{csquotes} -% -% We set the 'indexing' package option and use the 'authortitle' -% style in this example. -\usepackage[indexing,style=authortitle,babel=hyphen,backend=biber]{biblatex} -\addbibresource{biblatex-examples.bib} -% -% We want three indexes: a general index, an index of names, and an -% index of titles. They are defined by way of \newindex, see the -% documentation of the 'index' package for details. -\newindex{default}{idx}{ind}{Subject Index} -\newindex{names}{ndx}{nnd}{Name Index} -\newindex{titles}{tdx}{tnd}{Title Index} -% -% We need to redefine some index formatting directives such that -% biblatex adds names and titles to separate indexes. All names -% should go to the name index, hence we simply redefine the default -% index formatting directive for names. The default definition, -% which is found in biblatex.def, looks like this: -% -% \DeclareIndexNameFormat{default}{% -% \usebibmacro{index:name}{\index}{#1}{#3}{#5}{#7}% -% } -% -% As you can see, the data is simply passed on to a 'bibmacro' which -% takes care of the formatting of the name. The definition of the -% bibmacro, which is also found in biblatex.def, is not relevant in -% our example because all we want to do is change or rather extend -% the \index command, which happens to be the first argument of the -% 'index:name' bibmacro. -% -\DeclareIndexNameFormat{default}{% - \usebibmacro{index:name}{\index[names]}{#1}{#3}{#5}{#7}% -} -% -% Titles are handled in a similar way. The formatting directive we -% need to modify is 'indextitle'. It's default definition looks like -% this: -% -% \DeclareIndexFieldFormat{indextitle}{% -% \usebibmacro{index:title}{\index}{#1}% -% } -% -% We modify it such that the \index command writes to the index of -% titles: -% -\DeclareIndexFieldFormat{indextitle}{% - \usebibmacro{index:title}{\index[titles]}{#1}% -} -% -% That's it as far as splitting the index is concerned. Let's have a -% look at some other facilities you may want to customize. By -% default, biblatex will index the author or editor and the title of -% all references. This behavior may be modified as desired. The -% indexing facilities are not hard-coded. All standard styles which -% ship with this package call two 'bibmacros' which handle the -% indexing. These macros are called 'citeindex' and 'bibindex', both -% of which are defined in biblatex.def. The former handles indexing -% in citations, the latter in the bibliography. Their default -% definitions are as follows: -% -% \newbibmacro*{citeindex}{% -% \ifciteindex -% {\indexnames{labelname}% -% \indexfield{indextitle}} -% {}} -% -% \newbibmacro*{bibindex}{% -% \ifbibindex -% {\indexnames{labelname}% -% \indexfield{indextitle}} -% {}} -% -% The 'labelname' field is a copy of the 'author' field, if there is -% an author, or a copy of the 'editor' field otherwise. 'indextitle' -% is the 'indextitle' field, if defined in the bib file, or a copy -% of the 'title' field otherwise. -% -% The mechanism works like this: the \indexnames and \indexfield -% fields tell biblatex which data to add to the index, the indexing -% directives tell it how to index the data. -% -% The default settings should be fine in most cases. As an example, -% we will modify them here such that author, editors, translators, -% and commentators in the bibliography are indexed: -% -\renewbibmacro*{bibindex}{% - \ifbibindex - {\indexnames{author}% - \indexnames{editor}% - \indexnames{translator}% - \indexnames{commentator}% - \indexfield{indextitle}} - {}} -% -\begin{document} - -\section*{Indexing with the \texttt{index} package} - -% We add the contents of the entire bib file to the bibliography. -% Note that \nocite does not add anything to the index on its own. -\nocite{*} - -% We cite a few items. These citations will be added to the index. -\cite{piccato,gaonkar,malinowski,coleridge,gerhardt,cicero} - -% We also add an explicit index entry. -\index{Example entry} - -\clearpage - -% We print the printbibliography... -\printbibliography -% ...and the indexes -\raggedright -\printindex % the general index -\printindex[names] % the name index -\printindex[titles] % the title index - -\end{document} diff --git a/Master/texmf-dist/doc/latex/biblatex/examples/21-indexing-multiple.pdf b/Master/texmf-dist/doc/latex/biblatex/examples/21-indexing-multiple.pdf new file mode 100644 index 00000000000..940b0590293 Binary files /dev/null and b/Master/texmf-dist/doc/latex/biblatex/examples/21-indexing-multiple.pdf differ diff --git a/Master/texmf-dist/doc/latex/biblatex/examples/21-indexing-multiple.tex b/Master/texmf-dist/doc/latex/biblatex/examples/21-indexing-multiple.tex new file mode 100644 index 00000000000..fef863a4516 --- /dev/null +++ b/Master/texmf-dist/doc/latex/biblatex/examples/21-indexing-multiple.tex @@ -0,0 +1,142 @@ +% +% This file demonstrates indexing with the 'index' package. +% This file is processed as follows: +% +% latex file +% bibtex/biber file +% latex file +% makeindex -o file.ind file.idx (= makeindex file) +% makeindex -o file.nnd file.ndx +% makeindex -o file.tnd file.tdx +% latex file +% +% Note that the file name suffix may be omitted. It's 'latex file' +% and not 'latex file.tex'. Also note that '-t ' is optional. +% +\documentclass[a4paper]{article} +\usepackage[T1]{fontenc} +% +% The 'index' package provides advanced indexing facilities with +% support for multiple indexes. +\usepackage{index} +\usepackage[american]{babel} +\usepackage{csquotes} +% +% We set the 'indexing' package option and use the 'authortitle' +% style in this example. +\usepackage[indexing,style=authortitle,babel=hyphen,backend=biber]{biblatex} +\addbibresource{biblatex-examples.bib} +% +% We want three indexes: a general index, an index of names, and an +% index of titles. They are defined by way of \newindex, see the +% documentation of the 'index' package for details. +\newindex{default}{idx}{ind}{Subject Index} +\newindex{names}{ndx}{nnd}{Name Index} +\newindex{titles}{tdx}{tnd}{Title Index} +% +% We need to redefine some index formatting directives such that +% biblatex adds names and titles to separate indexes. All names +% should go to the name index, hence we simply redefine the default +% index formatting directive for names. The default definition, +% which is found in biblatex.def, looks like this: +% +% \DeclareIndexNameFormat{default}{% +% \usebibmacro{index:name}{\index}{#1}{#3}{#5}{#7}% +% } +% +% As you can see, the data is simply passed on to a 'bibmacro' which +% takes care of the formatting of the name. The definition of the +% bibmacro, which is also found in biblatex.def, is not relevant in +% our example because all we want to do is change or rather extend +% the \index command, which happens to be the first argument of the +% 'index:name' bibmacro. +% +\DeclareIndexNameFormat{default}{% + \usebibmacro{index:name}{\index[names]}{#1}{#3}{#5}{#7}% +} +% +% Titles are handled in a similar way. The formatting directive we +% need to modify is 'indextitle'. It's default definition looks like +% this: +% +% \DeclareIndexFieldFormat{indextitle}{% +% \usebibmacro{index:title}{\index}{#1}% +% } +% +% We modify it such that the \index command writes to the index of +% titles: +% +\DeclareIndexFieldFormat{indextitle}{% + \usebibmacro{index:title}{\index[titles]}{#1}% +} +% +% That's it as far as splitting the index is concerned. Let's have a +% look at some other facilities you may want to customize. By +% default, biblatex will index the author or editor and the title of +% all references. This behavior may be modified as desired. The +% indexing facilities are not hard-coded. All standard styles which +% ship with this package call two 'bibmacros' which handle the +% indexing. These macros are called 'citeindex' and 'bibindex', both +% of which are defined in biblatex.def. The former handles indexing +% in citations, the latter in the bibliography. Their default +% definitions are as follows: +% +% \newbibmacro*{citeindex}{% +% \ifciteindex +% {\indexnames{labelname}% +% \indexfield{indextitle}} +% {}} +% +% \newbibmacro*{bibindex}{% +% \ifbibindex +% {\indexnames{labelname}% +% \indexfield{indextitle}} +% {}} +% +% The 'labelname' field is a copy of the 'author' field, if there is +% an author, or a copy of the 'editor' field otherwise. 'indextitle' +% is the 'indextitle' field, if defined in the bib file, or a copy +% of the 'title' field otherwise. +% +% The mechanism works like this: the \indexnames and \indexfield +% fields tell biblatex which data to add to the index, the indexing +% directives tell it how to index the data. +% +% The default settings should be fine in most cases. As an example, +% we will modify them here such that author, editors, translators, +% and commentators in the bibliography are indexed: +% +\renewbibmacro*{bibindex}{% + \ifbibindex + {\indexnames{author}% + \indexnames{editor}% + \indexnames{translator}% + \indexnames{commentator}% + \indexfield{indextitle}} + {}} +% +\begin{document} + +\section*{Indexing with the \texttt{index} package} + +% We add the contents of the entire bib file to the bibliography. +% Note that \nocite does not add anything to the index on its own. +\nocite{*} + +% We cite a few items. These citations will be added to the index. +\cite{piccato,gaonkar,malinowski,coleridge,gerhardt,cicero} + +% We also add an explicit index entry. +\index{Example entry} + +\clearpage + +% We print the printbibliography... +\printbibliography +% ...and the indexes +\raggedright +\printindex % the general index +\printindex[names] % the name index +\printindex[titles] % the title index + +\end{document} diff --git a/Master/texmf-dist/doc/latex/biblatex/examples/22-indexing-subentry.pdf b/Master/texmf-dist/doc/latex/biblatex/examples/22-indexing-subentry.pdf new file mode 100644 index 00000000000..0909dec8697 Binary files /dev/null and b/Master/texmf-dist/doc/latex/biblatex/examples/22-indexing-subentry.pdf differ diff --git a/Master/texmf-dist/doc/latex/biblatex/examples/22-indexing-subentry.tex b/Master/texmf-dist/doc/latex/biblatex/examples/22-indexing-subentry.tex new file mode 100644 index 00000000000..ff4f8fb32ec --- /dev/null +++ b/Master/texmf-dist/doc/latex/biblatex/examples/22-indexing-subentry.tex @@ -0,0 +1,87 @@ +% +% This file demonstrates indexing with the 'imakeidx' package. +% This file is processed as follows: +% +% latex file +% bibtex/biber file +% latex file +% latex file +% +% Note that the file name suffix may be omitted. It's 'latex file' and not +% 'latex file.tex'. Also note that '-t ' is optional. +% +\documentclass[a4paper]{article} +\usepackage[T1]{fontenc} +% +% The 'imakeidx' package provides advanced indexing facilities with support for +% multiple indexes. Unlike the 'index' package, 'imakeidx' does not generate +% "self-protecting" index entries. So we need to protect control sequences in +% indexing fields from expansion. For an example see the 'knuth:ct:a' entry in +% biblatex-examples.bib. +% +\usepackage{imakeidx} +\usepackage[american]{babel} +\usepackage{csquotes} +% +% We set the 'indexing' package option and use the 'authortitle' +% style in this example. +% +\usepackage[indexing=cite,style=authortitle,babel=hyphen,backend=biber]{biblatex} +\addbibresource{biblatex-examples.bib} +% +% We want two indexes: an index of names with title subentries, an index of +% titles organized by year. They are defined by way of \makeindex, see the +% documentation of the 'imakeidx' package for details. +% +\makeindex[name=name-title,title={Name and Title Index}] +\makeindex[name=year-title,title={Year and Title Index}] +% +% A 'name:title' indexing bibmacro can be found in biblatex.def. It takes the same +% arguments as the 'index:name' bibmacro. Note that the title fields are accessed +% inside the name indexing directive. So we have to test for missing titles. +% +\DeclareIndexNameFormat{name:title}{% + \iffieldundef{title} + {\usebibmacro{index:name}{\index[name-title]}{#1}{#3}{#5}{#7}} + {\usebibmacro{index:name:title}{\index[name-title]}{#1}{#3}{#5}{#7}}} +% +% Auxiliary indexing macros in biblatex.def can be used to define additional +% indexing directives with subentries. The following directive creates entries +% for the year-title index. +% +\DeclareIndexFieldFormat{with:year}{% + \iffieldundef{year} + {\usebibmacro{index:entry}{\index[year-title]}{% + \mkbibindexentry{0}{Not dated}% + \subentryoperator% + \mkbibindexfield{\thefield{indexsorttitle}}{\emph{#1}}}} + {\usebibmacro{index:entry}{\index[year-title]}{% + \thefield{year}\subentryoperator% + \mkbibindexfield{\thefield{indexsorttitle}}{\emph{#1}}}}} +% +% We redefine the 'citeindex' bibmacro to use the new indexing directives. +% +\renewbibmacro*{citeindex}{% + \ifciteindex + {\indexnames[name:title]{labelname}% + \indexfield[with:year]{indextitle}} + {}} + +\begin{document} + +\section*{Indexing with the \texttt{imakeidx} package} + +% We cite a few items. These citations will be added to the indexes. +\cite{knuth:ct,knuth:ct:a,knuth:ct:c,knuth:ct:d} +\cite{aristotle:anima,aristotle:poetics,aristotle:physics,aristotle:rhetoric} + +\clearpage + +% We print the printbibliography... +\printbibliography +% ...and the indexes +\raggedright +\printindex[name-title] % the name-title index +\printindex[year-title] % the year-title index + +\end{document} diff --git a/Master/texmf-dist/doc/latex/biblatex/examples/biblatex-examples.bib b/Master/texmf-dist/doc/latex/biblatex/examples/biblatex-examples.bib index b86e9bf01f6..994b91995db 100644 --- a/Master/texmf-dist/doc/latex/biblatex/examples/biblatex-examples.bib +++ b/Master/texmf-dist/doc/latex/biblatex/examples/biblatex-examples.bib @@ -594,7 +594,7 @@ sorttitle = {Computers & Typesetting A}, indexsorttitle = {The TeXbook}, author = {Knuth, Donald E.}, - indextitle = {\TeX book, The}, + indextitle = {\protect\TeX book, The}, title = {The \TeX book}, shorttitle = {\TeX book}, maintitle = {Computers \& Typesetting}, @@ -605,7 +605,9 @@ annotation = {The first volume of a five-volume book. Note the \texttt{sorttitle} and \texttt{sortyear} fields. We want this volume to be listed after the entry referring to the entire five-volume set. Also - note the \texttt{indextitle} and \texttt{indexsorttitle} fields} + note the \texttt{indextitle} and \texttt{indexsorttitle} fields. Indexing + packages that don't generate robust index entries require some control + sequences to be protected from expansion} } @book{knuth:ct:b, hyphenation = {american}, -- cgit v1.2.3