biblatex.sty

<..biblatex.4ht..>
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 % biblatex.4ht                          2014-07-12-22:36 %
 % Copyright (C) 2007--2009       Eitan M. Gurari         %
 <.TeX4ht copyright.>
    <.config biblatex.>
    <.shared config biblatex.>
    <.biblatex-crosslinking.>
    <.biblatex AtEndPreamble.>
 \Hinput{biblatex}
 \endinput
 -_-_-

<..biblatex AtEndPreamble..>
 \let\:temp\do
   \def\do#1{%
     \patchcmd#1%
       {\color@begingroup}%
       {\color@begingroup\toggletrue{blx@footnote}}%
       {\togglefalse{blx@tempa}\listbreak}%
       {}}%
   \docsvlist{%
     \@footnotetext,%          latex
     \H@@footnotetext,%        hyperref
     \scr@saved@footnotetext,% koma-script 3.x
     \l@dold@footnotetext,%    ledmac
     \l@doldold@footnotetext,% ledmac
     \@fntORI}%                frenchle
 \let\do\:temp
 -_-_-

<..config biblatex..>
 \ifx\blx@startbib\:UnDef
  \pend:def\blx@shorthands{%
    \pend:def\blx@bibinit{%
        \HAssign\shorthands:cnt=0
        \NewConfigure{printfield-shorthand}{2}%
        \Configure{printfield-shorthand}%
          {\gHAdvance\shorthands:cnt by 1\relax
           \ifnum \shorthands:cnt=1 \a:printshorthands
           \else                    \c:printshorthands \fi
          }
          {\d:printshorthands}%
    \append:def\endtheshorthands{\b:printshorthands}%
    \csname a:@shorthands\endcsname}
 }
 -_-_-

