[XeTeX] problem with TeX logo spacing

Jonathan Kew jonathan_kew at sil.org
Sun Jun 17 19:33:41 CEST 2007


Hi Will,

I've been having trouble with the *TeX logos as defined by xltxtra,  
because of the way the logo spacing is handled. As far as I can tell,  
there are "length" (actually \skip) registers allocated for the  
various shifts, which means that even though the values are set using  
ems (and therefore proportional to the font size), they are then  
"frozen" at the time this is executed; TeX's registers can't hold  
"em" distances, they hold absolute values in points.

This has the result that the logos don't work well in very different  
sizes; the shifts will be too small for large font sizes, and too  
large for small sizes. I've been a little bothered in the past by how  
the logos looked in places like titles, but it became really bad when  
using them in beamer section titles, which appear in very small print  
in the navigation panel of some slide styles.

It looks to me as if simply using \def to record the spacing  
parameters, rather than allocating registers, should solved this; at  
least it works in my small examples. This way, the evaluation of em  
dimension to actual points is deferred until they are used, so they  
work properly at any size.

So here's what I've done in my copy (this is from TeX Live, but the  
code is the same in the latest XeTeX svn version):

--- /Volumes/Nenya/texlive/Master/texmf-dist/tex/xelatex/xltxtra/ 
xltxtra.sty    (revision 3858)
+++ /Volumes/Nenya/texlive/Master/texmf-dist/tex/xelatex/xltxtra/ 
xltxtra.sty    (working copy)
@@ -19,19 +19,13 @@
  \RequirePackage{graphicx}
  \RequirePackage{fontspec}
  \RequirePackage{xunicode}
-\newlength\xxt at kern@Te
-\newlength\xxt at kern@eX
-\newlength\xxt at lower@e
-\newlength\xxt at kern@La
-\newlength\xxt at kern@aT
-\newlength\xxt at kern@eL
  \newcommand*\TeX at logo@spacing[6]{%
-  \setlength\xxt at kern@Te{#1}%
-  \setlength\xxt at kern@eX{#2}%
-  \setlength\xxt at lower@e{#3}%
-  \setlength\xxt at kern@La{#4}%
-  \setlength\xxt at kern@aT{#5}%
-  \setlength\xxt at kern@eL{#6}%
+  \def\xxt at kern@Te{#1}%
+  \def\xxt at kern@eX{#2}%
+  \def\xxt at lower@e{#3}%
+  \def\xxt at kern@La{#4}%
+  \def\xxt at kern@aT{#5}%
+  \def\xxt at kern@eL{#6}%
  }
  \DeclareRobustCommand\TeX{%
    \leavevmode


Please see what you think; does this make sense, or have I missed  
some crucial problem that it will cause?

Thanks!

JK



More information about the XeTeX mailing list