[texhax] Underscoring

Reinhard Kotucha reinhard.kotucha at web.de
Tue Nov 20 05:24:38 CET 2007


Philip Taylor (Webmaster) writes:

 > what is being discussed is an /interruption/ to the
 > underlining to stop it just short of a descender, and
 > to resume it just afterwards.  If this is the case
 > (am I right, Ira), this would require information
 > on the /positioning/ of the descender, which TeX lacks.

Hi,
I agree with Phil, but there are a few things which currently can be
done, though.  None of them is really beautiful.

 1. If you know in advance that you always have a white background and
    you draw the line before the text is typeset, you can insert
    PostScript or PDF code into virtual fonts which puts white
    rectangles under the descenders which then hide particular parts
    of the line.  In this case you have full control about the
    thickness and position of the line from within TeX, but it doesn't
    do what you want if the background is not white.

 2. The other approach is to make a virtual font which provides line
    segments for each glyph.  The line is then part of the glyph and
    can contain interruptions.  However, in this case the position and
    thickness of the line cannot be changed.

But maybe there is a quite reasonable solution: We'll have LuaTeX
soon, which makes TeX's internal data structures accessible.  If you
follow the second approach, I suppose that it's possible to control
underline position and thickness by a (Lua)TeX macro, and probably
even the horizontal distances between the line fragments and the
descenders.

Ira, TeX is a very powerful typesetting program and even if you are
very familiar with another program, it's worthwhile to explore TeX.

TeX comes (at least) in three incarnations:

 1. plain TeX.  A macro package provided by Don Knuth, good for people
    who want to know how things work.  Everything is described in "The
    texbook", which is the ultimate reference.

 2. LaTeX.  A macro package written by Lesly Lamport.  Modular
    approach.  You just include a macro package and pass some
    arguments to it if you want to change the layout.

 3. Context.  A macro package written by Hans Hagen, based on plain
    TeX.  This is by far the most advanced incarnation of TeX.

If you are completely new to TeX and want to have fine control about
the layout, I strongly recommend to look into Context.

   http://www.pragma-ade.com

Your mail header tells me that you are on Windows.  If you want to
install TeX, download it from:

  http://www.fsci.fuk.kindai.ac.jp/kakuto/win32-ptex/web2c75-e.html

W32TeX is a TeX distribution which provides everything Japanese need,
but it's the only one I'm aware of which provides a beta version of
LuaTeX at the moment.

If you have any questions about LuaTeX, please join the pdfTeX mailing
list.

  http://tug.org/mailman/listinfo/pdftex

Regards,
  Reinhard

-- 
----------------------------------------------------------------------------
Reinhard Kotucha			              Phone: +49-511-4592165
Marschnerstr. 25
D-30167 Hannover	                      mailto:reinhard.kotucha at web.de
----------------------------------------------------------------------------
Microsoft isn't the answer. Microsoft is the question, and the answer is NO.
----------------------------------------------------------------------------


More information about the texhax mailing list