\ProvidesFile{blx-bibtex.def} [\abx@cptid] \blx@warning@noline{% Using fall-back BibTeX(8) backend:\MessageBreak functionality may be reduced/unavailable% } % Initialisation of backend-related switches, variables, etc. \newtoggle{blx@runbtx} % No interface provided for this but can be set 'in emergency' by user \def\blx@maxline{79} % Rename write stream so use is clear \let\blx@write\blx@bcfout % Data file initialisation \edef\blx@auxfile{\jobname} \let\blx@aux\@mainaux \newcommand*{\blxauxsuffix}{-blx} \begingroup \def\blx@tempa#1"#2{% #1\ifx#2\@empty\else \expandafter\blx@tempa \fi#2} \edef\blx@ctrlfile{% \noexpand\blx@tempa \expandafter\blx@tempa\jobname"\@empty \space\noexpand\@empty} \def\blx@tempa#1 #2{% #1\ifx#2\@empty\else \string_\expandafter\blx@tempa \fi#2} \xdef\blx@ctrlfile{\blx@ctrlfile} \endgroup \def\blx@auxinit#1{% \blx@auxwrite\blx@aux {\def\do##1{,\blx@stripbib{##1}}} {\ifx\blx@aux\@mainaux \else \blx@msg@aux \fi \string\bibstyle{biblatex}\blx@nl \string\bibdata{% \blx@ctrlfile\blxauxsuffix \ifx#1\@empty \else \dolistloop#1% \fi}\blx@nl \string\citation{biblatex-control}}} \def\blx@sig@bib{@Comment{$ biblatex control file $}} \edef\blx@ver@bib{% @Comment{$ biblatex bcf format version \blx@bcfversion\space $}} \let\blx@sig@aux\blx@sig@bbl \let\blx@ver@aux\blx@ver@bbl \edef\blx@msg@text{% \@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} \edef\blx@msg@aux{% \blx@sig@aux\blx@nl \blx@ver@aux\blx@nl \blx@msg@text \@percentchar\blx@nl\string\relax\blx@nl} \edef\blx@msg@bib{% \blx@sig@bib\blx@nl \blx@ver@bib\blx@nl \blx@msg@text\blx@nl} % User feedback \renewrobustcmd*{\RequireBiber}[1][2]{% \ifnumgreater{#1}\blx@reqbiber {\numgdef\blx@reqbiber{#1}} {}% \blx@checkbackend{style}} \@onlypreamble\RequireBiber \let\blx@reqbiber\z@ \def\blx@checkbackend#1{% \ifnum\blx@reqbiber>2 % \blx@error {Biber backend is required by #1} {The selected style or one of the .bib files requires Biber.\MessageBreak It will not work at all with BibTeX.}% \fi} \def\blx@check@logreq{% \begingroup \ltxrequest{biblatex}{{\iftoggle{blx@runltx}{1}{0}}}{% \provides[type=dynamic]{ \def\do##1{\file{##1.aux}} \dolistloop\blx@list@inactive \file{\blx@ctrlfile\blxauxsuffix.bib} } \requires[type=dynamic]{ \def\do##1{\file{##1.bbl}} \dolistloop\blx@list@inactive } \ifdef\blx@list@req@edit {\requires[type=editable]{ \forlistloop\file\blx@list@req@edit }} {} \ifdef\blx@list@req@stat {\requires[type=static]{ \forlistloop\file\blx@list@req@stat }} {} }% \def\do##1{% \ifinlist{##1}{\blx@list@active} {\blx@logreq@bibtex{1}{##1}} {\blx@logreq@bibtex{0}{##1}}}% \dolistloop\blx@list@inactive \endgroup} \def\blx@logreq@bibtex#1#2{% \logrequest[package=biblatex,priority=5,active=#1]{% \generic{bibtex} \cmdline{% \iftoggle{blx@bibtex8} {\binary{bibtex8} \option{--wolfgang} \option{--min\string_crossrefs \blx@mincrossrefs}} {\binary{bibtex} \option{-min-crossrefs \blx@mincrossrefs}}% \infile{#2} } \input{ \file{#2.aux} } \output{ \file{#2.bbl} } \provides[type=dynamic]{ \file{#2.bbl} } \requires[type=dynamic]{ \file{#2.aux} \file{\blx@ctrlfile\blxauxsuffix.bib} } \requires[type=editable]{ \ifcsdef{blx@list@bibfiles@#2} {\def\do{\file} \dolistcsloop{blx@list@bibfiles@#2}} {} } \requires[type=static]{ \file{biblatex.bst}} }% } \def\blx@logreq@active#1{% \xifinlist{\blx@auxfile}{\blx@list@active} {} {\listxadd\blx@list@active{\blx@auxfile}}% \ifblank{#1} {} {\@latex@warning{#1}}% \blx@rerun@latex \blx@rerun@bibtex} \def\blx@logreq@inactive{% \xifinlist{\blx@auxfile}{\blx@list@inactive} {} {\listxadd\blx@list@inactive{\blx@auxfile}}} \def\blx@rerun@bibtex{% \global\toggletrue{blx@runbtx}% \global\let\blx@rerun@bibtex\relax} % Only the toggle name changes here \patchcmd{\blx@check@rerun}{blx@runbiber}{blx@runbtx}{}{} \def\blx@warn@auxlist{% \begingroup \edef\blx@tempa{Please (re)run BibTeX on the file(s):}% \def\do##1{\appto\blx@tempa{\MessageBreak##1}}% \dolistloop\blx@list@active \blx@warning@noline{% \blx@tempa\MessageBreak and rerun LaTeX afterwards}% \endgroup} \protected\def\blx@bibreq#1{% \blx@auxwrite\blx@aux{}{\string\citation{#1}}} % bibtex doesn't parse ISO8601 dates so these overrides do nothing \appto\blx@blxinit{% \def\iflabeldateera#1{\@secondoftwo}% \def\iflabelenddateera#1{\@secondoftwo}% \let\iflabeldatecirca\@secondoftwo \let\iflabelenddatecirca\@secondoftwo \let\iflabeldateuncertain\@secondoftwo \let\iflabelenddateuncertain\@secondoftwo} % {} % This mustn't be robust as it's likely to be used mainly in tests and so % needs to be expandable \renewcommand*\rangelen[1]{% \ifblank{#1} {0}% {\expandafter\blx@rangelen@range\romannumeral-`\q% #1\bibrangedash\bibrangedash&% }} \def\blx@rangelen@range#1\bibrangedash#2\bibrangedash#3&{% \ifblank{#3} {\blx@rangelen@hyphen#1--&} {\blx@rangelen@check{#1}{#2}}% } \def\blx@rangelen@hyphen#1-#2-#3&{% \ifblank{#3} {1}% No range at all: assume one page {\blx@rangelen@check{#1}{#2}}% } \def\blx@rangelen@check#1#2{% \expandafter\blx@rangelen@check@aux \number\numexpr \blx@rangelen@check@int{#2} - \blx@rangelen@check@int{#1} + 1 \relax &\stop } \def\blx@rangelen@check@aux#1\stop{% \ifblank{#2} {#1} {-1}% } \def\blx@rangelen@check@int#1{% \ifblank{#1} {0&} {% \if\number\numexpr0#1-0#1\relax0 #1 \else 0& \fi }% } % Alter message text \patchcmd{\blx@bbl@warn}{Biber}{BibTeX}{}{} %% Data input \patchcmd{\blx@bblinput}{\blx@bblfile}{\blx@bblfile\blx@bblsecs}{}{} \def\blx@bblfile{% \blx@secinit \begingroup \blx@bblstart \ifnum\c@refsection>\z@ \edef\blx@auxfile{\jobname\the\c@refsection\blxauxsuffix}% \else \edef\blx@auxfile{\jobname}% \fi \blx@ifsigned{\blx@auxfile}{bbl} {\InputIfFileExists{\blx@auxfile.bbl} {\blx@info@noline{... file '\blx@auxfile.bbl' found}% \global\toggletrue{blx@bbldone}} {\blx@info@noline{... file '\blx@auxfile.bbl' not found}% \typeout{No file \blx@auxfile.bbl.}% \global\togglefalse{blx@bbldone}}} {}% \blx@bblend \endgroup \csnumgdef{blx@labelnumber@\the\c@refsection}{0}} \def\blx@bblsecs{% \advance\c@refsection\@ne \ifnum\c@refsection>\blx@maxsection \else \blx@bblfile \expandafter\blx@bblsecs \fi} \def\blx@refsection@ii{% \xdef\blx@auxfile{\jobname\the\c@refsection\blxauxsuffix}% \blx@regbibfiles\blx@auxfile\blx@bibfiles \blx@logreq@inactive \blx@ifsigned{\blx@auxfile}{aux} {\immediate\openout\blx@write\blx@auxfile.aux\relax \global\let\blx@aux\blx@write \blx@auxinit\blx@bibfiles} {}} \def\blx@endrefsection{% \blx@endrefsegment \ifx\blx@aux\blx@write \immediate\closeout\blx@write \global\let\blx@aux\@mainaux \xdef\blx@auxfile{\jobname}% \fi \global\c@refsection\z@} % xref support % {} \protected\def\blx@bbl@xref#1{% \ifcsdef{blx@refp@\the\c@refsection @\detokenize{#1}} {} {\listcsxadd{blx@refs@\the\c@refsection}{\detokenize{#1}}}% \listcsxadd{blx@refp@\the\c@refsection @\detokenize{#1}}{\abx@field@entrykey}% \csxdef{blx@refc@\the\c@refsection @\abx@field@entrykey}{\detokenize{#1}}} \def\blx@addxref#1{% \blx@ifdata{#1} {\begingroup \def\do##1{% \csgappto{blx@data@\the\c@refsection @##1}{% \def\abx@field@xref{#1}}}% \dolistcsloop{blx@refp@\the\c@refsection @#1}% \endgroup} {}% \global\csundef{blx@refp@\the\c@refsection @#1}} \def\blx@bblend{% \ifcsdef{blx@refs@\the\c@refsection}% {\begingroup \let\do\blx@addxref \dolistcsloop{blx@refs@\the\c@refsection}% \endgroup \global\csundef{blx@refs@\the\c@refsection}} {}% \iftoggle{blx@addset} {\blx@addset \global\togglefalse{blx@addset}} {}} \def\blx@citation#1#2{% \ifbool{citerequest} {\ifcsdef{blx@setp@\the\c@refsection @#1} {\blx@citation@set{#1}{#2}} {\ifcsdef{blx@setc@\the\c@refsection @#1} {\blx@citation@inset{#1}{#2}} {\blx@citation@entry{#1}{#2}}}% \ifcsdef{blx@refc@\the\c@refsection @#1}% {\blx@citation@xref{#1}} {}} {}} \def\blx@citation@set#1#2{% \blx@citation@entry{#1}{#2}% \begingroup \def\do##1{\blx@citation@entry{##1}\blx@msg@cundef}% \expandafter\expandafter\expandafter\docsvlist \expandafter\expandafter\expandafter{% \csname blx@setp@\the\c@refsection @#1\endcsname}% \endgroup} \def\blx@citation@inset#1#2{% \blx@citation@entry{#1}{#2}% \expandafter\expandafter\expandafter\blx@citation@inset@i \expandafter\expandafter\expandafter{% \csname blx@setc@\the\c@refsection @#1\endcsname}\blx@msg@cundef} \def\blx@citation@inset@i#1{% \ifcsdef{blx@setp@\the\c@refsection @#1} {\blx@citation@set{#1}} {\blx@citation@entry{#1}}} \def\blx@citation@xref#1{% \begingroup \edef\blx@tempa{blx@refp@\the\c@refsection @% \csname blx@refc@\the\c@refsection @#1\endcsname}% \ifcsdef\blx@tempa {\ifinlistcs{#1}\blx@tempa {} {\listcsxadd\blx@tempa{#1}}% \blx@tempcnta\z@ \def\do##1{\advance\blx@tempcnta\@ne}% \dolistcsloop\blx@tempa} {\listcsxadd\blx@tempa{#1}% \blx@tempcnta\@ne}% \expandafter\endgroup\ifnum\blx@tempcnta<\blx@minxrefs\relax \else \expandafter\expandafter\expandafter\blx@citation@entry \expandafter\expandafter\expandafter{% \csname blx@refc@\the\c@refsection @#1\endcsname}\blx@msg@cundef \fi} % refcontexts are out, but we can try to save labelprefix % Luckily all refcontext names use \blx@refcontext@labelprefix, so if we % don't modify that macro, we don't actually change the refcontext. % Remember that \blx@refcontext@labelprefix contains a hash of the labelprefix % and that \blx@refcontext@labelprefix@real contains the value. % Effectively we always stay in \blx@sorting/global/global//global/global, % and additionally carry around the labelprefix value % in \blx@refcontext@labelprefix@real and pass it to the aux file. % There are differences to the result obtained with Biber, % but it should be good enough for very simple applications. \define@key{blx@refcontext}{labelprefix}{% \xdef\blx@refcontext@labelprefix@real{#1}% \iftoggle{blx@defernumbers} {}% {\iftoggle{blx@labelnumber} {\blx@warning{% Option 'labelprefix' requires global\MessageBreak 'defernumbers=true'}} {}}% \ifundef{\blx@bibtexwarn@labelprefix@used} {\blx@warning@noline{% The option 'labelprefix' is limited\MessageBreak when used with BibTeX.\MessageBreak Consider using Biber instead}% \global\let\blx@bibtexwarn@labelprefix@used\@empty} {}} \def\blx@warn@bibtexrefcontext#1{% \blx@warning{% The refcontext option\MessageBreak '#1'\MessageBreak is not supported by the BibTeX backend.\MessageBreak Consider switching to Biber instead.\MessageBreak The option will be ignored}} \def\blx@bibtexrefcontext@disable#1{% \define@key{blx@refcontext}{#1}{% \blx@warn@bibtexrefcontext{#1}}} \forcsvlist{\blx@bibtexrefcontext@disable}{% nametemplates,sorting,sortingnamekeytemplatename,uniquenametemplatename, labelalphanametemplatename} \def\blx@assignrefcontext@disable#1{% \blx@warning{% BibTeX does not support refcontext assignments with\MessageBreak '\string\assignrefcontext#1'.\MessageBreak Consider using Biber instead.\MessageBreak Ignoring the refconext assignment}} \def\blx@assignrefcontextkeyws[#1][#2]#3{% \blx@assignrefcontext@disable{keyws}} \def\blx@assignrefcontextcats[#1][#2]#3{% \blx@assignrefcontext@disable{cats}} \def\blx@assignrefcontextentries[#1][#2]#3{% \blx@assignrefcontext@disable{entries}} \apptocmd{\blx@setdefaultrefcontext} {\csxdef{blx@assignedlabelprefix@\the\c@refsection @#1}{% \blx@refcontext@labelprefix@real}} {} {\blx@error {Failed to patch '\string\blx@setdefaultrefcontext'} {Patching '\string\blx@setdefaultrefcontext' failed for some reason. \MessageBreak Please report this bug}} \def\abx@aux@defaultlabelprefix#1#2#3{% \csgdef{blx@assignedlabelprefix@#1@#2}{#3}} \apptocmd{\blx@bbl@entry} {\ifcsundef{blx@assignedlabelprefix@\the\c@refsection @\thefield{entrykey}} {} {\blx@bbl@addfield{labelprefix}{% \csuse{blx@assignedlabelprefix@\the\c@refsection @\thefield{entrykey}}}}} {} {\blx@error {Failed to patch '\string\blx@bbl@entry'} {Patching '\string\blx@bbl@entry' failed for some reason. \MessageBreak Please report this bug}} \AtEndDocument{% % always add default labelprefix declarations to .aux \iftoggle{blx@bbldone} {\def\do#1{% \begingroup \def\do##1{% \blx@auxwrite\@mainaux{}{\string\abx@aux@defaultlabelprefix{#1}{##1}{% \csuse{blx@assignedlabelprefix@#1@##1}}}}% \dolistcsloop{blx@defaultrefcontexts@#1}% \endgroup} \dolistloop\blx@allrefsections} {}} % Translate sorting schemes to BibTeX form \def\blx@sorting@none{0} \def\blx@sorting@nty{1} \def\blx@sorting@nyt{2} \def\blx@sorting@nyvt{3} \def\blx@sorting@anyt{12} \def\blx@sorting@anyvt{13} \def\blx@sorting@ynt{21} \def\blx@sorting@ydnt{22} \def\blx@sorting@debug{99} % Control file \edef\blx@ctrl{% \blx@msg@bib @Control\string{biblatex-control,\blx@nl \space\space options = \string{% \blx@bcfversion:% \noexpand\iftoggle{blx@debug}{1}{0}:% \noexpand\iftoggle{blx@bibtex8}{1}{0}:% \noexpand\iftoggle{blx@sortcase}{1}{0}:% \noexpand\iftoggle{blx@useprefix}{1}{0}:% \noexpand\iftoggle{blx@useauthor}{1}{0}:% \noexpand\iftoggle{blx@useeditor}{1}{0}:% \noexpand\iftoggle{blx@usetranslator}{1}{0}:% \noexpand\iftoggle{blx@labelalpha}{1}{0}:% \noexpand\iftoggle{blx@labeldateparts}{1}{0}:% \noexpand\iftoggle{blx@singletitle}{1}{0}:% \noexpand\csuse{blx@sorting@\noexpand\blx@sorting}:% \noexpand\blx@maxcitenames:% \noexpand\blx@mincitenames:% \noexpand\blx@maxsortnames:% \noexpand\blx@minsortnames:% \noexpand\iftoggle{blx@nohashothers}{1}{0}:% \noexpand\iftoggle{blx@nosortothers}{1}{0}:% \noexpand\blx@maxalphanames:% \noexpand\blx@minalphanames:% \noexpand\blx@maxline:% \noexpand\detokenize\noexpand\expandafter{\noexpand\labelalphaothers}:% \noexpand\detokenize\noexpand\expandafter{\noexpand\blx@sortalphaothers}:% \noexpand\detokenize\noexpand\expandafter{\noexpand\blx@sorting}% \string},\blx@nl \string}% } \def\blx@ctrlwrite{% % \sortalphaothers should only contain safe characters, % so we should be able to \edef it \edef\blx@sortalphaothers{\sortalphaothers}% \immediate\openout\blx@write\blx@ctrlfile\blxauxsuffix.bib\relax \blx@auxwrite\blx@write{}{\blx@ctrl}% \immediate\closeout\blx@write} % Disable some interfaces \renewrobustcmd*{\DeclareSortingScheme}[3][]{} \renewrobustcmd*{\DeclareExtradate}[1]{} \def\blx@checkencoding{} \AtBeginDocument{% \blx@checkencoding \if@filesw \blx@auxinit\blx@bibfiles \fi} \endinput