summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/biblatex/biblatex2.sty
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/latex/biblatex/biblatex2.sty')
-rw-r--r--Master/texmf-dist/tex/latex/biblatex/biblatex2.sty97
1 files changed, 58 insertions, 39 deletions
diff --git a/Master/texmf-dist/tex/latex/biblatex/biblatex2.sty b/Master/texmf-dist/tex/latex/biblatex/biblatex2.sty
index 079897b93e1..c55458a475d 100644
--- a/Master/texmf-dist/tex/latex/biblatex/biblatex2.sty
+++ b/Master/texmf-dist/tex/latex/biblatex/biblatex2.sty
@@ -436,6 +436,7 @@
\newtoggle{blx@useeditor}
\newtoggle{blx@usetranslator}
\newtoggle{blx@useprefix}
+\newtoggle{blx@addset}
\newtoggle{blx@setonly}
\newtoggle{blx@dataonly}
\newtoggle{blx@skipbib}
@@ -554,7 +555,7 @@
% resulting number of things in the filtered list. This is
% because \tempcnta is used to set citetotal - this use
% of filtering for cite sorting has the side-effect of stripping
-% duplicated like \cite{foo,foo} but we need then to keep citetotal
+% duplicates like \cite{foo,foo} but we need then to keep citetotal
% in sync.
\protected\def\blx@filtercitesort#1#2{%
@@ -673,7 +674,7 @@
\ifx\blx@tempb\blx@tempc
\else
\blx@warning@noline{%
- File '#1.#2' created by wrong version}
+ File '#1.#2' is wrong format version - expected \blx@bblversion}
\fi
\else
\blx@error
@@ -690,38 +691,13 @@
\closein\blx@bcfin
\expandafter\endgroup\blx@tempa}
-\def\blx@sig@bib{@Comment{$ biblatex control file $}}
-\edef\blx@ver@bib{@Comment{$ biblatex version \blx@bblversion\space $}}
-\edef\blx@sig@aux{\@percentchar\space $ biblatex auxiliary file $}
-\edef\blx@ver@aux{\@percentchar\space$ biblatex version \blx@bblversion\space $}
-\let\blx@sig@bbl\blx@sig@aux
-\let\blx@ver@bbl\blx@ver@aux
+\edef\blx@sig@bbl{\@percentchar\space $ biblatex auxiliary file $}
+\edef\blx@ver@bbl{\@percentchar\space $ biblatex bbl format version \blx@bblversion\space $}
\edef\blx@sig@bcf{\detokenize{<?xml version="1.0" encoding="UTF-8"?>}}
\edef\blx@ver@bcf{%
- \detokenize{<bcf:controlfile version="}\blx@bblversion
+ \detokenize{<bcf:controlfile version="}\blx@bcfversion
\detokenize{" xmlns:bcf="https://sourceforge.net/projects/biblatex">}}
-\edef\blx@msg@aux{%
- \blx@sig@aux\blx@nl
- \blx@ver@aux\blx@nl
- \@percentchar\space Do not modify this file!\blx@nl
- \@percentchar\blx@nl
- \@percentchar\space This is an auxiliary file
- used by the 'biblatex' package.\blx@nl
- \@percentchar\space This file may safely be deleted.
- It will be recreated as\blx@nl
- \@percentchar\space required.\blx@nl
- \@percentchar\blx@nl\string\relax\blx@nl}
-\edef\blx@msg@bib{%
- \blx@sig@bib\blx@nl
- \blx@ver@bib\blx@nl
- Do not modify this file!\blx@nl\blx@nl
- This is an auxiliary file used
- by the 'biblatex' package.\blx@nl
- This file may safely be deleted.
- It will be recreated as\blx@nl
- required.\blx@nl\blx@nl}
-
% {<true>}{<false>}
\newrobustcmd*{\lbx@ifutfinput}{\ifboolexpr{%
@@ -4735,10 +4711,12 @@
% We need to now load any style data model
% Order of precedence is:
-% <datamodel option>.dbx, <style option>.dbx
+% <datamodel option>.dbx
+% <style option>.dbx
+% <citestyle option>.dbx and <bibstyle option>.dbx
% This has to be done before the real options processing so we need to
-% pick out just these two options to look at. You can't do this with keyval,
-% you have to use kvoptions. So, pick out these two, pass through all
+% pick out just these four options to look at. You can't do this with keyval,
+% you have to use kvoptions. So, pick out these four, pass through all
% others and delete datamodel option as we don't care about it when we come
% to really set options below
\SetupKeyvalOptions{
@@ -4746,10 +4724,23 @@
prefix=blx@opt@eldt@}
\DeclareStringOption{datamodel}
\DeclareStringOption{style}
+\DeclareStringOption{citestyle}
+\DeclareStringOption{bibstyle}
\DeclareDefaultOption{}
\ProcessLocalKeyvalOptions{blx@opt@eldt}
\ifx\blx@opt@eldt@datamodel\@empty
- \blx@inputonce{\blx@opt@eldt@style.dbx}{biblatex style data model}{}{}{}{}
+ \ifx\blx@opt@eldt@style\@empty
+ \ifx\blx@opt@eldt@citestyle\@empty
+ \else
+ \blx@inputonce{\blx@opt@eldt@citestyle.dbx}{biblatex citestyle data model}{}{}{}{}
+ \fi
+ \ifx\blx@opt@eldt@bibstyle\@empty
+ \else
+ \blx@inputonce{\blx@opt@eldt@bibstyle.dbx}{biblatex bibstyle data model}{}{}{}{}
+ \fi
+ \else
+ \blx@inputonce{\blx@opt@eldt@style.dbx}{biblatex style data model}{}{}{}{}
+ \fi
\else
\blx@inputonce{\blx@opt@eldt@datamodel.dbx}{biblatex style data model}{}{}{}{}
\fi
@@ -5225,7 +5216,8 @@
{\blx@addpageref{\abx@field@entrykey}}%
\nottoggle{blx@setonly}
{\listcsxadd{blx@slists@\the\c@refsection @entry@\blx@slist@name}{\abx@field@entrykey}}
- {\toggletrue{blx@skipbib}%
+ {\global\toggletrue{blx@addset}%
+ \toggletrue{blx@skipbib}%
\toggletrue{blx@skiplos}%
\toggletrue{blx@skiplab}}%
\nottoggle{blx@skipbib}
@@ -5260,6 +5252,30 @@
\blx@bbl@hooks
\endgroup}
+% This, at the end of the .bbl, puts any set parents into the
+% global sort list of citations as this is needed for the subentry citing
+% when sortcites is enabled as for sortcites, the global sorting list
+% is used and the parent set of a subentry is not necessarily
+% available in the global sortlist.
+\def\blx@addset{%
+ \begingroup
+ \letcs\blx@tempa{blx@slists@\the\c@refsection @entry@\blx@sorting}%
+ \global\cslet{blx@slists@\the\c@refsection @entry@\blx@sorting}\@empty
+ \forlistloop\blx@addset@i\blx@tempa
+ \endgroup}
+
+\def\blx@addset@i#1{%
+ \listcsgadd{blx@slists@\the\c@refsection @entry@\blx@sorting}{#1}%
+ \ifcsdef{blx@setp@\the\c@refsection @#1}
+ {\expandafter\expandafter\expandafter\forcsvlist
+ \expandafter\expandafter\expandafter\blx@addset@ii
+ \expandafter\expandafter\expandafter{%
+ \csname blx@setp@\the\c@refsection @#1\endcsname}}
+ {}}
+
+\def\blx@addset@ii#1{%
+ \listcsgadd{blx@slists@\the\c@refsection @entry@\blx@sorting}{#1}}
+
\def\blx@bbl@shorthand{%
\ifundef\abx@field@shorthand
{}
@@ -5393,7 +5409,11 @@
\let\verb\blx@bbl@verbdef
\let\endverb\blx@bbl@verbend}
-\def\blx@bblend{}
+\def\blx@bblend{%
+ \iftoggle{blx@addset}
+ {\blx@addset
+ \global\togglefalse{blx@addset}}
+ {}}
% {<instcount>}{<entrykey>}{<refsection>}{<labelnumber>}
@@ -5451,6 +5471,7 @@
\blx@bbl@addentryfield{\detokenize{#1}}{#2}{prefixnumber}{#3}}
\def\blx@bbl@slist#1#2{%
+ \csnumgdef{blx@labelnumber@\the\c@refsection}{0}%
\begingroup
\def\blx@slist@name{#2}%
% This macro (\key) will only be called in shorthand lists
@@ -10343,9 +10364,7 @@
\AtBeginDocument{%
\blx@checkencoding
\if@filesw
- \blx@ifsigned{\jobname}{bcf}
- {\blx@ctrlwrite@biber}
- {}%
+ \blx@ctrlwrite@biber
\blx@bblinput
\blx@maxsection\z@
\fi