summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/latex/biblatex/examples
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2012-11-02 23:54:18 +0000
committerKarl Berry <karl@freefriends.org>2012-11-02 23:54:18 +0000
commit295b453abefbb11e8491968ce857079ce2b76087 (patch)
tree6db4bfbfdae39c1b176bdf037f9b02015871c079 /Master/texmf-dist/doc/latex/biblatex/examples
parenteaaa1a9357feba342a82289c80811777e6f5eed5 (diff)
biblatex 2.3 (1nov12)
git-svn-id: svn://tug.org/texlive/trunk@28161 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/doc/latex/biblatex/examples')
-rw-r--r--Master/texmf-dist/doc/latex/biblatex/examples/20-indexing-single.pdf (renamed from Master/texmf-dist/doc/latex/biblatex/examples/20-indexing-basic.pdf)bin182797 -> 182797 bytes
-rw-r--r--Master/texmf-dist/doc/latex/biblatex/examples/20-indexing-single.tex (renamed from Master/texmf-dist/doc/latex/biblatex/examples/20-indexing-basic.tex)0
-rw-r--r--Master/texmf-dist/doc/latex/biblatex/examples/21-indexing-multiple.pdf (renamed from Master/texmf-dist/doc/latex/biblatex/examples/21-indexing-advanced.pdf)bin184600 -> 184600 bytes
-rw-r--r--Master/texmf-dist/doc/latex/biblatex/examples/21-indexing-multiple.tex (renamed from Master/texmf-dist/doc/latex/biblatex/examples/21-indexing-advanced.tex)0
-rw-r--r--Master/texmf-dist/doc/latex/biblatex/examples/22-indexing-subentry.pdfbin0 -> 88891 bytes
-rw-r--r--Master/texmf-dist/doc/latex/biblatex/examples/22-indexing-subentry.tex87
-rw-r--r--Master/texmf-dist/doc/latex/biblatex/examples/biblatex-examples.bib6
7 files changed, 91 insertions, 2 deletions
diff --git a/Master/texmf-dist/doc/latex/biblatex/examples/20-indexing-basic.pdf b/Master/texmf-dist/doc/latex/biblatex/examples/20-indexing-single.pdf
index fa30d6b1a1b..fa30d6b1a1b 100644
--- a/Master/texmf-dist/doc/latex/biblatex/examples/20-indexing-basic.pdf
+++ b/Master/texmf-dist/doc/latex/biblatex/examples/20-indexing-single.pdf
Binary files 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-single.tex
index d905168b33e..d905168b33e 100644
--- a/Master/texmf-dist/doc/latex/biblatex/examples/20-indexing-basic.tex
+++ b/Master/texmf-dist/doc/latex/biblatex/examples/20-indexing-single.tex
diff --git a/Master/texmf-dist/doc/latex/biblatex/examples/21-indexing-advanced.pdf b/Master/texmf-dist/doc/latex/biblatex/examples/21-indexing-multiple.pdf
index 940b0590293..940b0590293 100644
--- a/Master/texmf-dist/doc/latex/biblatex/examples/21-indexing-advanced.pdf
+++ b/Master/texmf-dist/doc/latex/biblatex/examples/21-indexing-multiple.pdf
Binary files 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-multiple.tex
index fef863a4516..fef863a4516 100644
--- a/Master/texmf-dist/doc/latex/biblatex/examples/21-indexing-advanced.tex
+++ b/Master/texmf-dist/doc/latex/biblatex/examples/21-indexing-multiple.tex
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
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/biblatex/examples/22-indexing-subentry.pdf
Binary files 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 <file>' 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},