[OS X TeX] Re: The microtype mystery

Peter Dyballa Peter_Dyballa at Web.DE
Thu Aug 26 16:22:12 EDT 2010


Am 23.08.2010 um 05:48 schrieb Robert:

> 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


This code introduces an error when I try to use in a LaTeX file which  
compiles XeTeX and also with pdfTeX. This is the stripped down (all  
comments removed) preamble:

	\documentclass{minimal}
	\usepackage{ifpdf,ifxetex}
	\usepackage[ngerman]{babel}
	\ifxetex
		\immediate\write16{==\jobname: Wir sind mit XeTeX==}
		\immediate\write16{==Ende XeTeX==}
	\else
		\immediate\write16{==Wir sind ohne XeTeX==}
	  \ifpdf
	  	\immediate\write16{==\jobname: Bonjour, PDF!==}
	    \usepackage[T1]{fontenc}
	    \usepackage[utf8]{inputenc}
	  \else
	  	\immediate\write16{==¡Hola \jobname: DVI!==}
	  \fi
		\immediate\write16{==Wir sind kurz vor 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%%%%%%%%%%%%%%%%%%%%%%%%%
	\fi
	\newcommand*{\Titel}[2]{%
	  \begingroup
	    #1
	    \ifxetex
	      \fontspec[LetterSpace=25,WordSpace=1.875]{Lucida Bright} 
%LetterSpace=37.5
	      \textcolor{Maroon}{#2}%
	    \else
	      \ifpdf
	        \textcolor{Maroon}{\textls[250]{#2}}%
	      \else
	        \textcolor{Maroon}{\so{#2}}%
	      \fi
	    \fi
	  \endgroup
	}
	
	\listfiles
	\pagestyle{empty}
	
	\begin{document}
	Text!
	\end{document}

With pdflatex and latex commands all is well, but with xelatex this is  
written into the shell:

	==if: Wir sind mit XeTeX==
	==Ende XeTeX==
	! Too many }'s.
	l.108       \ifMT at inlist@\else\xdef\MT at font@list{\MT at font@list 
\font at name,}\fi}
	
	?
	! Emergency stop.
	l.108       \ifMT at inlist@\else\xdef\MT at font@list{\MT at font@list 
\font at name,}\fi}
	
	No pages of output.

When I comment your four lines, all's well for xelatex (in TeX Live  
2008-2010).


--
Mit friedvollen Grüßen

   Pete

Wer nichts zu verbergen hat, hat schon alles verloren.
				(Juli Zeh)




More information about the MacOSX-TeX mailing list