3

I tried to insert a hyperlink with xetex and eplain, and here is what happens.

\input eplain
\enablehyperlinks
\input pgfmath
\href{http://www.google.com}{google}

\bye

prints this weird error in the log file:

! Undefined control sequence.
\color ...gfsysprotocol@bufferedtrue \pgfsetcolor 
                                                  {.}\expandafter \pgfsys@ou...

\temp ->\color [
                cmyk]{0.28,1,1,0.35}
\after@hl@getparam ...]{\hl@opt@color }}\fi \temp 
                                                  \fi \fi \hl@driver 
\@hl@getparam ...\@hllabel {#1}\after@hl@getparam 
                                                  \ignorespaces 
\@@href ...f@end@ext \hlstart@impl {hrefext}{#1#2}
                                                  \fi \@@@href 
l.4 \href{http://www.google.com}
                                {google}

With "normal" pgf,

\input eplain
\enablehyperlinks
\input pgf
\href{http://www.google.com}{google}

\bye

the document compiles with this error:

Package pgfbase: Error! Unsupported color model `'. Sorry.

and writes a weird pdf file

enter image description here

(the same happens if I load pgf before eplain)

1

1 Answer 1

5

pgfmath loads pgfplain-util.def that wants to emulate xcolor, without really being able to do it if the whole PGF isn't loaded.

You can adapt my solution at Can \usepackage{color} and \input tikz work together in Plain TeX/eplain? by giving control of color back to the color package.

\input eplain
\beginpackages
  \usepackage{url}
  \usepackage{color}
\endpackages

\let\eplaincolor\color
\let\eplaindefinecolor\definecolor
\input pgfmath
\let\color\eplaincolor
\let\definecolor\eplaindefinecolor

\enablehyperlinks
\definecolor{urlcolor}{rgb}{.2,.4,.6}
\hlopts{colormodel=,color=urlcolor}

\href{http://www.google.com}{google}

\url{http://tex.stackexchange.com}
\bye

enter image description here

2
  • I suppose that I have to manually change the color everytime if I want, say, cross-references in red and urls in blue? Commented Dec 31, 2013 at 16:20
  • @lvaneesbeeck That's beyond my knowledge of eplain.
    – egreg
    Commented Dec 31, 2013 at 16:21

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .