Debian Codegraph @

texmf-dist/tex/generic/tex4ht/natbib.4ht

raw
1 % natbib.4ht (2026-02-01-13:14), generated from tex4ht-4ht.tex
2 % Copyright 1999-2009 Eitan M. Gurari
3 % Copyright 2009-2026 TeX Users Group
4 %
5 % This work may be distributed and/or modified under the
6 % conditions of the LaTeX Project Public License, either
7 % version 1.3c of this license or (at your option) any
8 % later version. The latest version of this license is in
9 % https://www.latex-project.org/lppl.txt
10 % and version 1.3c or later is part of all distributions
11 % of LaTeX version 2005/12/01 or later.
12 %
13 % This work has the LPPL maintenance status "maintained".
14 %
15 % The Current Maintainer of this work
16 % is the TeX4ht Project <https://tug.org/tex4ht>.
17 %
18 % If you modify this program, changing the
19 % version identification would be appreciated.
20 \immediate\write-1{version 2026-02-01-13:14}
21
22
23 % these should be not necessary anymore
24 % \HRestore\@lbibitem
25 % \HRestore\@bibitem
26
27 % this is a copy of code from latex.4ht with support for natbib's version of \item
28 \def\:tempa[#1]#2{{\:SUBOff\:SUPOff\edef\:tempb{{#2}}%
29 \pend:def\:tempb{\o:@lbibitem:[#1]}%
30 \global\let\:temp\:tempb}%
31 \natbibsetb:anc{#2}\:temp\bib:anc \let\AnchorLabel\sv:anc\ignorespaces}%
32 \HLet\@lbibitem\:tempa
33
34 \def\natbibsetb:anc#1{\let\sv:anc\AnchorLabel
35 \def\bib:anc{\def\bib:anc{#1}\ifx \bib:anc\empty \else
36 \a:bibitem{}{\a:bibanchor#1}\b:bibitem\fi \gdef\bib:anc{}}%
37 \def\AnchorLabel{\bib:anc}%
38 \let\cite:item=\item
39 \def\item[##1]{\let\item\cite:item
40 \item[##1]\bib:anc}%
41 }
42
43 \def\hyper@natlinkstart#1{%
44 \let\rel:hyper\def \hyper@linkstart{cite}{X#1}%
45 \def\hyper@nat@current{#1}%
46 }
47 \def\hyper@natlinkbreak#1#2{%
48 \hyper@linkend#1\let\rel:hyper\def \hyper@linkstart{cite}{X#2}%
49 }
50 \def\hyper@natlinkend{\hyper@linkend}
51 \expandafter\ifx \csname hyper@linkstart\endcsname\relax
52 \def\hyper@linkstart#1#2{%
53 \a:cite%
54 \def\:temp{#1}%
55 \ifx\:temp\@urltype
56 \cIteLink[#2]{}{}%
57 \else
58 \ifx\rel:hyper\def\cIteLink{#2}{}\else\cIteLink[\##2]{}{}\fi
59 \fi \global\let\rel:hyper=\:UnDef
60 }
61 \def\hyper@linkend{\EndcIteLink\b:cite}
62 \fi
63 \long\def\:temp#1{}\ifx \:temp\hyper@natanchorstart
64 \def\hyper@natanchorstart#1{\Link{}{X#1}\EndLink}
65 \fi
66
67 \pend:defIII\NAT@cite{\let\mbox\o:mbox:}
68 \pend:defIII\NAT@citenum{\let\mbox\o:mbox:}
69
70
71 \Hinput{natbib}
72 \endinput
73