[tex4ht-commits] [SCM] tex4ht updated: r91 - trunk/lit

cvr at gnu.org.ua cvr at gnu.org.ua
Fri Sep 28 14:27:28 CEST 2012


Author: cvr
Date: 2012-09-28 15:27:28 +0300 (Fri, 28 Sep 2012)
New Revision: 91

Modified:
   trunk/lit/tex4ht-4ht.tex
Log:
biblatex.4ht modified to suit biblatex.sty v 2.2.
All 53 examples provided with the package seem to work fine
in my tests.



Modified: trunk/lit/tex4ht-4ht.tex
===================================================================
--- trunk/lit/tex4ht-4ht.tex	2012-09-20 07:21:15 UTC (rev 90)
+++ trunk/lit/tex4ht-4ht.tex	2012-09-28 12:27:28 UTC (rev 91)
@@ -4,7 +4,7 @@
 %
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 % tex4ht-4ht.tex                                         %
-% Copyright (C) 1996--            Eitan M. Gurari        %
+% Copyright (C) 1996--2009            Eitan M. Gurari    %
 %                                                        %
 % This work may be distributed and/or modified under the %
 % conditions of the LaTeX Project Public License, either %
@@ -18,7 +18,7 @@
 % This work has the LPPL maintenance status "maintained".%
 %                                                        %
 % This Current Maintainer of this work                   %
-% is Eitan M. Gurari.                                    %
+% is TeX4ht Projecct Team.                               %
 %                                                        %
 % If you modify this file your changing the signature    %
 % in \message{(signature)} below will be appreciated.    %
@@ -2088,13 +2088,9 @@
 % biblatex.4ht                          |version %
 % Copyright (C) |CopyYear.2007.       Eitan M. Gurari         %
 |<TeX4ht copyright|>
-   \ifx \blx at startbib\:UnDef
-      |<config biblatex|> 
-   \else
-      |<config biblatex pre v. 0.7|> 
-   \fi
+   |<config biblatex|> 
    |<shared config biblatex|>
-   |<appto blx mkhyperref|>
+   |<biblatex-crosslinking|>
    |<biblatex AtEndPreamble|>
 \Hinput{biblatex}
 \endinput
@@ -2120,7 +2116,8 @@
 >>>
 
 \<config biblatex\><<<
