Debian Codegraph @

texmf-dist/doc/latex/biblatex-trad/biblatex-trad.tex

raw
1 \documentclass{article}
2 \usepackage[utf8]{inputenc}
3 \usepackage[T1]{fontenc}
4 \usepackage[british]{babel}
5 \usepackage[strict]{csquotes}
6 \usepackage[useregional]{datetime2}
7 \usepackage{libertinus}
8 \usepackage[scaled=0.78]{beramono}
9 \usepackage{microtype}
10 \usepackage{multicol}
11 \usepackage{ragged2e}
12 \usepackage{btxdockit}
13
14 \hypersetup{%
15 colorlinks=true,
16 allcolors=spot,
17 bookmarksopen=false,
18 bookmarksnumbered=false,
19 plainpages=false}
20
21 \definecolor{spot}{rgb}{0,0.2,0.6}
22
23 \lstset{basicstyle=\ttfamily,keepspaces=true}
24
25 \makeatletter
26 % this is taken from ltxdockit.cls, which is not loaded
27 \newrobustcmd*{\fnurl}[1][]{\hyper@normalise\ltd@fnurl{#1}}
28 \def\ltd@fnurl#1#2{\footnote{#1\hyper@linkurl{\Hurl{#2}}{#2}}}
29
30 \newrobustcmd*{\email}{\hyper@normalise\ltd@email}
31 \def\ltd@email#1{\href{mailto:#1}{#1}}
32
33 % title
34 \providecommand*{\titlepage}{}
35 \providecommand*{\titlefont}{}
36 \renewrobustcmd*{\titlepage}[1]{\setkeys{ltd@ttp}{#1}}
37 \renewcommand*{\titlefont}{\bfseries}
38 \define@key{ltd@ttp}{title}{\def\ltd@title@title{#1}}
39 \define@key{ltd@ttp}{subtitle}{\def\ltd@title@subtitle{#1}}
40 \define@key{ltd@ttp}{url}{\def\ltd@title@url{#1}}
41 \define@key{ltd@ttp}{author}{\def\ltd@title@author{#1}}
42 \define@key{ltd@ttp}{email}{\def\ltd@title@email{#1}}
43 \define@key{ltd@ttp}{revision}{\def\ltd@title@revision{#1}}
44 \define@key{ltd@ttp}{date}{\def\ltd@title@date{#1}}
45
46 \providecommand*{\printtitlepage}{}
47 \renewrobustcmd*{\printtitlepage}{%
48 \begingroup
49 \centering\titlefont
50 \begingroup\LARGE
51 \ifundef\ltd@title@url
52 {\ltd@title@title}
53 {\href{\ltd@title@url}{\ltd@title@title}}%
54 \par
55 \endgroup
56 \vspace{0.25\baselineskip}
57 \begingroup\large
58 \ltd@title@subtitle\par
59 \endgroup
60 \expandafter\url\expandafter{\ltd@title@url}\par
61 \begin{multicols}{2}
62 \raggedleft
63 \ltd@title@author\par
64 \expandafter\email\expandafter{\ltd@title@email}\par
65 \raggedright
66 Version \ltd@title@revision\par\ltd@title@date
67 \end{multicols}
68 \endgroup}
69
70
71 \renewcommand\tableofcontents{%
72 \pdfbookmark[1]{\contentsname}{contents}%
73 \section*{\contentsname
74 \@mkboth{%
75 \MakeUppercase\contentsname}{\MakeUppercase\contentsname}}%
76 \@starttoc{toc}%
77 }
78 \def\@starttoc#1{%
79 \begingroup
80 \begin{multicols}{2}
81 \makeatletter
82 \RaggedRight
83 \@input{\jobname.#1}%
84 \if@filesw
85 \expandafter\newwrite\csname tf@#1\endcsname
86 \immediate\openout \csname tf@#1\endcsname \jobname.#1\relax
87 \fi
88 \end{multicols}
89 \@nobreakfalse
90 \endgroup}
91
92 \let\accentcolour\spotcolor
93
94 \newcommand*{\allsectionsfont}{\sffamily\accentcolour}
95
96 \renewcommand\section{\@startsection {section}{1}{\z@}%
97 {-3.5ex \@plus -1ex \@minus -.2ex}%
98 {2.3ex \@plus.2ex}%
99 {\normalfont\Large\bfseries\allsectionsfont}}
100 \renewcommand\subsection{\@startsection{subsection}{2}{\z@}%
101 {-3.25ex\@plus -1ex \@minus -.2ex}%
102 {1.5ex \@plus .2ex}%
103 {\normalfont\large\bfseries\allsectionsfont}}
104 \renewcommand\subsubsection{\@startsection{subsubsection}{3}{\z@}%
105 {-3.25ex\@plus -1ex \@minus -.2ex}%
106 {1.5ex \@plus .2ex}%
107 {\normalfont\normalsize\bfseries\allsectionsfont}}
108 \renewcommand\paragraph{\@startsection{paragraph}{4}{\z@}%
109 {3.25ex \@plus1ex \@minus.2ex}%
110 {-1em}%
111 {\normalfont\normalsize\bfseries\allsectionsfont}}
112 \renewcommand\subparagraph{\@startsection{subparagraph}{5}{\parindent}%
113 {3.25ex \@plus1ex \@minus .2ex}%
114 {-1em}%
115 {\normalfont\normalsize\bfseries\allsectionsfont}}
116
117 % from KOMA-Script
118 \newcommand*{\@list@extra}{%
119 \ifdim\parskip>\z@
120 \topsep\z@
121 \parsep\parskip
122 \itemsep\z@
123 \fi
124 }
125 \appto\@listi{\@list@extra}
126 \appto\@listii{\@list@extra}
127 \appto\@listiii{\@list@extra}
128 \appto\@listiv{\@list@extra}
129 \appto\@listv{\@list@extra}
130 \appto\@listvi{\@list@extra}
131 \makeatother
132
133 \newrobustcmd*{\tex}{\TeX}
134 \newrobustcmd*{\etex}{\mbox{e-TeX}}
135 \newrobustcmd*{\pdftex}{pdf\-\tex}
136 \newrobustcmd*{\xetex}{Xe\-\tex}
137 \newrobustcmd*{\luatex}{Lua\-\tex}
138 \newrobustcmd*{\latex}{\LaTeX}%{La\kern-0.07em TeX}
139 \newrobustcmd*{\pdflatex}{pdf\-\latex}
140 \newrobustcmd*{\xelatex}{Xe\-\latex}
141 \newrobustcmd*{\lualatex}{Lua\-\latex}
142 \newrobustcmd*{\miktex}{Mik\-\tex}
143 \newrobustcmd*{\texlive}{\tex~live}
144 \newrobustcmd*{\bibtex}{Bib\kern-0.07em TeX}
145 \newrobustcmd*{\lppl}{\latex{} Project Public License}
146
147 \renewcommand*{\verbatimfont}{\ttfamily}
148 \renewcommand*{\displayverbfont}{\ttfamily}
149 \renewcommand*{\marglistfont}{\accentcolour\sffamily\small}
150 \renewcommand*{\margnotefont}{\sffamily\small}
151 \renewcommand*{\optionlistfont}{\accentcolour\sffamily\displayverbfont}
152 \renewcommand*{\ltxsyntaxfont}{\ttfamily}
153 \renewcommand*{\ltxsyntaxlabelfont}{\accentcolour\displayverbfont}
154 \renewcommand*{\changelogfont}{\normalfont}
155 \renewcommand*{\changeloglabelfont}{\accentcolour\sffamily\bfseries}
156 \newcommand*{\stylelistlabelfont}{\accentcolour\sffamily\small}
157 \newcommand*{\bibfieldformatfont}{\sffamily}
158 \newcommand*{\bibfieldformatlabelfont}{\accentcolour\bibfieldformatfont\small}
159
160 \MakeAutoQuote*{<}{>}
161
162
163 \titlepage{%
164 title={The \sty{biblatex-trad} Package},
165 subtitle={Traditional bibliography styles for \sty{biblatex}},
166 url={https://github.com/moewew/biblatex-trad/},
167 author={Marco Daniel\\Moritz Wemheuer},
168 email={[email protected]},
169 revision={0.5},
170 date={\DTMDate{2021-03-06}}}
171
172 \hypersetup{%
173 pdftitle={The biblatex-trad Package},
174 pdfsubject={Traditional bibliography styles for biblatex},
175 pdfauthor={Marco Daniel},
176 pdfkeywords={tex, latex, biblatex, bibtex, bibliography, references, citation}}
177
178
179 \newrobustcmd*{\Deprecated}{%
180 \textcolor{spot}{\margnotefont Deprecated}}
181 \newrobustcmd*{\DeprecatedMark}{%
182 \leavevmode\marginpar{\Deprecated}}
183 \newcommand*{\gitissuelink}[1]{%
184 \href{https://github.com/moewew/biblatex-trad/issues/#1}{issue \##1 on github}}
185
186 \hyphenation{%
187 star-red
188 bib-lio-gra-phy
189 white-space
190 }
191
192 \begin{document}
193
194 \printtitlepage
195 \tableofcontents
196
197
198 \section{Introduction}\label{sec:int}
199
200 The package \sty{biblatex-trad} is a contribution to the great package \sty{biblatex}.
201
202 It provides the implementation of the traditional bibliography styles (\sty{plain},
203 \sty{unsrt}, \sty{alpha} and \sty{abbrv}) as a style for \sty{biblatex}.
204
205 \subsection{Motivation}\label{subsec:int:mot}
206
207 The package is motivated by a question at \tex{} -- \latex Stack Exchange
208 \enquote{\href{http://tex.stackexchange.com/a/69706/}{How to emulate the traditional BibTeX styles
209 (\sty{plain}, \sty{abbrv}, \sty{unsrt}, \sty{alpha}) as closely as possible with \sty{biblatex}?}}
210
211 \subsection{Requirements}
212 The use of the styles requires the \sty{biblatex} package.
213 It is tested with the current version of \sty{biblatex} (at the time of writing that is v3.16).
214 Care has been taken to retain backwards compatibility with older versions,
215 but please do not expect the styles to work flawlessly with ancient versions of \sty{biblatex}.
216 Note also that the style may fail silently with older versions, it need not necessarily emit noisy
217 warnings or error messages, the output might just be wrong.
218
219 Note that in recent versions of \sty{biblatex} the \bibtex backend has been degraded to
220 the status of \enquote{fallback backend}.
221 Some features of this style will only work properly if you use the default Biber backend.
222
223 \subsection{License}
224
225 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}
226
227
228 \subsection{Feedback}\label{subsec:int:feb}
229
230 Please use the \sty{biblatex-trad} project page on GitHub to report bugs and submit feature requests.\fnurl{https://github.com/moewew/biblatex-trad}
231
232 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}
233
234 \section{Usage}
235
236 \sty{biblatex-trad} is not a standalone package. As described in \secref{sec:int} it is
237 a small collection of styles. So you can load the styles as follows:
238
239 \begin{lstlisting}[style=latex,escapeinside={(*@}{@*)}]{}
240 \usepackage[style=(*@$\langle$\normalfont\emph{style}$\rangle$@*)]{biblatex}
241 \end{lstlisting}
242 The available styles are listed below.
243 \begin{marglist}
244
245 \item[trad-plain] Implementation of the standard style \sty{plain}
246 \item[trad-unsrt] Implementation of the standard style \sty{unsrt}
247 \item[trad-alpha] Implementation of the standard style \sty{alpha}
248 \item[trad-abbrv] Implementation of the standard style \sty{abbrv}
249
250 \end{marglist}
251
252 After loading the style you can use all options provided by \sty{biblatex}.
253 That means also that all fields of the standard bibliography drivers are available,
254 even if they are unknown to the traditional \texttt{.bst} files.
255
256 \section{Limitations}
257
258 Up to now the entry types \bibtype{article}, \bibtype{book}, \bibtype{incollection},
259 \bibtype{inproceedings}, \bibtype{online}, \bibtype{proceedings}, \bibtype{thesis},
260 \bibtype{report} and \bibtype{unpublished} are set up.
261
262 Since the styles are based on \sty{biblatex} standard styles, the fields retain the meaning
263 they have in \sty{biblatex} even if that may be at odds with how the traditional \sty{.bst}
264 files handle those fields.
265
266
267 \section{Revision History}\label{apx:log}
268 \begin{changelog}
269 \begin{release}{0.5}{2021-03-06}
270 \item Synced with \sty{biblatex} v3.16 (2020-12-31)
271 \end{release}
272
273 \begin{release}{0.4a}{2018-02-17}
274 \item Fixed alphabetic labels for names with prefix (\enquote{von} part) (\gitissuelink{34})
275 \end{release}
276
277 \begin{release}{0.4}{2018-02-02}
278 \item Fixed incorrect bibstring for chapters (\gitissuelink{32})
279 \item Various small modifications
280 \end{release}
281
282 \begin{release}{0.3}{2016-06-26}
283 \item Fix issues with new name formats in \sty{biblatex} versions $\geq$~3.3 (\gitissuelink{25})
284 \item Fix problems with the related mechanism (\gitissuelink{24})
285 \item Proper support for \bibtype{thesis}-types (\gitissuelink{23})
286 \item Modify \opt{maxalphanames}/\opt{minalphanames} and \cmd{labelalphaothers} in \sty{trad-alpha} to mirror \sty{alpha} more closely (\gitissuelink{22})
287 \item Use \bibfield{labelprefix} instead of \bibfield{prefixnumber}
288 \end{release}
289
290 \begin{release}{0.2}{2012-09-29}
291 \item Fixed missing comma after journal name if journal name has a period
292 \item Make titles sentence case
293 \item Removed extra \emph{in}
294 \item Removed extra \cmd{printfield}
295 \item Fixed extra comma if \bibtype{article} doesn't have a year
296 \item Use package \sty{libertine-type1} for documentation
297 \end{release}
298
299 \begin{release}{0.1}{2012-09-09}
300 \item First upload
301 \end{release}
302 \end{changelog}
303 \end{document}
304
305 \endinput