[texhax] rendering "TeX" in HTML

Karl Berry karl at freefriends.org
Wed Jan 26 16:01:56 CET 2005


The TUG webmasters received this note about rendering TeX in HTML.
I thought I'd pass it along.  (tex4ht does essentially this, but I think
(m)any other systems do.)

karl

Date: Tue, 25 Jan 2005 12:21:56 -0700
From: "Tom von Alten"
Subject: rendering "TeX" in HTML

Hello:

I've never used TeX myself, but I've known about it for a long time.
An email discussion piqued my curiosity and I went out and looked at
some of what all is on the web on the subject, and I was surprised
that no one seems to have taken the trouble to render the name with
the quirky dropped baseline, settling instead for the simple
de/capitalization technique.

Perhaps that's good enough, and it certainly is good enough in most
cases.

But I took a moment to consider whether the standard CSS tools could
provide the "original" rendering, and found they could, without much
difficulty.  I'm not motivated quite strongly enough to join a group
or list to publicize this myself, but if you're interested, feel free.
I've inspected with the browsers I have handy, Firefox 1.0 and
MSIE v6 on WinXP sp2; YMMV.

T<span style="position:relative; bottom:-4px">E</span>X
  or
T<span style="position:relative; bottom:-0.2em">E</span>X

LaTeX is (only) a bit trickier:

L<span style="position:relative; bottom:3px;
font-variant: small-caps">a</span>T<span style="position:relative;
bottom:-4px">E</span>X

It would be a bit annoying to do that every time it was used,
I suppose, but it would be nice in a title or two, at least.
It could be added to the style sheet to simplify matters a bit:

<style type="text/css">
 .drop { position:relative; bottom:-0.2em }
 .boost { position:relative; bottom:0.15em; font-variant: small-caps }
</style>

and then L<span class="boost">a</span>T<span class="drop">E</span>X
in the body.

Cheers,
_____________
Tom von Alten      http://fortboise.org



More information about the texhax mailing list