[OS X TeX] Re: The microtype mystery
George Gratzer
gratzer at me.com
Tue Aug 24 10:06:53 EDT 2010
Robert,
You have been of immense help. Now I can put my book in final shape in half a day.
microtype produces beautiful output.
One closing question. I just use
\usepackage{microtype}
Should I bother learning the options? Should I use some?
Thank you again,
George
On 2010-08-22, at 10:48 PM, Robert wrote:
> Hi George, Josep Maria, all,
>
> the solution is to add the following lines after loading microtype:
>
> \makeatletter
> \def\MT at register@subst at font{\MT at exp@one at n\MT at in@clist\font at name\MT at font@list
> \ifMT at inlist@\else\xdef\MT at font@list{\MT at font@list\font at name,}\fi}
> \makeatother
>
> With the examples provided to me by George and Josep Maria (thanks very much to both of you!), loading microtype will now increase the compilation time by a factor of 2.5 to 3. Even though this is still slower than I would have expected, it is bearable, I suppose. I may be able to speed microtype up a bit more, but will have to postpone this for later.
>
> For the interested, here's the background:
> * Every time a font is `picked up' by latex, microtype checks whether it has already seen this font: if it has, it will do nothing; if it hasn't, microtype will do its work (set up protrusion and everything else) and then add the font name to the list of fonts it has already dealt with.
> - Explanation #1: Compiling documents that are loaded with maths gets so slow because every time math mode is entered, latex picks up lots of math fonts, triggering microtype for each one. This accounts for the factor 2.5 to 3 we now get (with the above fix).
> * Now, there are also cases where a font is not available, but will be substituted (e.g. if small caps are not available, the regular shape will be used). microtype is aware of these substitutions, and also adds the substitute to the list of fonts it has already seen.
> - Explanation #2: Without the fix, microtype would have added substituted fonts *every time they were picked up*, which could lead to duplicates in microtype's font list. This was responsible for the epic deceleration, in particular together with the latexsym package, which replaces the bold font with the regular one -- every time a math symbol is typeset, regardless whether defined by latexsym or not! -- potentially leading to thousands of duplicates in the font list.
>
> The two lines given above should fix that.
>
> Regards,
> --
> Robert
>
> ----------- Please Consult the Following Before Posting -----------
> TeX FAQ: http://www.tex.ac.uk/faq
> List Reminders and Etiquette: http://email.esm.psu.edu/mac-tex/
> List Archive: http://tug.org/pipermail/macostex-archives/
> TeX on Mac OS X Website: http://mactex-wiki.tug.org/
> List Info: http://email.esm.psu.edu/mailman/listinfo/macosx-tex
>
More information about the MacOSX-TeX
mailing list