[XeTeX] More text output than input: bug or feature?

Jonathan Kew jonathan at jfkew.plus.com
Mon Jan 5 02:06:38 CET 2009


On 5 Jan 2009, at 00:16, Peter Dyballa wrote:

> Hello!
>
> I wish this mechanism could work in my wallet! OK, I would have  
> another crisis, broken seams, torn trousers ...
>
> This input:
>
>    1	\documentclass[a4paper,12pt]{article}
>    2	  \usepackage{xltxtra}
>    3	  \defaultfontfeatures{Mapping=tex-text}
>    4	  \setromanfont{Baskerville}
>    5	%  \setromanfont[ItalicFont={HiraMinPro- 
> W3:+ital},BoldItalicFont={HiraMinPro-W6:+ital},BoldFont={HiraMinPro- 
> W6}]{HiraMinPro-W3}
>    6	  \setsansfont[ItalicFont={HiraKakuPro- 
> W3:+ital},BoldFont={HiraKakuPro-W6},BoldItalicFont={HiraKakuPro- 
> W6:+ital}]{HiraKakuPro-W3}
>    7	
>    8	\listfiles
>    9	\begin{document}
>   10	
>   11	\textsf{habitudes et un mot entre auteurs et \XeLaTeX\  
> éditeurs. \XeLaTeX\
>   12	
>   13	habitudes et un \textit{certain} entre \textbf{auteurs} et  
> \XeLaTeX\ \textbf{\itshape éditeurs} \XeLaTeX}
>   14	
>   15	\textsf{habitudes et un certain mot entre auteurs et \XeTeX\  
> éditeurs. \XeTeX\
>   16	
>   17	et un {\itshape certain} entre {\bfseries auteurs} et \XeTeX\  
> {\bfseries\itshape éditeurs} \XeTeX}
>   18	
>   19	\end{document}
>
> seems to have some errors I can't see:

What do you mean, can't see the errors? Read the error messages and  
compare the input....

>
> Runaway argument?
> {habitudes et un mot entre auteurs et \XeLaTeX \ éditeurs. \XeLaTeX  
> \^^M
> ! Paragraph ended before \text at command was complete.

That's as plain as can be. It means the paragraph ended (with a blank  
line, in this case) while reading the argument to a macro  
(\text at command, called from \textsf, in this case) that wasn't  
declared as \long. Look it up in The TeXbook if necessary.

>
> <to be read again>
>                   \par
> l.13 ... \textit{certain} entre \textbf{auteurs} et \XeLaTeX\  
> \textbf{\itshape éditeurs} \XeLaTeX}
>
> I suspect you've forgotten a `}', causing me to apply this
> control sequence to too much text. How can we recover?
> My plan is to forget the whole thing and hope for the best.
> [...]
> ! Too many }'s.
> <recently read> \egroup
>
> l.13 ... \textit{certain} entre \textbf{auteurs} et \XeLaTeX\  
> \textbf{\itshape éditeurs} \XeLaTeX}
>
> You've closed more groups than you opened.
> Such booboos are generally harmless, so keep going.
>
>
> Runaway argument?
> {habitudes et un certain mot entre auteurs et \XeTeX \ éditeurs.  
> \XeTeX \^^M
> ! Paragraph ended before \text at command was complete.
> <to be read again>
>                   \par
> l.17 ...itshape certain} entre {\bfseries auteurs} et \XeTeX\  
> {\bfseries\itshape éditeurs} \XeTeX}
>
> I suspect you've forgotten a `}', causing me to apply this
> control sequence to too much text. How can we recover?
> My plan is to forget the whole thing and hope for the best.
>
> ! Too many }'s.
> <recently read> \egroup
>
> l.17 ...itshape certain} entre {\bfseries auteurs} et \XeTeX\  
> {\bfseries\itshape éditeurs} \XeTeX}
>
> You've closed more groups than you opened.
> Such booboos are generally harmless, so keep going.
>
> [1
>
> ]
>
> and produces this reach and generous output (showing also the logo  
> bugs):
>
> <XeTeX rich bug.pdf>

Before worrying about the details of the output, why don't you fix the  
errors that TeX is reporting? That would give you a much better chance  
of getting the correct result. See under GIGO.

FWIW, if you try a comparable test with (pdf)tex, you'll get  
comparable output. So it's not a xetex bug.

If you really want to understand it, you could try using TeX's tracing  
facilities to see what happens as the various macros are expanded (and  
errors encountered).

JK



More information about the XeTeX mailing list