-\pend:def\blx at shorthands{%
+\ifx\blx at startbib\:UnDef
+ \pend:def\blx at shorthands{%
    \pend:def\blx at bibinit{%
        \HAssign\shorthands:cnt=0
        \NewConfigure{printfield-shorthand}{2}%
@@ -2131,21 +2128,168 @@
          }
          {\d:printshorthands}%
    \append:def\endtheshorthands{\b:printshorthands}%
-   \csname a:@shorthands\endcsname
-}}
-\NewConfigure{printshorthands}{4}
-\NewConfigure{@shorthands}[1]{\concat:config\a:@shorthands{#1}} 
-\let\a:@shorthands\empty 
+   \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 at macro@entryhead:name\UnDef
+  \let\bib at macro@entryhead:name\@empty\fi
+\ifx\bib at macro@entryhead:full\UnDef
+  \let\bib at 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 at secnumdepth  
+  \def\section{\@ifstar
+      {\c at secnumdepth=0\relax\save:section}%
+      {\c at 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 at 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 at checksum{\ifx \blx at checksum@old \blx at checksum@new \else
   \blx at warning@noline {Page references have changed.\MessageBreak
     Rerun to get references right}\@tempswatrue \blx at reruntrue \fi
   \@nameuse {blx at rerun}}
+\pend:def\blx at bibliography{\bibSecConfigure%
+  \pend:def\blx at bibinit{%
+    \bibConfigure
+     \csname onthebibliography:list\endcsname
+  }%
+}
 >>>
+
+\<config biblatex\><<<
+\let\en:bib\@empty
+\newcounter{bib}
+\protected\def\blx at bbl@entry#1#2#3{%
+  \begingroup
+  \def\texht at bibkey{#1}
+  \edef\abx at field@entrykey{\detokenize{#1}}%
+  \global\advance\c at bib 1
+  \immediate\write\@auxout{\string\expandafter\string\gdef
+    \string\csname\space BIB-\thebib\string\endcsname
+     {\expandafter\strip at prefix\meaning\texht at bibkey}}%
+  \Tag{)QX\therefsection-#1}{\thebib}%
+  \blx at setoptions@type{#2}%
+  \blx at bbl@options{#3}%
+  \blx at setoptions@entry
+  \edef\blx at bbl@data{blx at data@\the\c at refsection @\abx at field@entrykey}%
+  \csuse\blx at bbl@data
+  \cslet\blx at bbl@data\@empty
+  \blx at bbl@addfield{entrykey}{\abx at field@entrykey}%
+  \blx at bbl@addfield{entrytype}{#2}%
+  \blx at imc@iffieldundef{options}
+    {}
+    {\blx at bbl@fieldedef{options}{\expandonce\abx at field@options}}}
+>>>
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
 % CVR 2010/03/31
 % \bib at field@entrykey initialized with empty value
 %
@@ -2216,7 +2360,7 @@
 % to revision of biblatex to version 0.9d, biblatex.4ht seemed to
 % be broken.  It was true. The problem was the redefined
 % \blx at checksum in biblatex.4ht which was either superfluous or
-% erratic or both. So, I have commented our in biblatex.4ht
+% erratic or both. So, I have commented out in biblatex.4ht
 % and decided to use the default definition in the biblatex.sty.
 % Both the bug reporters have told that the modified version
 % solved their problems.
@@ -2230,7 +2374,7 @@
 
 
 
-\<config biblatex\><<<
+\<config biblatex-???\><<<
 \pend:def\blx at bibliography{% 
   \pend:def\blx at bibinit{%
      \ConfigureList{thebibliography}%
@@ -2246,7 +2390,7 @@
 }  
 >>>
 
-\<config biblatex--???\><<<
+\<config biblatex-???\><<<
 \pend:defI\blx at bibitem{% 
    \ifx \bibitem:key\:UnDef
        \let\blx:anchor\blx at anchor
@@ -2272,7 +2416,7 @@
 
 
 
-\<config biblatex -??\><<<
+\<config biblatex-???\><<<
 \protected\def\blx at citeprint#1{% 
   \advance\c at citecount\@ne 
   \addtocounter{instcount}\@ne 
@@ -2308,9 +2452,6 @@
   \endgroup} 
 >>>
 
-
-
-
 \<config biblatex\><<<
 \def\:tempc[#1]#2{%
    \expandafter\ifx \csname a:printfield-#2\endcsname\relax
@@ -2334,7 +2475,7 @@
 }
 >>>
 
-\<config biblatex --???\><<<
+\<config biblatex--???\><<<
 \def\:tempc[#1]#2{%
    \expandafter\ifx \csname a:printtext-#2\endcsname\relax
       \NewConfigure{printtext-#2}{2}%
@@ -2364,8 +2505,6 @@
 \expandafter\HLet\csname\string\blx at bibstring\endcsname\:tempc
 >>>
 
-
-
 \<config biblatex\><<<
 \def\:tempc[#1]#2{%
    \expandafter\ifx \csname a:bibcpstring-#2\endcsname\relax
@@ -2381,8 +2520,6 @@
 >>>
 
 
-
-
 \<config biblatex\><<<
 \def\:tempc[#1]#2{%
    \expandafter\ifx \csname a:biblcstring-#2\endcsname\relax
@@ -2413,7 +2550,6 @@
 >>>
 
 
-
 \<config biblatex pre v. 0.7 -??\><<<
 \pend:def\blx at bibliography{% 
   \pend:def\thebibitem{\c:thebibliography}%
@@ -2439,6 +2575,10 @@
       \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 at cbxfile}{...} 
@@ -2447,12 +2587,150 @@
 }
 >>>
 
+\<config biblatex\><<<
+\let\blx:item\@item
+\def\@item[#1]{%
+  \blx:item[#1]%
+  \ifhmode \spacefactor\blx at sf@par\fi
+}
+\let\blx at resetpuncthook\@empty
+\let\blx at csq@ifkernmark\@empty
+\newskip\blx at unitmark
+\blx at unitmark=10pt plus 1pt minus 1pt
+\let\abx at aux@page\@gobbletwo
+\let\abx at aux@fnpage\@gobbletwo
+\let\abx at aux@refsection\@gobbletwo
+\def\blx at aux@number#1#2#3#4{}
+\def\abx at aux@number#1#2#3#4{}
+\AtEndDocument{%
+  \def\abx at aux@page#1#2{\blx at addpagesum{#1}{#2}}%
+  \def\abx at aux@fnpage#1#2{\blx at addpagesum{#1}{#2}}
+}
 
+\def\blx at begunit{%
+  \toggletrue{blx at tempa}%
+  \iftoggle{blx at insert}%
+    {\iftoggle{blx at unit}%
+       {\begingroup
+          \let\blx at begunit\@empty
+          \let\blx at endunit\@empty
+          \blx at unitpunct\blx at postpunct
+        \endgroup
+        \global\togglefalse{blx at unit}%
+        \togglefalse{blx at tempa}}
+       {\blx at postpunct}%
+     \iftoggle{blx at block}%
+       {\begingroup
+          \let\blx at begunit\@empty
+          \let\blx at endunit\@empty
+          \newblockpunct
+        \endgroup
+        \global\togglefalse{blx at block}%
+        \togglefalse{blx at tempa}}%
+       {}}%
+    {}%
+  \blx at postpunct
+  \blx at resetpuncthook
+  \iftoggle{blx at tempa}%
+    {}%
+    {\global\togglefalse{blx at insert}}%
+  \csname a:blx at unit\endcsname
+  \blx at leavevmode
+  \blx at csq@ifkernmark
+    {}%
+    {\penalty\@M
+    \hskip-\blx at unitmark\relax
+    \hskip\blx at unitmark\relax
+    }%
+  \begingroup
+    \Configure{blx at unit}{}{}%
+}
+\def\blx at endunit{%
+  \endgroup
+  \csname b:blx at unit\endcsname
+  \Configure{blx at unit}{}{}%
+  \ifdim\lastskip=\blx at unitmark
+    \unskip\unskip\unpenalty
+    \global\togglefalse{blx at lastins}%
+  \else
+   \global\toggletrue{blx at insert}%
+   \global\toggletrue{blx at lastins}%
+ \fi
+}
+\NewConfigure{blx at unit}{2}
+
+   \else
+   \fi
+
+>>>
+
 \<shared config biblatex\><<<
 \append:def\blx at bibinit{\a:bibinit}%
 \NewConfigure{bibinit}{1}%
 >>>
 
+\<biblatex-crosslinking\><<<
+\let\blx at anchors\@empty
+\let\bib at field@entrykey\@empty
+
+\protected\def\blx at anchor{%
+  \xifinlist{X\the\c at refsection -%@
+    \bib at field@entrykey}{\blx at anchors}%
+    {}%
+    {\listxadd\blx at anchors{X\the\c at refsection -%@
+      \bib at field@entrykey}%
+     \hyper:natanchorstart{X\the\c at refsection -%@
+      \bib at field@entrykey}%
+     \hyper:natanchorend}}
+     
+\protected\def\blx at bibhyperref{%
+   \@ifnextchar[%]
+     {\blx at bibhyperref@i}%
+     {\blx at bibhyperref@i[\bib at field@entrykey]}}%
+
+\long\def\blx at bibhyperref@i[#1]#2{%
+   \hyper:natlinkstart{X\the\c at refsection -%@
+     #1}%
+     #2\hyper:natlinkend}%
+
+\protected\long\def\blx at bibhyperlink#1#2{%
+   \hyper:natlinkstart{X\the\c at refsection -%:
+     #1}%
+     #2\hyper:natlinkend}%
+
+\protected\long\def\blx at bibhypertarget#1#2{%
+   \@bsphack
+   \hyper:natanchorstart{X\the\c at refsection -%:
+     #1}%
+   \@esphack
+     #2\hyper:natanchorend}%
+
+\let\blx at ifhyperref\@firstoftwo
+
+%\def\hyper:natanchorstart#1{\Link{}{#1}\EndLink}%  
+%\def\hyper:natlinkstart#1{\Link{#1}{}}%
+
+\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:natanchorend{}
+\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}{}}
+\def\hyper:natlinkend{\EndLink}
+\def\writeCiteLink#1{\immediate\write\@mainaux{%
+    \string\@namedef{#1.\thepage}{\FileName}}}
+\let\blx at addpagesum\@gobbletwo
+>>>
+
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  
 \SubSection{reading.bbx}
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  
@@ -2524,8 +2802,8 @@
 \NewConfigure{entryhead:full}{2}
 >>>
 
-\<config biblatex\><<<
-\let\blx:item\@item
+\<config biblatex-???\><<<
+\let\blx:item\@item %% discarded CVR
 \def\@item[#1]{%
   \blx:item[#1]%
   \ifhmode \spacefactor\blx at sf@par\fi 
@@ -2551,8 +2829,8 @@
 \Verb=\blx at unitmark= is defined as a new skip to match the introduction
 of the same in biblatex.sty v 1.6. [CVR 2011/09/10]
 
-\<config biblatex\><<<
-\newskip\blx at unitmark
+\<config biblatex-???\><<<
+\newskip\blx at unitmark %% discarded CVR
 \blx at unitmark=10pt plus 1pt minus 1pt
 \let\abx at aux@page\@gobbletwo
 \AtEndDocument{%
@@ -2600,7 +2878,7 @@
 } 
 >>>
 
-\<\><<<
+\<config biblatex-???\><<<
 \def\blx at begunit{% 
   \toggletrue{blx at tempa}% 
   \iftoggle{blx at insert}% 
@@ -2640,7 +2918,7 @@
 >>>
 
 
-\<config biblatex\><<<
+\<config biblatex-???\><<<
 \def\blx at endunit{% 
   \endgroup   
   \csname b:blx at unit\endcsname
@@ -2655,7 +2933,7 @@
 } 
 >>>
 
-\<config biblatex\><<<
+\<config biblatex-???\><<<
 \NewConfigure{blx at unit}{2}
 >>>
 



More information about the tex4ht-commits mailing list