| 1 |
% |
| 2 |
% This file presents the 'authoryear-comp' style |
| 3 |
% |
| 4 |
\documentclass[a4paper]{article} |
| 5 |
\usepackage[T1]{fontenc} |
| 6 |
\usepackage[utf8]{inputenc} |
| 7 |
\usepackage[american]{babel} |
| 8 |
\usepackage{csquotes} |
| 9 |
\usepackage[style=authoryear-comp,backend=biber]{biblatex} |
| 10 |
\usepackage{hyperref} |
| 11 |
\addbibresource{biblatex-examples.bib} |
| 12 |
% Some generic settings. |
| 13 |
\newcommand{\cmd}[1]{\texttt{\textbackslash #1}} |
| 14 |
\setlength{\parindent}{0pt} |
| 15 |
\newenvironment{bibsample} |
| 16 |
{\trivlist\samepage |
| 17 |
\setlength{\itemsep}{0pt}} |
| 18 |
{\endtrivlist} |
| 19 |
\begin{document} |
| 20 |
|
| 21 |
\section*{The \texttt{authoryear-comp} style} |
| 22 |
|
| 23 |
This style is a compact version of the \texttt{authoryear} style |
| 24 |
which prints the author only once if subsequent references passed to |
| 25 |
a single citation command share the same author. If they share the |
| 26 |
same year as well, the year is also printed only once. This style |
| 27 |
will implicitly enable the \texttt{sortcites} package option at load |
| 28 |
time. |
| 29 |
|
| 30 |
\subsection*{Additional package options} |
| 31 |
|
| 32 |
\subsubsection*{The \texttt{dashed} option} |
| 33 |
|
| 34 |
By default, this style replaces recurrent authors/editors in the |
| 35 |
bibliography by a dash so that items by the same author or editor |
| 36 |
are visually grouped. This feature is controlled by the package |
| 37 |
option \texttt{dashed}. Setting \texttt{dashed=false} in the |
| 38 |
preamble will disable this feature. The default setting is |
| 39 |
\texttt{dashed=true}. |
| 40 |
|
| 41 |
\subsubsection*{The \texttt{mergedate} option} |
| 42 |
|
| 43 |
Since this style prints the date label after the author/editor in the |
| 44 |
bibliography, there are effectively two dates in the bibliography: |
| 45 |
the full date specification (e.g., \enquote{2001}, \enquote{June |
| 46 |
2006}, \enquote{5th~Jan. 2008}, whose format is controlled by the |
| 47 |
\texttt{date} option) and the date label (e.g., \enquote{2006a}, |
| 48 |
whose format is controlled with the \texttt{labeldate} option), |
| 49 |
as found in citations. The \texttt{mergedate} option controls whether |
| 50 |
or not date specifications are merged with the date label. |
| 51 |
This option is best explained by example. Note that |
| 52 |
it only affects the bibliography. Citations use the date label only. |
| 53 |
|
| 54 |
\begin{bibsample} |
| 55 |
\item Doe 2000 |
| 56 |
\item Doe 2003a |
| 57 |
\item Doe 2003b |
| 58 |
\item Doe 2006a |
| 59 |
\item Doe 2006b |
| 60 |
\item Doe 2017 |
| 61 |
\end{bibsample} |
| 62 |
|
| 63 |
\texttt{mergedate=false} strictly separates the date specification |
| 64 |
(following \texttt{date}) from the date label (following \texttt{labeldate}). |
| 65 |
The year will always be printed twice: |
| 66 |
|
| 67 |
\begin{bibsample} |
| 68 |
\item Doe, John (2000). \emph{Book~1}. Location: Publisher, 2000. |
| 69 |
\item Doe, John (2003a). \emph{Book~2}. Location: Publisher, 2003. |
| 70 |
\item Doe, John (2003b). \emph{Book~3}. Location: Publisher, 2003. |
| 71 |
\item Doe, John (2006a). \enquote{Article~1}. In: \emph{Monthly Journal} 25.6 |
| 72 |
(June~2006), pp.~70--85. |
| 73 |
\item Doe, John (2006b). \enquote{Article~2}. In: \emph{Quarterly Journal} 14.3 |
| 74 |
(Fall~2006), pp.~5--25. |
| 75 |
\item Doe, John (2017). \emph{Webpage}. 7th Aug. 2017. |
| 76 |
\end{bibsample} |
| 77 |
|
| 78 |
\texttt{mergedate=minimum} omits the date whenever the full date |
| 79 |
and the date label have exactly the same precision (date-time granularity). |
| 80 |
|
| 81 |
\begin{bibsample} |
| 82 |
\item Doe, John (2000). \emph{Book~1}. Location: Publisher. |
| 83 |
\item Doe, John (2003a). \emph{Book~2}. Location: Publisher, 2003. |
| 84 |
\item Doe, John (2003b). \emph{Book~3}. Location: Publisher, 2003. |
| 85 |
\item Doe, John (2006a). \enquote{Article~1}. In: \emph{Monthly Journal} 25.6 |
| 86 |
(June~2006), pp.~70--85. |
| 87 |
\item Doe, John (2006b). \enquote{Article~2}. In: \emph{Quarterly Journal} 14.3 |
| 88 |
(Fall~2006), pp.~5--25. |
| 89 |
\item Doe, John (2017). \emph{Webpage}. 7th Aug. 2017. |
| 90 |
\end{bibsample} |
| 91 |
|
| 92 |
\texttt{mergedate=basic} is similar in concept but more economical. |
| 93 |
It will also omit the date if it differs from the date label only by |
| 94 |
\texttt{extradate}. |
| 95 |
|
| 96 |
\begin{bibsample} |
| 97 |
\item Doe, John (2000). \emph{Book~1}. Location: Publisher. |
| 98 |
\item Doe, John (2003a). \emph{Book~2}. Location: Publisher. |
| 99 |
\item Doe, John (2003b). \emph{Book~3}. Location: Publisher. |
| 100 |
\item Doe, John (2006a). \enquote{Article~1}. In: \emph{Monthly Journal} 25.6 |
| 101 |
(June~2006), pp.~70--85. |
| 102 |
\item Doe, John (2006b). \enquote{Article~2}. In: \emph{Quarterly Journal} 14.3 |
| 103 |
(Fall~2006), pp.~5--25. |
| 104 |
\item Doe, John (2017). \emph{Webpage}. 7th Aug. 2017. |
| 105 |
\end{bibsample} |
| 106 |
|
| 107 |
\texttt{mergedate=compact} merges all date specifications with the |
| 108 |
date labels. The merged date is printed in \texttt{date} format, |
| 109 |
not \texttt{labeldate}, even if it is printed in the position of |
| 110 |
the date label. The \texttt{issue} field is still treated specially: |
| 111 |
|
| 112 |
\begin{bibsample} |
| 113 |
\item Doe, John (2000). \emph{Book~1}. Location: Publisher. |
| 114 |
\item Doe, John (2003a). \emph{Book~2}. Location: Publisher. |
| 115 |
\item Doe, John (2003b). \emph{Book~3}. Location: Publisher. |
| 116 |
\item Doe, John (June 2006a). \enquote{Article~1}. In: \emph{Monthly Journal} 25.6, pp.~70--85. |
| 117 |
\item Doe, John (2006b). \enquote{Article~2}. In: \emph{Quarterly Journal} 14.3 |
| 118 |
(Fall), pp.~5--25. |
| 119 |
\item Doe, John (7th Aug. 2017).\emph{Webpage}. |
| 120 |
\end{bibsample} |
| 121 |
|
| 122 |
\texttt{mergedate=maximum} strives for maximum compactness. |
| 123 |
Like \texttt{mergedate=compact} this option merges the date |
| 124 |
into the date label. |
| 125 |
Even the \texttt{issue} field is merged with the date label: |
| 126 |
|
| 127 |
\begin{bibsample} |
| 128 |
\item Doe, John (2000). \emph{Book~1}. Location: Publisher. |
| 129 |
\item Doe, John (2003a). \emph{Book~2}. Location: Publisher. |
| 130 |
\item Doe, John (2003b). \emph{Book~3}. Location: Publisher. |
| 131 |
\item Doe, John (June 2006a). \enquote{Article~1}. In: \emph{Monthly Journal} 25.6, pp.~70--85. |
| 132 |
\item Doe, John (Fall 2006b). \enquote{Article~2}. In: \emph{Quarterly Journal} 14.3, pp.~5--25. |
| 133 |
\item Doe, John (7th Aug. 2017).\emph{Webpage}. |
| 134 |
\end{bibsample} |
| 135 |
|
| 136 |
\texttt{mergedate=true} is an alias for \texttt{mergedate=compact}. |
| 137 |
This is the default setting. |
| 138 |
|
| 139 |
\subsection*{Multiple citations} |
| 140 |
|
| 141 |
\cite{knuth:ct:c,aristotle:physics,knuth:ct:b,aristotle:poetics,aristotle:rhetoric,knuth:ct:d} |
| 142 |
|
| 143 |
\clearpage |
| 144 |
\printbibliography |
| 145 |
|
| 146 |
\end{document} |