[tex4ht-commits] [SCM] tex4ht updated: r99 - trunk/lit
cvr at gnu.org.ua
cvr at gnu.org.ua
Sat Jan 19 08:13:22 CET 2013
Author: cvr
Date: 2013-01-19 09:13:22 +0200 (Sat, 19 Jan 2013)
New Revision: 99
Modified:
trunk/lit/tex4ht-4ht.tex
Log:
\citet command in combination with super and numbers
option of natbib package was broken and reported by Stefan,
see bug 178. A new function \ht at citet has been defined
which will take charge in place of \citet when \NAT at super
is true. Bug fixed.
Modified: trunk/lit/tex4ht-4ht.tex
===================================================================
--- trunk/lit/tex4ht-4ht.tex 2013-01-18 18:19:28 UTC (rev 98)
+++ trunk/lit/tex4ht-4ht.tex 2013-01-19 07:13:22 UTC (rev 99)
@@ -5,6 +5,7 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% tex4ht-4ht.tex %
% Copyright (C) 1996--2009 Eitan M. Gurari %
+% 2009-2013 TeX Users Group %
% %
% This work may be distributed and/or modified under the %
% conditions of the LaTeX Project Public License, either %
@@ -23278,6 +23279,7 @@
\HRestore\@lbibitem
\HRestore\@bibitem
\ifNAT at super
+ |<natbib htcitet|>
|<natbib numbers|>
\else
\def\hyper at natlinkstart#1{%
@@ -23371,7 +23373,15 @@
\fi
>>>
+This modification is needed since Stefan
+\Verb=<s.newslists at googlemail.com>= vide bug \# 178 reported that
+\Verb=\citet= didn't work in combination with \Verb=super= option of
+\Verb=natbib= package.
+\<natbib htcitet\><<<
+\def\citet{\@ifstar{\NAT at longnamestrue\ht at citet}%
+ {\NAT at longnamesfalse\ht at citet}}
+>>>
\<natbib numbers\><<<
@@ -23380,12 +23390,13 @@
\c at NAT@ctr}\EndLink \gdef\bib:anc{}}%
\def\AnchorLabel{\bib:anc}}
\def\nb:link#1{\Protect\Link{bibitem#1}{}#1\Protect\EndLink}
+\def\nb at link#1{\Protect\Link{bibitem#1}{}#1\Protect\EndLink}
>>>
\<natbib numbers\><<<
\let\nat:lbibitem\@lbibitem
-\def\@lbibitem{
+\def\@lbibitem{%
\ifx\hyper at natanchorstart\@gobble
\def\hyper at natanchorstart##1{\Link{}{bibitem\the
\c at NAT@ctr}\EndLink}\fi
@@ -23394,9 +23405,28 @@
>>>
-
\<natbib numbers\><<<
\catcode`\:|=12
+ \def\ht at citet#1{\def\NAT at num{-1}\let\NAT at last@yr\relax\let\NAT at nm\@empty
+ \let\@citea\@empty
+ \@for\@citeb:=#1\do{%
+ \@ifundefined{b@\@citeb\@extra at b@citeb}%
+ {{\reset at font\bfseries?}\NAT at citeundefined\PackageWarning{natbib}%
+ {Citation `\@citeb' on page \thepage \space undefined}%
+ }%
+ {\@citea\let\NAT at last@num\NAT at num\let\NAT at last@nm\NAT at nm
+ \NAT at parse{\@citeb}%
+ \ifNAT at longnames\@ifundefined{bv@\@citeb\@extra at b@citeb}{%
+ \let\NAT at name=\NAT at all@names
+ \global\@namedef{bv@\@citeb\@extra at b@citeb}{}}{}%
+ \fi
+ \ifNAT at full\let\NAT at nm\NAT at all@names\else
+ \let\NAT at nm\NAT at name
+ \fi
+ \NAT at nm}\Tg<sup>\nb at link{\NAT at num}\Tg</sup>
+ \def\@citea{\unskip\NAT at sep\penalty\@m\space}%
+ }%
+}
\def\NAT at citexnum[#1][#2]#3{%
\NAT at sort@cites{#3}%
\let\@citea\@empty
More information about the tex4ht-commits
mailing list