Debian Codegraph @

texmf-dist/doc/latex/citeall/citeall.tex

raw
1 % !Mode:: "TeX:DE:UTF-8:Main"
2 % $UFDate: 2017-12-03 18:19:20 +0100 -- Commit: 4f26014 (HEAD, master) -- master$
3 \documentclass[DIV=12]{scrartcl}
4 \usepackage[utf8]{inputenc}
5 \usepackage[T1]{fontenc}
6 \usepackage[english]{babel}
7 \usepackage[autostyle]{csquotes}
8 \usepackage{microtype}
9 \usepackage[style=authoryear-ibid,hyperref=false]{biblatex}
10 \usepackage{citeall}
11 \usepackage{fourier}
12 \usepackage{ydoc-desc,tabularx}
13 \usepackage{enumitem,needspace}
14 \makeatletter
15 \enitkv@key{enumitem}{compactsep}[true]{%
16 \divide\partopsep by 2\relax
17 \divide\topsep by 2\relax
18 \divide\itemsep by 2\relax
19 \divide\parsep by 2\relax}
20 \makeatother
21 \addbibresource{examples-citeall.bib}
22 \title{The \pkg{citeall} package, v1.4}
23 \author{Ulrike Fischer\thanks{[email protected]}}
24
25 \begin{document}
26 \maketitle
27 \section{Changes}
28 Version 1.4 changed the code to adapt the package to the newest biblatex 3.9.
29
30
31 Version 1.3 added code to handle the @preamble field in a bib. Changed the definition of \verb+\sortlist+ to adapt to the newest biblatex.
32
33 Version 1.2 adapts the package to biblatex 3.0 and correct some small bugs (e.g. unwanted spaces).
34 \section{Important}
35 \pkg{citeall} works only together with (newer versions of) \pkg{biblatex}. \pkg{biblatex} should be loaded before \pkg{citeall}.
36
37 The package relies on some inner working of \pkg{biblatex}, so it could break with future or older versions (I tested with version 3.9).
38
39 \section{The aim of the package}
40 The \pkg{citeall} package is a package to help to adapt and debug \pkg{biblatex}
41 citation styles. When adapting such a style one often needs to inspect the
42 output of examples. While it is easy with \verb+\nocite{*}+ to output all entries of a bib-file in the bibliography it is more troublesome to show citations.
43 So I wrote a (very) small package which allows me to show citations of all entries of the bib-files.
44
45
46
47
48 \section{The command}
49 The main command of the package is called like the package and has two optional arguments:
50
51 \DescribeMacro\citeall[<list of commands>][<number of entries>]
52
53 The second optional argument sets the number of entries of the .bib (more precisely the .bbl-file) printed by \cs{citeall}. By default everything is cited.
54
55 The first optional argument is a comma separated list.
56 For each entrykey in the .bbl \cs{citeall} will loop through this list and pass to each item the entrykey as last argument. By default this list consist simply of a \cs{cite} command. The items don't need to be cite commands. As the examples show you can add text and other commands.
57
58 \begin{itemize}[compactsep]
59 \item The last command should be something that can handle the entry key argument.
60 \item If there are brackets e.g. from optional argument of a \cs{cite} you should protect them with braces.
61 \item If there are commas you should protect them with braces.
62 \item If you want to insert a paragraph break, use \cs{endgraf}
63 \item Don't overdo the system. It is meant for simple debugging not for complicated citation printouts.
64 \end{itemize}
65
66 \section{Some examples}
67 \verb+\citeall+ \begin{tabular}[t]{p{0.3\textwidth}}
68 \citeall
69 \end{tabular}
70 \verb+\citeall[][1]+ \begin{tabular}[t]{p{0.3\textwidth}}
71 \citeall[][1]
72 \end{tabular}
73
74
75 \noindent
76 \verb+\citeall[\fullcite]+\begin{tabular}[t]{p{0.7\textwidth}}
77 \citeall[\fullcite]
78 \end{tabular}
79
80
81 \noindent
82 \verb+\citeall[\cite[15],\cite]+\begin{tabular}[t]{p{0.7\textwidth}}
83 \citeall[\cite[15],\cite]
84 \end{tabular}
85
86 \noindent
87 \verb+\citeall[Key: \textcolor{red},{\cite[15]},Test ibid: \cite]+
88
89 \begin{tabular}[t]{p{0.7\textwidth}}
90 \citeall[Key: \textcolor{red},{\cite[15]},Test ibid: \cite]
91 \end{tabular}
92
93 \noindent
94 \verb+\citeall[{\cite[15]},\endgraf \cite]+
95
96 \begin{tabular}[t]{p{0.7\textwidth}}
97 \citeall[{\cite[15]},\endgraf \cite]
98 \end{tabular}
99
100 \section{Printing the bibliography}
101 \cs{citeall} internally issues a \verb+\nocite{*}+, so \cs{printbibliography} will print all entries of the bib-file. Since version 1.1 \cs{citeall} adds all entries it cites to a category \enquote{citeall}. So if you restrict the number of citation with the second optional argument, you can also restrict the length of the bibliography with \verb+\printbibliography[category=citeall]+
102
103 \Needspace{8\baselineskip}
104 \section{Configuration}
105
106 \DescribeMacro\citeallgroupseparator
107 \DescribeMacro\citeallseparator
108 \DescribeMacro\citeallfinentry
109 \DescribeMacro\citealldefaultcite
110
111 By default the item of an entry are separated by a comma and a space. This can be changed by redefining \cs{citeallseparator}. The last item is finished by \cs{citeallfinentry} (default nothing). The entries are separated by a \cs{par}, this can be changed by redefining \cs{citeallgroupseparator}.
112 The default cite command used by \cs{citeall} is (\cs{cite}). This can be changed by redefining \cs{citealldefaultcite}.
113
114 \DescribeMacro\citeallpreambledefinition
115
116 .bib files can contain a special entry type \texttt{@preamble} which can contain definitions that should be executed at the begin of the bibliography, e.g. to ensure that some commands are defined. Such a field lead to a command \verb+\preamble{...}+ in the .bbl. When \cs{citeall} reads the .bbl it redefines \cs{preamble} to do nothing. You can change this behaviour by redefining this macro. It should always have one argument!
117
118
119 \end{document}