[XeTeX] moreverb in beamer

Ulrike Fischer news2 at nililand.de
Tue Dec 9 15:03:08 CET 2008


Am Tue, 9 Dec 2008 12:52:16 +0200 schrieb Michael Iatrou:

>> I am using ``moreverb'' package with beamer in order to get visible tabs
>> on verbatim environment. Specifically I am usign the following code:

>> But it seems like verbatimtab is ignored and simple verbatim environment
>> is used for the output instead (no indentation).

> So it seems it's a beamer bug, specifically Ronan Keryell proposed the 
> following correction in beamerbaseverbatim.sty

> Using LaTeX this fixes the problem, but for XeTeX the result is that the ^^I 
> doesn't get replaced, so the output looks like:
> 
> indentation
> ^^Idoesn't
> ^^I^^Iwork
> 
> Any ideas?

The problem is that xetex writes auxiliary files differently than
pdflatex. If the catcode of the tab is 12, xetex writes a tab as ^^I. So
beamer writes 

\begin{verbatimtab}[4]
indentation
^^Idoesn't 
^^I^^Iwork
\end{verbatimtab}

But inside verbatimtab ^ has catcode 12 too, so ^^I is not a tab but
three normal input chars. 

It is possible to get a tab by resetting the catcode of ^ to seven:

  \beamer at makeinnocent\^^I% and whatever other special cases
  \catcode`\^=7


But be aware that you no longer can use ^ in other context (e.g. a^b)
inside such a verbatim environment. 

-- 
Ulrike Fischer 



More information about the XeTeX mailing list