[tex-eplain] \leavevmode in front of hyperlinks

Stepan Kasal kasal at ucw.cz
Sat Jul 23 18:41:54 CEST 2005


Hello,

On Fri, Jul 22, 2005 at 09:55:57PM +0300, geolsoft at mail.ru wrote:
> On Fri, Jul 22, 2005 at 08:12:16PM +0200, Karl Berry wrote:
> > Seems like the cleanest thing to do is just \ifvmode\leavevmode\fi
> > before outputting a link.
> 
> OK, I will do this.  But what is the reason for \ifvmode ?

yes, I had this idea immediately after reading Karl's mail, too.

>   \def\leavevmode{\unhbox\voidb at x}
> so it is just a no-op in horizontal mode.  Knuth actually
> uses it in several macros without the \ifvmode.

And yes, I also dived into plain.tex immediately, even before reading
Oleg's mail.  :-)
  
> > (Of course this should only be done if hyperlinks are actually enabled.)

I think \leavevmode should be issued always, to get consistent behaviour.

IOW, I think Knuth-style strict backward-compatibility should be sacrificed
for consistency inside the new version of eplain.  What do you think?

Stepan



More information about the tex-eplain mailing list