[tex4ht-commits] [SCM] tex4ht updated: r230 - trunk/lit
michal_h21 at gnu.org.ua
michal_h21 at gnu.org.ua
Wed Dec 21 00:22:26 CET 2016
Author: michal_h21
Date: 2016-12-21 01:22:26 +0200 (Wed, 21 Dec 2016)
New Revision: 230
Modified:
trunk/lit/ChangeLog
trunk/lit/Makefile
trunk/lit/tex4ht-4ht.tex
Log:
Fixed xr-hyper support
Modified: trunk/lit/ChangeLog
===================================================================
--- trunk/lit/ChangeLog 2016-12-19 00:47:22 UTC (rev 229)
+++ trunk/lit/ChangeLog 2016-12-20 23:22:26 UTC (rev 230)
@@ -1,3 +1,9 @@
+2016-12-20 Michal Hoftich <michal.h21 at gmail.com>
+
+ * tex4ht-4ht.tex (usepackage.4ht, xr-hyper.4ht): Fixed support for
+ additional optional argument of \externaldocument and fixed support for
+ hyperref's label in the cross references
+
2016-12-18 Karl Berry <karl at freefriends.org>
* tex4ht-4ht.tex (nameref.4ht): copyright.
Modified: trunk/lit/Makefile
===================================================================
--- trunk/lit/Makefile 2016-12-19 00:47:22 UTC (rev 229)
+++ trunk/lit/Makefile 2016-12-20 23:22:26 UTC (rev 230)
@@ -36,7 +36,8 @@
geometry.4ht graphicx.4ht hyperref.4ht latex.4ht lettrine.4ht listings.4ht \
memoir.4ht multicol.4ht multirow.4ht nameref.4ht quoting.4ht reading.4ht \
scrartcl.4ht scrbook.4ht scrreprt.4ht spanish.4ht subscript.4ht \
- titlesec.4ht tocloft.4ht wrapfig.4ht usepackage.4ht xcolor.4ht
+ titlesec.4ht tocloft.4ht wrapfig.4ht usepackage.4ht xcolor.4ht xr.4ht \
+ xr-hyper.4ht
# xx and many, many more.
Modified: trunk/lit/tex4ht-4ht.tex
===================================================================
--- trunk/lit/tex4ht-4ht.tex 2016-12-19 00:47:22 UTC (rev 229)
+++ trunk/lit/tex4ht-4ht.tex 2016-12-20 23:22:26 UTC (rev 230)
@@ -3358,6 +3358,7 @@
% Copyright (C) |CopyYear.1997. Eitan M. Gurari %
|<TeX4ht copyright|>
|<fix xr|>
+ |<fix xr-nonhyper|>
\Hinput{xr}
\endinput
>>> \AddFile{7}{xr}
@@ -3410,7 +3411,7 @@
\fi
>>>
-\<fix xr\><<<
+\<fix xr-nonhyper\><<<
\def\XRrEfLiNK[#1]#2#3{\a:xr[#1]{#2}{}%
\ifx\hyperrefLabel\:UnDef #3\else \hyperrefLabel\fi \b:xr}
\NewConfigure{xr}{2}
@@ -3456,19 +3457,45 @@
% Copyright (C) |CopyYear.2003. Eitan M. Gurari %
|<TeX4ht copyright|>
|<fix xr|>
+ |<fix xr-hyper|>
\Hinput{xr}
\endinput
>>> \AddFile{7}{xr-hyper}
+
+Hyperref pasess five arguments to \`|\newlabel|, we must adapt \`|\XR:rEfLiNK| to that
+
+\<fix xr-hyper\><<<
+\def\XRrEfLiNK[#1]#2#3{\a:xr[#1]{#2}{}%
+ \ifx\hyperrefLabel\:UnDef #3\else \hyperrefLabel\fi \b:xr}
+\NewConfigure{xr}{2}
+\Configure{xr}{\Link}{\EndLink}
+\def\XR:rEfLiNK#1#2#3#4#5{{\xr:rEfLiNK#1}{\xr:rEfLiNK#2}{\xr:rEfLiNK#3}}
+\def\xr:rEfLiNK#1#2{\noexpand\XRrEfLiNK[\Get:HFile#2-]{#2}}
+\def\Get:HFile#1-#2-{\:LikeRef{)F\:gobble #1F-}}
+>>>
+
\<use package\><<<
xr-hyper,>>>
\<add to usepackage\><<<
\def\:temp{xr-hyper}\ifx \@currname\:temp
- |<wait with xr|>
+ |<wait with xr-hyper|>
\fi
>>>
+xr-hyper add optional argument after mandatory argument of
+\`|\externaldocument|. It is a full path to the PDF file. We don't really need
+it, so we can safely eat that.
+
+\<wait with xr-hyper\><<<
+\def\eat:optional[#1]{}
+\AtEndOfPackage{\let\XR:\XR@
+ \def\XR@[#1]#2{%
+ \Configure{AtBeginDocument}{\XR:[#1]{#2}}{}\@ifnextchar[\eat:optional{}}%
+}
+>>>
+
%%%%%%%%%%%%%%%%%%
\Section{savetrees.sty}
%%%%%%%%%%%%%%%%%%
More information about the tex4ht-commits
mailing list