summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/biblatex-contrib/biblatex-trad/biblatex-trad.tex
blob: f5eae36bdbee79e96701c2f6e851196a84a6c442 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[british]{babel}
\usepackage[strict]{csquotes}
\usepackage[useregional]{datetime2}
\usepackage{libertinus}
\usepackage[scaled=0.78]{beramono}
\usepackage{microtype}
\usepackage{multicol}
\usepackage{ragged2e}
\usepackage{btxdockit}

\hypersetup{%
  colorlinks=true,
  allcolors=spot,
  bookmarksopen=false,
  bookmarksnumbered=false,
  plainpages=false}

\definecolor{spot}{rgb}{0,0.2,0.6}

\lstset{basicstyle=\ttfamily,keepspaces=true}

\makeatletter
% this is taken from ltxdockit.cls, which is not loaded
\newrobustcmd*{\fnurl}[1][]{\hyper@normalise\ltd@fnurl{#1}}
\def\ltd@fnurl#1#2{\footnote{#1\hyper@linkurl{\Hurl{#2}}{#2}}}

\newrobustcmd*{\email}{\hyper@normalise\ltd@email}
\def\ltd@email#1{\href{mailto:#1}{#1}}

% title
\providecommand*{\titlepage}{}
\providecommand*{\titlefont}{}
\renewrobustcmd*{\titlepage}[1]{\setkeys{ltd@ttp}{#1}}
\renewcommand*{\titlefont}{\bfseries}
\define@key{ltd@ttp}{title}{\def\ltd@title@title{#1}}
\define@key{ltd@ttp}{subtitle}{\def\ltd@title@subtitle{#1}}
\define@key{ltd@ttp}{url}{\def\ltd@title@url{#1}}
\define@key{ltd@ttp}{author}{\def\ltd@title@author{#1}}
\define@key{ltd@ttp}{email}{\def\ltd@title@email{#1}}
\define@key{ltd@ttp}{revision}{\def\ltd@title@revision{#1}}
\define@key{ltd@ttp}{date}{\def\ltd@title@date{#1}}

\providecommand*{\printtitlepage}{}
\renewrobustcmd*{\printtitlepage}{%
  \begingroup
  \centering\titlefont
  \begingroup\LARGE
    \ifundef\ltd@title@url
      {\ltd@title@title}
      {\href{\ltd@title@url}{\ltd@title@title}}%
    \par
  \endgroup
  \vspace{0.25\baselineskip}
  \begingroup\large
    \ltd@title@subtitle\par
  \endgroup
  \expandafter\url\expandafter{\ltd@title@url}\par
  \begin{multicols}{2}
  \raggedleft
    \ltd@title@author\par
    \expandafter\email\expandafter{\ltd@title@email}\par
  \raggedright
    Version \ltd@title@revision\par\ltd@title@date
  \end{multicols}
  \endgroup}


\renewcommand\tableofcontents{%
    \pdfbookmark[1]{\contentsname}{contents}%
    \section*{\contentsname
        \@mkboth{%
           \MakeUppercase\contentsname}{\MakeUppercase\contentsname}}%
    \@starttoc{toc}%
    }
\def\@starttoc#1{%
  \begingroup
    \begin{multicols}{2}
    \makeatletter
    \RaggedRight
    \@input{\jobname.#1}%
    \if@filesw
      \expandafter\newwrite\csname tf@#1\endcsname
      \immediate\openout \csname tf@#1\endcsname \jobname.#1\relax
    \fi
    \end{multicols}
    \@nobreakfalse
  \endgroup}

\let\accentcolour\spotcolor

\newcommand*{\allsectionsfont}{\sffamily\accentcolour}

\renewcommand\section{\@startsection {section}{1}{\z@}%
                                     {-3.5ex \@plus -1ex \@minus -.2ex}%
                                     {2.3ex \@plus.2ex}%
                                     {\normalfont\Large\bfseries\allsectionsfont}}
\renewcommand\subsection{\@startsection{subsection}{2}{\z@}%
                                       {-3.25ex\@plus -1ex \@minus -.2ex}%
                                       {1.5ex \@plus .2ex}%
                                       {\normalfont\large\bfseries\allsectionsfont}}
\renewcommand\subsubsection{\@startsection{subsubsection}{3}{\z@}%
                                       {-3.25ex\@plus -1ex \@minus -.2ex}%
                                       {1.5ex \@plus .2ex}%
                                       {\normalfont\normalsize\bfseries\allsectionsfont}}
\renewcommand\paragraph{\@startsection{paragraph}{4}{\z@}%
                                      {3.25ex \@plus1ex \@minus.2ex}%
                                      {-1em}%
                                      {\normalfont\normalsize\bfseries\allsectionsfont}}
\renewcommand\subparagraph{\@startsection{subparagraph}{5}{\parindent}%
                                         {3.25ex \@plus1ex \@minus .2ex}%
                                         {-1em}%
                                         {\normalfont\normalsize\bfseries\allsectionsfont}}

% from KOMA-Script
\newcommand*{\@list@extra}{%
  \ifdim\parskip>\z@
    \topsep\z@
    \parsep\parskip
    \itemsep\z@
  \fi
}
\appto\@listi{\@list@extra}
\appto\@listii{\@list@extra}
\appto\@listiii{\@list@extra}
\appto\@listiv{\@list@extra}
\appto\@listv{\@list@extra}
\appto\@listvi{\@list@extra}
\makeatother

\newrobustcmd*{\tex}{\TeX}
\newrobustcmd*{\etex}{\mbox{e-TeX}}
\newrobustcmd*{\pdftex}{pdf\-\tex}
\newrobustcmd*{\xetex}{Xe\-\tex}
\newrobustcmd*{\luatex}{Lua\-\tex}
\newrobustcmd*{\latex}{\LaTeX}%{La\kern-0.07em TeX}
\newrobustcmd*{\pdflatex}{pdf\-\latex}
\newrobustcmd*{\xelatex}{Xe\-\latex}
\newrobustcmd*{\lualatex}{Lua\-\latex}
\newrobustcmd*{\miktex}{Mik\-\tex}
\newrobustcmd*{\texlive}{\tex~live}
\newrobustcmd*{\bibtex}{Bib\kern-0.07em TeX}
\newrobustcmd*{\lppl}{\latex{} Project Public License}

\renewcommand*{\verbatimfont}{\ttfamily}
\renewcommand*{\displayverbfont}{\ttfamily}
\renewcommand*{\marglistfont}{\accentcolour\sffamily\small}
\renewcommand*{\margnotefont}{\sffamily\small}
\renewcommand*{\optionlistfont}{\accentcolour\sffamily\displayverbfont}
\renewcommand*{\ltxsyntaxfont}{\ttfamily}
\renewcommand*{\ltxsyntaxlabelfont}{\accentcolour\displayverbfont}
\renewcommand*{\changelogfont}{\normalfont}
\renewcommand*{\changeloglabelfont}{\accentcolour\sffamily\bfseries}
\newcommand*{\stylelistlabelfont}{\accentcolour\sffamily\small}
\newcommand*{\bibfieldformatfont}{\sffamily}
\newcommand*{\bibfieldformatlabelfont}{\accentcolour\bibfieldformatfont\small}

\MakeAutoQuote*{<}{>}


\titlepage{%
  title={The \sty{biblatex-trad} Package},
  subtitle={Traditional bibliography styles for \sty{biblatex}},
  url={https://github.com/moewew/biblatex-trad/},
  author={Marco Daniel\\Moritz Wemheuer},
  email={mwemheu@posteo.de},
  revision={0.5},
  date={\DTMDate{2021-03-06}}}

\hypersetup{%
  pdftitle={The biblatex-trad Package},
  pdfsubject={Traditional bibliography styles for biblatex},
  pdfauthor={Marco Daniel},
  pdfkeywords={tex, latex, biblatex, bibtex, bibliography, references, citation}}


\newrobustcmd*{\Deprecated}{%
  \textcolor{spot}{\margnotefont Deprecated}}
\newrobustcmd*{\DeprecatedMark}{%
  \leavevmode\marginpar{\Deprecated}}
\newcommand*{\gitissuelink}[1]{%
  \href{https://github.com/moewew/biblatex-trad/issues/#1}{issue \##1 on github}}

\hyphenation{%
  star-red
  bib-lio-gra-phy
  white-space
}

\begin{document}

\printtitlepage
\tableofcontents


\section{Introduction}\label{sec:int}

The package \sty{biblatex-trad} is a contribution to the great package \sty{biblatex}.

It provides the implementation of the traditional bibliography styles (\sty{plain},
\sty{unsrt}, \sty{alpha} and \sty{abbrv}) as a style for \sty{biblatex}.

\subsection{Motivation}\label{subsec:int:mot}

The package is motivated by a question at \tex{} -- \latex Stack Exchange
\enquote{\href{http://tex.stackexchange.com/a/69706/}{How to emulate the traditional BibTeX styles
(\sty{plain}, \sty{abbrv}, \sty{unsrt}, \sty{alpha}) as closely as possible with \sty{biblatex}?}}

\subsection{Requirements}
The use of the styles requires the \sty{biblatex} package.
It is tested with the current version of \sty{biblatex} (at the time of writing that is v3.16).
Care has been taken to retain backwards compatibility with older versions,
but please do not expect the styles to work flawlessly with ancient versions of \sty{biblatex}.
Note also that the style may fail silently with older versions, it need not necessarily emit noisy
warnings or error messages, the output might just be wrong.

Note that in recent versions of \sty{biblatex} the \bibtex backend has been degraded to
the status of \enquote{fallback backend}.
Some features of this style will only work properly if you use the default Biber backend.

\subsection{License}

Copyright \textcopyright\ 2012--2015 Marco Daniel, 2016--2021 Moritz Wemheuer. Permission is granted to copy, distribute and\slash or modify this software under the terms of the \lppl, version 1.3c.\fnurl{http://www.latex-project.org/lppl.txt}


\subsection{Feedback}\label{subsec:int:feb}

Please use the \sty{biblatex-trad} project page on GitHub to report bugs and submit feature requests.\fnurl{https://github.com/moewew/biblatex-trad}

If you do not want to report a bug or request a feature but are simply in need of assistance, you might want to consider posting your question on the \texttt{comp.text.tex} newsgroup or \tex{} -- \latex Stack Exchange.\fnurl{http://tex.stackexchange.com/questions/tagged/biblatex}

\section{Usage}

\sty{biblatex-trad} is not a standalone package. As described in \secref{sec:int} it is
a small collection of styles. So you can load the styles as follows:

\begin{lstlisting}[style=latex,escapeinside={(*@}{@*)}]{}
\usepackage[style=(*@$\langle$\normalfont\emph{style}$\rangle$@*)]{biblatex}
\end{lstlisting}
The available styles are listed below.
\begin{marglist}

\item[trad-plain] Implementation of the standard style \sty{plain}
\item[trad-unsrt] Implementation of the standard style \sty{unsrt}
\item[trad-alpha] Implementation of the standard style \sty{alpha}
\item[trad-abbrv] Implementation of the standard style \sty{abbrv}

\end{marglist}

After loading the style you can use all options provided by \sty{biblatex}.
That means also that all fields of the standard bibliography drivers are available,
even if they are unknown to the traditional \texttt{.bst} files.

\section{Limitations}

Up to now the entry types \bibtype{article}, \bibtype{book}, \bibtype{incollection},
\bibtype{inproceedings}, \bibtype{online}, \bibtype{proceedings}, \bibtype{thesis},
\bibtype{report} and \bibtype{unpublished} are set up.

Since the styles are based on \sty{biblatex} standard styles, the fields retain the meaning
they have in \sty{biblatex} even if that may be at odds with how the traditional \sty{.bst}
files handle those fields.


\section{Revision History}\label{apx:log}
\begin{changelog}
\begin{release}{0.5}{2021-03-06}
\item Synced with \sty{biblatex} v3.16 (2020-12-31)
\end{release}

\begin{release}{0.4a}{2018-02-17}
\item Fixed alphabetic labels for names with prefix (\enquote{von} part) (\gitissuelink{34})
\end{release}

\begin{release}{0.4}{2018-02-02}
\item Fixed incorrect bibstring for chapters (\gitissuelink{32})
\item Various small modifications
\end{release}

\begin{release}{0.3}{2016-06-26}
\item Fix issues with new name formats in \sty{biblatex} versions $\geq$~3.3 (\gitissuelink{25})
\item Fix problems with the related mechanism (\gitissuelink{24})
\item Proper support for \bibtype{thesis}-types (\gitissuelink{23})
\item Modify \opt{maxalphanames}/\opt{minalphanames} and \cmd{labelalphaothers} in \sty{trad-alpha} to mirror \sty{alpha} more closely (\gitissuelink{22})
\item Use \bibfield{labelprefix} instead of \bibfield{prefixnumber}
\end{release}

\begin{release}{0.2}{2012-09-29}
\item Fixed missing comma after journal name if journal name has a period
\item Make titles sentence case
\item Removed extra \emph{in}
\item Removed extra \cmd{printfield}
\item Fixed extra comma if \bibtype{article} doesn't have a year
\item Use package \sty{libertine-type1} for documentation
\end{release}

\begin{release}{0.1}{2012-09-09}
\item First upload
\end{release}
\end{changelog}
\end{document}

\endinput