[XeTeX] moreverb in beamer
Michael Iatrou
m.iatrou at freemail.gr
Tue Dec 9 11:52:16 CET 2008
When the date was Monday 08 December 2008, Michael Iatrou wrote:
> Hi,
>
> I am using ``moreverb'' package with beamer in order to get visible tabs
> on verbatim environment. Specifically I am usign the following code:
>
> %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
>
> \documentclass[14pt]{beamer}
> \usepackage{fontspec}
> \usepackage{xunicode}
> \usepackage{xltxtra}
> \usepackage{moreverb}
>
> \begin{document}
>
> \begin{frame}[fragile]{tab}
>
> \begin{verbatimtab}[4]
> indentation
> doesn't
> work
> \end{verbatimtab}
>
> \end{frame}
>
> \end{document}
>
> %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
>
> (one tab before ``doesn't'', two before ``work'')
>
> But it seems like verbatimtab is ignored and simple verbatim environment
> is used for the output instead (no indentation).
>
> I don't get any error messages in the log file and the only relative
> entries are:
>
> (/usr/share/texmf-texlive/tex/latex/moreverb/moreverb.sty
> Package: moreverb 1997/12/07 v2.2d.2 `more' verbatim facilities
>
> (/usr/share/texmf-texlive/tex/latex/tools/verbatim.sty
> Package: verbatim 2003/08/22 v1.5q LaTeX2e package for verbatim
> enhancements
>
> $ xelatex -v
> XeTeX 3.141592-2.2-0.996-patch2 (Web2C 7.5.6)
> kpathsea version 3.5.6
> Copyright 2007 SIL International.
> Kpathsea is copyright 2007 Karl Berry and Olaf Weber.
> There is NO warranty. Redistribution of this software is
> covered by the terms of both the XeTeX copyright and
> the Lesser GNU General Public License.
> For more information about these matters, see the file
> named COPYING and the XeTeX source.
> Primary author of XeTeX: Jonathan Kew.
> Kpathsea written by Karl Berry, Olaf Weber, and others.
>
> Compiled with ICU version 3.4 [with modifications for XeTeX]
> Compiled with zlib version 1.2.3.3; using 1.2.3.3
> Compiled with FreeType2 version 2.3.7; using 2.3.7
> Compiled with fontconfig version 2.6.0; using 2.6.0
> Compiled with libpng version 1.2.27; using 1.2.27
> Compiled with libpoppler version 3.00
>
> Any ideas on what I am missing and how I can get the desired result
> without manually replacing tabs with spaces?
So it seems it's a beamer bug, specifically Ronan Keryell proposed the
following correction in beamerbaseverbatim.sty
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\def\beamer at verbatimreadframe{%
\begingroup%
\let\do\beamer at makeinnocent\dospecials%
\count@=127%
\@whilenum\count@<255 \do{%
\advance\count@ by 1%
\catcode\count@=11%
}%
\beamer at makeinnocent\^^L% and whatever other special cases
% XXX: Add tabulations too. I guess that all the ASCII and other
% ISO-8859-15 code should be added :-/
\beamer at makeinnocent\^^I% and whatever other special cases
%\beamer at makeinnocent\«% and whatever other special cases
%\beamer at makeinnocent\»% and whatever other special cases
\endlinechar`\^^M \catcode`\^^M=12%
\@ifnextchar\bgroup{\afterassignment\beamer at specialprocessframefirstline\let\beamer at temp=}
{\beamer at processframefirstline}}%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
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?
Thanks,
--
Michael Iatrou (murh)
More information about the XeTeX
mailing list