[tex-eplain] Contents hyperlinks
Rodolfo Medina
rodolfo.medina at gmail.com
Tue Aug 2 20:33:57 CEST 2016
Rodolfo Medina <rodolfo.medina at gmail.com> writes:
> Philip Taylor <P.Taylor at Rhul.Ac.Uk> writes:
>
>> Rodolfo Medina wrote:
>>
>> Thanks. I used your macros in the following example it but the link
>> doesn't seem to work... Why?
>>
>> Not enough code !
>>
>> \input eplain
>>
>> \enablehyperlinks
>>
>>
>> \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}}}}
>>
>> \newread \toc
>>
>> \immediate \openin \toc = \jobname.toc
>>
>> \ifeof \toc \closein \toc \else \closein \toc \input \jobname.toc \fi
>>
>>
>> \newwrite \toc
>>
>> \immediate \openout \toc = \jobname.toc
>>
>>
>> \addtocentry {Section 1}
>>
>>
>> Hallo.
>>
>>
>> \immediate \closeout \toc
>>
>>
>> \end
>>
>> ** Phil.
>
>
> I'm sorry... I filled the test file with exactly the above code but now I even
> get error:
>
> $ tex test
> This is TeX, Version 3.14159265 (TeX Live 2015/Debian) (preloaded format=tex)
> (./test.tex (./eplain.tex)
> Eplain: using `hypertex' hyperlink driver. (./test.toc
> Runaway argument?
> ! Paragraph ended before \tocentry was complete.
> <to be read again>
> \par
> l.1 \tocentry {Section 1} \par
> {\hlidxpage{}{1}}
> ?
The error was due to a wrong blank line in the definition of \addtocentry. But
still the link does not work...
More information about the tex-eplain
mailing list