diff options
author | Karl Berry <karl@freefriends.org> | 2013-11-24 22:40:15 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2013-11-24 22:40:15 +0000 |
commit | 2f4083de8cf96ea8d55425d1e0074d43b2216d93 (patch) | |
tree | b4f499b2fd0cb8bbb5d84cff3d81e22f1158ee27 /Master/texmf-dist/tex/latex/biblatex/biblatex1.sty | |
parent | 7d8d8f2338990bb460545d4ca8b2738b0d3bb25e (diff) |
biblatex (24nov13)
git-svn-id: svn://tug.org/texlive/trunk@32231 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/biblatex/biblatex1.sty')
-rw-r--r-- | Master/texmf-dist/tex/latex/biblatex/biblatex1.sty | 117 |
1 files changed, 88 insertions, 29 deletions
diff --git a/Master/texmf-dist/tex/latex/biblatex/biblatex1.sty b/Master/texmf-dist/tex/latex/biblatex/biblatex1.sty index 5777027e0ab..3e529ac3280 100644 --- a/Master/texmf-dist/tex/latex/biblatex/biblatex1.sty +++ b/Master/texmf-dist/tex/latex/biblatex/biblatex1.sty @@ -70,14 +70,32 @@ cite,citeref,drftcite,footbib,inlinebib,jurabib,mcite,mciteplus, mlbib,multibbl,multibib,natbib,opcit,overcite,splitbib,ucs}% \@ifpackageloaded{polyglossia} - {\iftoggle{blx@autolang} - {\blx@mkautolangpoly} - {\blx@mknoautolang}} + {\ifboolexpr{ + not test {\iftoggle{blx@autolangbib}} + and + not test {\iftoggle{blx@autolangcite}}} + {\blx@mknoautolang} + {\blx@mkautolangpoly}} {\@ifpackageloaded{babel} - {\iftoggle{blx@autolang} - {\blx@mkautolangbabel} - {\blx@mknoautolang}} - {{\blx@mknoautolang}}}% + {\ifboolexpr{ + not test {\iftoggle{blx@autolangbib}} + and + not test {\iftoggle{blx@autolangcite}}} + {\blx@mknoautolang} + {\blx@mkautolangbabel}} + {\blx@mknoautolang}}% + % These already have defaults set to basically do nothing + % so if the toggles are true, we need to define again since + % mkautolang* redefines \blx@beglang + % In turn, \blx@beglang defines \blx@endlang and so \blx@beglangcite and + % \blx@endlangcite need redefining inside \blx@beglang after \blx@endlang + % has been defined. + \iftoggle{blx@autolangbib} + {\let\blx@beglangbib\blx@beglang} + {}% + \iftoggle{blx@autolangcite} + {\let\blx@beglangcite\blx@beglang} + {}% \csuse{abx@extras@\blx@languagename}% \csuse{abx@strings@\blx@languagename}% \undef\blx@mkautolangbabel @@ -421,7 +439,8 @@ \newtoggle{blx@debug} \newtoggle{blx@sortcase} \newtoggle{blx@sortupper} -\newtoggle{blx@autolang} +\newtoggle{blx@autolangbib} +\newtoggle{blx@autolangcite} \newtoggle{blx@clearlang} \newtoggle{blx@defernumbers} \newtoggle{blx@omitnumbers} @@ -3173,9 +3192,9 @@ \let\abx@macro@bibindex\@empty \let\abx@macro@pageref\@empty \csuse{blx@hook@bbxinit}#1% - \blx@beglang + \blx@beglangbib \blx@driver{#2}% - \blx@endlang + \blx@endlangbib \endgroup} % Punctuation @@ -4024,7 +4043,7 @@ \blx@setoptions@entry \addtocounter{instcount}\@ne \blx@execute - \blx@beglang#3\blx@endlang + \blx@beglangbib#3\blx@endlangbib \endgroup} {}} @@ -4063,13 +4082,13 @@ \blx@setoptions@entry \addtocounter{instcount}\@ne \blx@execute - \blx@beglang + \blx@beglangbib \blx@begunit \blx@entryset@precode \blx@driver{\blx@imc@thefield{entrytype}} \blx@entryset@postcode \blx@endunit - \blx@endlang + \blx@endlangbib \endgroup} {\blx@nounit}} @@ -5015,6 +5034,10 @@ %% babel/polyglossia interface \def\blx@beglang{\blx@clearlang\begingroup} \def\blx@endlang{\endgroup} +\let\blx@beglangbib\blx@beglang +\let\blx@endlangbib\blx@endlang +\let\blx@beglangcite\blx@beglang +\let\blx@endlangcite\blx@endlang \let\blx@hook@endlang\@empty \let\blx@hook@initlang\@empty \let\blx@imc@mainlang\@empty @@ -5047,6 +5070,12 @@ \blx@hook@endlang \csname end\blx@thelangenv\endcsname \endgroup}% + \iftoggle{blx@autolangbib} + {\let\blx@endlangbib\blx@endlang} + {}% + \iftoggle{blx@autolangcite} + {\let\blx@endlangcite\blx@endlang} + {}% \csname\blx@thelangenv\expandafter\endcsname \expandafter{\abx@field@langid}}}}} {}% @@ -5071,8 +5100,18 @@ \blx@hook@endlang \csname end\blx@thelangenv\endcsname \endgroup}% - \csname\blx@thelangenv\expandafter\endcsname - \expandafter{\abx@field@langid}% + \iftoggle{blx@autolangbib} + {\let\blx@endlangbib\blx@endlang} + {}% + \iftoggle{blx@autolangcite} + {\let\blx@endlangcite\blx@endlang} + {}% + \ifcsstring{blx@thelangenv}{langname} + {\ifdef\abx@field@langidopts + {\csname\abx@field@langid\expandafter\endcsname\expandafter[\abx@field@langidopts]} + {\csname\abx@field@langid\endcsname}} + {\csname\blx@thelangenv\expandafter\endcsname + \expandafter{\abx@field@langid}}% % These lines are equal to \blx@maplang \blx@resetpunct \csuse{abx@extras@\abx@field@langid}% @@ -6836,12 +6875,12 @@ \blx@execute \blx@initunit \blx@anchor - \blx@beglang + \blx@beglangbib \bibsentence \blx@pagetracker \blx@driver\abx@field@entrytype \blx@postpunct - \blx@endlang}% + \blx@endlangbib}% \endgroup} {}} @@ -7024,12 +7063,12 @@ \csuse{blx@hook@lositem}% \blx@execute \blx@initunit - \blx@beglang + \blx@beglangbib \bibsentence \blx@pagetracker \blx@driver{shorthands}% \blx@postpunct - \blx@endlang}% + \blx@endlangbib}% \endgroup} {}} @@ -7675,6 +7714,7 @@ \blx@pagetracker \csuse{blx@hook@citekey}% \csuse{blx@hook@citekey@next}% + \blx@beglangcite \blx@execute \blx@loopcode \blx@citecounter @@ -7687,6 +7727,7 @@ \def\blx@thecheckpunct{\blx@err@nestcite\@gobble}% \blx@postcode \fi + \blx@endlangcite \endgroup} % cite counter @@ -9913,15 +9954,33 @@ {\let\abx@bibmonth\blx@imc@biblstring}} \DeclareBibliographyOption{language}{% - \ifstrequal{#1}{auto} - {\toggletrue{blx@autolang}% - \def\blx@languagename{english}} - {\IfFileExists{#1.lbx} - {\togglefalse{blx@autolang}% - \edef\blx@languagename{#1}} - {\blx@error - {Language '#1' not supported} - {Failed to find a matching '#1.lbx' file}}}} + \togglefalse{blx@autolangbib}% + \togglefalse{blx@autolangcite}% + \ifboolexpr{ + test {\ifstrequal{#1}{auto}} + or + test {\ifstrequal{#1}{autobib}} + or + test {\ifstrequal{#1}{autocite}} + } + {\def\blx@languagename{english}% + \ifstrequal{#1}{auto} + {\toggletrue{blx@autolangbib}% + \toggletrue{blx@autolangcite}} + {}% + \ifstrequal{#1}{autobib} + {\toggletrue{blx@autolangbib}} + {}% + \ifstrequal{#1}{autocite} + {\toggletrue{blx@autolangcite}} + {}} + {\IfFileExists{#1.lbx} + {\togglefalse{blx@autolangbib}% + \togglefalse{blx@autolangcite}% + \edef\blx@languagename{#1}} + {\blx@error + {Language '#1' not supported} + {Failed to find a matching '#1.lbx' file}}}} \DeclareBibliographyOption{clearlang}[true]{% \settoggle{blx@clearlang}{#1}} @@ -10578,7 +10637,7 @@ usetranslator=false,indexing=false,abbreviate=true,dateabbrev=true, backref=false,backrefsetstyle=setonly,pagetracker=false,ibidtracker=false, idemtracker=false,opcittracker=false,loccittracker=false,citetracker=false, - citecounter=false,block=none,language=auto,clearlang=true,autolang=none, + citecounter=false,block=none,language=autobib,clearlang=true,autolang=none, date=comp,datelabel=year,origdate=comp,eventdate=comp,urldate=short, autopunct=true,punctfont=false,defernumbers=false, refsection=none,refsegment=none,citereset=none,hyperref=auto, |