[tex-eplain] Contents hyperlinks

Rodolfo Medina rodolfo.medina at gmail.com
Tue Aug 2 19:21:19 CEST 2016


Philip Taylor <P.Taylor at Rhul.Ac.Uk> writes:

> Rodolfo Medina wrote:
>
>     In eplain.pdf, I read:
>     
>     
>         
>          There is currently no special support for hyperlinks in the table of
>  contents, but implementing them with the \hldest and \hlstart ... \hlend
>  commands should be possible.
>
> Could anyone please suggest a way to do that?
>
> I use the following :
>
>     \def \tocentry #1#2{\noindent #1\dotfill $\mkern 2 mu$#2\endgraf} 
>
>     \def \addtocentry #1{\immediate \write \toc {\string \tocentry \space {#1}
>     {\string \hlidxpage {}{\the \pageno}}}}
>
> ** Phil.


Thanks.  I used your macros in the following example it but the link doesn't
seem to work...  Why?

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\input eplain
\enablehyperlinks
\newwrite\toc
\def \tocentry #1#2{\noindent #1\dotfill $\mkern 2 mu$#2\endgraf} 
\def \addtocentry #1{\immediate \write \toc {\string \tocentry \space {#1}
    {\string \hlidxpage {}{\the \pageno}}}}

\readtocfile

\addtocentry{Section 1}

Hallo.

\end
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%


Cheers,

Rodolfo



More information about the tex-eplain mailing list