[pdftex] Optical alignment.

Felix Neubauer felix.neubauer at gmx.de
Mon Mar 24 12:29:12 CET 2003


John Culleton wrote:
> On Sunday 23 March 2003 04:02 am, Ulrich Dirr wrote:
> > BTW I think abbr.tex is nothing to be put to a public place. It
> > contains some private macros of Thanh. You just have to use the
> > long form for \multiply and \divide in your protcode.tex file.
> >
> > Ulrich Dirr
>
> Well, it is one thing or the other. Either we distribute abbr.tex
> (which is already in a public place BTW) or we rewrite the "official"
> version of protcode.tex.  there is no need to put each and every user
> to the trouble of rewriting protcode.tex.

The macros from protcode.tex can easily be rewritten without any 
definitions from abbrv.tex:

\def\adjustprotcode#1{%
   \needadjustprotcodefalse
   \ifnum\pdftexversion > 13
        \ifnum \expandafter`\pdftexrevision > `g
            \needadjustprotcodetrue
         \else\ifnum\pdftexversion > 14
            \needadjustprotcodetrue
      \fi\fi
   \fi
    \ifneedadjustprotcode
        \count255=0
        \loop
            \ifcase\lpcode#1\count255\else
                \adjustcp\lpcode#1{\count255}
            \fi
            \ifcase\rpcode#1\count255 \else
                \adjustcp\rpcode#1{\count255}
            \fi
            \advance\count255 1
        \ifnum\count255 < 256 \repeat
    \fi
}

\def\adjustcp#1#2#3{%
    \begingroup
    \setbox0=\hbox{%
        \ifx#2\font\else#2\fi
        \char#3}%
    \count0=\wd0
    \multiply\count0 #1#2#3%
    \divide\count0 \fontdimen6 #2%
    #1#2#3=\count0
    \endgroup
}

The use of \count0 as a scratch register should be safe as it is used 
inside a group.

I think that this revised version of protcode.tex together with a 
cleaned up version of efcode.tex should indeed be uploaded to
<http://www.tug.org/applications/pdftex/>.

> Perhps the abbr.tex macros could just be merged into protcode.tex. I
> will try that.

Seems not to make much sense to me since protcode.tex depends only on 
minor parts of abbrv.tex and these dependencies can easily be removed 
from the code.

Regards
Felix
-- 
Felix Neubauer, felix.neubauer at gmx.de


More information about the pdftex mailing list