<..config biblatex..>+
 \ifx\b:printshorthands\Undef\let\endtheshorthands\@empty\fi
 \def\a:entryhead{CVR}
 \def\a:entryhead:full{CV Radhakrishnan}
 \ifx\bib@macro@entryhead:name\UnDef
   \let\bib@macro@entryhead:name\@empty\fi
 \ifx\bib@macro@entryhead:full\UnDef
   \let\bib@macro@entryhead:full\@empty\fi
   \gdef\BibFileName[#1]#2{\expandafter\xdef\csname
        BibFileName#1\endcsname{#2}}
 -_-_-

<..config biblatex..>+
 \newcount\sv:sec:cnt
 \def\bibSecConfigure{%
   \let\save:section\section
   \global\sv:sec:cnt=\c@secnumdepth
   \def\section{\@ifstar
       {\c@secnumdepth=0\relax\save:section}%
       {\c@secnumdepth=\sv:sec:cnt\save:section}}%
 }
 \gHAssign\bibN=0
 -_-_-

<..biblatex-with-ooffice..>
 \def\bibConfigure{\ConfigureList{thebibliography}%
       {\IgnorePar\EndP \gHAdvance\bib:N by 1
        \HCode{<text:bibliography text:name="bib-\bib:N" >
               <text:bibliography-source>\Hnewline
              <text:index-title-template>}
            \NoFonts\ref:name\EndNoFonts
        \HCode{</text:index-title-template>\Hnewline
 %
            <text:bibliography-entry-template\Hnewline
             text:bibliography-type="custom1"
             text:style-name="Bibliography11">\Hnewline
 %
             <text:index-entry-bibliography
              text:bibliography-data-field="identifier"/>\Hnewline
 %
            <text:index-entry-span>: </text:index-entry-span>\Hnewline
            <text:index-entry-bibliography
             text:bibliography-data-field="author" />\Hnewline
            <text:index-entry-span>, </text:index-entry-span>\Hnewline
 %
            <text:index-entry-bibliography
             text:bibliography-data-field="title" />\Hnewline
            <text:index-entry-span>, </text:index-entry-span>\Hnewline
 %
            <text:index-entry-bibliography
             text:bibliography-data-field="year" />\Hnewline
            </text:bibliography-entry-template>\Hnewline\Hnewline
            </text:bibliography-source>\Hnewline
            <text:index-body>\Hnewline}%
          \let\en:bib=\empty
       }%
       {\en:bib\HCode{</text:index-body></text:bibliography>}}
       {\en:bib\gdef\en:bib{\HCode{</text:p>\Hnewline}}%
         \HCode{<text:p text:style-name="p-bibitem">}%
         \gHAdvance\bibN by 1
         \HCode{<text:reference-mark
           text:name="X0-\csname BIB-\bibN\endcsname">%
           </text:reference-mark>}%
       }%
       {}{}
   }
 -_-_-

<..biblatex-without-ooffice..>
  \def\bibConfigure{%
   \ConfigureList{thebibliography}
   {\ifvmode \IgnorePar \fi \EndP \EndP
     \HCode {<dl class="thebibliography">}%
 %
 % This is for linking citations with biblist items which
 % are in a different file when output is split into different
 % chunks. [CVR 2012-09-27]
 %
 %
 % <biblatex-2.2>
 %
   \immediate\write\@auxout{%
       \string\BibFileName[\therefsection]{\FileName}}%
 %
 % </biblatex-2.2>
 %
     \PushMacro \end:itm \global \let \end:itm =\empty}%
   {\ifvmode \IgnorePar \fi \EndP
     \PopMacro \end:itm \global \let \end:itm \end:itm \EndP
     \HCode {</dd></dl>}\ShowPar}%
   {\ifvmode \IgnorePar \fi \EndP \gHAdvance \bibN by 1
     \end:itm \global \def \end:itm {\EndP \Tg </dd>}%
     \HCode {<dt id="X\therefsection-\abx@field@entrykey"
       class="thebibliography">}\bgroup \bf}%
   {\ifvmode \IgnorePar \fi \EndP
     \egroup
     \HCode {</dt><dd\Hnewline id="bib-\bibN"
       class="thebibliography">}%
     \par \ShowPar}%
  }
 -_-_-

<..config biblatex..>+
   \:CheckOption{ooffice}\if:Option
    <.biblatex-with-ooffice.>
   \else
    <.biblatex-without-ooffice.>
  \fi
 -_-_-

<..config biblatex..>+
 \NewConfigure{printshorthands}{4}
 \NewConfigure{@shorthands}[1]{\concat:config\a:@shorthands{#1}}
 \let\a:@shorthands\empty
 \def\nolinkurl{\o:url:}
 \def\blx@checksum{\ifx \blx@checksum@old \blx@checksum@new \else
   \blx@warning@noline {Page references have changed.\MessageBreak
     Rerun to get references right}\@tempswatrue \blx@reruntrue \fi
   \@nameuse {blx@rerun}}
 \pend:def\blx@bibliography{\bibSecConfigure%
   \pend:def\blx@bibinit{%
     \bibConfigure
      \csname onthebibliography:list\endcsname
   }%
 }
 -_-_-

<..config biblatex..>+
 \let\en:bib\@empty
 \newcounter{bib}
 \protected\def\blx@bbl@entry#1#2#3{%
   \begingroup
   \def\texht@bibkey{#1}
   \edef\abx@field@entrykey{\detokenize{#1}}%
   \global\advance\c@bib 1
   \immediate\write\@auxout{\string\expandafter\string\gdef
     \string\csname\space BIB-\thebib\string\endcsname
      {\expandafter\strip@prefix\meaning\texht@bibkey}}%
   \Tag{)QX\therefsection-#1}{\thebib}%
   \blx@setoptions@type{#2}%
   \blx@bbl@options{#3}%
   \blx@setoptions@entry
   \edef\blx@bbl@data{blx@data@\the\c@refsection @\abx@field@entrykey}%
   \csuse\blx@bbl@data
   \cslet\blx@bbl@data\@empty
   \blx@bbl@addfield{entrykey}{\abx@field@entrykey}%
   \blx@bbl@addfield{entrytype}{#2}%
   \blx@imc@iffieldundef{options}
     {}
     {\blx@bbl@fieldedef{options}{\expandonce\abx@field@options}}}
 -_-_-

<..appto blx mkhyperref..>
 \let\blx@anchors\@empty
 \let\bib@field@entrykey\@empty
 \protected\def\blx@anchor{%
   \xifinlist{<./the /c@refsection @.>\bib@field@entrykey}{\blx@anchors}%
     {}%
     {\listxadd\blx@anchors{<./the /c@refsection @.>\bib@field@entrykey}%
      \hyper:natanchorstart{<./the /c@refsection @.>\bib@field@entrykey}%
      \hyper:natanchorend}}
 -_-_-

<..appto blx mkhyperref..>+
 \protected\def\blx@bibhyperref{%
    \@ifnextchar[%]
      {\blx@bibhyperref@i}%
      {\blx@bibhyperref@i[\bib@field@entrykey]}}%
 \long\def\blx@bibhyperref@i[#1]#2{%
    \hyper:natlinkstart{<./the /c@refsection @.>#1}%
    #2\hyper:natlinkend}%
 \protected\long\def\blx@bibhyperlink#1#2{%
    \hyper:natlinkstart{<./the /c@refsection :.>#1}%
    #2\hyper:natlinkend}%
 \protected\long\def\blx@bibhypertarget#1#2{%
    \@bsphack
    \hyper:natanchorstart{<./the /c@refsection :.>#1}%
    \@esphack
    #2\hyper:natanchorend}%
 -_-_-

<../the /c@refsection @..>
 X\the\c@refsection -%@
 -_-_-

<../the /c@refsection :..>
 X\the\c@refsection --%:
 -_-_-

<..appto blx mkhyperref..>+
 \let\blx@ifhyperref\@firstoftwo
 \def\hyper:natanchorstart#1{\Link{}{#1}\EndLink}
 \def\hyper:natanchorend{}
 \def\hyper:natlinkstart#1{\Link{#1}{}}
 \def\hyper:natlinkend{\EndLink}
 -_-_-
 
 \long\def\blx@bibhyperref@i[#1]#2{#2}
 \protected\long\def\blx@bibhyperlink#1#2{#2}
 \protected\long\def\blx@bibhypertarget#1#2{#2} -_-_-

<..config biblatex-???..>
 \pend:def\blx@bibliography{%
   \pend:def\blx@bibinit{%
      \ConfigureList{thebibliography}%
         {\a:thebibliography}%
         {\b:thebibliography}%
         {\c:thebibliography}%
         {\d:thebibliography}%
      \csname onthebibliography:list\endcsname
   }%
 %  \pend:def\endthebibliography{%
 %     \if@newlist \global\@newlistfalse \fi
 %  }%
 }
 -_-_-

<..config biblatex-???..>+
 \pend:defI\blx@bibitem{%
    \ifx \bibitem:key\:UnDef
        \let\blx:anchor\blx@anchor
        \def\blx@anchor{\let\blx@anchor\blx:anchor
                        \Link{}{\bibitem:key}\EndLink}%
    \fi
    \def\bibitem:key{##1}%
 }
 -_-_-

<..config biblatex..>+
 \protected\def\blx@finentry{%
   \unspace
   \a:finentry
       \finentrypunct
       \blx@postpunct
   \b:finentry
   \blx@initunit
 }
 \NewConfigure{finentry}{2}
 -_-_-

<..config biblatex-???..>+
 \protected\def\blx@citeprint#1{%
   \advance\c@citecount\@ne
   \addtocounter{instcount}\@ne
   \ifnum\c@citecount=\@ne
     \blx@getdata@cite{#1}%
     \blx@precode
     \ifnum\c@citetotal>\@ne
       \blx@resetdata
     \fi
   \else
     \blx@dlimcode
   \fi
   \begingroup
   \ifnum\c@citetotal>\@ne
     \blx@getdata@cite{#1}%
   \fi
   \blx@entrysetcount
   \blx@options
   \blx@backref
   \blx@pagetracker
   \csuse{blx@hook@citekey}%
   \csuse{blx@hook@citekey@next}%
   \blx@execute
   \cIteLink{#1}{}\blx@loopcode \EndcIteLink
   \blx@citetracker
   \blx@ibidtracker
   \blx@opcittracker
   \blx@loccittracker
   \ifnum\c@citecount=\c@citetotal
     \def\blx@thecheckpunct{\blx@err@nestcite\@gobble}%
     \blx@postcode
   \fi
   \endgroup}
 -_-_-

<..config biblatex..>+
 \def\:tempc[#1]#2{%
    \expandafter\ifx \csname a:printfield-#2\endcsname\relax
       \NewConfigure{printfield-#2}{2}%
       \a:printfield{printfield-#2}%
    \fi
    \Configure{blx@unit}%
        {\csname a:printfield-#2\endcsname}%
        {\csname b:printfield-#2\endcsname}%
    \csname o:\string\blx@printfield:\endcsname[#1]{#2}%
 }
 \expandafter\HLet\csname\string\blx@printfield\endcsname\:tempc
 -_-_-

<..config biblatex..>+
 \NewConfigure{printfield}[1]{\def\a:printfield##1{#1}}
 \Configure{printfield}{%
     \Configure{#1}%
        {\HCode{<!--#1-->}}%
        {\HCode{<!--/#1-->}}%
 }
 -_-_-

<..config biblatex--???..>
 \def\:tempc[#1]#2{%
    \expandafter\ifx \csname a:printtext-#2\endcsname\relax
       \NewConfigure{printtext-#2}{2}%
       \a:printfield{printtext-#2}%
    \fi
    \Configure{blx@unit}%
        {\csname a:printtext-#2\endcsname}%
        {\csname b:printtext-#2\endcsname}%
    \csname o:\string\blx@printtext:\endcsname[#1]{#2}%
 }
 \expandafter\HLet\csname\string\blx@printtext\endcsname\:tempc
 -_-_-

<..config biblatex..>+
 \def\:tempc[#1]#2{%
    \expandafter\ifx \csname a:bibstring-#2\endcsname\relax
       \NewConfigure{bibstring-#2}{2}%
       \a:printfield{bibstring-#2}%
    \fi
    \Configure{blx@unit}%
        {\csname a:bibstring-#2\endcsname}%
        {\csname b:bibstring-#2\endcsname}%
    \csname o:\string\blx@bibstring:\endcsname[#1]{#2}%
 }
 \expandafter\HLet\csname\string\blx@bibstring\endcsname\:tempc
 -_-_-

<..config biblatex..>+
 \def\:tempc[#1]#2{%
    \expandafter\ifx \csname a:bibcpstring-#2\endcsname\relax
       \NewConfigure{bibcpstring-#2}{2}%
       \a:printfield{bibcpstring-#2}%
    \fi
    \Configure{blx@unit}%
        {\csname a:bibcpstring-#2\endcsname}%
        {\csname b:bibcpstring-#2\endcsname}%
    \csname o:\string\blx@bibcpstring:\endcsname[#1]{#2}%
 }
 \expandafter\HLet\csname\string\blx@bibcpstring\endcsname\:tempc
 -_-_-

<..config biblatex..>+
 \def\:tempc[#1]#2{%
    \expandafter\ifx \csname a:biblcstring-#2\endcsname\relax
       \NewConfigure{biblcstring-#2}{2}%
       \a:printfield{biblcstring-#2}%
    \fi
    \Configure{blx@unit}%
        {\csname a:biblcstring-#2\endcsname}%
        {\csname b:biblcstring-#2\endcsname}%
    \csname o:\string\blx@biblcstring:\endcsname[#1]{#2}%
 }
 \expandafter\HLet\csname\string\blx@biblcstring\endcsname\:tempc
 -_-_-

<..config biblatex..>+
 \def\:tempc[#1]#2{%
    \expandafter\ifx \csname a:bibucstring-#2\endcsname\relax
       \NewConfigure{bibucstring-#2}{2}%
       \a:printfield{bibucstring-#2}%
    \fi
    \Configure{blx@unit}%
        {\csname a:bibucstring-#2\endcsname}%
        {\csname b:bibucstring-#2\endcsname}%
    \csname o:\string\blx@bibucstring:\endcsname[#1]{#2}%
 }
 \expandafter\HLet\csname\string\blx@bibucstring\endcsname\:tempc
 -_-_-

<..config biblatex pre v. 0.7 -??..>
 \pend:def\blx@bibliography{%
   \pend:def\thebibitem{\c:thebibliography}%
   \append:def\thebibitem{\relax\d:thebibliography}%
   \pend:def\blx@startbib{\a:thebibliography}%
   \pend:def\endthebibliography{%
      \if@newlist \global\@newlistfalse \fi
   }%
   \append:def\endthebibliography{\b:thebibliography}%
 }
 -_-_-

<..shared config biblatex..>
 \NewConfigure{thebibliography}{4}
 -_-_-

<..config biblatex..>+
 \NewConfigure{biblatex-style}[2]{%
    \def\:temp{#1}%
    \ifx \:temp\blx@cbxfile
       #2%
       \global\let\biblatex:style\def
    \fi
 }
 
 \def\biblatex:style{}
 \Configure{biblatex-style}{}{}
 
 \pend:def\at:docend{%
    \ifx \UnDef\biblatex:style
       \:warning{\string\Configure{biblatex-style}{\blx@cbxfile}{...}
          not available}%
    \fi
 }
 -_-_-

<..config biblatex..>+
 \let\blx:item\@item
 \def\@item[#1]{%
   \blx:item[#1]%
   \ifhmode \spacefactor\blx@sf@par\fi
 }
 \let\blx@resetpuncthook\@empty
 \let\blx@csq@ifkernmark\@empty
 \newskip\blx@unitmark
 \blx@unitmark=10pt plus 1pt minus 1pt
 \let\abx@aux@page\@gobbletwo
 \let\abx@aux@fnpage\@gobbletwo
 \let\abx@aux@refsection\@gobbletwo
 %
 % <[email protected]> reported that After updating
 % biblatex and biblatex.ht to versions 2.2 respectively
 % 2012-09-28-17:49 (using MiKTeX 2.9 64 bit), tex4ht seemed no longer
 % respected the defernumbers option in biblatex.sty: When applied to
 % the attached file tex4hterror.tex.
 %
 % The problem was due to nullifying \abx@aux@number which in fact
 % should have been redefined to \blx@aux@number when defernumbers
 % option is true.
 %
 % This is done now and as per Kristian, the fix works fine now.
 %
 \protected\def\blx@aux@number#1#2#3#4{%
   \blx@bbl@addentryfield{\detokenize{#2}}{#3}{localnumber}{#4}%
   \ifblank{#4}%
     {}%
     {\csgdef{blx@labelnumber@#3}{#4}%
      %\blx@addchecksum{#1}{#4} % this can cause a nodocument error!
      }}
 %
 \iftoggle{blx@defernumbers}%
     {\setkeys{blx@opt@pre}{labelnumber}%
      \let\blx@thelabelnumber\blx@addlabelnumber
      \let\abx@aux@number\blx@aux@number}%
     {\let\blx@thelabelnumber\relax
      \let\abx@aux@number\@gobblefour}
 %
 \AtEndDocument{%
   \def\abx@aux@page#1#2{\blx@addpagesum{#1}{#2}}%
   \def\abx@aux@fnpage#1#2{\blx@addpagesum{#1}{#2}}%
 }
 %
 \def\blx@begunit{%
   \toggletrue{blx@tempa}%
   \iftoggle{blx@insert}%
     {\iftoggle{blx@unit}%
        {\begingroup
           \let\blx@begunit\@empty
           \let\blx@endunit\@empty
           \blx@unitpunct\blx@postpunct
         \endgroup
         \global\togglefalse{blx@unit}%
         \togglefalse{blx@tempa}}
        {\blx@postpunct}%
      \iftoggle{blx@block}%
        {\begingroup
           \let\blx@begunit\@empty
           \let\blx@endunit\@empty
           \newblockpunct
         \endgroup
         \global\togglefalse{blx@block}%
         \togglefalse{blx@tempa}}%
        {}}%
     {}%
   \blx@postpunct
   \blx@resetpuncthook
   \iftoggle{blx@tempa}%
     {}%
     {\global\togglefalse{blx@insert}}%
   \csname a:blx@unit\endcsname
   \blx@leavevmode
   \blx@csq@ifkernmark
     {}%
     {\penalty\@M
     \hskip-\blx@unitmark\relax
     \hskip\blx@unitmark\relax
     }%
   \begingroup
     \Configure{blx@unit}{}{}%
 }
 \def\blx@endunit{%
   \endgroup
   \csname b:blx@unit\endcsname
   \Configure{blx@unit}{}{}%
   \ifdim\lastskip=\blx@unitmark
     \unskip\unskip\unpenalty
     \global\togglefalse{blx@lastins}%
   \else
    \global\toggletrue{blx@insert}%
    \global\toggletrue{blx@lastins}%
  \fi
 }
 \NewConfigure{blx@unit}{2}
 %
    \else
 \fi
 
 -_-_-

<..shared config biblatex..>+
 \append:def\blx@bibinit{\a:bibinit}%
 \NewConfigure{bibinit}{1}%
 -_-_-

<..biblatex-crosslinking..>
 \let\blx@anchors\@empty
 \let\bib@field@entrykey\@empty
 
 \protected\def\blx@anchor{%
   \xifinlist{X\the\c@refsection -%@
     \bib@field@entrykey}{\blx@anchors}%
     {}%
     {\listxadd\blx@anchors{X\the\c@refsection -%@
       \bib@field@entrykey}%
      \hyper:natanchorstart{X\the\c@refsection -%@
       \bib@field@entrykey}%
      \hyper:natanchorend}}
 
 \protected\def\blx@bibhyperref{%
    \@ifnextchar[%]
      {\blx@bibhyperref@i}%
      {\blx@bibhyperref@i[\bib@field@entrykey]}}%
 
 \long\def\blx@bibhyperref@i[#1]#2{%
    \hyper:natlinkstart{X\the\c@refsection -%@
      #1}%
      #2\hyper:natlinkend}%
 
 \protected\long\def\blx@bibhyperlink#1#2{%
    \hyper:natlinkstart{X\the\c@refsection -%:
      #1}%
      #2\hyper:natlinkend}%
 
 \protected\long\def\blx@bibhypertarget#1#2{%
    \@bsphack
    \hyper:natanchorstart{X\the\c@refsection -%:
      #1}%
    \@esphack
      #2\hyper:natanchorend}%
 
 \let\blx@ifhyperref\@firstoftwo
 
 % Oleg Domanov [email protected] reports:
 % tex4ht ends with an error when compiles biblatex files. I’m on
 % Windows, texlive 2012. I put here a minimal example and files
 % generated with the command latexmk test && mk4ht oolatex test
 %
 % https://www.dropbox.com/s/hn1zm40htqs13mf/t4htlink.zip
 %
 % There is a superfluous \relax in the file test.tmp, line 65 which
 % seems to cause the error.
 %
 % Changes to cope with biblatex upgrade caused this problem. It is now
 % fixed. --CVR 2012/10/26
 %
 \:CheckOption{ooffice}\if:Option
  \def\hyper:natanchorstart#1{\Link{}{#1}\EndLink}%
  \def\hyper:natlinkstart#1{\Link{#1}{}}%
 \else
  \def\hyper:natanchorstart#1{%
       \expandafter\ifx\csname QXpage.\thepage\endcsname\relax%
         \Tag{)Qpage.\thepage}{\file:id}%
         \HCode{<a id="page.\thepage"></a>}%
         \expandafter\xdef\csname QXpage.\thepage\endcsname{0}%
        \fi
       \Link[\csname BibFileName\therefsection\endcsname]{}{#1}\EndLink}
  \def\hyper:natlinkstart#1{%
       \expandafter\ifx\csname QXpage.\thepage\endcsname\relax%
         \Tag{)Qpage.\thepage}{\file:id}%
         \HCode{<a id="page.\thepage"></a>}%
         \expandafter\xdef\csname QXpage.\thepage\endcsname{0}%
        \fi
       \Link[\csname BibFileName\therefsection\endcsname]{#1}{}}
 \fi
 \def\hyper:natanchorend{}
 \def\hyper:natlinkend{\EndLink}
 \def\writeCiteLink#1{\immediate\write\@mainaux{%
     \string\@namedef{#1.\thepage}{\FileName}}}
 \let\blx@addpagesum\@gobbletwo
 \let\nolinkurl\relax
 -_-_-