[OS X TeX] pdftex 1.20a and microtype?

Bruno Voisin bvoisin at mac.com
Sun Oct 17 08:17:09 CEST 2004


Le 16 oct. 04, à 16:34, Gary L. Gray a écrit :

> Having installed the TL 2004 distribution using Gerben's i-Installer, 
> I find myself wondering the best way to implement the new microtype 
> features. I either use the latin modern fonts via:
>
> \usepackage[T1]{fontenc}
> \usepackage{lmodern}
>
> or the Lucida fonts via:
>
> \usepackage[LY1]{fontenc} % Use this font encoding.
> \usepackage[expert,altbullet,lucidasmallscale]{lucidabr}
>
> and in both cases I always use the AMS-LaTeX packages.
>
> With that said, until installing the new (experimental) stuff from 
> Gerben, I would always use the pdfcprot package to get margin kerning. 
> Since he doesn't seem to have included the microtype package in his 
> distribution, I am wondering if it is the best choice moving forward.

Hi Gary,

I won't have time to try the new TL2004 until the end of next week, too 
much stress for now. I generally use the same commands as you (lmodern 
or Lucida, with sometimes Fourier and now experiments with XeTeX and 
Hoefler Text).

Regarding margin kerning, the following does work with Lucida:

% Provides margin kerning (ignored silently if pdfTeX is not used)
% Dependencies: file "protcode"

\newif\ifpdf
\ifx\pdfoutput\undefined
   \pdffalse
\else
   \pdfoutput=1
   \pdftrue
\fi
\ifpdf
   \input{protcode}
   \newcommand{\setupfont}{
     \setprotcode\font}
   \newcommand{\setupfam}{
     \setupfont
     {\itshape\setupfont}
     {\bfseries\setupfont}
     {\itshape\bfseries\setupfont}
     {\scshape\setupfont}}
   \AtBeginDocument{
     \setupfam
     {\LARGE\setupfam}
     {\large\setupfam}
     {\small\setupfam}
     {\footnotesize\setupfam}
     {\indexsize\setupfam}}
   \pdfprotrudechars=2
\fi

It's inspired by code in some files from the TeXShop distro (don't 
remember which ones), and should be, I hope, self-explanatory. You may 
want to change \pdfprotudechars:

- \pdfprotrudechars=1 means the linebreaks are calculated without 
taking margin kerning into account, and only afterwards is margin 
kerning applied;

- \pdfprotrudechars=2 means margin kerning is taken into account 
already when calculating the linebreaks.

The sizes (\LARGE etc.) and font instances (\itshape etc.) were chosen 
to correspond to those actually used in a custom journal class I'm 
using, you may have you alter them depending on the class you're using.

As for protcode.tex, it's included in gwTeX (at least in the TL2003 
setup), at 
/usr/local/teTeX/share/texmf.gwtex/tex/plain/misc/protcode.tex.

All the best,

Bruno
--------------------- Info ---------------------
Mac-TeX Website: http://www.esm.psu.edu/mac-tex/
           & FAQ: http://latex.yauh.de/faq/
TeX FAQ: http://www.tex.ac.uk/faq
List Post: <mailto:MacOSX-TeX at email.esm.psu.edu>





More information about the Macostex-archives mailing list