summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/biblatex-contrib/biblatex-ext/biblatex-ext.tex
diff options
context:
space:
mode:
Diffstat (limited to 'macros/latex/contrib/biblatex-contrib/biblatex-ext/biblatex-ext.tex')
-rw-r--r--macros/latex/contrib/biblatex-contrib/biblatex-ext/biblatex-ext.tex157
1 files changed, 112 insertions, 45 deletions
diff --git a/macros/latex/contrib/biblatex-contrib/biblatex-ext/biblatex-ext.tex b/macros/latex/contrib/biblatex-contrib/biblatex-ext/biblatex-ext.tex
index 0390a822ae..c0603c4856 100644
--- a/macros/latex/contrib/biblatex-contrib/biblatex-ext/biblatex-ext.tex
+++ b/macros/latex/contrib/biblatex-contrib/biblatex-ext/biblatex-ext.tex
@@ -1,4 +1,4 @@
-\documentclass[DIV=9]{scrartcl}
+\documentclass[11pt,a4paper]{article}
\usepackage{iftex}
\iftutex
\usepackage{fontspec}
@@ -24,7 +24,12 @@
\usepackage[scaled=0.78]{beramono}
\usepackage{bm}
\fi
+\usepackage[%verbose,
+ left=3.5cm, right=3.5cm,
+ marginparwidth=2.5cm
+]{geometry}
\usepackage{microtype}
+\usepackage{ragged2e}
\usepackage{hyphenat}
\usepackage{booktabs}
\usepackage{multicol}
@@ -165,6 +170,7 @@
\newtcolorbox{bibexample}[1][]{enhanced,
colframe=spot!75!black, colback=spot!5!white,
+ before title=\raggedright,
#1}
\newtcblisting{biblatexcode}{enhanced,
colframe=black!75!white, colback=black!5!white,
@@ -270,9 +276,27 @@
\end{multicols}
\endgroup}
-\BeforeStartingTOC[toc]{\begin{multicols}{2}}
-\AfterStartingTOC[toc]{\end{multicols}}
-\BeforeTOCHead[toc]{\pdfbookmark[1]{\contentsname}{contents}}
+
+\renewcommand\tableofcontents{%
+ \section*{\contentsname
+ \@mkboth{%
+ \MakeUppercase\contentsname}{\MakeUppercase\contentsname}}%
+ \pdfbookmark[1]{\contentsname}{contents}%
+ \@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}
\newrobustcmd*{\tex}{\TeX}
\newrobustcmd*{\etex}{\mbox{e-TeX}}
@@ -305,9 +329,28 @@
\let\accentcolour\spotcolor
-\addtokomafont{section}{\accentcolour}
-\addtokomafont{subsection}{\accentcolour}
-\addtokomafont{subsubsection}{\accentcolour}
+\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}}
\renewcommand*{\verbatimfont}{\ttfamily}
\renewcommand*{\displayverbfont}{\ttfamily}
@@ -434,7 +477,7 @@
}
% By Stefan Kottwitz, see https://tex.stackexchange.com/a/799/35864
-\newcommand*\justify{%
+\newcommand*\ttjustify{%
\fontdimen2\font=0.4em% interword space
\fontdimen3\font=0.2em% interword stretch
\fontdimen4\font=0.1em% interword shrink
@@ -443,9 +486,9 @@
}
% no \mbox here, we may have to break things
-\renewrobustcmd*{\sty}[1]{{\verbatimfont\justify #1}}
-\newrobustcmd*{\blxstyle}[1]{{\verbatimfont\justify #1}}
-\newrobustcmd*{\filename}[1]{{\verbatimfont\justify #1}}
+\renewrobustcmd*{\sty}[1]{{\verbatimfont\ttjustify #1}}
+\newrobustcmd*{\blxstyle}[1]{{\verbatimfont\ttjustify #1}}
+\newrobustcmd*{\filename}[1]{{\verbatimfont\ttjustify #1}}
\renewrobustcmd*{\bibfield}[1]{\sty{#1}}
\renewrobustcmd*{\opt}[1]{\sty{#1}}
\newrobustcmd*{\optval}[1]{\sty{#1}}
@@ -455,7 +498,7 @@
\let\cs\cmd
\newrobustcmd*{\bibfieldformat}[1]{{\bibfieldformatfont #1}}
-\newrobustcmd*{\gencode}[1]{{\verbatimfont\justify #1}}
+\newrobustcmd*{\gencode}[1]{{\verbatimfont\ttjustify #1}}
\def\exltd@buildhypercmd@i#1{%
\expandafter\newrobustcmd\expandafter*\expandafter
@@ -476,7 +519,7 @@
\newcommand*{\ctan}{\mkbibacro{CTAN}}
\newcommand*{\gitbaseurl}{https://github.com/moewew/biblatex-ext}
-\newcommand*{\extblxversion}{0.9}
+\newcommand*{\extblxversion}{0.10}
\newcommand*{\biber}{Biber}
\newcommand*{\gitissuelink}[1]{%
\href{\gitbaseurl/issues/#1}{issue \##1 on github}}
@@ -547,9 +590,9 @@
subtitle = {Extensions for the \sty{biblatex} standard styles},
url = {\gitbaseurl},
author = {Moritz Wemheuer},
- link = {mwemheu@gmail.com},%
+ link = {mwemheu@posteo.de},%
revision = {\extblxversion},
- date = {\DTMDate{2020-08-21}},
+ date = {\DTMDate{2021-01-01}},
}
\hypersetup{%
@@ -714,7 +757,7 @@ under the terms of the \lppl, version 1.3c%
\fnurl{https://www.latex-project.org/lppl/lppl-1-3c.txt}
or (at your option) any later version%
\fnurl{https://www.latex-project.org/lppl.txt}.
-This bundle is maintained by Moritz Wemheuer (\textcopyright 2017--2020).
+This bundle is maintained by Moritz Wemheuer (\textcopyright 2017--2021).
\subsection{Feedback}\label{sec:feedback}
@@ -1067,7 +1110,7 @@ Sigfridsson and Ryde \quad Knuth 1984, 1986
\styleitem{ext-authoryear-tecomp}
A compact author-year citation style that combines
-\blxstyle{ext-authoryear-tcomp} and \blxstyle{ext-authoryear-ecomp}.
+\blxstyle{ext-authoryear-tcomp} and \blxstyle{ext-author\-year-ecomp}.
\begin{bibexample}
\begin{lstlisting}[style=extblxstylelatex]
\usepackage[style=ext-authoryear-tecomp]{biblatex}
@@ -1815,6 +1858,9 @@ Field formats can be modified with \cmd{DeclareFieldFormat}.
\exampleprintbib{sigfridsson}
\end{bibexample}
+A customisation example for \bibfield{issuedate} can be found in the
+\hypercmd{volnumdatedelim} description.
+
\bibfieldformatitem{volumeof} The format for the \bibfield{volume} of a
\bibfield{maintitle} used when \hyperkvopt{maintitleaftertitle}{true}.
\begin{bibexample}
@@ -2174,6 +2220,7 @@ The default is a comma followed by a space.
\begin{lstlisting}[style=extblxstylelatex]
\renewcommand*{\pubdatedelim}{\addspace}
\end{lstlisting}
+\tcblower
\renewcommand*{\pubdatedelim}{\addspace}
\csuse{bbx@opt@mergedate@false}%
\exampleprintbib{knuth:ct:a}
@@ -2296,9 +2343,9 @@ or \enquote{\prm{opening delimiter}\allowbreak text\allowbreak
is introduced.
It cannot be guaranteed that the opening and closing delimiters are executed
at the same level of grouping, let alone in the same group.
-As mentioned above, this approach is not suitable to wrap the citation up in a
-wrapper command, i.e.\ to pass the entire output of the citation command as
-argument to a macro.
+As mentioned above, citation delimiters cannot be used to introduce a
+wrapper command for the citation output, i.e.\ to pass the entire output of the
+citation command as argument to a macro.
Instead of hard-coded \gencode{(}, \gencode{)}, \gencode{[} and \gencode{]}
their \sty{biblatex} counterparts \cmd{bibopenparen}, \cmd{bibcloseparen},
@@ -2584,6 +2631,9 @@ By default the macro is defined and used as follows.
\usebibmacro{pubinstorg+location+date}{|organization|}}
\end{biblatexcode}
+An example use of the \bibmacro{pubinstorg+location+date} is shown
+in the descriotion of~\hypercmd{publocdelim}.
+
\keyitem[type+number]
A bibliography macro to print the \bibfield{type} and \bibfield{number} fields.
\end{keymarglistbook}
@@ -2714,8 +2764,46 @@ The package also defines two helpful bibliography macros.
\keyitem[tabular:omitsortname] Suppresses the labelname/sortname in the current
group.
\end{keymarglistbook}
+\begin{remindbox}
+ These two bibliography macros have a fairly basic definition that should make
+ them compatible with most styles (not only \sty{biblatex-ext}
+ or standard styles).
+ Consequently, they may not be able to support all advanced features of
+ the style you are using.
+
+ If you are missing anything, you will have to write versions of those macros
+ that are tailored to the specific style you are loading and the features you
+ want to use.
+\end{remindbox}
+
+For the common case of two-column tabular bibliographies there is a thin
+wrapper around \hypercmd{defbibtabular} that might turn out a bit easier to use.
+\begin{ltxsyntax}
+ \cmditem{defbibtabulartwocolumn}{name}{begin code}{end code}%
+ {anchor code}{driver precode}
+
+ This defines a two-column tabular bibliography environment with \prm{name},
+ \prm{begin code} and \prm{end code} as for \hypercmd{defbibtabular}.
+
+ The first column is an \hypercmd{anchorlang} column that executes
+ \prm{anchor code}, the second column executes a pre-code and
+ the bibliography driver.
+
+\begin{biblatexcode}
+\defbibtabulartwocolumn{(*@\prm{name}@*)}
+ {(*@\prm{begin code}@*)}{(*@\prm{end code}@*)}
+ {(*@\prm{anchor code}@*)}{(*@\prm{driver precode}@*)}
+\end{biblatexcode}
+is equivalent to
+\begin{biblatexcode}
+\defbibtabular{(*@\prm{name}@*)}
+ {(*@\prm{begin code}@*)}{(*@\prm{end code}@*)}
+ {\anchorlang{(*@\prm{anchor code}@*)} & \driver{(*@\prm{driver precode}@*)} \\}
+\end{biblatexcode}
+
+Usage examples are shown on the next page
-A simple example of a useful tabular bibliography setup is
+\clearpage
\begin{bibexample}[breakable,
title={Example document with tabular bibliography}]
\begin{lstlisting}[style=extblxstylelatex]
@@ -2798,30 +2886,6 @@ to avoid duplication.
The anchor is set to the first column, so that a viewer jumps there
if a link to the entry is followed.
-For the common case of two-column tabular bibliographies there is a thin
-wrapper around \hypercmd{defbibtabular} that might turn out a bit easier to use.
-\begin{ltxsyntax}
- \cmditem{defbibtabulartwocolumn}{name}{begin code}{end code}%
- {anchor code}{driver precode}
-
- This defines a two-column tabular bibliography environment with \prm{name},
- \prm{begin code} and \prm{end code} as for \hypercmd{defbibtabular}.
-
- The first column is an \hypercmd{anchorlang} column that executes
- \prm{anchor code}, the second column executes a pre-code and
- the bibliography driver.
-
-\begin{biblatexcode}
-\defbibtabulartwocolumn{(*@\prm{name}@*)}
- {(*@\prm{begin code}@*)}{(*@\prm{end code}@*)}
- {(*@\prm{anchor code}@*)}{(*@\prm{driver precode}@*)}
-\end{biblatexcode}
-is equivalent to
-\begin{biblatexcode}
-\defbibtabular{(*@\prm{name}@*)}
- {(*@\prm{begin code}@*)}{(*@\prm{end code}@*)}
- {\anchorlang{(*@\prm{anchor code}@*)} & \driver{(*@\prm{driver precode}@*)} \\}
-\end{biblatexcode}
Using \cmd{defbibtabulartwocolumn} the example from above could be written as
\begin{biblatexcode}
@@ -3540,6 +3604,9 @@ See also \filename{CHANGES.md}.
The numbers on the right indicate the relevant section of the manual.
\begin{changelog}
+\begin{release}{0.10}{2021-01-01}
+ \item Synced with \sty{biblatex} 3.16 changes.
+\end{release}
\begin{release}{0.9}{2020-08-21}
\item Synced with \sty{biblatex} 3.15 changes.
\end{release}