diff options
author | Karl Berry <karl@freefriends.org> | 2006-01-12 23:52:02 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2006-01-12 23:52:02 +0000 |
commit | b1daf7130666bef14cdb98d88b3c107da38becec (patch) | |
tree | 08f591f90145354f39d714eadee16c99557b7109 /Master/texmf-dist/tex/latex/beamer/beamerbaseverbatim.sty | |
parent | 47773c8fa98e5885b1d789b205b39fb924707e6e (diff) |
beamer
git-svn-id: svn://tug.org/texlive/trunk@699 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/beamer/beamerbaseverbatim.sty')
-rw-r--r-- | Master/texmf-dist/tex/latex/beamer/beamerbaseverbatim.sty | 121 |
1 files changed, 121 insertions, 0 deletions
diff --git a/Master/texmf-dist/tex/latex/beamer/beamerbaseverbatim.sty b/Master/texmf-dist/tex/latex/beamer/beamerbaseverbatim.sty new file mode 100644 index 00000000000..1c3d5dd4345 --- /dev/null +++ b/Master/texmf-dist/tex/latex/beamer/beamerbaseverbatim.sty @@ -0,0 +1,121 @@ +\ProvidesPackageRCS $Header: /cvsroot/latex-beamer/latex-beamer/base/beamerbaseverbatim.sty,v 1.6 2005/04/12 14:29:35 tantau Exp $ + +% Copyright 2003 by Till Tantau <tantau@users.sourceforge.net>. +% +% This program can be redistributed and/or modified under the terms +% of the GNU Public License, version 2. + +\mode<presentation> + + +\newwrite\beamer@verbatimfileout + +\def\beamer@verbatimreadframe{% + \begingroup% + \let\do\beamer@makeinnocent\dospecials% + \count@=127% + \@whilenum\count@<255 \do{% + \advance\count@ by 1% + \catcode\count@=11% + }% + \beamer@makeinnocent\^^L% and whatever other special cases + \endlinechar`\^^M \catcode`\^^M=12 \beamer@processframefirstline} + +{\catcode`\^^M=12\endlinechar=-1% + \long\gdef\beamer@processframefirstline#1^^M{% + \def\beamer@test{#1}% + \ifx\beamer@test\beamer@stopframefirst% + \let\next=\beamer@framewritten% + \else + \@temptokena={#1}% + \immediate\write\beamer@verbatimfileout{\the\@temptokena}% + \let\next=\beamer@processframeline% + \fi% + \next% + } + \long\gdef\beamer@processframeline#1^^M{% + \def\beamer@test{#1}% + \ifx\beamer@test\beamer@stopframe% + \let\next=\beamer@framewritten% + \else + \immediate\write\beamer@verbatimfileout{#1}% + \let\next=\beamer@processframeline% + \fi% + \next% + } +} + +\def\beamer@setupstoppers#1{% + { + \escapechar=-1\relax% + \xdef\beamer@stopframe{\string\\end\string\{#1\string\}} + \xdef\beamer@stopframefirst{\noexpand\end\string\{#1\string\}} +} +} + + +\def\beamer@framewritten{\endgroup% + \beamer@afterexternalframe% +} + + + + +% The following code is partly adapted from code from the alltt package. + +\mode +<all> +{ +\begingroup +\lccode`\~=`\' +\lowercase{\endgroup +\newenvironment{semiverbatim}{% + \trivlist + \item\relax + \if@minipage + \else + \vskip\parskip + \fi + \leftskip\@totalleftmargin + \rightskip\z@skip + \parindent\z@ + \parfillskip\@flushglue + \parskip\z@skip + \@@par + \@tempswafalse + \def\par{% + \if@tempswa + \leavevmode\null\@@par\penalty\interlinepenalty + \else + \@tempswatrue + \ifhmode\@@par\penalty\interlinepenalty\fi + \fi} + \obeylines + \def\verbatim@nolig@list{\do\`\do\,\do\'\do\-} + \verbatim@font + \let\org@prime~% + \everymath\expandafter{\the\everymath + \catcode`\'=12 \let~\org@prime} + \everydisplay\expandafter{\the\everydisplay + \catcode`\'=12 \let~\org@prime} + \def\dospecials{\do\ \do\$\do\&% + \do\#\do\^\do\_\do\%\do\~\do\`\do\,\do\'\do\-} + \let\do\@makeother + \dospecials + \def\\{\char`\\} + \def\{{\char`\{} + \def\}{\char`\}} + \frenchspacing\@vobeyspaces + \everypar \expandafter{\the\everypar \unpenalty}} +{\endtrivlist}} +} + +\mode +<all> +% End in common mode + + +%%% Local Variables: +%%% mode: latex +%%% TeX-master: "~/texmf/tex/latex/beamer/examples/beamerexample1.tex" +%%% End: |