Skip to content

Commit

Permalink
Looking at #1383
Browse files Browse the repository at this point in the history
  • Loading branch information
plk committed Sep 30, 2024
1 parent 5fafe90 commit 762bdd3
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 14 deletions.
2 changes: 1 addition & 1 deletion doc/latex/biblatex/biblatex.tex
Original file line number Diff line number Diff line change
Expand Up @@ -9017,7 +9017,7 @@ \subsubsection{Labels}

\begin{ltxsyntax}

\cmditem{DeclareLabelalphaTemplate}[]{specification}
\cmditem{DeclareLabelalphaTemplate}[entrytype, \dots]{specification}

Defines the alphabetic label template for the given entrytypes. If no entrytypes are specified in the first argument, then the global label template is defined. The \prm{specification} is an undelimited list of \cmd{labelelement} directives which specify the elements used to build the label. Spaces, tabs, and line endings may be used freely to visually arrange the \prm{specification}. Blank lines are not permissible. This command may only be used in the preamble.

Expand Down
42 changes: 29 additions & 13 deletions tex/latex/biblatex/biblatex.sty
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
% This is not updated by build script as the control file version
% does not necessarily change with the package version.
% This is used when writing the .bcf
\def\blx@bcfversion{3.11}
\def\blx@bcfversion{3.12}

% This is not updated by build script as the bbl version
% does not necessarily change with the package version.
Expand Down Expand Up @@ -13336,9 +13336,9 @@
\xdef\blx@xml@labelalpha@part#1#2{%
~~~~~~<bcf:labelpart#1>#2</bcf:labelpart>\blx@nl}

\xdef\blx@xml@extradate#1{%
~~<bcf:extradatespec>\blx@nl
#1%
\xdef\blx@xml@extradate#1#2{%
~~<bcf:extradatespec type="#1">\blx@nl
#2%
~~</bcf:extradatespec>\blx@nl}
\xdef\blx@xml@extradatescope#1{%
~~~~<bcf:scope>\blx@nl
Expand Down Expand Up @@ -13747,8 +13747,12 @@
\dolistloop\blx@latem@type
% extradate specification
\eappto\blx@tempa{%
\blx@xml@comment{EXTRADATE}%
\blx@xml@extradate{\csuse{blx@bcf@extradatespec}}}%
\blx@xml@comment{EXTRADATE}}%
\def\do##1{%
\eappto\blx@tempa{%
\blx@xml@extradate{##1}{%
\csuse{blx@extradate@##1}}}}%
\dolistloop\blx@ed@type
% data inheritance
\eappto\blx@tempa{%
\blx@xml@comment{INHERITANCE}%
Expand Down Expand Up @@ -14266,7 +14270,7 @@
{\eappto\blx@tempc{ substring\string_side="right"}}
{\eappto\blx@tempc{ substring\string_side="left"}}}

% [<entrytype>]{<spec>}
% [<entrytype,...>]{<spec>}
\newrobustcmd*{\DeclareLabelalphaTemplate}[2][]{%
\ifblank{#1}
{\blx@latem{#2}{global}}
Expand Down Expand Up @@ -14839,19 +14843,31 @@
\def\blx@sortinclude@i#1{%
\appto\blx@tempa{\blx@xml@include{#1}}}

% {<field,field,...>}
\newrobustcmd*{\DeclareExtradate}[1]{%
% [<entrytype,...>]{<field,field,...>}
\newrobustcmd*{\DeclareExtradate}[2][]{%
\ifblank{#1}
{\blx@ed{#2}{global}}
{\forcsvlist{\blx@ed{#2}}{#1}}}
\@onlypreamble\DeclareExtradate
\blx@DeclareBackendOption{global,type}[xml]{extradatespec}

\def\blx@ed#1#2{%
\begingroup
\let\blx@tempa\@empty
\let\scope\blx@extradate@scope
#1%
\global\let\blx@bcf@extradatespec\blx@tempa
\ifdef\blx@ed@type
{\ifinlist{#2}\blx@ed@type
{\global\cslet{blx@extradate@#2}\blx@tempa}
{\listgadd\blx@ed@type{#2}%
\global\cslet{blx@extradate@#2}\blx@tempa}}
{\listgadd\blx@ed@type{#2}%
\global\cslet{blx@extradate@#2}\blx@tempa}%
\endgroup}
\@onlypreamble\DeclareExtradate
\blx@DeclareBackendOption{global}[xml]{extradatespec}

\newrobustcmd*{\blx@extradate@scope}[1]{%
\let\blx@tempb\@empty
\blx@tempcnta\z@
\let\field\blx@ordereded@field
#1%
\csxappto{blx@tempa}{%
Expand All @@ -14877,7 +14893,7 @@
\endgroup}
\@onlypreamble\DeclareExtradateContext
\blx@DeclareBackendOption{global,type}[xml]{extradatecontext}

\newrobustcmd*{\DeclareLabelname}[2][]{%
\begingroup
\let\blx@tempa\@empty
Expand Down

0 comments on commit 762bdd3

Please sign in to comment.