[tex-eplain] \leavevmode in front of hyperlinks

geolsoft at mail.ru geolsoft at mail.ru
Thu Jul 21 23:35:28 CEST 2005


[I decided to break the thread `Hyperlinks in Eplain' and
start new threads for new issues regarding hyperlinks.
tex-eplain does not seem to be awfully busy list, so I don't
think any confusion will arise.  Should anybody disagree I
will stick to the original thread.]

The problem:

In the original eplain it was perfectly legal to start the
paragraph by saying `\xref{LABEL}'; with pdftex driver,
however, this trick will give you the following error:

! pdfTeX error (ext1): \pdfstartlink cannot be used in vertical mode.

This could be cured by forcing \leavevmode at the beginning
of \@hlstart.  But in case of dvipdfm it is actually legal
to start a link in vertical mode (it will just be another
\special in vertical list).

I don't think it would be possible to make links force
\leavevmode in pdftex driver but not in dvipdfm.  For one
thing, the drivers will occasionally behave quite different
(not a big deal).  Most importantly, in this case it is not
clear how should `nolinks' define \@hlstart.  It should be
let to \gobblethree if user was using dvipdfm driver to
prepare the document, and be defined to `\leavevmode' if it
was pdftex driver (but we never know which one it was!).

So the question is:  should I leave everything as it is and
have the user (in case of pdftex) say \indent / \noindent /
\leavevmode in front of macros which start links; or should
I force \leavevmode before a link in every driver (in
\@hlstart)?  Or maybe somebody can think of a better
solution?

The reason I didn't just go ahead and force \leavevmode
everywhere was because I was wondering maybe someone had
uses for links starting in vertical mode when working with
dvipdfm.

Sorry for such a long post to discribe this trivial issue,
but I think it is better to uncover as many problems as
possible before the thing goes into production.

-- 
Best regards,
Oleg Katsitadze



More information about the tex-eplain mailing list