[XeTeX] XeTeX : images as links

Philip Taylor P.Taylor at Rhul.Ac.Uk
Fri Sep 20 19:23:58 CEST 2013


In a forthcoming PDF catalogue of Greek MSS, a number of "thumbnail"
images of folia, bindings, etc., will appear, many if not all of
which will be expected to function as hyperlinks to full-sized
(or perhaps pannable/zoomable) versions of the same.  However,
endeavouring to achieve this functionality using either Eplain's
\hyperref or Eplain's \hlstart/\hlend fails to produce the desired
effect -- whilst text can act as a clickable region for a hyperlink,
an image included using \XeTeXpicfile seemingly cannot.	

The following, a verbatim copy from the test file, demonstrates
the problem --


	\catcode `\< = \catcode `\@
		\input eplain
	\catcode `\< = \active
	
	\enablehyperlinks
	
	\uselanguage {UKenglish}
	
	\hlstart {url}{}{http://example.org/fullsize}
	\hbox
	\bgroup
	\XeTeXpicfile Images/LPL-MS-1214/JPG/f1r.jpg height 0,25\vsize
	\egroup
	\hlend
	
	\vskip \baselineskip
	
	\hbox
	\bgroup
	\hlstart {url}{}{http://example.org/fullsize}
	\XeTeXpicfile Images/LPL-MS-1214/JPG/f1r.jpg height 0,25\vsize
	\hlend
	\egroup
	
	\vskip \baselineskip
	
	\href{http://example.org/fullsize}{\hbox {\XeTeXpicfile
Images/LPL-MS-1214/JPG/f1r.jpg height 0,25\vsize}}
	
	\end

Needless to say, if any of the \XeTeXpicfiles are replaced by text,
all works as expected.

Can anyone please explain why this does not work, and how the
problem can best be transcended ?  (NB.  UNIV = Plain XeTeX, not XeLaTeX)

Philip Taylor

P.S. The catcode stuff at the top is because the real project goes on
to load an XML file.


More information about the XeTeX mailing list