From e0c6872cf40896c7be36b11dcc744620f10adf1d Mon Sep 17 00:00:00 2001 From: Norbert Preining Date: Mon, 2 Sep 2019 13:46:59 +0900 Subject: Initial commit --- macros/latex/contrib/examplep/README | 27 + macros/latex/contrib/examplep/codep.sty | 447 ++++ .../contrib/examplep/eurotex_2005_examplep.pdf | Bin 0 -> 364081 bytes .../contrib/examplep/eurotex_2005_examplep.tex | 1848 +++++++++++++++ macros/latex/contrib/examplep/examplep.sty | 2418 ++++++++++++++++++++ macros/latex/contrib/examplep/houses.eps | 34 + macros/latex/contrib/examplep/houses.pdf | Bin 0 -> 963 bytes macros/latex/contrib/examplep/pexaminipage.eps | 1230 ++++++++++ macros/latex/contrib/examplep/pexaminipage.pdf | Bin 0 -> 21033 bytes macros/latex/contrib/examplep/shorthyp_t1xtts.eps | 32 + macros/latex/contrib/examplep/shorthyp_t1xtts.pdf | Bin 0 -> 959 bytes macros/latex/contrib/examplep/verbfwr.sty | 252 ++ macros/latex/contrib/examplep/wrfiles.pl | 275 +++ 13 files changed, 6563 insertions(+) create mode 100644 macros/latex/contrib/examplep/README create mode 100644 macros/latex/contrib/examplep/codep.sty create mode 100644 macros/latex/contrib/examplep/eurotex_2005_examplep.pdf create mode 100644 macros/latex/contrib/examplep/eurotex_2005_examplep.tex create mode 100644 macros/latex/contrib/examplep/examplep.sty create mode 100644 macros/latex/contrib/examplep/houses.eps create mode 100644 macros/latex/contrib/examplep/houses.pdf create mode 100644 macros/latex/contrib/examplep/pexaminipage.eps create mode 100644 macros/latex/contrib/examplep/pexaminipage.pdf create mode 100644 macros/latex/contrib/examplep/shorthyp_t1xtts.eps create mode 100644 macros/latex/contrib/examplep/shorthyp_t1xtts.pdf create mode 100644 macros/latex/contrib/examplep/verbfwr.sty create mode 100644 macros/latex/contrib/examplep/wrfiles.pl (limited to 'macros/latex/contrib/examplep') diff --git a/macros/latex/contrib/examplep/README b/macros/latex/contrib/examplep/README new file mode 100644 index 0000000000..f729aea71f --- /dev/null +++ b/macros/latex/contrib/examplep/README @@ -0,0 +1,27 @@ +Verbatim phrases and listings in LaTeX +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +README by pts@fazekas.hu at Sun Jan 16 15:33:24 CET 2005 + +This directory contains the examplep LaTeX package, which provides +sophisticated features for typesetting verbatim source code listings, +including the display of the source code and its compiled LaTeX or METAPOST +output side-by-side, with automatic width detection and enabled page breaks +(in the source), without the need for specifying the source twice. Special +care is taken so section, page and footnote numbers do not interfere with the +main document. For typesetting short verbatim phrases, a replacement for the +\verb command is also provided in the package, which can be used inside +tables and moving arguments such as footnotes and section titles. The +listings package is used for syntax highlighting. + +The article (eurotex_2005_examplep.pdf) reviews the design decisions made +during the package development and also presents some interesting +implementation internals. examplep is compared to standard LaTeX packages +such as listings, ltxdoc, sverb and moreverb. The new codep package and its +accomanying Perl script, which provide a convenient interface to the examplep +package for authors of manuals, is also presented. With codep it is possible +to generate the source code, the LaTeX or METAPOST output and the compilable +example file onto the CD from a single source embedded into the appropriate +place of the .tex document file. + +The software is free software, covered by the GNU GPL v2.0 or later. +There is NO WARRANTY. diff --git a/macros/latex/contrib/examplep/codep.sty b/macros/latex/contrib/examplep/codep.sty new file mode 100644 index 0000000000..a12ed691ab --- /dev/null +++ b/macros/latex/contrib/examplep/codep.sty @@ -0,0 +1,447 @@ +% +% codep.sty -- typeset Source and Sample, and dump Source to an external file +% by pts@fazekas.hu at Wed Jan 5 22:38:29 CET 2005 +% + +\NeedsTeXFormat{LaTeX2e} +\ProvidesPackage{codep}[2005/01/01 v0.01 typeset Source and Sample, dump to file] + +\RequirePackage{examplep} + +% Some docs in Hungarian +% --- \begin{code} (WF és pts tervezése, a dokumentációt is ketten írták) +% +% A pelda, peldak, kod környezetek továbbra is működnek, de használatuk +% nem javasolt. Helyettük létrejön a megszűnnek, helyettük marad a `code' +% környezet. A környezet alakja: +% +% \begin{code} +% j szöveg +% j szöveg +% \end{code} +% +% ahol 'j' egy egykarakteres jel, 'szöveg' pedig a kódszöveg. +% 'j' lehetséges értékei v,f,d,l,p,0,t,b,<,>, ,c,o,2,e. Ezek a jelek +% osztályokba vannak sorolva, az osztályok sorrendje meg van kötve, de az +% egy osztályba tartozók sorrendje tetszőleges. Az osztályokat Nagy +% betűvel jelöljük, de ez csak a kommunikációt segíti, egyébként nem +% használjuk sehol. +% +% Minden _osztályhoz_ tartozik egy default jelsorozat (default +% argumentummokkal). Ha egy osztály kimarad, akkor ez a default lefut. +% +% Azt kell vezérelnünk, hogy a code kódja hova menjen, és ott hogy +% jelenjen meg! Mehet *kód*ba (régen ez volt a kod környezet), mehet +% *kód*ba, és mellé *output*ba (régen ezt csinálta a pelda +% környezet), és az előző két változattól függetlenül mehet egy +% *fájl*ba, ami egyből futtatható is, és a CD-n mellékeljük! +% +% +% osztály +% jel default jelentés +% --+---+-------------------------+------------------------------------ +% F |f |(nincs _).tex |a teljes kód bekerül egy fájlba: +% | | |f nev.tex -> 2_63_nev.tex +% | | |A .tex kiterjesztést is kötelező kiírni! +% |v | |azonnal C-be lép D,L,P,B,E default-jait +% | | | megüresítve. Megadható `v .mp', ekkor +% | | | 2_63_.mp alakú file fog keletkezni. +% |f! | |f!nev.tex -> nev.tex +% |v! | |v!nev.ps -> nev.ps +% --+---+-------------------------+------------------------------------ +% G | | |ide visz egy F-beli parancs +% --+---+-------------------------+------------------------------------ +% D |d |\documentclass{article} |a LaTeX-fájl első sora -> fájl +% --+---+-------------------------+------------------------------------ +% L |l |\usepackage[latin2]{inputenc} -> fájl +% | |\usepackage[T1]{fontenc} ha nem e három sort akarjuk, akkor egy +% | |\usepackage[magyar]{babel} üres l törli, és a p-be írjuk az újat. +% --+---+-------------------------+------------------------------------ +% P |p 0| |preambulumba -> fájl +% |t | |ha kódba is -> fájl + kód(%^) +% | | |pl. `t \usepackage{foo} +% --+---+-------------------------+------------------------------------ +% B |b |\begin{document} | -> fájl +% --+---+-------------------------+------------------------------------ +% C |< c| | -> kód + fájl +% |> o| | -> könyvbeli output +% | 2| | (` ' vagy `2 ') -> kód + output + fájl +% |w | | -> fájl +% |s | | -> kód +% |% | | komment, sehova nem kerül be +% --+---+-------------------------+------------------------------------ +% E |e |\end{document} | -> fájl +% --+---+-------------------------+------------------------------------ +% Z | | |ide visz az \end{code} +% --+---+-------------------------+------------------------------------ +% +% A kiírásnál az alábbi korlátok (lennének) érvényesek: +% +% -- a file mindenképpen soremelésre végződik (TeX \write tulajdonsága) +% -- a file-nak muszáj kiterjesztést adni (egyébként .tex lenne). Ha nem +% kívánkunk kiterjesztést, akkor `.noext' legyen (TeX \openout +% tulajdonsága) +% -- a sorvégi szóközök törlődnek (akkor is, ha csak szóköz van a sorban) +% -- az ékezetes betűk ^^-pal íródnak ki ( pl. á -> ^^e1), hacsak nem +% `latex --translate-file cp8bit.tcx'-et futtatunk (nem +% `--translate-file il2-t1.tcx'-et, mert az a DVI-ben levő ő-t elrontja) +% Ez információvesztéssel jár, mert mi van, ha eleve ^^-ot akartunk volna +% kiírni? +% -- nehézkes elkerülni, hogy ne generálódjon két azonos nevű file +% (ugyanazon az oldalon, ugyanabban a fejezetben két \begin{pelda} +% -- a régi peldak környezetben a sorhatárok elvesznek +% +% Éppen ezért a file-ba írást nem a TeX-hel csináltatjuk, hanem egy Perl +% script-et fogok írni, ami az .aux file alapján dolgozik: +% `wrfiles.pl master.aux'. Ezt nyilván a LaTeX futtatása után kell majd +% futtatni. Ennek a megoldásnak a tulajdonságai: +% +% -- (hátrány) \begin{code} és társai nem hívhatók olyan .tex file-ból, +% amely más .tex file-okat betölt; és a főfile-on kívül csak olyan +% file-ból hívható, ami \input{...}-tal vagy \include{...}-dal (kapcsos +% zárójel kötelező!) lett betöltve (ez amiatt van, hogy a TeX-ben nem +% kérdezhető le az aktuális file neve) +% -- ha az \end{code} előtti soremelés vagy belekerül a file-ba vagy nem +% -- nem kötelező a kiterjesztés a filenév végén +% -- sorvégi szóközök megmaradnak +% -- ékezetes betűk megmaradnak +% -- a sorhatárok \begin{peldak}-ban sem vesznek el +% -- a \begin{code} után közvetlenül a szóközök elnyelődnek, majd 0 vagy 1 +% soremelés is elnyelődik +% -- a \begin{peldak} output-ba kerülő részében (a kommentektől eltekintve) +% helyesen kell egymásba ágyazni a kapcsoszárójeleket! +% -- akár Unicode-ös szövegfájl is létrehozható +% +% A régi környezetek működése: +% +% -- \begin{kod}: \begin{code}-ként működik, csupa `< ' jellel. Ez például +% azt jelenti, hogy a nyelvspecifikus részeket (babel csomag, L osztály) +% mindig kiírja a fájlba! +% -- \begin{pelda}: \begin{code}-ként működik, csupa `2 ' jellel +% -- \begin{peldak}: \begin{code}-ként működik, `< ' és `> ' jelekkel +% Az output-ba kerülő részben (a kommentektől eltekintve) helyesen kell +% egymásba ágyazni a kapcsoszárójeleket! +% +% Tipikus használatok: +% +% 1. Nem magyar szöveg -- mindhárom helyre +% +% \begin{code} +% f nembonyolult.tex +% l +% Not so complicated! +% \end{code} +% +% Az eredmény kimentődik pl. a 2_63_nembonyolult.tex nevű állományba, +% ahol 2 a fejezet sorszáma, 63 az aktuális oldalszám. +% +% [pts] Az oldalszám kinyeréséhez \ref-et kell majd csinálni. +% +% 2. Magyar szöveg -- mindhárom helyre +% +% \begin{code} +% ÁRVÍZTŰRŐ tükörfúrógép. +% \end{code} +% +% Az eredmény kimentődik a 2_63.tex állományba, ahol 2 a fejezet +% sorszáma, 63 az aktuális oldalszám (kerüljük ezt a laza módszert, +% az f-et adjuk meg!) +% +% 3. Nem magyar szöveg csomaggal, és nem írjuk ki fájlba +% +% \begin{code} +% f +% l +% p \usepackage{amsmath} +% \[1+1 \text{ equals to } 2\] +% \end{code} +% +% 4. Nem magyar szöveg csomaggal -- de lássuk a könyvbeli kódon is, +% hogy milyen csomagot kell betölteni: +% +% \begin{code} +% l +% t \usepackage{amsmath} +% \[1+1 \text{ equals to } 2\] +% \end{code} +% +% (pts írja: ekkor a könyvbeli kód százalékjellel fog kezdődni, mivel +% minden t-s sor százalékjelet szúr be: `%^\usepackage{amsmath}' +% +% 5. Hazudunk, és mást írunk a kódba, mint az outputba: +% +% \begin{code} +% f filename.tex +% < \author{Szerző} +% < \date{} +% > \centering Szerző\\ +% > 2004 augusztus 20. +% \end{code} +% +% 6. Ha valami más kódot közlünk teljes egészében +% +% \begin{code} +% v!mikulaska.eps +% < %!PS-Adobe-2.0 EPSF-2.0 +% < %%Title: mikulaska.eps +% < %%Creator: fig2dev Version 3.2 Patchlevel 3d +% < %%CreationDate: Mon Oct 27 17:01:57 2003 +% < %%...és így tovább +% \end{code} +% +% `% ' type + +\newenvironment{code}{% + \begingroup + \verbfwr@default@acts% superfluous, will be overridden + \let\verbfwr@actemitdone\codep@code@done + \let\verbfwr@actemitlineone\codep@code@lineone + \let\verbfwr@actemitline\codep@code@line + \verbfwr@safespc% \catcode32 13 + \def\codep@code@@curclass{F}% + \edef\codep@code@@inputlineno{\the\inputlineno}% + \global\let\pexa@@cursourcename\relax + \global\let\pexa@@cursamplename\relax + \ifhmode\unskip\fi% before \write. Strange: why is it needed for \immediate\write + \verbfwr@readenv\verbfwr@write% no more after this +}{% + % Dat: too late for \ifhmode\unskip\fi + \endgroup% undo \catcode changes, see above + \ifx\pexa@@cursamplename\relax + \ifx\pexa@@cursourcename\relax\else + \PexaShowSource{srcstyle=leftnumhang}% + \fi + \else + \immediate\closeout\codep@code@samplefile + \ifx\pexa@@cursourcename\relax\else% Dat: there may be only Sample => don't show anything + \PexaShowBoth{srcstyle=leftnumhang}% + %\aftergroup\PexaShowBoth\aftergroup{\aftergroup}% + \fi + \fi + % Dat: no more \endgroup here, for \if@endpe + \aftergroup\clubpenalty\aftergroup\@clubpenalty% fundamental LaTeX design flaw -- BUGFIX at Fri Apr 16 00:32:04 CEST 2004 +} + +\def\codep@code@lineone{\let\verbfwr@actemitlineone\@empty}% std +\let\codep@code@@prefix\@empty +\def\codep@code@line#1{% + \expandafter\expandafter\expandafter\codep@code@line@a + \expandafter\codep@code@@prefix\VerbFwrLines\hfuzz +} +\begingroup\lccode\string`~\string`\ \lowercase{\endgroup +%** Add spaces into the beginning if line length < 2 +\def\codep@code@line@a#1{% + \ifx#1\hfuzz\expandafter\codep@code@line@c\expandafter~\expandafter~\expandafter\hfuzz + \else\expandafter\codep@code@line@b\expandafter#1\fi +} +\def\codep@code@line@b#1#2{% + \ifx#2\hfuzz\expandafter\codep@code@line@c\expandafter#1\expandafter~\expandafter\hfuzz + \else\expandafter\codep@code@line@c\expandafter#1\expandafter#2\fi +} +}% \lowercase +\def\codep@code@line@c#1#2#3\hfuzz{% + %%[(#1)(#2)#3]% + \edef\codep@code@@curcmd{\string#1\string#2}% + \expandafter\ifx\csname codep@code@\codep@code@@curcmd\endcsname\relax + \PackageError{lb}{Unknown code command \string`\codep@code@@curcmd'}\@eha + % Dat: no other commands of pattern `\codep@code@..' + \else + \csname codep@code@\codep@code@@curcmd\endcsname{#3}% + \fi +} +%** @param #1 uppercase letter token: [FGDLPBCE] +%** @expands to positive class number or 0 +\def\codep@code@classnum#1{% + \if#1F1\else\if#1G2\else\if#1D3\else\if#1L4\else\if#1P5\else + \if#1B6\else\if#1C7\else\if#1E8\else\if#1Z9\else0\fi\fi\fi\fi\fi\fi\fi\fi\fi +} +\def\codep@code@toclass#1{% + \@tempcnta\expandafter\codep@code@classnum\codep@code@@curclass\relax + \@tempcntb\codep@code@classnum#1\relax + % ^^^ Dat: need these because of the cascaded \if + %%\showthe\@tempcnta \showthe\@tempcntb + \ifnum\@tempcnta>\@tempcntb + \PackageError{lb}{Code command \string`\codep@code@@curcmd' too late (class \codep@code@@curclass\space> #1)}\@ehc + \fi + \ifnum\@tempcnta<2 \ifnum\@tempcntb>2 % class F missing + % Imp: make class 0 the default + \codep@code@setwfile1{}% + \fi\fi + % vvv Dat: don't set \codep@code@@curcmd here + % vvv Dat: no need for this, the Perl script wrfiles.pl will do this + %\loop\ifnum\@tempcnta<\@tempcntb% call defaults + % \ifcase\@tempcnta\or% F + % \or% G + % \or\csname\codep@code@d \endcsname{\string\documentclass{article}}% D + % \or\csname\codep@code@l \endcsname{\string\usepackage[latin2]{inputenc}}% L + % \csname\codep@code@l \endcsname{\string\usepackage[T1]{fontenc}}% L + % \csname\codep@code@l \endcsname{\string\usepackage[magyar]babel}}% L + % \fi + % \advance\@tempcnta\@ne + %\repeat + \def\codep@code@@curclass{#1}% +} + +\def\codep@code@@inputfile{\jobname.tex} +% ^^^ Dat: \jobname never has `.tex', even if it was specified in the cmdline +% ^^^ Imp: what if \jobname is foo.xyz? +\def\codep@code@@tex{tex}% +%\expandafter\def\expandafter\codep@code@setfile\expandafter#\expandafter +% 1\string.#2 #3\hfuzz{% +\def\codep@code@setfile#1 #2#3{% + \edef\reserved@a{#3}% usually .tex or .fd + \ifx\reserved@a\codep@code@@tex + \immediate\write\m@ne{Input File: #1#2}% .log file + \global\edef\codep@code@@inputfile{#1#2}% Imp: strip space + \fi +} + +%** Overrides latex.ltx +%** Called for \include{...} and \input{...} (but not for `\input ... ') +\long\def \InputIfFileExists#1#2{% + \IfFileExists{#1}{#2\@addtofilelist{#1}% + \edef\@filef@und{\expandafter\strip@prefix\meaning\@filef@und}% reset catcodes + \filename@parse{#1}% + % vvv Dat: \@filef@und always ends by ` ' + \ifx\filename@ext\relax + \def\filename@ext{tex}% no ext specified + \expandafter\codep@code@setfile\@filef@und{.tex}{\filename@ext}% + \else + \expandafter\codep@code@setfile\@filef@und{}{\filename@ext}% + \fi + \@@input \@filef@und}} +%** @param #1 0|1: emit automatic filename prefix? +\def\codep@code@setwfile#1#2{% + %\protected@write\@auxout{}{\string\@gobble{code:\thechapter_\thepage_#1}}% + % vvv Dat: written at EOP with correct page number + % vvv Dat: this is not the final filename, wrfiles.pl will adjust it two + % files will have the same name (e.g 1_4.tex) + \protected@write\@auxout{}{\string\@gobble{code:\codep@code@@inputfile:\codep@code@@inputlineno:% + \if\noexpand#10\else + \expandafter\ifx\csname thechapter\endcsname\relax\else\thechapter_\fi + \thepage + \ifx\hfuzz#2\hfuzz.tex\else_\fi + \fi + #2}}% +} + +\def\codep@code@defaultlname#1{\jobname.cd#1} + +\def \CodeDefaultD{\codep@code@default{d}} +\def\endCodeDefaultD{\immediate\closeout\verbfwr@writefile} +%** @example \begin{CodeDefaultL} +%** \usepackage[latin2]{inputenc} +%** \usepackage[T1]{fontenc} +%** \usepackage[english]{babel} +%** \end{CodeDefaultL} +\def \CodeDefaultL{\codep@code@default{l}} +\let\endCodeDefaultL\endCodeDefaultD +\def \CodeDefaultB{\codep@code@default{b}} +\let\endCodeDefaultB\endCodeDefaultD +\def \CodeDefaultE{\codep@code@default{e}} +\let\endCodeDefaultE\endCodeDefaultD +%** @param #1 one of d, l, b, e +\def\codep@code@default#1{% + \AtBeginDocument{\immediate\write\@auxout{\string\@gobble{cd#1:\codep@code@defaultlname{#1}}}}% + \immediate\openout\verbfwr@writefile\codep@code@defaultlname{#1}\relax + \let\verbfwr@writecs\verbfwr@writefile + \let\verbfwr@actwriteline\verbfwr@writeline + \verbfwr@default@acts + \verbfwr@readenv\verbfwr@write}% finish this \cs here + +%\def\CodeDefaultL + +\@namedef{codep@code@f }#1{% + \codep@code@toclass{F}% + \codep@code@toclass{G}% + \codep@code@setwfile1{#1}% +} +\@namedef{codep@code@f!}#1{% + \codep@code@toclass{F}% + \codep@code@toclass{G}% + \ifx\hfuzz#1\hfuzz \PackageWarning{lb}{Empty filename to write}\@eha + \else\codep@code@setwfile0{#1}\fi +} +\@namedef{codep@code@v }#1{% + \codep@code@toclass{F}% + \def\codep@code@@curclass{C}% ignore middle classes; also omts E (by wrfiles.pl) + \codep@code@setwfile1{#1}% +} +\@namedef{codep@code@v!}#1{% + \codep@code@toclass{F}% + \def\codep@code@@curclass{C}% ignore middle classes + \ifx\hfuzz#1\hfuzz \PackageWarning{lb}{Empty filename to write}\@eha + \else\codep@code@setwfile0{#1}\fi +} +\@namedef{codep@code@d }#1{\codep@code@toclass{D}} +\@namedef{codep@code@l }#1{\codep@code@toclass{L}} +\@namedef{codep@code@p }#1{\codep@code@toclass{P}} +\expandafter\expandafter\expandafter\let\expandafter\expandafter + \csname codep@code@0 \endcsname \csname codep@code@p \endcsname +%** Prefix to show in Source in front of `t ' +% WF %= is changed for %^ as it suggests taking up +\edef\codep@code@tprefix{\expandafter\@gobble\string\%\string^} +\@namedef{codep@code@t }#1{% + \codep@code@toclass{P}% + \expandafter\codep@code@tosource\expandafter{\codep@code@tprefix#1}% + % Dat: wrfiles.pl will write to CDfile +} +\@namedef{codep@code@w }#1{\codep@code@toclass{C}}% +\@namedef{codep@code@\@percentchar\space}#1{\codep@code@toclass{C}}% Dat: must change classes, because that's how wrfiles.pl is implemented +\@namedef{codep@code@\string< }#1{% + \codep@code@toclass{C}% + \codep@code@tosource{#1}% +} +\@namedef{codep@code@x }#1{% + \codep@code@toclass{C}% + \codep@code@tosample{#1}% +} +\expandafter\expandafter\expandafter\let\expandafter\expandafter + \csname codep@code@c \endcsname \csname codep@code@\string< \endcsname +\expandafter\expandafter\expandafter\let\expandafter\expandafter + \csname codep@code@s \endcsname \csname codep@code@\string< \endcsname +\@namedef{codep@code@\string> }#1{% + \codep@code@toclass{C}% + \codep@code@tosample{#1}% +} +\expandafter\expandafter\expandafter\let\expandafter\expandafter + \csname codep@code@o \endcsname \csname codep@code@\string> \endcsname +\@namedef{codep@code@ \space}#1{% + \codep@code@toclass{C}% + \codep@code@tosource{#1}% + \codep@code@tosample{#1}% +} +\expandafter\expandafter\expandafter\let\expandafter\expandafter + \csname codep@code@2 \endcsname \csname codep@code@ \space\endcsname +\@namedef{codep@code@e }#1{\codep@code@toclass{E}} +\@namedef{codep@code@b }#1{\codep@code@toclass{B}} +\def\codep@code@tosource#1{% + \ifx\pexa@@cursourcename\relax + \global\let\pexa@@cursourcename\pexa@@sourcename + \immediate\openout\verbfwr@writefile\pexa@@sourcename\relax + \fi + \immediate\write\verbfwr@writefile{#1}% + % !! page number, not \immediate + %%source[#1]% +} +\def\codep@code@tosample#1{% + \ifx\pexa@@cursamplename\relax + \ifx\codep@code@samplefile\@undefined + \newwrite\codep@code@samplefile + \fi + \global\let\pexa@@cursamplename\pexa@@samplename + \immediate\openout\codep@code@samplefile\pexa@@samplename\relax + \fi + \immediate\write\codep@code@samplefile{#1}% + %%sample[#1]% +} +\def\codep@code@done{% + \ifx\verbfwr@actemitlineone\@empty\else + \PackageWarning{lb}{Empty \string\begin{code}}% + \fi + \codep@code@toclass{Z}% + \ifx\pexa@@cursourcename\relax\else + \immediate\closeout\verbfwr@writefile \fi +}% + +\endinput diff --git a/macros/latex/contrib/examplep/eurotex_2005_examplep.pdf b/macros/latex/contrib/examplep/eurotex_2005_examplep.pdf new file mode 100644 index 0000000000..952be1fdab Binary files /dev/null and b/macros/latex/contrib/examplep/eurotex_2005_examplep.pdf differ diff --git a/macros/latex/contrib/examplep/eurotex_2005_examplep.tex b/macros/latex/contrib/examplep/eurotex_2005_examplep.tex new file mode 100644 index 0000000000..e6052aca4d --- /dev/null +++ b/macros/latex/contrib/examplep/eurotex_2005_examplep.tex @@ -0,0 +1,1848 @@ +% +% eurotex_2005_examplep.tex +% by pts@fazekas.hu at Thu Nov 11 20:44:25 CET 2004 +% -- Wed Jan 12 00:42:06 CET 2005 +% +% Dat: this is the supposed final version of the article, without corrections +% Dat: required houses.{eps,pdf} pexaminipage.{eps,pdf} shorthyp_t1xtts.{eps,pdf} +% Dat: auxilary files: eurotex_2005_examplep.bib ttt.tex +% OK: eliminate Overfull \hbox{}es +% OK: submit to CTAN +% + +\documentclass[a4paper]{article} +\usepackage[latin2]{inputenc}% Dat: because of `á' etc.; also ÷ +\usepackage{t1enc} +\usepackage{booktabs} +\usepackage{graphicx}% Dat: after Babel +\usepackage{mflogo} + +% Dat: for \documentclass[a4paper]{article} +\special{\string!\expandafter\expandafter\csname @gobble\endcsname + \string\%xdvi.dvo: -expert -s 6 -xoffset -1.54cm -yoffset -1.54cm + -paper 12.8cmx23cm} % -xoffset 7mm -yoffset 13mm -paper 385ptx576pt} + +\title{Verbatim phrases and listings in {\LaTeX}} +\author{P\'eter Szab\'o $\langle$\texttt{pts@fazekas.hu}$\rangle$ +\thanks{Thanks to Ferenc Wettl for the fruitful long discussion about the +line syntax of the \texttt{code} environment, and also for reviewing the +article.} +\\[3pt]%\par\smallskip +\normalsize Budapest University of Technology and Ecomomics,\\[-3pt] +\normalsize Department of Analysis,\\[-3pt] +\normalsize M\H{u}egyetem rakpart 3--9.,\\[-3pt] +\normalsize Budapest, Hungary H-1111} +\date{2004-11-11} + +\def\verbatizee#1{\begingroup\ttfamily + \toks0{#1}\edef\next{\the\toks0}% + %\dimen0=\the\fontdimen2\font % Dat: disable spaces, `=' is required here + \dimen0\fontdimen2\font % Dat: disable spaces, `=' is required here + %\showthe\dimen0 + \fontdimen2\font=0pt + {\expandafter\stripit\meaning\next}% Dat: grouping to keep \dimen0 + \unskip % Dat: strip final space, possibly after command + \fontdimen2\font=\dimen0 + %\showthe\dimen0 + \endgroup} +\def\next{} +\expandafter\def\expandafter\stripit\meaning\next{} + +%** So \verb+÷+ works. +\DeclareInputText{247}{\ensuremath{\div}} + +\belowcaptionskip0pt + +\begin{document} + +\maketitle + +\begin{abstract} + + The \textsf{examplep} package written by the author recently provides + sophisticated features for typesetting verbatim source code listings, + including the display of the source code and its compiled \LaTeX{} or + \textsf{METAPOST} output side-by-side, with automatic width detection and + enabled page breaks (in the source), without the need for specifying the + source twice. Special care is taken so section, page and footnote numbers + do not interfere with the main document. For typesetting short verbatim + phrases, a replacement for the \verb+\verb+ command is also provided + in the package, which can be used inside tables and moving arguments such as + footnotes and section titles. The listings package is used for syntax + highlighting. + + The article reviews the design decisions + made during the package development and also presents some interesting + implementation internals. \textsf{examplep} is compared to standard + \LaTeX{} packages such as \textsf{listings}, \textsf{ltxdoc}, + \textsf{sverb} and \textsf{moreverb}. The new \textsf{codep} package and + its accomanying \textsf{Perl} script, + which provide a convenient interface to the \textsf{examplep} package for + authors of manuals, is also presented. With \textsf{codep} it is possible + to generate the source code, the \LaTeX{} or \textsf{METAPOST} output and + the compilable example file onto the CD from a single source embedded + into the appropriate place of the \texttt{.tex} document file. +%%%WF A CD-re irasnak semmi koze a lenyeghez, sajnos a dolgozat +%%% hatralevo reszeben is folyton CD-file es egyebekrol szolsz, de +%%% valojaban csak arrol van szo, hogy kulon file-ba irjuk a +%%% futtathato kodot (amit aztan a web-re, CD-re, DVD-re... lehet tenni). +%% -- kellett neki nevet adni, ez lett +\end{abstract} + + +\section{Terminology} + +\begin{description} + +\item[verbatim text] A visually distinguishable textual part of the + document (usually typeset with a monospaced, or typewriter font) that is + allowed to contain the full ASCII character set. Verbatim text is often + used to typeset parts of program source files, including \TeX{} source. + Verbatim text must be marked up (i.e.\ surrounded) + in the source of the \LaTeX{} + document, so backslash and other control characters are typeset verbatim + instead of being interpreted as commands or special \LaTeX{} characters. + +%%%WF a kovetkezo 2 def nem pontos, nem biztos, hogy paragrafusok kozt +%%% van a kiemelt verbatim. Sorban? vagy sorok kozt van? +%% -- lehetne még pontosítani, de szerintem ebből rögtön lehet tudni, mire +%% gondolok +\item[inline verbatim] A verbatim text passage inside a paragraph + or table cell. + +\item[display verbatim] is a vertical verbatim text block between + paragraphs. + +\item[side-by-side display] + When typesetting program source in a display verbatim, it is often + desirable to show the output of the program as well. This is especially + useful when teaching scripting languages, so the reader can see the + command and its effect side-by-side in a quick glance. For \TeX{} or + \textsf{METAPOST} sources and EPS and PDF source files it is also useful to + see the source and the typeset result side-by-side. + +\item[Source and Sample] + Side-by-side displays can be divided to \emph{Source} and \emph{Sample}, + the latter being program output or typeset material. + +\item[CD-files] + Files accompanying a book, usually on a CD or DVD shipped with the book, + or avalable for download on the home page of the book. These + files usually contain some of the display verbatim material in the book, + so readers do not have to retype them. + +\end{description} + +\section{Special characters in the \LaTeX{} source} + +The special meaning of the input characters in the source file must be +disabled in verbatim mode -- except for the character(s) that delimit the end +of the verbatim text. The following characters have to be dealt with: + +\begin{description} + +\item[ASCII symbols] The ligatures have to be disabled, especially \verb+?`+ $\to$ +\texttt{?`} etc. The safest way is to make both characters of such a ligature +active, and %then +defining \verb+\def?{\relax\string?\relax}+ +and \verb+\def`{\relax\string`+\allowbreak\verb+\relax}+. \hskip0pt +minus3.3pt\relax \textsf{examplep} issues similar +definitions covering all such ligatures in the OT1- and T1-encoded CM fonts. + +\item[ASCII letters] Most verbatim fonts don't contain the ``fi'' or similar +ligatures, so \textsf{examplep} takes no care to disable them. + +\item[special \TeX{} source symbols] To disable the special meaning of the symbols +\verb+\+ +\verb-{- +\verb-}- +\verb+$+ %%%$ +\verb+%+ +\verb+^+ +\verb+&+ +\verb+_+, +\textsf{examplep} redefines their \verb+\catcode+ for display verbatim. +However, catcode changes are not always appriopriate for inline verbatim, +so \textsf{examplep} provides \verb+\÷+ (see below) which doesn't change +catcodes at all. + +\item[other ASCII punctuation] Some of these characters (% +\verb+[+ +\verb+]+ +\verb+;+ +\verb+'+ +\verb+,+ +\verb+.+ +\verb+/+ +\verb+~+ +\verb+!+ +\verb+@+ +\verb+*+ +\verb+(+ +\verb+)+ +\verb-+- +\verb-|- +\verb-:- +\verb-"- +\verb-<- +\verb->- +\verb-?- +\verb+`+ +\verb+-+ +\verb+=+) may be active, for example, \verb+~+ is ÷\nobreakspace÷, +\verb+`+ is a Babel shorthand (e.g.\ in the Hungarian language module, +\textsf{magyar.ldf}); \verb+"+ is a Babel shorthand (e.g\ in the German +language module); \verb+?+, \verb+!+, \verb+:+ and \verb+;+ are activated +(e.g.\ by the French language module), and other characters may be activated, +too. So \textsf{examplep} sets the catcode of all characters in the range +$33\ldots126$ to other (12). This includes all ASCII punctuation, letter and +digit characters. + +\item[double carets] For example, the letter +``J'' can be input as its ASCII code in hex, +prefixed by double carets: \verb+^^4a+. However, in verbatim mode we want the +4 characters, not the letter {J}. There is no problem in inline verbatim +mode, because \verb+^+ loses its special meaning once its catcode is changed. +However, when the verbatim material is written to a file or to the terminal, +\TeX{} may change ``unprintable'' characters to escapes prefixed by \verb+^^+. +These changes must be reverted when reading the file back. See Subsection +\ref{tcx} for more. + +\item[high characters] Input characters in the range $128\ldots255$ are +usually activated by the \textsf{inputenc} package, and they know how to +typeset themselves -- so \textsf{examplep} leaves the catcode of such +characters intact. However, in some modes, \textsf{examplep} has already +changed all catcodes to 12 and 10 (with \verb+\meaning+), so it has to change +the catcodes of such high codes back to 13 (active). + +\end{description} + +\section{Features of \textsf{examplep}} + +These are the most important, unique features: + +\begin{itemize} + +\item layout of side-by-side display may depend on maximum Source width +\item automatic hyphenation of inline verbatim. The text is divided into + words and punctuation symbols (based on catcodes). For words, the normal + \TeX{} hyphenation patterns apply, and it is allowed to break the line on + both sides of a punctuation symbol. +\item customizable isolation of page, section etc.\ numbers in the Sample + and the host document with the \texttt{PexaMiniPage} environment +\item besides the outer level, inline verbatim (when properly escaped inside + \verb+\Q+ or \verb+\÷+) works safely inside macro arguments, section + titles, footnotes, table cells and index entries +\item generated CD-files with automatic page and chapter number +\item writing verbatim data to CD-files with a \textsf{Perl} script; exact, + binary reproduction of verbatim text is guaranteed +\item ability to write different material to Source, Sample and CD-files +\item the accents \verb+\H+ and \verb+\.+ work as expected with monospaced + fonts in the OT1 encoding. By default, \verb+\texttt{\H o}+ produces + \hbox to0pt{\verb+}+\hss}\verb+o+ in OT1 encoding, because such + typewriter fonts (such as \textit{cmtt10}) have those accents +%%%WF repaced + replaced + by ASCII symbols. \textsf{examplep} solves the problem by getting the + accent from the \textit{cmr} font family. + +\end{itemize} + +\noindent Some other features: + +\begin{itemize} + +\item side-by-side display of the Source and the Sample +\item between-word hypenation of inline verbatim +\item customizable left and right indentation of display verbatim +\item specifying inline verbatim with nested braces (\verb+\PVerb+, + \verb+\Q+) or terminating character (\verb+\PVerb+, \verb+÷+, \verb+\÷+) +\item automatic line breaks with hyphenation in display verbatim +\item the discretionary hyphen (\verb+\hyphenchar+) of verbatim text is + different from the one in normal text +\item line numbering in display verbatim +\item writing to temporary files only if needed +\item reading back contents of any file in display verbatim +%\item writing verbatim data to temporary files (\verb+^+\relax\verb+^+ab, .tcx) +% Dat: not a feature: automatic \textsf{METAPOST} processing, see the \texttt{eempost} package +\item inline verbatim with a single character ($\div$) and its escaped + version (\textbackslash$\div$ and \verb+\Q+) +\item automatic \verb+\indent+\allowbreak/\allowbreak\verb+\noindent+, + based on empty line above \verb+\begin{...}+ +\item ISO Latin accented input character support in all modes (also present + in \verb+\verb+) +\item support for syntax highlighting with the \textsf{listings} package + \cite{listings} +%%%WF a (\cite{...}) kicserelendo \cite{...} -re az EGESZ DOLGOZATBAN, +%%% nem kell kerek zarojel, ott van mar a szogletes +%% -- javítva +\item emits a tab as eight spaces in normal mode, but tabs are supported + properly with \texttt{ttlistings=yes} and \texttt{ttlistings=showtabs} +\item simple side-by-side display emulation without temporary files, + using \texttt{src\allowbreak style=leftboth} or \texttt{srcstyle=leftleft} + +\end{itemize} + + +\subsection{Escaped mode of inline verbatim locations}\label{escaped} + +For compatibility reasons, \textsf{examplep} doesn't change the original +%%%WF ÷\verb+ and ÷\verb*+ +\verb+\verb+ and \verb+\verb*+ +%%% +commands in any way, but defines its own commands: +\verb+\PVerb+, \verb+\PVerbH+, \verb+\PVerbInner+, +\verb+\PVerbOpt+, \verb+\Q+, \verb+÷+ and \verb+\÷+. Most of the +\verb+\PVerb+\ldots{} +commands are historical. For new documents, only the use of +\verb+\PVerbOpt+, \verb+\Q+, \verb+÷+ and \verb+\÷+ is recommended. Some of +these commands have to be activated with package load options: +\verb+\usepackage[Q=yes,div=yes,bsdiv=yes]{examplep}+. The reason why +\verb+÷+ was introduced is that it is a high Latin-1 (and Latin-2) character +available on the Hungarian keyboard, which is usually not used in \LaTeX{} +documents (in fact, \verb+$\div$+ is used instead). Inline verbatim sources +with such a character are compact, and they can contain all ASCII symbols. + +\begin{table} +\caption{Contexts and features of inline verbatim commands}\label{contexts} +\vskip\abovecaptionskip +\small +\noindent\hfil\begin{tabular}{@{}llllll@{}}\toprule + & outer& argument& tablular& elsewhere& escaped \\\midrule +\verb+\verb+ & + & $-$$^1$ & + & $-$$^1$ & no \\ +\verb+\PVerbOpt+ & + & +$^2$ & + & $-$ & no \\ +\verb+÷+ & + & +$^2$ & $-$ & +$^2$ & no \\ +\verb+\÷+ & + & + & + & + & yes \\ +\verb+\Q+ & + & + & + & + & yes \\ +\bottomrule +\end{tabular} +\par\smallskip +$^1$sometimes displays the proper error message\par +$^2$inner mode only (spaces compressed or lost, \verb+%+ is comment etc.) +\end{table} + +\textsf{examplep} supports inline verbatim text at the outer level, +inside macro arguments, in table cells and elsewhere (in section titles, in +footnotes and in index entries), see also in Table \ref{contexts}. +The reason why some of these cases are treated differently +is that catcode changes must be timed correctly so that the proper catcodes +are active by the time \TeX{} reads the verbatim text from the input file for +the first time. (Please note that section titles and index entries are also +written to and read back from auxilary files.) + +This is quite hard to accomplish in several cases (because \TeX{}'s mouth +gathers macro arguments at high speed, a way before \TeX{}'s stomach could +change the catcodes), so \textsf{examplep} provides the commands \verb+÷+ +and \verb+\Q+, which do not change catcodes at all, so they work everywhere. +Each special (say, not alphanumeric) character of the source text of these +commands must be prefixed by a backslash, so \TeX's eyes will see it as a +controls sequence token. The backslashes are retained when the construct is +written to auxilary files, but they get removed upon typesetting. Letters, +when prefixed by a backslash, get special meaning, for example \verb+\V+ +denotes a visible space. For example, The construct +\verb+\÷\\\}÷+ is seen by \TeX's eyes as +\verb+\÷+$_{13}$\allowbreak +\verb+\\+$_{13}$\allowbreak +\verb+\}+$_{13}$\allowbreak +\verb+÷+$_{13}$, and its gets typeset as \verb+\}+ (by running the command +\verb+\÷+). Please note that the construct is properly nested, because all +braces are inside control sequence names. The same result (\verb+\}+) can be +achieved with \verb+\Q{\\\}}+. Both constructs are safe, because they can be +freely moved to anywhere in the source file. However, for compatibility +reasons, \verb+\Q+ is recommended, because its execution doesn't rely on the +current catcode of the terminating \verb+÷+ of \verb+\÷+. A more complicated +example: \verb+``\Q{\\\V X\ }''+ gets typeset as ``\verb*+\ X+\verb+ +''. +In escaped mode, \verb+\V+ dentoes a visible, unbreakable space, +\verb+\S+ and \verb*+\ + denote default space (affected by the +\texttt{pverb-space=} option), \verb+\B+ allows a line break there with a +discreationary hyphen (affected by the \texttt{pverb-linebreak=} option), +and \verb+\n+ flushes left and starts a new line. + +The \verb+\PVerb+ macros can detect whether they have been invoked from +within a macro argument. If so, they do not insist on catcode changes, but +they emit all the tokens that has been seen by \TeX's eyes. (Spaces are +already compressed now, and everything after \verb+%+ +is ignored etc., so this is not purely verbatim anymore.) However, this works +only if the macro argument is properly nested with respect to braces, and it +is delimited by braces (not a terminator character). + +Please note that there might be problems with verbatim material in index +entries processed by \textsf{makeindex} if characters +\verb+"+, \verb+@+, \verb+!+ and \verb+|+ are not quoted properly with +\verb+"+. This is a generic \textsf{makeindex} issue. The quoting must be +applied even inside verbatim material. + +\subsection{Horizontal alignment of the Source lines}\label{srcstyle} + +The \texttt{verbatim} environment of standard \LaTeX{} reads the whole +verbatim text into a macro argument, thus limiting the length of the verbatim +material to the available main memory. This is enough for about 3400 +80-character lines. The \textsf{verbatim}, \textsf{moreverb}, +\textsf{listings} and +% Dat: moreverb pkg uses verbatim pkg +\textsf{examplep} packages parse the input line-by-line, so there is no such +limit. However, with \textsf{examplep}, additional memory is required for +aligned mode, which limits the maximum number of lines to about 2200 +(32 pages) when the average line width is 80 characters. Please note that +the maximums mentioned here may be lower if more packages are loaded; in +another situatian the maximum number of lines was 375. As a reference, +a plain \verb+\halign+ with all lines having +\verb+(9999)\hfil\cr+ only could accomodate about 5000 lines when no packages +were loaded. The +maximum memory can be increased by increasing the \verb+extra_mem_bot+ +variable in \textsf{texmf.cnf} or in the environment. +%As a reference measurement. +%%%WF mi itt ez az utso mondat? +%% -- tényleg hülyeség, hihúzva + +There are two display modes used for display verbatim: paragraph and aligned +(see the \verb+\pexa@show@pars+ and \verb+\pexa@show@halign+ macros, +respectively, in the source). Aligned mode is used when multiple columns +(such as line numbers and text) have to be aligned horizontally. Aligned mode +uses the \TeX{} \verb+\halign+ primitive to do the alignment, and this +primitive reads the whole construct into memory before typesetting it (in +order to be able to calculate the column widths). The other one, +paragraph mode, is used when +horizontal alignment is not needed and side-by-side display is not used. In +paragraph mode, each line is typeset as a seperate paragraph, so the length +of the verbatim text is only limited by the available disk space to hold the +resulting DVI file. \textsf{examplep} chooses the mode automatically: for +side-by-side display it always chooses aligned mode (so it can measure the +width of the Source before typesetting it), otherwise, if the +\texttt{srcstyle=} makes it possible, it chooses paragraph mode, otherwise +it chooses aligned mode. See Figure \ref{fig:srcstyle} for details about +Source styles. + +\begin{figure}\small +{\relax\normalsize \parindent1em + \advance\leftskip\parindent %\advance\rightskip\parindent % Dat: automatic for \hsize + \advance\hsize-2\parindent + \parindent0pt +\texttt{srcstyle=left} \emph{PAF}\par +\leavevmode\hbox to0pt{\hss\scriptsize9}\texttt{srcstyle=leftnumhang} \emph{PAF}\par +{\scriptsize9}\texttt{srcstyle=leftnum} \emph{PAF}\par +\leavevmode{\scriptsize\phantom99}\texttt{srcstyle=leftnumcol} \emph{AF} when the last page number has 2 digits\par +\hfil\texttt{srcstyle=center} \emph{PAF}\par +\hfill\texttt{srcstyle=right} \emph{PAF}\par +\texttt{srcstyle=paralign}\hfill\emph{PF}\hfill with\hfill \texttt{source-par-align=justjust}\par +\strut\texttt{srcstyle=leftboth}\ \vrule\ srcstyle=leftboth \emph{A}\par +\leavevmode{\scriptsize\phantom99}\strut\texttt{srcstyle=leftbothnumcol}\ \vrule\ srcstyle=leftbothnumcol \emph{A}\par +\strut\texttt{srcstyle=leftleft}\ \vrule\ anything \emph{A}\par +%%%WF eleg zavaros egy tablazat, es harom sorban a | utani dolgok is +%%% erthetetlenek +%% -- mivel nincs jobb ötletem, marad ez +% Imp: boxed? +} +\medskip +\emph{P:} works in paragraph mode\\ +\emph{A:} works in aligned mode\\ +\emph{F:} works when Source is read back from file +\caption{The effect of the \texttt{srcstyle=} option}\label{fig:srcstyle} +\end{figure} + +Please note that the Source styles \texttt{leftboth} and +\texttt{leftbothnumcol} display each line twice, as Source and as Sample, +too. This is different from regular side-by-side display, because lines of +the Source and Sample here are forcibly aligned, and this solution doesn't +use a temporary file. The source style \texttt{leftleft} is similar, but it +lefts the author specify different Source and Sample for the same line (they +should be separated by \verb+&+ in the source). + + +\subsection{Display verbatim isolation}\label{pexaminipage} + +The \texttt{PexaMinipage} environment is provided, which is similar to the +%%%WF bulilt-in +built-in +%%% +\texttt{minipage} environment, but provides better isolation of the +Sample from the container document, because it saves and restores section, +page, equiation (etc.) numbers and also marks (section titles in +page headers). +Labels (for \verb+\label+, \verb+\ref+ etc.) are not isolated, because many +packages use them in a non-standard way. +See Figure \ref{fig:pexaminipage} for an example. + +\begin{figure}\small +\noindent\hfil\hbox to0pt{\hss\includegraphics{pexaminipage}\hss} +\caption{Display verbatim isolation with the \texttt{PexaMinipage} environment}% +\label{fig:pexaminipage} +\end{figure} + +The environment also +cancels vertical skips (including \verb+\belowdisplayskip+) at the bottom +of its contents. For space conservation, \verb+\abovedisplayskip+ above the +very first displayed equation is also canceled. To vaid this, put +\verb+\everydisplay{}+ before the formula. The environment starts with +\verb+\noindent+, but subsequent paragraphs are indented. + + +\subsection{Feature comparison} + +Although there are several \LaTeX{} packages providing display and/or inline +verbatim environments for \LaTeX{}, \textsf{examplep} has some important +unique features not found in other packages (see the beginning of this +section for details). The author has tried the following packages before +deciding to write \textsf{examplep}: + +\begin{description} + +\item[\normalfont\textsf{verbatim}] + Although the \texttt{verbatim} environment is built-in into \LaTeX{}, its + most important limitation is that it eats up \TeX{} memory when typesetting + very long verbatim material (of several hundred or thousand lines). The + \textsf{verbatim} package fixes this, and provides the + \verb+\verbatiminput+ command (similar to the \verb+\PexaShowSource+ + command of \textsf{examplep}) and the \texttt{comment} environment (similar + to \texttt{PIgnore} in \textsf{examplep}). + +\item[\normalfont\textsf{moreverb}] + This package extends the \textsf{verbatim} package with additional + features: proper handling of tabulators (also accessible from + \textsf{examplep} with the \textsf{listings} interface), line numbering + (also available in \textsf{examplep} with much more customization), + verbatim surrounded by a frame (this is not available in \textsf{examplep}, + but it works with \textsf{listings}, with page breaks allowed), the + \texttt{verbatimwrite} environment writes its contents to a file (similar + to the \texttt{WFile} environment in \textsf{examplep}). + +\item[\normalfont\textsf{sverb}] + It provides display verbatim with tabulators and long environments, and it + can read and write text from files. It also has a side-by-side environment + (\texttt{demo}) with fancy frames. + The \textsf{verbfwr} package (part of the \textsf{examplep} distribution) + was derived from parts of this package. + +\item[\normalfont\textsf{syntax}] + This package is written by the author of \textsf{sverb}. It provides + generic and customizable inline verbatim support and it also has powerful + features to typeset BNF-like grammars and syntax diagrams. It is documented + that no attempt is made to make the constructs work inside macro arguments + or section titles. + +\item[\normalfont\textsf{alltt}] + This standard \LaTeX{} package defines the \texttt{alltt} environment in + which the characters \verb+\ { }+ retain their original meaning, so it is + possible to do some manual formatting in the verbatim text. + +\item[\normalfont\textsf{fancyvrb}] \cite{fancyvrb} + This is extremely configurable verbatim package provides inline + verbatim even in footnotes, display verbatim even with side-by-side, line + numbers on any side, all + kinds of francy frames even with page breaks, text formatting and + writing and reading from files; and very long diplay verbatim text. + Options can be specified any time within the argument of the \verb+\fvset+ + command. The original \texttt{verbatim} environment is not modified, + but a new one, \texttt{Verbatim} is defined. Setting the background color + is not possible. + + This package is not actively developed. Version 2.7 (dated + 2000/03/21) is part of te\TeX{}. Oddly enough, the newest version on CTAN + is 2.6, which a file timestamp in 2004, but it dated 1998/07/17). + +\item[\normalfont\textsf{fvrb-ex}] + This package is part of the \textsf{fancyvrb} distribution and uses the + \textsf{fancyvrb} package. It provides a + side-by-side display verbatim environment (\texttt{SideBy\allowbreak SideExample}). A + page break is not allowed in the Source after the Sample. % Dat: tested + The \texttt{xrightmargin} option has to be specified manually (e.g.\,% + \texttt{xrightmargin\allowbreak=3cm}. The first two + characters of each line in the environment are ignored. + +\item[\normalfont\textsf{ltxdoc}] + The most important features of \textsf{examplep} inspired by the \LaTeX{} + documentation package are display verbatim line numbering with + \texttt{srcstyle=left\allowbreak num} and inline verbatim started with \verb+÷+. + The \textsf{ltxdoc} package typesets everything between two \verb+|+ + characters as inline verbatim. This is not supported by \textsf{examplep} + to avoid making an ASCII character active. + +\item[\normalfont\textsf{listings}] \cite{listings} + The most important layout elements of this sophisticated, highly + customizable, actively developed package missing from + \textsf{examplep} are: background color, frames (with page breaks allowed), + syntax highlighting and proper tabulator support. Except for the background + color and frames, these features can be used from \textsf{examplep} with + its interface to \textsf{listings}, see in Subsection \ref{listings}. + Use \verb+\lstset{columns=fullflexible,lang+\allowbreak\verb+uage=C,back+\allowbreak\verb+groundcolor=\color{red},frame=trBL}+ + to try these features. \textsf{listings} also provides inline verbatim + mode (with syntax highlighting), in the character-delimited argument of the + command \verb+\lstinline+;\,unfortunately, spaces at line breaks (with + option \texttt{breaklines}) are rendered in an inconsistent way, and line + breaks do not work well with background color. + + \textsf{listings} has an important weak point: it cannot typeset ISO Latin + accented characters with the \textsf{inputenc} package; + the way described in the manual doesn't work as expected: it puts the + accented characters to the wrong place in the line. This problem, + however, is solved when \textsf{listings} is invoked from + \textsf{examplep}. See more about listings in Subsection \ref{listings}. + +%%%WF This package is actively developed. +%%% ezt mar emlitetted a bekezdes elejen +\end{description} + +\section{Customization}\label{customization} + +The operation of \textsf{examplep} can be customized with options as +$\langle$key$\rangle${}$=${}$\langle$value$\rangle$ pairs. Global options, which affect all subsequent commands within +the current block, can be specified as package load options +(\verb+\usepackage[+\ldots\verb+]{examplep}+) or as argument of the \verb+\PexaDefaults+ +command. \LaTeX{} doesn't allow complicated option values (such as values +containing some expandable macros, for example after \texttt{linenumberformat=}) +to be specified in the \verb+\usepackage+ +line -- use \verb+\PexaDefaults+ in such cases. +Many commands and environment accept local options, which affect +only that construct. + +All options have default values, which are indicated below right after the +option name. If the option has a fixed set of possible values, all of them +are mentioned, and they are prefixed by \texttt{=}. The defaults have been +chosen so the \texttt{PSource} environment matches the builtin +\texttt{verbatim} environment as closely as possible. Note that the original +environment is not overridden before the \texttt{verbatimenv=yes} is +specified. + +\begin{description} +\makeatletter % Dat: for \verbatizee{\z@} + +\item[\verbatizee{Q=unchanged}] + To enable \verb+\Q+, use \texttt{=yes} instead of the default. +\item[\verbatizee{abreak=unchanged}] + To enable \verb+\abreak+, use \texttt{=yes} instead of the default. +\item[\verbatizee{addvspace-bottom={\vskip\z@skip\addvspace}}] + \hskip0pt plus4pt + Specifies the command to add vertical space below display verbantim. The default works + fine, but e.g.\ packages maintaining the baseline grid might want to + change it. +\item[\verbatizee{addvspace-top=\addvspace}] + Command to add vertical space above display verbantim. The default works + fine, but for example, packages maintaining the baseline grid might want to + change it. +\item[\verbatizee{allowbreak=yes}] + Use \texttt{=no} to disable page breaks in the Source of display verbatim. +\item[\verbatizee{allowshrink=yes}] + The default will shrink the Sample horizontally if the + Source is too wide. Use \texttt{=no} to disable this. + Use \texttt{=force} to enable shrinking of Source, and with + \texttt{srcstyle=leftleft} or \texttt{srcstyle=leftboth}, also enable + shrinking of the Source if it is narrow. +\item[\verbatizee{baseline-grid=no}] + Use \texttt{=yes} to adjust the height of the Sample to be an integer + multiply of \verb+\baselineskip+ (with \texttt{yalign=u} and + \texttt{yalign=v}). +\item[\verbatizee{boxstyle=p}] Controls how the Sample is boxed. Capital + letters are not allowed for side-by-side display. By default (\texttt{=p}), + a \texttt{PexaMinipage} environment is put inside a \verb+\vtop+. Use + \texttt{=h} to put a \verb+\hbox+ only, \texttt{=v} to put a \verb+\vtop+ + only, \texttt{=V} to put a \verb+\vbox+ only, + \texttt{=m} to put a \texttt{minipage} environment inside a \verb+\vtop+, + \texttt{=M} to put a \texttt{minipage} environment inside a \verb+\vbox+, + \texttt{=P} to put a \texttt{PexaMinipage} environment inside a \verb+\vbox+, + \texttt{=G} to add \verb+\begingroup+ and \verb+\endgroup+ only. + The default is recommended for most cases, because the \verb+\vtop+ + provides proper alignment with the Source, and the \texttt{PexaMinipage} + environment provides isolation (of page and section numbers etc.) from the + main document. +\item[\verbatizee{bsdiv=unchanged}] + To enable \verb+\÷+, use \texttt{=yes} instead of the default. +\item[\verbatizee{div=unchanged}] + To enable \verb+÷+, use \texttt{=yes} instead of the default. +\item[\verbatizee{firstlinenum=1}] + Specifies the number of the first line of a numbered Source listing. + Useful with \texttt{srcstyle=leftnumcol} and \texttt{srcstyle=leftnumhang}. +\item[\verbatizee{linenumberformat={{...}}}] + %\item[\verbatizee{linenumberformat={{\normalfont\rmfamily\scriptsize\number-\pexa@@cntb}\pexa@default@linenumbersep}}] + Commands to display a line number and the separator in a numbered Source + listing. See the default value in \texttt{examplep.sty}. +\item[\verbatizee{linenumbersep={}}] + Commands to display the separator in a numbered Source listing. +\item[\verbatizee{listings=no}] + Use \texttt{=yes} to display each Source line with the \textsf{listings} + package. Specify options (to be executed in \verb+\lstset+), separated by + commas in the argument. Read more about the options in the documentation of + the \textsf{listings} package. For example, \verb+listings=yes+ and + \verb+listings={}+ uses \textsf{listings} with default options (no syntax + highlighting), and \verb+listings={language=+\allowbreak\verb+C,showtabs}+ enables syntax + highlighting for C language and enables visible tabulators. See + Subsection \ref{listings} for more information. +\item[\verbatizee{listings-verbatimfont=pexavf}] + Set the font to be used in the Source when \texttt{listings=} is active. See + \texttt{source-verbatimfont=} for the possible values. +\item[\verbatizee{mp-equation-reset=yes}] + Use \texttt{=no} to make the main document and the Samples inside + \texttt{PexaMinipage} share the same equation counter. +\item[\verbatizee{mp-varioref-reset=no}] + Use \texttt{=yes} to make the internal counter \texttt{vrcnt} of the + \textsf{varioref} package to be reset for each Sample inside + \texttt{PexaMinipage}. This option doesn't affect the final output, and + \textsf{varioref} expects this counter not to be reset, so it is not + recommended to change the default. +\item[\texttt{noligs=some}] + By default, only those ligatures are disabled whose second character is one + of \verb+`+ \verb+'+ \verb+,+ \verb+-+ \verb+<+ \verb+>+. Use + \texttt{=kernel} to get the same effect, but using the \LaTeX{} built-in + \verb+\@noligs+. Use \verb+=most+ to get all ligatures with either the + first or the second character having code between 32 and 127 and catcode + 12. Please note that ligatures in inline verbatim mode are disabled anyway, + because \verb+\allowbreak+ is inserted between characters of catcode 12, + depending on the value of \texttt{pverb-linebreak=}. +\item[\verbatizee{pexaminipage-setuphook={}}] + Extra commands to run when starting the \texttt{Pexa\allowbreak MiniPage} environment, + just after the environment has finished its own initialization. +\item[\verbatizee{pverb-hash=full}] + Use \texttt{=half} to make \verb+\PVerb+ convert \verb+##+ to \verb+#+. + The command \verb+\PVerbH+ is the same as \verb+\PVerb+ but + forces \texttt{=half}. This is required when \verb+\PVerb+ or \verb+÷+ is + used inside a macro argument. For example, \verb+\textit{÷#÷}+ yields + the error message \textit{Illegal parameter number in definition of + \string\reserved@a}, but \verb+\textit{\PVerbH{##}}+ works fine. The error + message is a general \LaTeX{} kernel limitation, for example + \verb+\textit{\@gobb+\allowbreak\verb+le{#}}+ doesn't work either. +\item[\verbatizee{pverb-hyphenchar=hyphen}] + By default, the minus character (ASCII code 45) is used to for automatic word + hyphenation in inline verbatim. Use \texttt{=char'30} to have character + with code 24; see also Subsection \ref{char'30}. Use \texttt{=none} to + disable word hyphenation (by setting \verb+\hyphenchar+ to $-1$). + Use \texttt{=unchanged} to get the hyphenchar from + the font (the \textit{cmtt} and \texttt{ectt} fonts have word hyphenation + disabled). Please note that hyphenation around symbols is affected + the \texttt{pverb-linebreak=} option, not this one. +\item[\verbatizee{pverb-leftbreakmin=2}] + Specifies the minimum number of characters in inline verbatim after which it + is allowed to break the line (with \texttt{pverb-linebreak\allowbreak=}). Values + allowed are $0$, $1$ and $2$, but $0$ usually doesn't make sense. +\item[\verbatizee{pverb-linebreak=char}] + By default, \verb+\PexaAllowBreak+ is inserted around symbols in inline + verbatim, so a line break (with a discreationary hyphen affected by + \texttt{pverb-linebreakchar=}) is allowed there. Use \texttt{=yes} to insert + \verb+\allowbreak+ instead, which allows a line break without + discretionaries. Use \texttt{=no} to disable line breaks around symbols in + inline verbatim. The option \texttt{pverb-hyphenchar=} affects + intra-word hyphenation in inline verbatim, not this one. +\item[\verbatizee{pverb-linebreakchar={$\lnot$}}] + Specifies the discreationary hyphen to be used in \verb+\PexaAllowBreak+. + See also \texttt{pverb-linebreak=}. +\item[\verbatizee{pverb-space=invbreak}] + By default, spaces in inline verbatim are invisible, variable width (as + allowed by the font, see also \texttt{pverb-stretchshrink=}) + and breakable (i.e.\ a space can be replaced by a line + break if necessary). Use \texttt{=invdisc} to get an invisible, variable + width space which becomes visible (\verb*+ +) when it is broken at the end + of the line. Use \texttt{=invfixbreak} to get an invisible, fixed width and + breakable space. Use \texttt{=invnobreak} to get an visible, variable width + and unbreakable space. Use \texttt{=visnobreak} to get a visible, fixed + width and unbreakable space. Use \texttt{=visbreak} to get a visible, fixed + width space with line breaks allowed on both sides. Use + \texttt{=invbreakleft} to get a visible, variable width space with infinite + stretchablility if the line is broken there (this may have strange effect + on other line breaks in the paragraph, so please try to avoid it). + The built-in \verb+\verb*+ command uses + \texttt{source-space=visnobreak}. +\item[\verbatizee{pverb-stretchshrink=yes}] + By default, spaces in inline verbatim are forced to be stretchable and + shrinkable (by \verb+\quad+${}/9$). Use \texttt{=no} to disable + stretchability and shrinkability. Use \texttt{=unchanged} to keep the + settings in the font. Note that \verb+\fontdimen+$3$ and + \verb+\fontdimen+$4$ are changed by this option, and the changes are local + to inline verbatim mode. +\item[\verbatizee{pverb-verbatimfont=pexavf}] + Set the font to be used in inline verbatim mode. See + \texttt{source-verbatimfont=} for the possible values. +\item[\verbatizee{samplewidth=.5\PexaWidth}] + Specifies the maximum width of the Sample in side-by-side display as a + \TeX{} dimension. The actual Sample can become actually narrower (see + \texttt{allowshrink=}. The dimensions \verb+\hsize+, \verb+\linewidth+ and + \verb+\PexaWidth+ can be used. (Our \LaTeX{} book used + \verb+sample+\allowbreak\verb+width=.45\PexaWidth+.) \verb+\leftskip+ and \verb+\rightskip+ + do not affect this option. \verb+\hsize+ can be used, which is the total + width available (including the extra margins added by surrounding list + environments), \verb+\linewidth+ is \verb+\hsize+ widtout the extra margins + produced by lists, and \verb+\PexaWidth+ is the total width of the Source, + the separator (see \texttt{vrule=}) and the Sample. +\item[\verbatizee{source-par-align=left}] + Specifies the alignment of Source lines when \texttt{srcsty\allowbreak le=paralign} is + active. Use \texttt{=left} (default), \texttt{=right} or \texttt{=center} to + specified flush-left, flush-right or centered alignment, respectively. Use + \texttt{=justi\allowbreak fy} to have the last line flush-left and the previous line + justified (please note that each Source line is mapped to a single + paragraph, so the paragraph will have more than 1 line only if the source + line is too long). Use \texttt{=justjust} to have all lines justified. + Use \texttt{=unchanged} to keep the alignment of the enclosing block. +\item[\verbatizee{source-sepwidth=\tabcolsep}] + Specifies the horizontal distance between the Source and the Sample. + See also \texttt{vrule=}. +\item[\verbatizee{source-space=invfixbreak}] + Specifies how to typeset spaces of the Source. See \texttt{pverb-space=} + for the possible values. The built-in \texttt{verbatim*} environment uses + \texttt{source-space=visnobreak}. +\item[\verbatizee{source-verbatimfont=pexavf}] + Sets the font to be used for the Source when \texttt{listings=} is not + active (see also \texttt{listings-verbatimfont=} for + \texttt{listings\allowbreak=}). + Give + \texttt{=ttfamily} to use \verb+\ttfamily+, + \texttt{=pexavf} to use \verb+\pexa@@verbatim+\allowbreak\verb+font+ (which defaults to + \verb+\verbatim@font+), + \texttt{=latexvf} to use \verb+\verbatim@+\allowbreak\verb+font+ (which defaults to \verb+\normalfont\ttfamily+), + \texttt{=unchanged} to keep the current font, + or \texttt{=normalfont} to use \verb+\normalfont+. +\item[\verbatizee{srcstyle=left}] + Specifies the horizontal alignment of the Source lines. See more in + Subsection \ref{srcstyle} and Figure \ref{fig:srcstyle}. +\item[\verbatizee{ttlistings=}\normalfont\ (no default)] % Dat: $\varnothing$ + Shorthand of \texttt{listings-verbatimfont=ttfamily,\allowbreak listings=}. +\item[\verbatizee{url=unchanged}] + To enable \verb+\url+, use \texttt{=yes} instead of the default. The + \verb+\url+ will be defined as \verb+\def\url{\PVerbOpt{}}+. This has the + disadvantage that inside \verb+\textit+ etc.\ it cannot typeset URLs having + a single \verb+#+ (see \texttt{pverb-hash=} for more), but the \textsf{url} + package has the same limitation. A quick fix: use \verb+\itshape+ instead + of \verb+\textit+ etc. +\item[\verbatizee{usewidth=skipwidth}] + Specifies which horizontal part of the main text should be used in a + display verbatim. By default, left and right margins introduced by list + environments (such as \texttt{itemize}) and \verb+\leftskip+ and + \verb+\rightskip+ are respected. Use \texttt{=linewidth} to ignore + \verb+\leftskip+ and \verb+\rightskip+ but respect list environments. Use + \texttt{=hsize} to use the whole width of main text. Note that this option + affects the calculation of \verb+\PexaWidth+. +\item[\verbatizee{vextrabotdepth=\z@}] + Dimension to add to the depth of the display verbatim with + \texttt{yalign=v}. The default works + fine, but for example, packages maintaining the baseline grid might want to + change it for each instance. +\item[\verbatizee{vextravskip=\z@}] + Amount of vertical space to be added above display verbantim with + \texttt{yalign=v}. The default works + fine, but for example, packages maintaining the baseline grid might want to + change it for each instance. +\item[\verbatizee{vsmallht=1pt}] + Specifies Sample height threshold for \texttt{yalign=v}. If the Sample is + lower than this (or sample a higher than the 1st line of the Source plus + \verb+\vextravskip+ -- + typical for \verb+\includegraphics+), its top will be aligned to the top of + the Source, otherwise + its top baseline (with \verb+\vtop+) will be aligned to the top baseline of + the Source. +\item[\verbatizee{xalign=l}] + Specifies horizontal alignment (\texttt{=l} for left, \texttt{=r} for + right) of the Sample box (and the separator) within its allocated width for + side-by-side display. Please note that \texttt{=r} works only + with \texttt{boxstyle=h}, because all other box sizes use their + full allocated width. +\item[\verbatizee{xindent=deeppre}] + Specifies additional horizontal indentation in display verbatim mode. Use +%%%WF \texttt{=nonoe} + \texttt{=none} +%%% + to get no extra indentation. Use \texttt{=narrower} to get + \verb+\narrower+ (both \verb+\leftskip+ and \verb+\rightskip+ are decreased + by \verb+\parindent+). + Use \texttt{=deeper} to move one level deeper in the list environment + hierarchy and get that indentation. +%%%WF na most akkor mi a default? a deeper vagy a deeppre? + Use \texttt{=deeppre} (default) to move one level deeper, but don't change + indentation (this is useful with \texttt{yindent=deeper} -- + otherwise it is equivalent to \texttt{=none}). % Dat: really?? + Use \texttt{=deepright} to set both left and right indentation from + the left indentation of \texttt{=deeper}. +\item[\verbatizee{yalign=u}] + Specifies vertical alignment in side-by-side display. By default, the top + of the bounding boxes of the Source and the Sample is aligned, which looks + nice if the Sample is an image, but doesn't align properly if the Sample is + text with a font of similar size to the Source. Use \texttt{=b} to align + the topmost baselines of the Sample and the Source. This looks nice if the + Sample is text, but it is ugly if the Sample is an image higher than + \verb+\baselineskip+. The use of \texttt{=v} is recommended, which decides + between \texttt{=b} and \texttt{=u} based on the height of the Sample (see + \texttt{vsmallht=} for the details). +\item[\verbatizee{yindent=deeper}] + Specifies the vertical space separating display verbatim from the + surrounding text. Use \texttt{=none} no have no extra vertical space, the + display verbatim appears to be a new paragraph as far as + \verb+\baselineskip+ and \verb+\vskip+s are concerned. Use \texttt{=deeper} + (default) to move one level deeper in the list environment hierarchy + (and use the \verb+\parsep+ and \verb+\partopsep+ etc.\ specified there). + It is recommended to have \texttt{yindent=deeper} and + \texttt{xindent=deeppre} together, so there is no extra horizontal + indentation. +\item[\verbatizee{verbatimenv=unchanged}] + Use \texttt{=yes} + to change the implementation of the \texttt{verba\allowbreak tim} and \texttt{verbatim*} + environments to use the \texttt{PSource} environment. +\item[\verbatizee{vrule=rule}] + By default, the Source and the Sample are separated with a vertical rule + of width \verb+\arrayrulewidth+ in the middle of a horizontal space + specified by \texttt{source-sepwidth=}. Use \texttt{=skip} to omit the rule + but keep the space. Use \texttt{=none} to have no separator at all. + +\end{description} + +The other packages (\textsf{codep} and \textsf{verbfwr}) shipped with +\textsf{examplep} do not have load options. + + +\subsection{Interface to the \textsf{listings} package}\label{listings} + +The \textsf{listings} package \cite{listings} provides advanced typographic for display +verbatim, including proper typesetting of tabulators and syntax highlighting +for more than a hundred languages. \textsf{examplep} doesn't try to +reimplement these features, but it supports calling the \textsf{listings} +package to typeset the Source lines in display verbatim. The surroundings +(line numbers, vertical separation, horizontal margins and the Sample) are +not effected, only the Source line contents are passed to \textsf{listings}. +This implies that the border and the background color support provided by the +\textsf{listings} package doesn't work with \textsf{examplep}. To use the +interface, the \textsf{listings} package must be loaded, and either the +\textsf{listings=} or the \textsf{ttlistings=} options of \textsf{examplep} +has to be active when the Source is typeset. Additional options +can be specified to \textsf{listings} in the argument of \verb+\lstset+ at +any time. The interface has been tested +with the \textsf{listings} package dated 2000/08/23 and 2004/09/07. + +\textsf{examplep} treats tabulators (ASCII code 9) as 8 spaces. This is +acceptable at the beginning of the line, but it may be incorrect elsewhere. +To get tabs right, specify the \verb+ttlistings=yes+, or, to be more precise, +the \verb+ttlistings={tabsize+\allowbreak\verb+=8}+ option to \textsf{examplep}. It is also +possible to have visible tabulators: specify, for example, +\verb+ttlistings={tabsize=8,showtabs}+. In our tests \textsf{listings} failed +to detect the width of a character of a fixed width font, so +\textsf{examplep} enforces character width using the natural width of the +space each time it calls \textsf{listings}. This workaround made the +\texttt{showtabs} \textsf{listings} option work properly. +See the documentation of the +\textsf{listings} package for options that affect the typesetting of +Source line contents. See an example of using \textsf{listings} from +\textsf{examplep} on page \pageref{pag:use-listings}. + +\textsf{listings} supports fixed width characters with a variable with fonts. +However, this support seems to be broken when used with \textsf{examplep}, so +the \texttt{columns=full\allowbreak flexible} \textsf{listings} option is enforced so +proportional fonts will look proportional. Although the +\textsf{listings} package claims that it has accented letter support, this +didn't work well with the single-character accented letters input using +the \textsf{inputenc} package (those characters were positioned to a wrong +place inside the line, possibly because \textsf{listings} has failed to +recognise that \verb+\lst@UseLostSpace\lst@+\allowbreak\verb+PrintToken+ has to be inserted +in front of the accented character into its internal token list). +\textsf{examplep} contains a work-around to this problem, with the following +limitations: multibyte input encodings such as UTF-8 are not supported (will +print strange error message); accented characters may not be part of keyword +names in syntax highlighting; accented characters are shown as \verb+^^+ hex +escapes in aligned mode (see in Subsection \ref{srcstyle}), so they don't +work with \verb+\PexaShowBoth+. + +\textsf{listings}, when called from \textsf{examplep}, failed to break +ligatures such as \verb+`?+ and \verb+<<+. This has the side effect that +guillemots would be typeset instead of bitwise right shift in C language +sources. \textsf{examplep} modifies +the \verb+\lst@FillOutputBox@+ macro so it will add a \verb+\relax+ between +each character displayed -- so all ligatures are broken. (This approach is +quite differrent from the way \LaTeX{} disables a few ligatures +with \verb+\@noligs+; \verb+\pexa@noligs+ is similar to \verb+\@noligs+ in +this respect.) + +It is possible to customize the \textsf{listings} package so it typesets some +strings differently. For example, with the +\verb+literate={<=}{{$\leq$}}1+ \textsf{listings} option, all occurences of +\verb+<=+ (even those inside strings of the target programming language) +are typeset as $\leq$. There are no problems when using this feature from +within \textsf{examplep}. It is also possible for strings and comments in the +syntax-highlighted Source to span multiple lines -- \textsf{listings} takes +care to remember its internal state between lines. + + +\section{Commands and environments} + +The arguments between brackets (\verb+[+ and \verb+]+) are optional: either +the the argument and the brackets are all missing all all present. The +arguments named ``options'' is a comma-separated list of local customization +options, defined in Section \ref{customization}. The \texttt{\{}$^+$ notation +in front of an argument means that the argument can be delimited by braces +(thus it must be properly nested), or with any symbol in +\verb+\dospecials+ (% +\verb+\+ \verb+$+ \verb+&+ \verb+#+ \verb+^+ \verb+_+ \verb+%+ +\verb+~+) %%%WF $ +or in \verb+\pexa@cverb@donormals+ (% +\verb+`+ \verb+!+ \verb+@+ \verb+*+ \verb+-+ \verb-+- \verb+=+ \verb+|+ +\verb+:+ \verb+;+ \verb+'+ \verb+"+ \verb+,+ \verb+.+ \verb+/+ \verb+?+ +\verb+<+ \verb+>+ \verb+(+ \verb+)+ \verb+[+ \verb+]+). + +\begin{description} + +\def\cearg #1{{\normalfont\texttt{\{}$\langle $\relax#1\relax$\rangle$\texttt{\}}}} +\def\verarg#1{{\normalfont\texttt{\{}$^+\langle$\relax#1\relax$\rangle$\texttt{\}}}} +\def\delarg#1{{\normalfont $\langle $\relax#1\relax$\rangle $}} +\def\optarg#1{{\normalfont[$\langle$\relax#1\relax$\rangle$]}} + +\item[\verbatizee{\PVerb}\optarg{options}\verarg{verbatimtext}] + Typesets its argument in inline verbatim mode. Similar to the \LaTeX{} + \verb+\verb+ macro, but respects the options. The use of \verb+[]+ is + recommended instead of omitting the options altogether, because \verb+[]+ + will ensure that the proper catcode changes are in effect even for the + first verbatim character. + This command is robust. +\item[\verbatizee{\PVerbH}\verarg{verbatimtext}] + Shorthand for \verb+\PVerb[pverb-hash=half]+\ \hskip0pt plus2pt + (extra options cannot be specified). + This command is robust. +\item[\verbatizee{\PVerbInner\PVerb}\ldots] + Forces the \verb+\PVerb+\ldots{} command immediately following it to work + in inner mode, thus compressing spaces, respecting comment characters etc. + Because of how \TeX{} works, it is impossible to go the other way round, + and force outer mode, because it is too late change catcodes -- the + argument has already been tokenized in inner mode. + This command is robust. +\item[\verbatizee{\PVerbOpt}\cearg{options}\verarg{verbatimtext}] + Equivalent to \verb+\PVerb+, but uses a different syntax. + For example, \verb+\item[\PVerb[pverb-space=visbreak]{xy+\allowbreak\verb+}]+ doesn't work + because of the nested \verb+[+. Use this instead: + \verb+\item[\PVerb+\allowbreak\verb+Opt{pverb-space=+\allowbreak\verb+visbreak}{xy}]+, + \hskip0pt plus4pt or \hskip0pt plus4pt + \verb+\item[{\PVerb[pverb-space=+\allowbreak\verb+visbreak]{xy}}]+. + This command is robust. +\item[\verbatizee{\Q}\cearg{verbatimtext}] + Similar to \verb+\PVerb+, but its argument must be escaped + (see in Subsection \ref{escaped}), and it can be used in section titles etc. + Must be enabled with \texttt{Q=yes}. + This command is robust. +\item[$\div$\delarg{verbatimtext}$\div$] + Similar to \verb+\PVerb+, but it can be used in section titles etc. (but not + int \texttt{tabular}) (see in Subsection \ref{escaped}). + Must be enabled with \texttt{div=yes}. + This command is robust. +\item[\textbackslash$\div$\delarg{verbatimtext}$\div$] + Equivalent to \verb+\Q+, but the argument delimiter is different. + Similar to \verb+\PVerb+, but its argument must be escaped + (see in Subsection \ref{escaped}), and it can be used in section titles etc. + Must be enabled with \texttt{bsdiv=yes}. + This command is robust. +\item[\verbatizee{\url}\cearg{url}] + Must be enabled with \texttt{url=yes}. + This command is robust. +%%%WF az eleme jelet NE HASZNALD, osszesen 3-szor szerepel, irj +%%% valamit, hogy pl.: (after laoding verbfwr package) +%%% vagy valami hasonlot +%% -- javítva +\item[\verbatizee{\begin{WFile}}\cearg{filename}] (defined in the \textsf{verbfwr} package) + Writes its contents verbatim to the specified file. + \TeX{} \texttt{.tcx} and line ending transformations apply, so it is + possible that accented letters will be converted to \verb+^^+hex according + to the input encoding. +\item[\verbatizee{\begin{WAux}}] (defined in the \textsf{verbfwr} package) + Writes its contents verbatim into the current \texttt{.aux} file. + \TeX{} \texttt{.tcx} and line ending transformations apply, so it is + possible that accented letters will be converted to \verb+^^+hex according + to the input encoding. +\item[\verbatizee{\begin{PWSource}}\optarg{options}] + Comination of \verb+\begin{WSource}+ and \verb+\PexaShow+\allowbreak\verb+Source+. + It is recommended to have a \verb+[]+ even if there are no + options, so the very first token of the contents will be read with proper + catcodes. +\item[\verbatizee{\begin{WBoth}}] + Writes its contents to the Source and the Sample temporary file. It is + a combination of \texttt{WSample} and \texttt{WSample}. +\item[\verbatizee{\begin{WSample}}] + Writes its contents to the Sample temporary file (\texttt{pexa-sam.\allowbreak tex}), + to be typeset by a subsequent \verb+\PexaShowSample+ or + \verb+\PexaShowBoth+. + The line must end at \verb+\end{WSample}+ because of technical reasons. +\item[\verbatizee{\begin{WSource}}] + Writes its contents to the Source temporary file (\texttt{pexa-src.\allowbreak tex}), + to be typeset by a subsequent \verb+\PexaShowSource+ or + \verb+\PexaShowBoth+. It is similar to + \verb+\begin{verbwrite}+ in the \texttt{sverb} package + and the \verb+\begin{+\allowbreak\verb+filecontents}+ \LaTeX{} built-in environment. + The line must end at \verb+\end{+\allowbreak\verb+WSource}+ because of technical reasons. +\item[\verbatizee{\begin{PIgnore}}] + Ignores everything up to \verb+\end{PIgnore}+. The environment closer must + be at the end of its line. Similar to the \texttt{comment} environment in + some other packages. +\item[\verbatizee{\begin{PSource}}\optarg{options}] + Typesets its contents in display verbatim. Similar to the \LaTeX{} + \verb+\begin{verbatim}+ environment, but respects the customization + options. It is recommended to have a \verb+[]+ even if there are no + options, so the very first token of the contents will be read with proper + catcodes. This environment is similar to \texttt{PWSource}, but it doesn't + create a temporary file, so it is faster, \texttt{srcstyle=leftboth} (etc.) + can be used, and there is no ambiguity between \verb+^^e1+ and + \texttt{\'a} (etc., see more in Subsection \ref{tcx}). Page breaks are + allowed between each Source line. (The implementation of this environment + is fairly complex compared to \texttt{PWSource}.) +\item[\verbatizee{\begin{verbatim}}] + Equivalent to \verb+\begin{PSource}[]+. + Must be enabled with \texttt{verbatimenv=yes}. +\item[\verbatizee{\begin{verbatim*}}] + Equivalent to \verb+\begin{PSource}[source-space=visbrea+\allowbreak\verb+k]+. + Must be enabled with \texttt{verbatimenv=yes}. +\item[\verbatizee{\begin{PexaMinipage}}\optarg{vbox-type}\cearg{width}] + Similar to the \LaTeX{} \texttt{minipage} environment (and + accepts the same arguments), but + isolates (concerning section numbers etc.) of its contents from the main + document more thoroughly. See Subsection \ref{pexaminipage} for + details of isolation. +\item[\verbatizee{\PexaShowBoth}\cearg{options}] + Typeets the Source and the Sample side-by-side in display verbatim mode. + The Source comes from the temporary file written by the last + \texttt{WSource} or \texttt{WBoth} environment, and + the Sample comes from the temporary file written by the last + \texttt{WSample} or \texttt{WBoth} environment. + By default, a vertical separator line is drawn between the Source and the + Sample, and page breaks are allowed in the Source after the end of + Sample. + It can be called multiple times with different options for the same file. +%\item[\verbatizee{\PexaShowBothMany}]% Dat: for internal use +\item[\verbatizee{\PexaShowSample}\cearg{options}] + Typesets the Sample (written by\,the\,last + \texttt{WSample} or \texttt{WBoth} environment) in display mode. + It can be called multiple times with different options for the same file. +%\item[\verbatizee{\PexaShowSampleMany}]% Dat: for internal use +\item[\verbatizee{\PexaShowSource}\cearg{options}] + Equivalent to \verb+\PexaInputSource+ with the file written by the last + \texttt{WSource} or \texttt{WBoth} environment. + It can be called multiple times with different options for the same file. +%\item[\verbatizee{\PexaShowSourceMany}]% Dat: for internal use +\item[\verbatizee{\PexaInputSource}\cearg{filename}\cearg{options}] + Typesets the contents of the specified file as Source in display verbatim + mode. +% \item[\verbatizee{\PexaAddlastskip}] (not used anymore, see comment in lb.sty) +\item[\verbatizee{\begin{code}}] (defined in the \texttt{codep} package) + Typesets its contents side-by-side and also marks its contents to be dumped + to the CD. By default, each line is emitted to all +%%%WF thre + three +%%% + streams, but lines + with special prefixes will go into the Source, Sample or CD-file stream + only. See Section \ref{code} for details. +\item[\verbatizee{\PexaAllowBreak}] + Allows a line break here with a discreationary specified + in the option \texttt{pverb-linebreakchar=} inserted. +\item[\verbatizee{\abreak}] + A robust command which + inserts \verb+\PexaAllowBreak+ when the font \verb+{\ttdefault}{m}{n}+ + is active; inserts \verb+\allowbreak+ otherwise. + Must be enabled with \texttt{abreak=yes}. + +\end{description} + +\section{Writing examples with the \textsf{codep} package}\label{code} + +Textbooks and manuals tend to have many display verbatim examples. The +examples are usually code snippets which can be further processed by a +compiler or another program. +Sometimes minor modifications, such as adding the proper header or trailer, +are necessary before the code snippet can be processed. It is customary to +put all code snippets in the book onto the CD accompanying the book. The +\texttt{code} environment of the \textsf{codep} package (part of the +\textsf{examplep} distribution) generates CD-files automatically. + +Three streams are generated from the contents of each \texttt{code} +%%%WF environemnt: +environment: +%%% +the Source, the Sample and the CD-file streams. Most parts of +these streams are identical. The Sample usually differs from the Source +because the code snippet has to be typeset specially in the book (for +example, \verb+\includegraphics+ has to be used to typeset an EPS file whose +Source is displayed). The CD-file differs from Source because additional +header and footer may be required (such as \verb+\begin{document}+ etc.), +which are omitted from the book to conserve space. + +The \texttt{code} environment reads the code snippet line-by-line. The type +of the line is specified in first two characters. Lines having the default +type are written to all 3 streams, and special line types exist to write to a +specific stream only. The \texttt{code} environment writes the Source and +Sample streams to temporary files, and upon the end of the environment, it +calls \verb+\PexaShowBoth+ (or \verb+\PexaShowSource+, if the Sample stream +is empty) to typeset the example. The CD-file stream is not written to a file +by \TeX{}, but the file name and starting line number of the \texttt{code} +environment is reported in the \texttt{.aux} file. A \textsf{Perl} script +(\textsf{wrfiles.pl}, part of the \textsf{examplep} distribution) has to be +called later to the actual generaton of CD-files. It will examine the +\texttt{.aux} files, extract the CD-file stream from the \texttt{.tex} files, +and dump these streams to individual files in the \texttt{CDfiles} directory. +The file names can be specified in the \texttt{code} enviroment, and the +environment can generate file names based on chapter and page numbers (so the +reader will know from the file name where to read more about the example). +The same file name is never generated again. + +The \textsf{code} package was used in our recent \LaTeX{} textbook \cite{lakk} +to typeset its examples. Most of the examples were written in \LaTeX{}, but +many +%%%WF of of +of +%%% +them were \textsf{METAPOST} sources, and some of them were others +(e.g.\ configuration files, shell scripts or EPS files). Because of the huge +amount of \LaTeX{} examples, special features were added to make them easy +and convenient to input for the author. For example, +\begin{verbatim} +\begin{code} +t \usepackage{url} + URL: + \\\url{http://foo.org/~user/} +\end{code} +\end{verbatim} +is displayed as (depending on the \textsf{examplep} options) +\par\medskip +\noindent\begin{tabular}{@{}l@{}l@{}l@{}} +{\scriptsize1}\verb+%^\usepackage{url}+&\ \vrule\ \null&URL:\\ +{\scriptsize2}\verb+URL:+&\ \vrule\ \null&\verb+http//foo.org/~user/+\\ +{\scriptsize3}\verb+\\\url{http//foo.org/~user/}+&&\\ +\end{tabular} +\par\medskip\par +As seen above, examples are quite convenient to input, and \textsf{examplep} +takes care of typesetting side-by-side, determining width of the Source, +allowing page breaks, putting margins and \verb+\vskip+s right, adding the rule the +separate the Source and the Sample, adding line numbers, generating file name +for CD-file and writing the CD-file with header and footer. + +With \textsf{codep} it is easy to fulfill the following quality criterias: +the Sample must be consistent with the Source (i.e.\ if the Source is +changed during editing to book, the Sample should change automatically); the +CD-file must be consistent with the Source; the CD-file must be directly +compilable with \LaTeX{} (so a header and a footer have to be added). When +the deadline of finishing the book approaches, there might not be enough time +left to ensure these manually, so a package such as \textsf{codep} is very +useful in this situation. + +\subsection{Example files on the CD}\label{codewritereasons} + +The following CD-file is generated from the code snippet above: +\begin{verbatim} +\documentclass{article} + +\usepackage[latin2]{inputenc} +\usepackage[T1]{fontenc} +\usepackage[magyar]{babel} +\usepackage{url} + +\begin{document} + +URL: +\\\url{http://foo.org/~user/} + +\end{document} +\end{verbatim} + +The \texttt{CodeDefaultD}, \texttt{CodeDefaultL}, \texttt{CodeDefaultB} and +\texttt{CodeDefaultE} environments can be used in the preamble to customize +the default header and footer generated into the CD-file. For example: +\begin{verbatim} +\begin{CodeDefaultD} +\documentclass[10pt]{article} +\end{CodeDefaultD} +\begin{CodeDefaultL} +\usepackage[latin2]{inputenc} +\usepackage[T1]{fontenc} +\usepackage[english]{babel} +\end{CodeDefaultL} +\end{verbatim} + +Although \TeX{} is able to write to external files with \verb+\textsfrite+, there +were several reasons for using an external program (a \textsf{Perl} script) to +extract the source snippets from the document sources: +% +\begin{itemize} + +\item with \verb+\write+ the file always ends at end-of-line +\item \verb+\write+ forces \texttt{.tex} if no extension is specified +\item \verb+\write+ removes whitespace from end-of-line +\item \verb+\write+ translates accented letters to hat-escapes + (e.g.\ \texttt{á} to \verb+^+\verb+^e1+) unless + compiled with \texttt{latex --translate-file cp8bit.tcx} + (\texttt{--translate-file il2-t1.tcx} makes \texttt{\H{o}} in DVI + incorrect). There is the same problem when emitting UTF-8 text. +\item it is impossible to distinguish missing files from empty files, + so accidental file overwrites are hard to prevent +\item it is too late to verbatize if the verbatim text is inside + braced macro arguments + +\end{itemize} +% +The only limitations of this solution are: is not possible to \verb+\input+ +or \verb+\include+ a subfile, and then use the \texttt{code} environment in +the referrer file; the subfile has to be included with +\verb+\include{...}+ or \verb+\input{...}+ (with braces); +and the subfile must have extension \texttt{.tex}. +The first one is usually not a problem, since referrer files themselves do not +typeset text, they only include subfiles. See Subsection +\ref{codeimpl} for implementation details. + + +\subsection{\texttt{\textbackslash begin\{code\}} invocation} + +The input syntax of the \texttt{code} environment has been designed so that +typing the most common examples (short \LaTeX{} code snippets) is simple and +straightforward, but the author can have full control over all three streams +if he wants to. The contents of the environment is divided into lines. The +first two characters of each line specify the line type and the rest is the +line data. +% Lines with type \verb+% + are ignored. +The first character of the line type is usually a lowercase +ASCII letter or a punctuation symbol. Line types belong to classes, which are +denoted by capital ASCII letters. The order of the classes in the environment +is significant, but the order of the individual types or lines within the +class is irrelevant. Some classes have default lines, which are used +only if the class is omitted from the environment. The default lines make it +possible to have default CD-file header and trailer. The clases, in proper +order with allowed types in parentheses), are: +% +\begin{description} + +\item[F (f, f!, v, v!)] specify the file name. + +% G | | |ide visz egy F-beli parancs + +\item[D (d)] the \verb+\documentclass+ line, default uses article + +%%%WF kicsit fura, hogy a magyar a default, valami megjegyzessel itt +%%%enyhiteni kellene, pl hogy ez hogy irhato folul... +%% -- javítva +\item[L (l)] the preamble specific to the natural language, defaults for + Hungarian \textsf{babel}, Latin-2 \textsf{inputenc}, T1 \textsf{fontenc}. + Use the \texttt{CodeDefaultL} environment to override. + +\item[P (p$\equiv$0, t)] the preamble with the \verb+\usepackage+ lines + +\item[B (b)] \verb+\begin{document}+ + +\item[C (<$\equiv$c, >$\equiv$o, \textvisiblespace$\equiv$2, w, s, x, \%)] the document contents + +\item[E (e)] \verb+\end{document}+ + +% Z | | |ide visz az \end{code} + +\end{description} +% +The meaning of the complicated types are: +% +\begin{description} + +\item[f] Accepts a file name with extension. The use of \verb+_+ in the name + is not recommended. The extension (e.g.\ \texttt{.tex}) is mandatory. The + chapter and page numbers will be prepended to the file name (only the + page number for document classes without chapters), for example + \texttt{f foo.mp} may become \texttt{2\textunderscore 63\textunderscore foo.mp} in chapter 2, on page 63. + +\item[v] Like \texttt{f}, but removes the default lines from classes + D, L, P, B and E. This is ideal for emitting non-\LaTeX{} examples. + +\item[f!] Like \texttt{f}, but don't prepend numbers to the file name. + +\item[v!] Like \texttt{v}, but don't prepend numbers to the file name. + +\item[p$\equiv$0] Writes only to the preamble of the CD-file. + +\item[t] Writes to CD-file, appends line prefixed by \verb+%^+ + to Source. Useful to indicate in the book that a package is needed. + Example: \verb*+t \usepackage{url}+. + +\item[<$\equiv$c] Writes to Source and CD-file. +\item[>] Writes only to Sample. +\item[x] Writes to Sample and CD-file. +\item[\textvisiblespace$\equiv$2] Writes %%%WF only + to Source, CD-file and Sample. +\item[w] Writes only to CD-file. +\item[s] Writes only to Source. +\item[\%] Comment, ignored. + +\end{description} + +The \texttt{code} environment omits the Sample part from the book if the +Sample is empty, +and it omits the whole display verbatim environment (but still writes to +CD-files) if both the Sample and Source are empty. + +\subsection{An example with METAPOST code} + +If the \textsf{eempost} package is also loaded, the following code can be +used to typeset a simple, syntax-highlighted \MP{} source and its output: +\begin{verbatim} +{\PexaDefaults{listings={language=metapost}}\begin{code} +v house.mp +> \begin{EempDef}{house.1}{}{} +w beginfig(1) + u:=18bp; picture V; V:=image( + draw unitsquare scaled u xscaled 2; + fill (0,u)--(2u,u)--(u,1.5u)--cycle + withcolor red); + draw V rotated 10; + draw V shifted (3u,0); +w endfig; end +> \end{EempDef} +> \leavevmode\EempUseFig{house.1}{0}{0} +% ^^^ Dat: \leavevmode to get the Overfull \hbox warning +\end{code} +} % Dat: nothing allowed after \end{code} in its line +\end{verbatim} +% +If \textsf{eempost} is not loaded, the following code should be used instead: +% +\begin{verbatim} +{\PexaDefaults{listings={language=metapost}}\begin{code} +v house.mp +> \begin{WFile}{house.mp} +x beginfig(2) + u:=18bp; picture V; V:=image( + draw unitsquare scaled u xscaled 2; + fill (0,u)--(2u,u)--(u,1.5u)--cycle + withcolor red); + draw V rotated 10; + draw V shifted (3u,0); +x endfig; end +> \end{WFile} +> \leavevmode\includemps{house.2} +\end{code} +} +\end{verbatim} +The \verb+\includemps+ command should be defined in the preamble as: +\begin{verbatim} +\usepackage{graphicx} +\DeclareGraphicsRule{*}{mps}{*}{} +\makeatletter +\@ifundefined{Ginclude@eps}{}{\def\Ginclude@mps{\Ginclude@eps}} +\def\includemps{\@ifnextchar[\includempsb{\includempsb[]}} +\def\includempsb[#1]#2{\includempsc{#1}#2\@nil} +\def\includempsc#1#2.#3\@nil{% + \IfFileExists{#2.#3}{\includegraphics[#1]{#2.#3}}{ + \GenericWarning{}{Please run: mpost #2^^J\@gobble}}} +\makeatother +\end{verbatim} +This should work with both \textsf{dvips} and \textsf{pdflatex}. The typeset +output looks like this:\label{pag:use-listings} +\par\medskip +\noindent\begin{tabular}{@{}l@{}l@{}l@{}} +{\scriptsize1}u:=18\textbf{bp}; \textbf{picture} V; V:=\textbf{image}( &\ \vrule\ \null&\\ +{\scriptsize2}\ \ \textbf{draw} \textbf{unitsquare} \textbf{scaled} u \textbf{xscaled} 2;&\ \vrule\ \null&\\ +{\scriptsize3}\ \ \textbf{fill} (0,u)$-${}$-$(2u,u)$-${}$-$(u,1.5u)$-${}$-$\textbf{cycle}&\ \vrule\ \null& + \setbox0\hbox{\includegraphics{houses}}\ht0=0pt \box0 \\ +{\scriptsize4}\ \ \ \ \textbf{withcolor} \textbf{red}); & &\\ +{\scriptsize5}\textbf{draw} V \textbf{rotated} 10; & &\\ +{\scriptsize6}\textbf{draw} V \textbf{shifted} (3u,0); & &\\ +\end{tabular} +\par\medskip\par + + +\section{Some implementation details} + +\subsection{Starting from poor man's inline verbatim} + +The following macro, derived from a macro in the \texttt{.dtx} documentation +of David Kastrup's \textsf{binhex} package \cite{binhex}, +typesets its argument in inline verbatim mode: +% +\begin{verbatim} +{\catcode\string`>12 \gdef\stripprefix#1>{}} +\def\verbatize#1{{\ttfamily + \toks0{#1}\edef\next{\the\toks0}% Dat: make # OK + \fontdimen2\font=0pt % Dat: hide spaces + \expandafter\stripprefix\meaning\next + \unskip % Dat: strip final space, possibly after command + \fontdimen2\font=\dimen0}}% Dat: reset global change +\end{verbatim} +% +This demonstration show how useful the \TeX{} primitives \verb+\string+ and +\verb+\meaning+ are. Both of them convert tokens to characters with catcode +12 (other) or 10 (space). Token lists with spaces are hard to post-process by +\TeX{} macros, because \TeX{} macro expansion ignores spaces before +undelimited macro arguments. But it is possible to write a macro which +converts spaces to anything with catcode 12, for example the \verb+\sca+ +macro below does this: +% +\begin{verbatim} +\begingroup\catcode\string``12 \lccode```\%\lowercase{\endgroup + \def\scc#1 {\ifx\hfuzz#1\else#1`\expandafter\scc\fi}} +\def\scb#1#2{\scc#2\hfuzz#1} \def\sca{\scb{ }} +% try with: \message{\sca{foo bar }} +\end{verbatim} +% +It is possible to change \verb+%+ +in the definition above to anything, including a space: the replacement +character will have catcode 12. After such a conversion, the text to be +emitted can be easily processed to add \TeX{} macros, change catcodes back to +13 for ISO Latin high accented characters, replace spaces with appropriate +constructs, insert \verb+\allowbreak+ to the right places to enable line +breaks etc. The \verb+\PVerb+ macro, when invoked in inner mode (i.e.\ read +inside a macro argument) works this way, and respects the options specified +by the author. + +\subsection{Hex escapes with output translation}\label{tcx} + +The \TeX{} primitives \verb+\write+, \verb+\message+ and \verb+\errmessage+ +may escape some characters when printing them. By default, \TeX{} changes the +code ranges 0--31 and 127--255 (the codes outside the printable ASCII range), +escaping such codes with a \verb+^^+: for example, +the tabulator (code 9) becomes \verb+^^I+, and characters having a high code +in the font (not the input) encoding are dumped in hexadecimal, for example +\texttt{\H{o}} (having code 174 in T1 encoding) becomes \texttt{^^ae}. +(This behaviour depends on the default \texttt{.tcx} file the \TeX{} +distribution uses. No translation occurs with \textsf{cp8bit.tcx}. +To spot the difference, run +\verb+tex -translate-file cp8bit "\messa+\allowbreak\verb+ge{^^I^^1f+\allowbreak\verb+á}\end"+, and then change +\texttt{cp8bit} to \texttt{.missing.}, and run again.) +The transformation is lossy: %, for example % e.g.\ +both +\verb+\message{+\texttt{\H{o}}\verb+}+ and +\verb+\message{\string^^ae}+ yield the same result: \verb+^^ae+. Escaping the caret +as \verb+^^5e+ doesn't help either, because the \TeX{} unescapes carets +recursively when reading back the written file. Since ISO Latin +accented characters are +more often needed in verbatim environments than double carets, +\textsf{examplep} does the necessary unescaping when it reads the file back. +% Dat: doesn't work The back-transformation works with UTF-8, too, because it is timed properly. +The back-transformation doesn't work with UTF-8, because the 2nd byte is not +decoded by the time the first one is being executed. +The unescaping would be done by \TeX{} itself if the caret had its original +catcode 7, but that would imply that the non-escaping, verbatim carets +wouldn't work. + +The unescaping is implemented in a straighforward, but ugly way in the +\verb+\pexa@dohex@low+\ldots{} macros. The caret escapes are parsed in a +huge \verb+\if+%\ldots +\verb+\else+\allowbreak\verb+\if+ construct nested in 40 levels, and once +the hexadecimal code is available and converted to upper case, the +\verb|\lccode`+="|$\langle$code$\rangle$\verb*|\lowercase{+}| construct is +used to insert the appropriate character with catcode 12 (\verb+~+ is +used instead of \verb|+| to get an active character, catcode 13). The +construct is not expandable, but it works because it is used for typesetting. +The caret is made active and defined to execute \verb+\pexa@dohex+, so each +caret in the file will get unescped. + +\subsection{Disabling ligatures} + +The only way to disable a ligature in \TeX{} is to insert a nonexpandable +tokens into the input stream between the characters forming the ligature. +For example, \verb+f{}i+ or \verb+f\relax i+ can be used to get ``f{}i'' +instead of ``fi''. The most important ligatures (in addition to ligature +letters) to be disabled in verbatim mode are: +\verb+<<+ \verb+>>+ \verb+?`+ \verb+!`+ \verb+,,+ \verb+``+ \verb+''+ +\verb+--+ and \verb+---+. This can be accomplised by inserting a \verb+\relax+ +token in front of each \verb+`+ \verb+'+ \verb+,+ \verb+-+ \verb+<+ +and \verb+>+. The \verb+\pexa@noligs@some+ command of \textsf{examplep} does +exactly this, for example, it defines +\verb+{\lccode`~`<13 \gdef~{\relax+\allowbreak\verb+\string~}}+. The definition +slightly different from the one of the \verb+\@noligs+ command in the +\LaTeX{} kernel: \verb+\def<{\leavevmode\kern\z@\char`\<}+; but the effect is +the same. The \verb+\pexa@noligs@most+ command, on the other hand, makes +all characters with category code 12 in the range 32\ldots127 active, and +adds \verb+\relax+ to both sides. This change doesn't affect ASCII or +accented letters, but usually there are no ligatures with letters in +typewriter fonts. See also the \texttt{noligs=} load option. + +\subsection{Detecting inner/outer brace in inline verbatim mode} + +The \verb+\PVerb+ commands work differently based on whether they are inside +a macro argument or not. More precisely, they detect whether they are able +to change the catcode of the following token. If so, they are in outer mode +(i.e.\ outside a macro argument), so they change all the other catcodes as +well, so consecutive spaces and comment characters will be included in +verbatim, too. Otherwise, they are in inner mode, their argument is already +read and tokenized by \TeX{}'s eyes, so changing catcodes is pointless. + +The auto-detection works this way: the catcode of all the special characters +(as enumerated in \verb+\dospecials+; including braces) is changed to 3 +(math-shift). Then the next token is read into \verb+\reserved@a+ with +\verb*+\afterassignment\pexa@+\allowbreak\verb+cverb@gottoken\let\reserved@a= +. No tokens are +ignored this way, not even spaces. The \verb+\pexa@cverb@gottoken+ macro then +examines the catcode of the character in +\verb+\reserved@a+, and if it is 3, it continues in +outer mode, otherwise it continues in inner mode. In inner mode, the next +token is forced to be an open-brace, because verbatim material with braces +not nested cannot be read into inner mode anyway (\TeX{} would print an error +message when it is trying to find the end of the macro argument containing +the \verb+\PVerb+ construct). + +Another common trick is used when parsing the argument in outer mode when it +is delimited by braces. Normally a \TeX{} macro expansion +(using the definition \verb+\def\pexa@cverb@outerc#1{...}+) can read an +argument that is in braces, but in our case the very first opening brace has +been already read (by \verb+\let+ above), so we have to insert it back: +\verb+\catcode`\{1 \catcode`\}2 \ex+\allowbreak\verb+pandafter\pexa@cverb@outerc\expandafter{\iffalse}\fi+. +The \verb+\iffalse+\allowbreak\verb+}\fi+ here is needed for making the definition properly +nested. + +\subsection{Inline verbatim in section titles} + +The \TeX{} command \verb+\write+, \verb+\message+ and \verb+\edef+ fully +expand their arguments, and similar expansion is enforced by the +\verb+\markboth+ built-in \LaTeX{} macro for section titles and page +headings. Therefore macros in section titles have to be protected so their +expansion is delayed until the section title is typeset. \LaTeX{} offers +\verb+\protect+ for this: if the macro control sequence is preceded by +\verb+\protect+, its expansion is properly delayed; the expansion of the +argument has to be delayed manually in a similar way. Some macros have +\verb+\protect+ion included; they are called ``robust''. If the definition a +macro starts with \verb+\DeclareRobustCommand+ instead of \verb+\newcommand+, +the macro is defined to be robust (and its body can be retrieved by looking +at the control sequence with a space added, e.g.\ +\verb*+\expandafter\show\csname sqrt \endcsname+). + +\verb+\protect+ can have three definitions depending on what time it is +processed: it is \verb+\string+ in a \verb+\typeout+ or a \LaTeX{} error or +warning message (try \verb+\typeout{\meaning\protect}+); +it is \verb+\noexpand\protect\noexpand+ when +\verb+\write+ing to a file (most commonly the \texttt{.aux} file); otherwise +it is just \verb+\relax+ ($\equiv{}$\verb+\@typeset@protect+; try +\verb+\pagestyle{headings}\section{\meaning\pro+\allowbreak\verb+tect}+ and spot the difference +between the main text, the section title and the \texttt{.aux} file). + +The \verb+\÷+ and \verb+\Q+ inline verbatim commands are made robust, so they +can be used in macro arguments. In fact, they are extra-robust, since they +take care of protecting their arguments when being written to a file by +\LaTeX{}. Protecting here means adding \verb+\noexpand+ in front of each +token in the argument. The token parsing is easy since the argument -- by the +nature of these commands -- may not contain braces or spaces. The +implementation looks like this. +% +\begin{verbatim} +\long\def\÷#1÷{\Q{#1}} +\long\def\Q{\ifx\protect\@typeset@protect\expandafter\@gobble\fi + \@thirdofthree\@firstoftwo\displayit\protectit} +\def\displayit#1{...} +\def\protectit#1{\noexpand\÷\protectnext#1÷} +\long\def\protectnext#1{\noexpand#1% + \ifx#1÷\else\expandafter\protectnext\fi} +\end{verbatim} +% +The first trick is in the body of \verb+\Q+: the argument is passed to +either \verb+\displayit+ or \verb+\protectit+, depending on the current value +of \verb+\protect+. If the condition is true, \verb+\@gobble+ is called, +which removes \verb+\@thirdofthree+, so \verb+\@firstoftwo+ will choose +\verb+\displayit+ (otherwise, \verb+\@thirdofthree+ chooses +\verb+\protectit+). +The second, more classical trick is the r\^ole of +\verb+\expandafter+ in the definition of \verb+\protectnext+: it makes the +\verb+\fi+ token disappear, so the tail-recursive call to \verb+\protectnext+ +will grab the next token into \verb+#1+ instead of \verb+\fi+ itself. + + +\subsection{Special hyphenchar in inline verbatim}\label{char'30} + +When inline verbatim is hyphenated, care has to be taken to make the +discretionary hyphen different from a regular, verbatim hyphen. (There is a +similar problem with spaces disappearing when the line is broken; to avoid +this, try setting the option \texttt{pverb-space=visbreak} or +\texttt{pverb-space=invdisc}.) \TeX{} auto-hyphenation takes the +discretionary hyphen from the \verb+\hyphenchar+ of the font. So the solution +is adding a new glyph to the verbatim font, changing the font encoding +vector to include the glyph, and then setting \verb+\hyphenchar+. + +We have chosen character position 24 (per-thousand sign) of the T1 encoding to +be replaced by a soft hyphen (\includegraphics[scale=0.009]{shorthyp_t1xtts}), +which is deliberately narrower than all the other characters, so the +reader immediately sees its function. For example: +``\texttt{foo\includegraphics[scale=0.009]{shorthyp_t1xtts}\break bar}''. +We have drawn the glyph in \textsf{Fontforge}, saved the data to PFB, +converted it to human-readable format with the command +\texttt{type1fix.pl shorthyp.pfb gsx: shorthyp.gsx}, extracted the human +readable glyph definition (\verb+/short+\allowbreak\verb+hyp { ... }+) from the output. +We have changed the \texttt{/FontName} and +injected the glyph to original font with the following command: +% +\begin{verbatim} +perl -x -S type1fix.pl --set-leniv=0 --dump-spaces=no --pack \ + --dump-bars --dump-stde --dump-ends=no --debug-warnings \ + --chk-insize=no --set-uniqueid=random --set-fontname=t1xtts \ + --set-glyph="/shorthyp { 50 354 hsbw 315 vmoveto -17 vlineto 0 + -8 0 -8 6 -4 rrcurveto 4 -6 8 0 5 0 rrcurveto 195 hlineto -124 + vlineto -11 0 -21 15 vhcurveto 2 0 3 1 2 1 rrcurveto 10 2 1 12 + 0 12 rrcurveto 0 8 -1 8 0 5 rrcurveto 130 vlineto 0 5 1 7 0 7 + rrcurveto 0 12 -2 11 -11 3 rrcurveto -5 1 -6 0 -5 0 rrcurveto + -12 0 -12 -1 -10 0 rrcurveto -98 hlineto -16 0 -19 2 -17 0 + rrcurveto -32 -6 -3 -24 hvcurveto closepath endchar} def" \ + t1xtt.pfb pfb: t1xtt-shorthyp.pfb +\end{verbatim} +% +We have changed six lines in \textsf{tex256.enc} to match the glyph names +in the font (e.g. \texttt{/endash} $\to$ \texttt{/rangedash}), and we have +changed position 24 to \texttt{/shorthyp}. We have also changed the name of +the encoding in the beginning of the file. We have inserted the following +line to the PostScript font map files (e.g.\ \textsf{psfonts.map}), without +the line break: +% +% into psfonts.map: +% ul9r8r LuxiMono "TeXBase1-shorthypEncoding ReEncodeFont" <8r-shorthyp.enc t1xtts} +\end{verbatim} +% +The \verb+\hyphenchar+ settings above disables automatic word hyphenation, so +words inside \verb+\texttt+ etc.\ won't be accidentally hyphenated. We have +copied all the files above to the appropriate directories and we have run +\textsf{mktexlsr} to update the file list. We have included some options in +\verb+\PexaDefaults+ line in the document preamble: + \texttt{pverb-hyphenchar=char'30} (for automatic word hyphenation) + \texttt{pverb-linebreak=char}, + \texttt{pverb-linebreakchar=}\verb*+{\string\char'30 }+ (insert\-ed around symbols). +We have also defined +\verb+\def\pexa@verbatimfont{\normal+\allowbreak\verb+font\fontfamily{xtts}\selectfont}+, +and we have made sure that the T1 encoding is in use +(\verb+\usepackage{t1enc}+). + +The overall effect of these modifications was that \textsf{examplep} now used +our glyph for automatic word hyphenation and as discreationary hyphen around +symbols in inline verbatim mode. The demonstrations above shows that it is +quite complicated to change a single glyph in a \LaTeX{} font. It is hoped +that the situtation will improve with \TeX's successors. + + +\subsection{Passing information about the CD-files to \textsf{wrfiles.pl}}\label{codeimpl} + +\textsf{wrfiles.pl} is used to extract the CD-files from the \LaTeX{} sources +of a book. The reasons why an external program is used instead of \TeX{}'s +built-in \verb+\write+ command are described in Subsection +\ref{codewritereasons}. + +The file names and environment start line numbers are passed to +\textsf{wrfiles.pl} in the \texttt{.aux} file(s). For example, the line +\verb+\@gobble{code:foo.tex:156:2_pic3.+\allowbreak\verb+mp}+ is a declaration that there is a +\texttt{code} environment starting at line 156 in the file \texttt{foo.tex}. +\textsf{wrfiles.pl} understands such declarations, and it also understands +lines like \verb+\@input{foo1.aux}+, so dumping works even if the document is +separated to several \verb+\include+d source files. The declaration above is +ignored by \LaTeX{} when it reads back the \texttt{.aux} file (because +\verb+\@gobble+ gobbles its argument). + +Although the \verb+\inputlineno+ primitive is mentioned twice in the +\TeX{}book \cite{texbook}, its -- rather straightforward -- purpose is not +documented there. But the real problem is that \TeX{} doesn't remember the +name of the file being read. \verb+\jobname+ contains the name of the +top-level \texttt{.tex} file, so it doesn't work when that file +\verb+\include+s or \verb+\input+s subfiles containing \texttt{code}. The +\textsf{codep} package thus modifies the \verb+\InputIfFileExists+ command to +save the file name to the macro \verb+\codep@code@@inputfile+ if the +extension is \texttt{.tex}. (The other most common extension after the preamble is +\texttt{.fd}: such a file is loaded each time a \LaTeX{} font that has not +been used yet is selected.) The implicit limitation here that \texttt{code} +won't work unless the extension of the file included is \texttt{.tex}. +Hooking \verb+\InputIfFileExists+ affects \verb+\include{...}+ and +\verb+\input{...}+, but not not \verb*+\input ...+, \verb+\documentclass+ or +\verb+\usepackage+. This is not a problem if the author remember that he has +to use braces around the file name. + +Since there is no hook for \verb+\endinput+ (and some packages rely on that +\verb+\endinput+ is an expandable primitive), it is not possible to set up a +stack of names of files being read. Thus, if file $A$ has included file $B$, +an after that \texttt{code} environment placed in $A$ will not work, because +the declaration line read by \textsf{wrfiles.pl} will contain the name of $B$ +instead of $A$. This is not a serious limitation, becase files including +other files usually don't typeset text by themselves after the inclusion. + +The primary reason why \textsf{wrfiles.pl} needs the \texttt{.aux} +file is that it has to embed the page and chapter numbers into the file +names. Although \textsf{wrfiles.pl} could find the source file with the +\texttt{code} environments by trying to match line numbers with all source +files in the current directory, we have decided to make it fail when the file +name is not emitted properly into the declaration, so it is sure that the +examples in the book and on the CD are consistent. + + +\section{Future work} + +The most important features to be added and other improvement possibilites: + +\begin{itemize} + +%\item func-tion better hyphenation point in \verb+\Q+ than functi-on +\item a better approach towards automatic hyphenation of inline verbatim, + after studies in typography +\item allow wider sample if source is small enough +\item why doesn't \verb+\selectlanguage+ work inside + \verb+\begin{PSource}[srcstyle=+\allowbreak\verb+leftboth]+ +\item \verb+\PVerb{foo}+ mustn't insert ``$\lnot$'' if foo is at end-of-line +\item \verb+\PVerb{...}+ inner unnested braces (\verb+\futurelet+?) +\item differentiated \verb+\penalty+ values in \verb+\PVerb+ +\item paragraph mode should work with side-by-side displays (of course, + measuring the width of the Source has still to be done in aligned mode) +\item ASCII tabulator (9) characters aren't supported properly, they are just + converted to spaces. The width of the tab character should depend on its + horizontal position in the line. (With \texttt{listings=}, the results are + already correct.) +\item framing and background color support to display verbatim +\item accented characters should work with \textsf{listings} and + \verb+\PexaShowBoth+. The original catcode of \verb+^+ should be kept + so \TeX{} itself would parse the hex escapes. +\item an interface to \verb+\lstinline+ in \textsf{listings}, with line + breaks allowed +\end{itemize} + +\section{Conclusion} + +\textsf{examplep}, as it is now, is a highly customizable \LaTeX{} package +that provides both inline and display verbatim mode with several advanced +features, many of which are not available in any other packages. The +\textsf{code} environment is also provided which can typeset both the Source +and the Sample column of a side-by-side display verbatim from the same +\LaTeX{} source stream, furthermore it can emit the stand-alone working +version of the Source into a CD-file. These features make the \textsf{code} +environment especially useful for sofware textbook and manual authoring. The +whole \textsf{examplep} distribution is under the GNU GPL, and it is freely +available from CTAN. An earlier version of the packages was used to typeset +all the examples in a 770-page introductionary book about \LaTeX{}. + +\textsf{examplep} is not complete. Some important features are not +implemented yet and the package has not been tested thoroughly. Some parts of +the code are really ugly, partially because it has not been polished up after +writing, and partially because the architecture of \TeX{} and \LaTeX{} +doesn't provide an elegant way to address the problem. For example, active +characters are overloaded: they are used by \textsf{inputenc}, \textsf{babel} +(shorthands) and \textsf{listings} (syntax highlighting) for different +purposes -- these packages have to make extra effort to cooperate with each +other. We hope that \TeX's successors will improve these +conditions, and the core system will provide a generic way to tokenize +verbatim text instead of changing catcodes. + +\iffalse +\bibliographystyle{plain} +\bibliography{eurotex_2005_examplep} +\else +\begin{thebibliography}{1} + +\bibitem{listings} +Carsten Heinz. +\newblock {\em The \textsf{Listings} Package}, 7~September 2004. +\newblock \\CTAN:\texttt{macros/latex/contrib/listings/listings-1.3.dtx}. + +\bibitem{binhex} +David Kastrup. +\newblock {\em The \texttt{binhex.tex} package for expansible conversion into + binary-based number systems}, 2001. +\newblock \\CTAN:\texttt{macros/generic/kastrup/binhex.dtx}. + +\bibitem{texbook} +Donald~E. Knuth. +\newblock {\em The {{\TeX}book}}. +\newblock Addison--Wesley, 1984. + +\bibitem{lakk} +Ferenc Wettl, Gyula Mayer, and P\'eter Szab\'o. +\newblock {\em {\LaTeX} k\'ezik\"onyv}. +\newblock Panem, Budapest, 2004. + +\bibitem{fancyvrb} +Timothy~Van Zandt, Denis Girou, and Sebastian Rahtz. +\newblock {\em The `\textsf{fancyvrb}' package. Fancy Verbatims in \LaTeX{}}, + 1998. +\newblock \\CTAN:\texttt{macros/latex/contrib/fancyvrb/fancyvrb.dtx}. + +\end{thebibliography} +\fi + +\end{document} diff --git a/macros/latex/contrib/examplep/examplep.sty b/macros/latex/contrib/examplep/examplep.sty new file mode 100644 index 0000000000..5b32ccc971 --- /dev/null +++ b/macros/latex/contrib/examplep/examplep.sty @@ -0,0 +1,2418 @@ +% +% examplep.sty -- typesetting verbatim TeX code and examples +% by pts@fazekas.hu at Sat Sep 27 23:58:14 CEST 2003 +% -- Sun Sep 28 23:38:37 CEST 2003 +% ligatures broken -- Tue Sep 30 19:14:11 CEST 2003 +% examplep.sty at Fri Oct 24 10:25:27 CEST 2003 +% options and misc stuff at Fri Oct 24 22:23:06 CEST 2003 +% xalign=, yalign= fixes, *-test.tex at Wed Dec 24 02:33:24 CET 2003 +% baseline-grid=, fixes at Wed Feb 25 23:37:41 CET 2004 +% +% This is a LaTeX package that provides following features: +% +% -- a robust \PVerb macro comparable to the LaTeX \verb macro +% -- \begin{PSource} comparable to the LaTeX \begin{verbatim} environment +% -- \begin{WSource} comparable to \begin{verbwrite} in sverb.sty +% and \begin{filecontents} of latex.ltx +% -- \begin{PWSource} combining \begin{PSource} and \begin{WSource} +% -- \begin{PexaMiniPage} comparable to the LaTeX \begin{minipage} environment +% -- \PexaShowBoth that typesets LaTeX code, and also shows it verbatim; +% facing and page breaks enabled (!) +% -- Package load options can be specified \usepacakge[...]{examplep} +% +% See samplewidth= in this file for the load option defaults. Use +% \PexaDefaults{...} instead of \usepackage[...]{examplep} to specify +% complicated options such as linenumberformat={...} (this is a LaTeX kernel +% limitation.) +% +% !! func-tion better hyphenation point in \Q than functi-on +% !! after \end{PSource} in pts_diploma.tex, don't require \noindent +% !! option to emit tabs as spaces +% !! allow wider Source if Sample is small enough +% !! \ifnum0=`{\fi} and similar tricks for \halign? +% !! magyarldf-doc.tex infinite bug +% !! why is it called twice? +% \def\pexa@cverb@@verbatimfont{u\normalfont\ttfamily +% \hyphenpenalty10000 } +% !! why doesn't \selectlanguage works inside \begin{PSource}[srcstyle=leftboth] +% !! \PVerb{foo} mustn't insert $\lnot$ if foo is at EOL +% !! \ifvmode testing for \PSource +% !! \PVerb{...} inner unnested braces (\futurelet?) +% !! \penalty in \PVerb +% !! \pexa@ss@left etc. should work with \PexaShowBoth (not for measuring) +% !! \@afterindenttrue etc. +% !! ASCII tab (9) characters aren't supported properly +% !! \begin{PSource} says 'Missing $ inserted.' in magyarldf-doc.tex: +% \begin{PSource}[srcstyle=leftboth] +% \grq~\glq~\glqq~\grqq~\flq~\frq~\flqq~\frqq\\ +% \textquoteright~\textquotedblright\\ +% \textquoteleft~\textquotedblleft\\ +% \end{PSource} +% Dat: multiple spaces count inside \PVerb+...+, even at line break +% Dat: it is impossible to indent the first line via \begin{WSource} etc., +% because verbfwr.sty chops heading spaces +% Dat: 5000..9999 lines of \halign containing only `(9999)\hfil\cr' will fill +% up TeX's memory (! TeX capacity exceeded, sorry [main memory size=263001].), +% so text fed to \PexaShowBoth shouldn't exceed 375 lines (with an +% average line length of 80 characters) +% Imp: page breaks near \FBHLastDepth put a too tall \vrule on next page +% + +\NeedsTeXFormat{LaTeX2e} +\ProvidesPackage{examplep}[2010/02/03 v0.04 Verbatim and typeset TeX code] + +\@ifundefined{XeTeXinputencoding}{}{\XeTeXinputencoding "cp1250" } + +\edef\pexa@@restorecat{\catcode\string``\the\catcode\string``\space} +\catcode\string``12 % may have been changed by Babel +\RequirePackage{verbfwr} + +% --- + +\def\pexa@@samplename{pexa-sam.tex} +\def\pexa@@sourcename{pexa-src.tex} +\let\pexa@@cursourcename\pexa@@samplename + +\def\pexa@dohex#1{% + \if\noexpand#1^% + \expandafter\pexa@dohex@lowa + \else\char"5E \expandafter#1\fi +} + +\def\pexa@dohex@lowa#1#2{% + \if\noexpand#18\pexa@swaprelax{\pexa@dohex@lowc#28}% + \else\if\noexpand#19\pexa@swaprelax{\pexa@dohex@lowc#29}% + \else\if\noexpand#1a\pexa@swaprelax{\pexa@dohex@lowc#2A}% + \else\if\noexpand#1b\pexa@swaprelax{\pexa@dohex@lowc#2B}% + \else\if\noexpand#1c\pexa@swaprelax{\pexa@dohex@lowc#2C}% + \else\if\noexpand#1d\pexa@swaprelax{\pexa@dohex@lowc#2D}% + \else\if\noexpand#1e\pexa@swaprelax{\pexa@dohex@lowc#2E}% + \else\if\noexpand#1f\pexa@swaprelax{\pexa@dohex@lowc#2F}% + \else\if\noexpand#1I\pexa@swaprelax{\pexa@dohex@lowc90#2}% tab: \t; Imp: better !! no #2, neither in \char "5E + \else\char"5E \pexa@swaprelax{\pexa@dohex#1#2}% + \fi\fi\fi\fi\fi\fi\fi\fi\fi\relax +} +\def\pexa@dohex@lowb#1{% + \if\noexpand#1aA% + \else\if\noexpand#1bB% + \else\if\noexpand#1cC% + \else\if\noexpand#1dD% + \else\if\noexpand#1eE% + \else\if\noexpand#1fF% + \else#1\fi\fi\fi\fi\fi\fi +} +\def\pexa@dohex@lowc#1#2{% + \ifnum\catcode"#2\pexa@dohex@lowb#1=13{\lccode`\~="#2\pexa@dohex@lowb#1\lowercase{~}}% + \else{\lccode`\+="#2\pexa@dohex@lowb#1\lowercase{+}}\fi% +} +%** Usage: \begin{PWSource}[OPTIONS]...\end{PWSource}. Writes everything (...) +%** into file \pexa@@sourcename, and also typesets it with \PexaShowSource +%** Dat: everything after \end{PWSource} in its line will be ignored +%** Dat: ^^ab hex codes >=128 will be substituted in \input (by \pexa@dohex) +%** Dat: ^^I etc. hex codes will be left alone +%** Dat: spaces at EOL will be lost (this is a limitation of TeX's eyes), so +% will be contents of lines with spaces only. This limitation is true +% for all environments in this file. +%** Dat: if `[OPTIONS]' is missing, then all spaces +\def\PWSource{% + \let\pexa@@savepar\par + \catcode`\ =12 \let\par\relax \obeylines% ugly hack so \@ifnextchar won't gobble spaces or newlines + \@ifnextchar[\pexa@PWSource{\pexa@PWSource[]}}%] +\def\pexa@PWSource[#1]{% + \def\pexa@@envopts{#1}% + \global\let\pexa@@cursourcename\pexa@@sourcename + \immediate\openout\verbfwr@writefile\pexa@@cursourcename\relax + \let\verbfwr@writecs\verbfwr@writefile + \let\verbfwr@actwriteline\verbfwr@writeline + \let\par\pexa@@savepar % so we won't get an infinite loop + \verbfwr@default@acts + \verbfwr@readenv\verbfwr@write + % Don't put anything else here! +} +\def\endPWSource{% + \immediate\closeout\verbfwr@writefile + \expandafter\PexaShowSource\expandafter{\pexa@@envopts}% use defaults +} + +%** Writes its contents to file \pexa@@samplename and sets +%** \pexa@@cursourcename to \pexa@@samplename +%** Usage: \begin{WBoth}...\end{WBoth}. `...' is LaTeX source that can +%** be typeset verbatim or later \input into the middle of the document. See +%** the docs for \begin{PWSource} for more details. +\def\WBoth{% + \global\let\pexa@@cursourcename\pexa@@samplename + \immediate\openout\verbfwr@writefile\pexa@@samplename\relax + \let\verbfwr@writecs\verbfwr@writefile + \let\verbfwr@actwriteline\verbfwr@writeline + \verbfwr@default@acts + \verbfwr@readenv\verbfwr@write% finish this \cs here +} +\def\endWBoth{\immediate\closeout\verbfwr@writefile} +%** Similar to \begin{WBoth} (see docs there), but writes its contents to +%** file \pexa@@samplename. +\def\WSample{% + \immediate\openout\verbfwr@writefile\pexa@@samplename\relax + \let\verbfwr@writecs\verbfwr@writefile + \let\verbfwr@actwriteline\verbfwr@writeline + \verbfwr@default@acts + \verbfwr@readenv\verbfwr@write% finish this \cs here +} +\let\endWSample\endWBoth +%** Similar to \begin{WBoth} (see docs there), but writes its contents to +%** file \pexa@@sourcename (and sets \pexa@@cursourcename to it). +\def\WSource{% + \global\let\pexa@@cursourcename\pexa@@sourcename + \immediate\openout\verbfwr@writefile\pexa@@sourcename\relax + \let\verbfwr@writecs\verbfwr@writefile + \let\verbfwr@actwriteline\verbfwr@writeline + \verbfwr@default@acts + \verbfwr@readenv\verbfwr@write% finish this \cs here +} +\let\endWSource\endWBoth + +%** Everything is ignored between \begin{PIgnore}...\end{PIgnore}. The trailing +%** Everything in the line of \end{PIgnore} is ignored, even chars after it. +%** `...' may contain unnested braces, groups or \ifs. +\def\PIgnore{% + \verbfwr@default@acts + \let\verbfwr@actemitline\@gobble + \verbfwr@readenv\verbfwr@write% finish this \cs here +} +\let\endPIgnore\endWBoth + +%** Usage: \begin{PSource}[OPTIONS]...\end{PSource}. Same as \begin{PWSource}, +%** but doesn't write anything to a file, so it is a little faster. Also, a +%** little more stable, since ^^ab hex codes aren't involved. +\def\PSource{% + \catcode`\ =13 \let\par\@@par \obeylines% ugly hack so \@ifnextchar won't gobble spaces or newlines + \@ifnextchar[\pexa@PSource{\pexa@PSource[]}}%] +\def\endPSource{\pexa@@undoyindent} +%\def\verbfwr@readenv@ii#1\hfuzz{{\end.}{\end{#1}}}% !! +\def\pexa@PSource[#1]{% + \pexa@doopts{#1}% + \expandafter\expandafter\expandafter\pexa@plines@start + \expandafter\verbfwr@readenv@i\@currenvir\hfuzz% +}% +\def\pexa@plines@notverbatim{% + %\catcode`~=13 %\def~{\nobreakspace{}}% + \catcode`\ =10 % restore to be space + \let\pexa@setupverb\relax% call this before \pexa@setupverb + \let\pexa@default@verbatimfont\relax + \def\verbfwr@read##1##2##3{\verbfwr@noter@read0}% +} +\def\pexa@plines@expandeach#1{% + \expandafter\def\expandafter\reserved@a\expandafter{% + \expandafter\relax + \pexa@@eachline{#1}\cr}% +} +%** @param #1 `\end{PSource}' in catcode 12 +%** @param #2 `\end {PSource}' with normal catcodes +\def\pexa@plines@start#1#2{% + \def\pexa@@starthalign{}% + \def\pexa@@dohalign{}% + %** Must be fully expandable. + \let\pexa@@eachline\@firstofone + %%\show\pexa@default@srcstyle + \expandafter\ifx\csname pexa@ss@\pexa@default@srcstyle\endcsname\relax + \def\verbfwr@actemitlineone{% not called if there are no lines! + \let\verbfwr@actemitlineone\@empty + \pexa@starthalign% one @ + \pexa@@beforefirstline + \noalign\bgroup + }% + \def\verbfwr@actemitline##1{% get line in \VerbFwrLines + %\edef\reserved@a{\def\noexpand\VerbFwrLines{\noexpand\pexa@@eachline{\VerbFwrLines}}}% + %\expandafter\egroup\reserved@a% \noalign, pass \VerbFwrLines inside the column + %\relax\VerbFwrLines\cr%\relax<.\VerbFwrLines.>\cr% + % vvv This solution makes it possible for \pexa@@eachline to contain `&' + % vvv Dat: a beginning \edef\reserved@a{\relax...} is necessary to prevent + % TeX looking for \span, \omit etc. + %\edef\reserved@a{\relax\expandafter\pexa@@eachline\expandafter{\VerbFwrLines}\cr}% + \expandafter\pexa@plines@expandeach\expandafter{\VerbFwrLines}% + \expandafter\egroup\reserved@a% \noalign, pass \VerbFwrLines inside the column + % + \noalign\bgroup + }% + \def\verbfwr@actemitdone{% called if there were no lines + \ifx\verbfwr@actemitlineone\@empty + \egroup% \noalign + \egroup% \halign + \fi + }% + \expandafter\let\expandafter\pexa@plines@@setup\csname pexa@sh@\pexa@default@srcstyle\endcsname% this sets up further \catcodes + \else + %\expandafter\pexa@setup@calcwidths\expandafter{\pexa@default@usewidth}% + % Dat: no need to save/restore \parindent here, becasuse we do \noindent + \def\verbfwr@actemitlineone{\let\verbfwr@actemitlineone\@empty}% + \let\verbfwr@actemitdone\@empty + \def\verbfwr@actemitline##1{\expandafter\pexa@plines@parpre\expandafter\pexa@@eachline\expandafter{\VerbFwrLines}\@@par}% + \expandafter\let\expandafter\pexa@plines@@setup\csname pexa@ss@\pexa@default@srcstyle\endcsname% this sets up further \catcodes + \everypar{}% + % Dat: too early to set \hsize now + \let\pexa@@dopars\@empty + \fi + % + % vvv Similar to \PexaShowSourceMany + %\leavevmode% for \@bsphack + %\@bsphack% don't have to save \spacefactor + \let\par\@@par% make \vskip work fine?? + \expandafter\pexa@setup@calcwidths\expandafter{\pexa@default@usewidth}% + \begingroup + \pexa@@calcwidths% calculate leftmost \tabskip + \@tempdima\PexaWidth + \advance\@tempdima\tabskip + \edef\reserved@a{\def\noexpand\pexa@@tolinewidth{to\the\@tempdima}}% + \expandafter\endgroup\reserved@a + %\advance\linewidth\@totalleftma + %\def\pexa@@tolinewidth{to\linewidth}% + % + \pexa@xyindent\pexa@default@xindent\pexa@default@yindent + % \pexa@plines@notverbatim + \pexa@plines@@setup + % ^^^ calls \pexa@s?@..., which calls \pexa@show@pars or \pexa@show@halign, + % which calls \pexa@setupverb and \pexa@@calcwidths, which modifies + % \tabskip and \linewidth + \advance\leftskip-1\leftskip% keep stretch + \advance\rightskip-1\rightskip% keep stretch + %\leftskip\z@skip \rightskip\z@skip % Dat: needed by \begin{egysoros} -- why?? + %\advance\hsize\rightskip + %\showthe\hsize + %\showthe\leftskip + %\showthe\rightskip + \let\par\@@par \obeylines + \verbfwr@read{#1}\@gobble{% read verbatim data line-by-line, call \verfwr@act... as callbacks + %\@esphack + #2% + }% + % Don't put anything else here, will be read by \verbfwr@read +} +% vvv Dat: \leavevmode would insert \indent and cancels \noindent +% vvv Dat: \null is needed for empty lines with no \catcode change for ^^M +\def\pexa@plines@parpre{\pexa@@vts\noindent\null + \kern\tabskip% !! added at Tue May 18 11:14:58 CEST 2004; for \begin{PSource} in \begin{description}; does it hurt lakk?? + \pexa@@everyparr}% + +% --- Adding accents and breaking ligatures + +\edef\pexa@quoteleft {\relax\string`} +\edef\pexa@quoteright{\relax\string'} +\edef\pexa@hyphen {\relax\string-\relax}% +\edef\pexa@comma {\relax\string,} +\edef\pexa@less {\relax\string<} +\edef\pexa@greater {\relax\string>} +\let\pexa@@oldH\H% default +\let\pexa@@olddot\.% default +\def\pexa@@otone{OT1} +\def\pexa@H#1{% \H accent missing from {OT1}{cmtt} + \ifx\f@encoding\pexa@@otone% Imp: don't hard-wire cmr?? + \pexa@curprop\iftrue% + \pexa@@oldH#1% + \else% + \pexa@add@accentx{125}{\fontencoding{OT1}\fontfamily{cmr}\selectfont}#1% not expandable + \fi% + \else% + \pexa@@oldH#1% {T1}{cmtt} is OK + \fi% +}% +\def\pexa@dot#1{% \. accent missing from {OT1}{cmtt} + \ifx\f@encoding\pexa@@otone% + \pexa@curprop\iftrue% + \pexa@@dot#1% + \else% + \pexa@add@accentx{95}{\fontencoding{OT1}\fontfamily{cmr}\selectfont}#1% not expandable + \fi% + \else% + \pexa@@olddot#1% {T1}{cmtt} is OK + \fi% +}% +%** Derived from LaTeX \add@accent +%** @param #1 0..255 code of the accent +%** @param #2 commands to load the accent font +%** @param #3 char to put the accent on +\def\pexa@add@accentx#1#2#3{\hmode@bgroup + \let\hmode@start@before@group\@firstofone + \setbox\@tempboxa\hbox{% + #3\global\mathchardef\accent@spacefactor\spacefactor}% + \edef\@thefont{\the\font}% + #2% select font + \accent#1% + \@thefont#3% + \egroup\spacefactor\accent@spacefactor +} + +\def\pexa@@zero{0} +%** `\pexa@curprop\iftrue' behaves like `\iftrue' if the current font is +%** proportional; or `\iffalse' if the current font is fixed-width. +%** Cannot create an `\ifpexa@curprop' macro, since it won't be treated properly +%** when skipped (only \let\ifpexa@curprop\iffalse and \let\ifpexa@curprop\iftrue +%** is treated properly). +%** Ruins \reserved@a +%** Imp: better in pexample.sty +\def\pexa@curprop#1{% + \expandafter\let\expandafter\reserved@a\csname prop@\fontname\font\endcsname + \ifnum10>1\reserved@a% no ` %' here; calculate \reserved@a for the first time + \def\reserved@a{1}% \let\reserved@a0 won't work with `\ifnum' + \ifdim\fontdimen3\font=\z@ + \ifdim\fontdimen4\font=\z@ + \begingroup + \setbox0=\hbox{i}% + \setbox1=\hbox{W}% + \ifdim\wd0=\wd1 % + \aftergroup\let\aftergroup\reserved@a\aftergroup\pexa@@zero% found a fixed-width font + \fi + \endgroup + \fi + \fi + \expandafter\let\csname prop@\fontname\font\endcsname\reserved@a + \fi + \csname if\if\reserved@a0false\else true\fi\endcsname +}% + +% --- + +%** Acts based on usewidth= +%** @in \linewidth already decreased by \@totalleftmargin and total_right margin +%** @out \PexaWidth = source+rule+sample a dimen register or tokens ending +%** by space `1.2pt '; \PexaWidth doesn't contain left or right indentation +%** @out \pexa@@calcwidths to set \tabskip to point to final left margin +%** to decrease \linewidth by some margins +%** Modifies \linewidth: decreases by \leftskip +%** @param #1 value of \pexa@default@usewidth: 0, 1 or 2 +\def\pexa@setup@calcwidths#1{% + \if#12% usewidth=skipwidth + \begingroup + \@tempdimb\linewidth + % Dat: we definitely mustn't do \advance\@tempdimb-\@totalleftmargin, + % because \linewidth has never contained the value of \@totalleftmargin + \advance\@tempdimb-\rightskip \advance\@tempdimb-\leftskip + \edef\PexaWidth{\def\noexpand\PexaWidth{\the\@tempdimb\space}}% + \expandafter\endgroup\PexaWidth + % Dat: we really don't want to say \let\PexaWidth\@tempdimb here, because + % \small in \pexa@defaut@verbatimfont will clobber it later + \def\pexa@@calcwidths{% + % vvv this is called in \pexa@show@halign to set the left margin properly + \tabskip\leftskip \advance\tabskip\@totalleftmargin + %\advance\linewidth-\@totalleftmargin% BUGFIX at Tue Dec 23 19:55:06 CET 2003 -- fixes \PexaShowBoth + %\advance\linewidth-\leftskip% Dat: enabling this makes \begin{egysoros} buggy (too narrow line). BUGFIX at Tue Mar 30 17:40:50 CEST 2004 + %\advance\linewidth-\rightskip% !! is this used? and below? (two) + }% + \else\if#11% usewidth=linewidth + \let\PexaWidth\linewidth + \def\pexa@@calcwidths{\tabskip\@totalleftmargin + %!!\advance\linewidth-\@totalleftmargin% BUGFIX at Tue Dec 23 19:55:06 CET 2003 -- fixes \PexaShowBoth + }% + \else% usewidth=hsize + \let\PexaWidth\hsize + \def\pexa@@calcwidths{\tabskip\z@ \let\linewidth\hsize}% + \fi\fi +} + +\def\PexaShowSample#1{% + \begingroup + \pexa@doopts{#1}% + % vvv Dat: may contain .45\PexaWidth + % \expandafter\@temptokena\expandafter{\pexa@default@samplewidth}% + % !! test this + \@tempdimb\PexaWidth\relax + \let\PexaWidth\@tempdimb + \@tempdima\pexa@default@samplewidth\relax% do arithmetic: .5\PexaWidth + \edef\PexaWidth{\the\@tempdimb\space}% + \edef\reserved@a{\noexpand\PexaShowSampleMany + {\the\@tempdima}% 1 + {\pexa@default@boxstyle}% 2 + }% + %%\show\reserved@a + \expandafter\endgroup\reserved@a +}% + +%** Shows the Sample in lines on their own. Page breaks disallowed. +%** @param #1 dimen: width of Sample (\hsize, paragraph width). Examples: .4\hsize >= .4\linewidth +%** @param #2 boxing style of Sample: +%** `h': \hbox +%** `v': \vtop +%** 'm': is minipage with \vtop +%** 'p': is PexaMinipage with \vtop (recommended) +%** `V': \vbox +%** 'M': is minipage with \vbox +%** 'P': is PexaMinipage with \vbox +%** 'G': no boxing, only \begingroup .. \endgroup +\def\PexaShowSampleMany#1#2{% + \if#2G\else + \if#2h\else + \vskip\z@skip% leave horizontal mode + \fi\fi + \csname pexa@setsample@#2\endcsname{#1}% +} + +% --- + +\def\pexa@@tolinewidth{to\PexaWidth} +\def\pexa@@calcwidths{} +%** Default: align left +\def\pexa@@preamble{##\hfil\tabskip\z@ plus1fill} +\def\pexa@@preamblecr{\cr}% or {\cr\noalign{\nobreak}} +%** Don't allow a page break before Sample is over +\def\pexa@preamblecr@keep{\cr\noalign{% + \ifdim-\pexa@@cnta\baselineskip<\@tempdima\nobreak\fi}}% +%** Default +\let\pexa@@beforehalign\@empty +\let\pexa@@firstlinebeg\@empty +\let\pexa@@beforefirstline\@empty +\def\pexa@default@addlinenum{0}% start line numbering from \pexa@default@addlinenum+1 +\def\pexa@@cnta{0}% +\let\pexa@@cntb\pexa@default@addlinenum% default +%** Contains width of linenumbersep=, too +\def\pexa@default@linenumberwidth{0pt}% +%** Better than `~', because not affected by amsxtra.sty's redefinition. +\def\pexa@default@space{\leavevmode\nobreak\ }% +%** @example \enspace, \quad, \hbox{\space} etc. +%** @example \def\pexa@default@linenumberwidth{\parindent} \def\pexa@default@linenumbersep{\enspace}% +\def\pexa@default@linenumbersep{}% +%** No effect, will be overridden later. +\def\pexa@default@linenumberformat{} + +%** Clobbers \@tempcnta. \gdef#1 +%** @param #1 a macro \cs name expanding to a number +\def\pexa@decr#1{\@tempcnta#1\advance\@tempcnta\m@ne\global\edef#1{\the\@tempcnta}} + +%** A tab is really more complicated than 8 spaces, but correct tabbing would +%** be hard to implement here. +\def\pexa@setuptab{% + \catcode9 13 \begingroup\lccode`~=9 \lowercase{\endgroup\def~}{\ \ \ \ \ \ \ \ }% +} + +%** Called by \begin{PLines}, \PexaShowBoth, \PVerb etc. +\def\pexa@setupverb{% + \ifnum\the\catcode`^=13 % already active, is \pexa@dohex + \let\do\@makeother \dospecials + \catcode`^=13 + \else + \let\do\@makeother \dospecials% \catcode`\\=12 etc. (see latex.ltx for \dospecials) + \fi + % Dat: `latex --translate-file il1-t1' emits accented glyph to file as a single char + % ^^^ Dat: don't modify catcode of 127..255, so accents will come out right + \catcode`\ =13 \lccode`~=32 \lowercase{\let~\pexa@default@space}% make each space count, but not a visible space -- \@xobeysp defined in latex.ltx + % ^^^ Dat: former \let~\@xobeysp + % Common ligatures in monospaced fonts: `` '' ,, -- -Z << >> !` ?` (where Z has ASCII code 127) + % Dat: compare this code with \@noligs of latex.ltx -- this is more efficient + % vvv Dat: this has no effect on \pexa@cverb@outerc (and neither on inner + % \PVerb), but that is hoped to have its \break{}s already separating. + \catcode``13 \lccode`~``\lowercase{\let~\pexa@quoteleft}% break Spanish ?` and !` ligatures in cmtt10.mf (and also the '' ligature in) + \catcode`-13 \lccode`~`-\lowercase{\let~\pexa@hyphen}% break ligatures --, --- and -Z (where Z has ascii code 127) + \catcode`'13 \lccode`~`'\lowercase{\let~\pexa@quoteright}% break ligature '' + \catcode`,13 \lccode`~`,\lowercase{\let~\pexa@comma}% break ligature ,, + \catcode`<13 \lccode`~`<\lowercase{\let~\pexa@less}% break ligature << + \catcode`>13 \lccode`~`>\lowercase{\let~\pexa@greater}% break ligature >> + % + \let\pexa@@oldH\H \let\H\pexa@H% + \let\pexa@@olddot\.\let\.\pexa@dot% +} +%** Not \pexa@default@verbatimfont. This is used by load options to +%** examplep.sty +\def\pexa@@verbatimfont{\verbatim@font}% in latex.ltx +\def\pexa@setupverb@read{% + \catcode`\^13 \lccode`~`^\lowercase{\let~\pexa@dohex}% Dat: allow ^^e1 hex emulation (setting catcode=7 won't do good because of literal `^'s) +} +\def\pexa@starthalign{% + %\zzzzz\show\pexa@@tolinewidth\showthe\PexaWidth + \halign\pexa@@tolinewidth\bgroup + \pexa@@vts% run only once + \pexa@decr\pexa@@cnta + \pexa@decr\pexa@@cntb% must be \global because of \halign, but don't want to clobber \@tempcnt* \global{}ly + \span\pexa@@preamble % expand preamble right now: `##\hfil' + \cr% Dat: \pexa@@preamblecr isn't called _before_ the 1st line +}% +\def\pexa@@starthalign{\pexa@starthalign}% +\def\pexa@@dohalign{% + \pexa@@beforefirstline% called after the \cr of the preamble, should contain \noalign{...} + %\relax\pexa@setupverb@read% Dat: already called + \relax\input\pexa@@cursourcename\space + % ^^^ Dat: \relax instead of \space would begin an extra line and demand + % an extra \cr (at end) + \egroup% terminate \halign +}% +%** Call this inside \begingroup, from a macro +%** Caller may set \pexa@@beforehalign, \tabskip; should pexa@@ +\def\pexa@show@halign{% + \pexa@setupverb + \pexa@setuptab + \pexa@default@verbatimfont + \let\par\pexa@@preamblecr \obeylines% must set \par before this; so each ^^M will emit a \cr plus more + \def\pexa@@vts{% + \pexa@@firstlinebeg + %\vrule height\topskip width\z@ %!! try to do without this + \global\let\pexa@@vts\relax + }% + \pexa@@calcwidths + \pexa@@beforehalign + % Dat: \everypar{...} has no effect here (inside \halign) + \pexa@@starthalign + \pexa@@dohalign +} +\def\pexa@@dopars{% doesn't called by \begin{egysoros}, called by \begin{code} + \begingroup% Dat: don't do a \vbox, because it resets \parshape + \everypar{% + \setbox0\lastbox% remove \indent since \noindent is too late + \pexa@@vts\pexa@@everyparr}% + %\showthe\linewidth + %\showthe\leftskip + \hsize\linewidth + \advance\hsize\leftskip% !! already done by \pexa@show@pars?? -- maybe fixup after hook? + \advance\hsize\rightskip + \pexa@setupverb@read + \relax\input\pexa@@cursourcename\space + \endgroup +}% +\def\pexa@show@pars{% modelled after \pexa@ss@left + \pexa@setupverb% Dat: we still have normal catcodes for \dospecials before calling this + \pexa@setuptab + %\showthe\catcode9 + %\show\pexa@default@verbatimfont + \pexa@default@verbatimfont + %\show\pexa@@calcwidths + \parfillskip\@flushglue + \parskip\z@skip + % + \pexa@@calcwidths% doesn't always change \linewidth; sets \tabskip + % Dat: now \tabskip is the left indentation and \linewidth is the desired + % width of text. From that we calculate \leftskip and \hsize. + \leftskip\tabskip% as calculated by \pexa@@calcwidths + \hsize\linewidth% !! \PexaWidth?, respect \leftskip etc. (\pexa@setup@calcwidths) + \advance\hsize\leftskip + \advance\hsize\rightskip + %\leftskip0pt + %foo\par + %\show\leftskip \showthe\leftskip + % + % Dat: don't change and don't use \parindent + \def\par{\hskip\z@skip\@@par}% obey empty lines + \obeylines + \def\pexa@@vts{% + \pexa@@firstlinebeg + %\vrule height\topskip width\z@% superfluous, ruins \baselineskip + \global\let\pexa@@vts\relax + }% + %\show\leftskip \showthe\leftskip + \pexa@@showparshook % \raggedright etc. + % Dat: \pexa@@dopars is empty for \begin{egysoros}, not empty for \begin{code} + \pexa@@dopars +} + +\def\pexa@@showparshook{} +% Dat: used by source-par-align= +% Dat: \centering, \raggedright and \raggedleft clobbers these: +% \\, \rightskip, \leftskip, \parindent, \parfillskip, \@rightskip. +% We ignore \\, \parindent and \@rightskip, we have to modifye (but not +% clobber) \rightskip, \leftskip and \parfillskip only. So we have our +% own macros. +\def\pexa@paralign@center{% similar to \centering + \leftskip 1\leftskip plus 1fil\relax + \rightskip1\rightskip plus 1fil\relax + \parfillskip\z@skip} +\def\pexa@paralign@left{% similar to \raggedright + % Dat: \leftskip and \rightskip are cumulative + \leftskip 1\leftskip\relax + \rightskip1\rightskip plus 1fill\relax + \parfillskip\z@skip}% + %\parfillskip\@flushglue}% Imp: is \@flushglue better here for the line breaking algorithm? +\def\pexa@paralign@right{% similar to \raggedleft + \leftskip 1\leftskip plus 1fil\relax + \rightskip1\rightskip\relax + \parfillskip\z@skip} +\def\pexa@paralign@justify{% last line left aligned, others justified + \leftskip 1\leftskip\relax + \rightskip1\rightskip\relax + \parfillskip\@flushglue} +\def\pexa@paralign@justjust{% all lines justified => lot of Underfull \hbox{}es + \leftskip 1\leftskip\relax + \rightskip1\rightskip\relax + \parfillskip\z@skip} + +%** readded at Thu Dec 21 19:02:12 CET 2006 +%** @param #1 filename +%** @param #2 options +\def\PexaInputSource#1#2{% + \begingroup + \edef\pexa@@cursourcename{#1}% + \PexaShowSource{#2}% + \endgroup +} + +%** @param #1 options +%** Dat: not affected by samplewidth= +\def\PexaShowSource#1{% + \clubpenalty\@clubpenalty % allow club lines after \paragraph{x}y\par + \begingroup + \pexa@doopts{#1}% + \edef\reserved@a{\noexpand\PexaShowSourceMany + {\pexa@default@srcstyle}% 1 + {\pexa@default@usewidth}% 2 + {\pexa@default@xindent}% 3 + {\pexa@default@yindent}% 4 + }% + \expandafter\endgroup\reserved@a +} +%** Show the source of the previous \begin{WSource} / \begin{WBoth}, +%** @param #1 source display style: +%** `left': aligned to the left margin +%** `center': center aligned (individual lines left aligned) +%** `right': right aligned (individual lines left aligned) +%** `leftnum': left aligned with left aligned line numbering +%** `leftnumcol': right flushed line numbering . left flushed source line +%** `leftnumhang': marginpar-hanging line numbering . left flushed source line +%** `leftboth': similar to \PexaShowBoth, but uses \PVerb (works only with \PSource) +%** `leftleft': two columns, left aligned with a \pexa@@vrule (works only with \PSource) +%** @param #2 width selector: `0': use full \hsize, `1': use \linewidth only, +%** `2': use \linewidth-\leftskip-\rightskip (because of \narrower) +%** @param #3 xindent: `none' | `deeper' | `narrower' | `deepright' +%** @param #4 yindent: `none' | `deeper' +\def\PexaShowSourceMany#1#2#3#4{% + \pexa@setup@calcwidths{#2}% + \begingroup + \pexa@xyindent{#3}{#4}% + % Dat: we don't need \pexa@@calcwidths now, it will be called later. + %\pexa@@calcwidths % \leftskip, \@totalleftmargin -> \tabskip + %\showthe\tabskip + \expandafter\ifx\csname pexa@ss@#1\endcsname\relax + \csname pexa@sh@#1\endcsname% do the actual \input + \else\csname pexa@ss@#1\endcsname\fi + \pexa@@undoyindent + \pexa@endparenvgroup +}% + +\def\pexa@movedeeper{% + \ifnum\@listdepth=\z@ \leftmargin\z@ \rightmargin\z@ \fi% remove garbage + \edef\pexa@@restore@xmargins{% + \noexpand\leftmargin \the\leftmargin + \noexpand\rightmargin\the\rightmargin + }% + \ifnum \@listdepth >5\relax + \@toodeep + \else + %\showthe\@listdepth + \global\advance\@listdepth\@ne + \aftergroup\global\aftergroup\advance\aftergroup\@listdepth\aftergroup\m@ne + \fi + \rightmargin\z@ + % vvv defined in size*.clo, sets \leftmargin, \rightmargin, \topsep, \parsep + % \itemsep etc. + \csname @list\romannumeral\the\@listdepth\endcsname + \let\pexa@@oncedeeper\@empty +} + +\let\pexa@@restore@xmargins\@empty + +% The \pexa@doxindent@... commands to the following: +% +% -- clobber \leftmargin and \rightmargin to an unused value +% -- set \parshape\z@ +% -- decrease \linewidth by additional left and right margin +% -- increase \@totalleftmargin by additional right margin +% -- increase \leftskip by more additional left margin +% -- increase \rightskip by more additional right margin + +\def\pexa@doxindent@none{% + %\advance\@totalleftmargin 5pt + \parshape\z@ +}% +\def\pexa@doxindent@deeper{% + \pexa@@oncedeeper + %\showthe\linewidth + %\showthe\rightmargin + % + % vvv do proper Overfull \hbox calculations + % vvv not done by \pexa@@oncedeeper, for \begin{egysoros} at Wed Jul 7 08:20:23 CEST 2004 + \advance\linewidth -\rightmargin + \advance\linewidth -\leftmargin + % + \advance\@totalleftmargin \leftmargin % do indentation + %\advance\leftskip1em + \parshape\z@% \parshape unused, converted to \tabskip +} +%** deeppre: move deeper, but keep old \leftmargin and \rightmargin +\def\pexa@doxindent@deeppre{% + \pexa@@oncedeeper + %\show\pexa@@restore@xmargins + \pexa@@restore@xmargins + % vvv Dat: removed for lakkbook at Fri Mar 26 17:24:23 CET 2004: + % \linewidth and \@totalleftmargin has already been modified; and + % \leftmargin and \rightmargin doesn't count + % !! make it indent with \begin{PSource} -- or =deeper? + \parshape\z@% \parshape unused, converted to \tabskip +} +\def\pexa@doxindent@narrower{\narrower}% +\def\pexa@doxindent@deepright{% + \pexa@@oncedeeper + \rightmargin\leftmargin + \advance\linewidth -\rightmargin + \advance\linewidth -\leftmargin + \advance\@totalleftmargin \leftmargin + \parshape\z@% \parshape unused, converted to \tabskip +} + +\def\pexa@@str@addvspace{\addvspace} +\def\pexa@undo@nobreak{% + \if@nobreak + \@nobreakfalse + \ifnum\clubpenalty=\@M \clubpenalty\@clubpenalty \fi + \fi} +\def\pexa@doyindent@none{\let\pexa@@undoyindent\@empty + \pexa@undo@nobreak + \@endpetrue\@doendpe % automatic \noindent for text coming -- if not separated by newline +}% +\def\pexa@doyindent@deeper{% + \edef\pexa@@restoreleftskip{\leftskip\the\leftskip\space}% + \@rightskip\rightskip + \pexa@@oncedeeper + \@trivlist % calculates \@topsepadd depending on \ifvmode + %\show\par + \global\@newlistfalse + \pexa@undo@nobreak + \let\makelabel\@firstofone + \let\@itemlabel\@empty + \pexa@@restoreleftskip \let\pexa@@restoreleftskip\@undefined + \def\pexa@@undoyindent{% + % Dat: now \pexa@default@addvspace shouldn't contain \addvspace itself. Brr. + %\ifx\pexa@default@addvspace\pexa@@str@addvspace\else + % \let\addvspace\pexa@default@addvspace % used by \@endparenv called from \endtrivlist + %\fi + %\def\@endparenv{% original in latex.ltx + % \addpenalty\@endparpenalty\addvspace\@topsepadd\@endpetrue} + \def\@endparenv{% original latex.ltx + \addpenalty\@endparpenalty + \pexa@default@addvspace@bottom\@topsepadd + \@endpetrue} + \global\@newlistfalse + \endtrivlist}% + %\showthe\@topsepadd + %\show\pexa@default@addvspace@top + %\pexa@default@addvspace@top\@topsepadd % as calculated by \@trivlist + \expandafter\pexa@default@addvspace@top\expandafter{\the\@topsepadd}% !! as calculated by \@trivlist +} + +\def\pexa@sh@left{\pexa@show@halign} +\def\pexa@ss@left{% \begin{egysoros} + \def\pexa@@everyparr{}% + \pexa@show@pars +} +\def\pexa@sh@center{% + \def\pexa@@beforehalign{\advance\tabskip\z@ plus1fill }% + \def\pexa@@preamble{####\hfil\tabskip\z@ plus1fill }% + \pexa@show@halign +} +\def\pexa@sh@right{% + \def\pexa@@preamble{####\hfil\tabskip\z@}% + \def\pexa@@beforehalign{\tabskip\z@ plus1fill }% + \pexa@show@halign +} +%** Similar to .dtx line numbering +\def\pexa@sh@leftnum{% + \def\pexa@@preamble{{\pexa@default@linenumberformat}####\hfil\tabskip\z@ plus1fill }% + \let\pexa@@cntb\pexa@default@addlinenum + \pexa@show@halign +} +% +%** Called from within an alignment (preamble). +\def\pexa@pre@leftboth@do{% + % Dat: \@tempdima has been set by \pexa@@beforehalign to the available + % width for the source + % Dat: \hb@xt@ will emit Overfull \hbox correctly + \if0\pexa@default@allowshrink\setbox0\hb@xt@\@tempdima\bgroup + \else\setbox0\hbox\bgroup\fi + \expandafter\expandafter\expandafter\PVerbOpt + \expandafter\expandafter\expandafter,% + \expandafter\expandafter\expandafter{% + \expandafter\@gobble\reserved@a}% + \hfil + \egroup + \labelsep\FBHLastDepth% Dat: I hope that \labelsep isn't used in \reserved@a + \global\FBHLastDepth\dp0 + \setbox1\hbox{\reserved@a}% just a measurement + \ifdim\FBHLastDepth<\dp1 \global\FBHLastDepth\dp1 \fi + % + % vvv let \vrules meet. Better than \strut + \ifdim\baselineskip>\labelsep + % Dat: safe to modify \@tempdimb here, because we're inside a group of an alignment + \@tempdimb\baselineskip \advance\@tempdimb-\labelsep + \vrule\@height\@tempdimb\@width\z@\space + \fi +} +\def\pexa@pre@leftboth@put{% + \advance\@tempdima-\wd0 + %%\show\pexa@default@allowshrink + \if0\pexa@default@allowshrink\box0 + \else + \unhbox0 + \ifdim\@tempdima>\z@\if2\pexa@default@allowshrink\else + \kern\@tempdima + \null + \fi\fi + \fi +}% +\def\pexa@pre@leftboth@beforehalign{% + %\def~{;;}%\nobreakspace{}}% + \let\\\relax% ignore newlines in sample + \lineskiplimit\z@ \lineskip\z@% !! more liberal, accept negative + \newdimen\FBHLastDepth% for \global + \FBHLastDepth\baselineskip + % + %\show\PexaWidth + \@tempdimb\PexaWidth\relax + \let\PexaWidth\@tempdimb + \@tempdima-\pexa@default@samplewidth\relax% do arithmetic: .5\PexaWidth + \advance\@tempdima\PexaWidth + \edef\PexaWidth{\the\@tempdimb\space}% + %\@tempdima\PexaWidth + %\advance\@tempdima-\pexa@default@samplewidth + \setbox1\hbox{\pexa@@vrule{}}% + \advance\@tempdima-\wd1 + %\hrule height 1pt width 10pt +}% +\def\pexa@sh@leftboth{% + \let\pexa@@beforehalign\pexa@pre@leftboth@beforehalign + \def\pexa@@eachline##1{##1&&##1}% + \def\pexa@@preamble{% + \def\reserved@a{####}% + %\show\reserved@a% + \pexa@pre@leftboth@do + \pexa@pre@leftboth@put + % ^^^ \@gobble removes \relax inserted by \pexa@plines@start + \hfil\tabskip\z@skip& + \pexa@@vrule{}####&% Dat: \copy2 wouldn't work by this time + {####}\tabskip\z@ plus1fill\hfil}% Dat: \selectlanguage inside #### needs an extra {group} + \pexa@plines@notverbatim + \pexa@show@halign +} +% +\def\pexa@pre@leftleft@measure{% + % Dat: \@tempdima has been set by \pexa@@beforehalign to the available + % width for the source + % Dat: \hb@xt@ will emit Overfull \hbox correctly + \setbox0\hbox{\reserved@a}% just a measurement + \ifdim\FBHLastDepth<\dp0 \global\FBHLastDepth\dp0 \fi +}% +\def\pexa@ampersand{&}% +\def\pexa@sh@leftleft{% + \let\pexa@@beforehalign\pexa@pre@leftboth@beforehalign + \def\pexa@@preamble{% + \relax + \ifdim\baselineskip>\FBHLastDepth + % Dat: safe to modify \@tempdimb here, because we're inside a group of an alignment + \@tempdimb\baselineskip \advance\@tempdimb-\FBHLastDepth + \vrule\@height\@tempdimb\@width\z@\space + \fi + % vvv let \vrules meet. Better than \strut + \global\FBHLastDepth\z@ + \def\reserved@a{####}% + \pexa@pre@leftleft@measure \pexa@pre@leftboth@put + \hfil\tabskip\z@skip&\pexa@@vrule{}\pexa@ampersand####&% + \def\reserved@a{####}% + \pexa@pre@leftleft@measure \unhbox0 + \tabskip\z@ plus1fill\hfil}% + \pexa@plines@notverbatim + \pexa@show@halign +} +% +\def\pexa@pre@numcol@eachrow{{\pexa@default@linenumberformat}&}% +\def\pexa@sh@leftnumcol{% + \def\pexa@@preamble{\hfil\pexa@pre@numcol@eachrow####&####\hfil\tabskip\z@ plus1fill }% + \let\pexa@@cntb\pexa@default@addlinenum + \pexa@show@halign +} +% +\def\pexa@sh@leftnumhang{% + \def\pexa@@preamble{\hb@xt@\pexa@default@linenumberwidth{\hss\pexa@default@linenumberformat}####\hfil\tabskip\z@ plus1fill }% + \let\pexa@@cntb\pexa@default@addlinenum + \pexa@show@halign +} +\def\pexa@ss@leftnumhang{% + \def\pexa@@everyparr{% + \pexa@decr\pexa@@cntb + \hb@xt@\pexa@default@linenumberwidth{\hss\pexa@default@linenumberformat}% + } + \let\pexa@@cntb\pexa@default@addlinenum + \pexa@show@pars +} + +%** Default. +%** @param #1 desired height; specified by horizontal neighbours if empty +\def\pexa@@vrule#1{% + %\ifx\hfuzz#1\hfuzz + \kern\tabcolsep + \kern-.5\tabcolsep + \kern-.5\arrayrulewidth + \ifx\hfuzz#1\hfuzz + \vrule\@width\arrayrulewidth + \else + \vrule\@width\arrayrulewidth\@height#1\relax + \fi + \kern-\arrayrulewidth + \kern.5\arrayrulewidth + \kern.5\tabcolsep + %\else + %\fi +} + +%** @param #1 to gobble a space token +\def\pexa@doopt#1,{% + \if,\noexpand#1,% ignore multiple commas (#1 is empty) + \expandafter\pexa@doopt + \else + \csname fi\endcsname% don't count as `\fi' when being skipped + \pexa@doopt@low#1,=,% + \fi +} +\iftrue\csname fi\endcsname% \def\pexa@doopt@low contains `\fi'. Make it skippable. +%** @param #1 is here for gobbling space tokens +%** @param #4 \fi -- will be ignored +\def\pexa@doopt@low#1#2=#3,#4\fi{% + % Dat: Normal case: #1#2 is key, #3 is value, #4 is `=,' + % Dat: MissingArg case: #1#2 is `key,', #3 is empty, #4 is empty + % Dat: Terminator case: #1#2 is `\hfuzz,', #3 is empty, #4 is empty + % Dat: OnlySpace case: #1 is `,', #2 is empty, #3 is empty, #4 is empty + \ifx\relax#4\relax% MissingArg or Terminator + \ifx#1\hfuzz% Terminator + \else + \if,\noexpand#1\else% OnlySpace case + \pexa@doopt@missingval#1#2% #2 already contains comma at end + \fi + \expandafter\expandafter\expandafter\pexa@doopt + \fi + \else% Normal + \expandafter\ifx\csname pexa@opt@@#1#2\endcsname\hfuzz + \expandafter\ifx\csname pexa@opt@@#1#2@#3\endcsname\relax + \PackageError{examplep}{Invalid arg for option: #1#2 = #3}\@ehc + \else + \csname pexa@opt@@#1#2@#3\endcsname + \fi + \else + \expandafter\ifx\csname pexa@opt@@#1#2\endcsname\relax + \PackageError{examplep}{Unknown option: #1#2 (= #3)}\@ehc + \else + \csname pexa@opt@@#1#2\endcsname{#3}% + \fi + \fi + \expandafter\pexa@doopt + \fi +} +\def\pexa@doopt@missingval#1,{% + \PackageError{examplep}{Value (=) missing for option: #1}\@ehc +} +%** Dat: Spaces and newlines at end of #1 are not ignored, so please prefix +%** them with a comma, e.g \pexa@doopts{foo=bar, } +%** @param #1 comma-separated optoinname=value pairs +\def\pexa@doopts#1{\pexa@doopt #1,\hfuzz,}% +\let\PexaDefaults\pexa@doopts + +\def\pexa@opt@@samplewidth#1{\def\pexa@default@samplewidth{#1}}% +\def\pexa@opt@@firstlinenum#1{% + \begingroup\@tempcnta\number-#1\relax + \advance\@tempcnta\@ne + \edef\reserved@a{\def\noexpand\pexa@default@addlinenum{\the\@tempcnta}}% + \expandafter\endgroup\reserved@a +} +%** A dimension. Depth that yalign=v should neglect at the bottom of the Sample. +%** Should not be too much (i.e more than the depth of `g'), because a page +%** break might occur just below the Sample, and too much text would be put +%** below the bottom margin. +\def\pexa@opt@@vextrabotdepth#1{\def\pexa@default@vextrabotdepth{#1}} +\def\pexa@opt@@addlinenum#1{\def\pexa@default@addlinenum{\number-#1}} +\def\pexa@opt@@linenumbersep#1{\def\pexa@default@linenumbersep{#1}} +\def\pexa@opt@@linenumberformat#1{\def\pexa@default@linenumberformat{#1}} +%** lb.sty overrides it: \def\pexa@default@addvspace{\lakkbook@vspace} +\expandafter\def\csname pexa@opt@@addvspace-top\endcsname#1{\def\pexa@default@addvspace@top{#1}} +\expandafter\def\csname pexa@opt@@addvspace-bottom\endcsname#1{\def\pexa@default@addvspace@bottom{#1}} +%** Extra vertical distance for aligning top lines at yalign=v +\def\pexa@opt@@vextravskip#1{\def\pexa@default@vextravskip{#1}} +%** Maximum height of ``small'' sample at yalign=v +\def\pexa@opt@@vsmallht#1{\def\pexa@default@vsmallht{#1}} +\def\pexa@opt@@linenumberwidth#1{\def\pexa@default@linenumberwidth{#1}} +\expandafter\def\csname pexa@opt@@pexaminipage-setuphook\endcsname#1{\def\pexa@@minipage@setuphook{#1}} +\def\pexa@opt@@xalign@l{\def\pexa@default@xalign{l}}% +\def\pexa@opt@@xalign@r{\def\pexa@default@xalign{r}}% +\let\pexa@opt@@xalign\hfuzz +%** These correspond to \pexa@sa@u and \pexa@sa@b +\def\pexa@opt@@yalign@b{\def\pexa@default@yalign{b}}% align \vtop baselines +\def\pexa@opt@@yalign@u{\def\pexa@default@yalign{u}}% align upper corners +\def\pexa@opt@@yalign@v{\def\pexa@default@yalign{v}}% align upper corners, with baseline grid +\let\pexa@opt@@yalign\hfuzz +\def\pexa@opt@@xindent@none{\def\pexa@default@xindent{none}}% +\def\pexa@opt@@xindent@deeper{\def\pexa@default@xindent{deeper}}% +\def\pexa@opt@@xindent@deeppre{\def\pexa@default@xindent{deeppre}}% +\def\pexa@opt@@xindent@narrower{\def\pexa@default@xindent{narrower}}% +\def\pexa@opt@@xindent@deepright{\def\pexa@default@xindent{deepright}}% +\let\pexa@opt@@xindent\hfuzz +\def\pexa@opt@@yindent@none{\def\pexa@default@yindent{none}}% +\def\pexa@opt@@yindent@deeper{\def\pexa@default@yindent{deeper}}% +\let\pexa@opt@@yindent\hfuzz + +\def\pexa@opt@@Q@yes{\pexa@activate@Q}% +\def\pexa@opt@@Q@unchanged{}% +\let\pexa@opt@@Q\hfuzz +\def\pexa@opt@@bsdiv@yes{\pexa@activate@bsdiv}% +\def\pexa@opt@@bsdiv@unchanged{}% +\let\pexa@opt@@bsdiv\hfuzz +\def\pexa@opt@@div@yes{\pexa@activate@div}% +\def\pexa@opt@@div@unchanged{}% +\let\pexa@opt@@div\hfuzz +\def\pexa@opt@@url@yes{\pexa@activate@url}% +\def\pexa@opt@@url@unchanged{}% +\let\pexa@opt@@url\hfuzz + +\def\pexa@opt@@boxstyle@h{\def\pexa@default@boxstyle{h}}% +\def\pexa@opt@@boxstyle@v{\def\pexa@default@boxstyle{v}}% +\def\pexa@opt@@boxstyle@m{\def\pexa@default@boxstyle{m}}% +\def\pexa@opt@@boxstyle@p{\def\pexa@default@boxstyle{p}}% +\def\pexa@opt@@boxstyle@V{\pexa@optboxstyle@noboth\def\pexa@default@boxstyle{V}}% +\def\pexa@opt@@boxstyle@M{\pexa@optboxstyle@noboth\def\pexa@default@boxstyle{M}}% +\def\pexa@opt@@boxstyle@P{\pexa@optboxstyle@noboth\def\pexa@default@boxstyle{P}}% +\def\pexa@opt@@boxstyle@G{\pexa@optboxstyle@noboth\def\pexa@default@boxstyle{G}}% +\let\pexa@opt@@boxstyle\hfuzz +\let\pexa@optboxstyle@noboth\@empty +\def\pexa@optboxstyle@inboth{\PackageError{pexample}{Arg unapplicable for boxstyle=}\@ehc} +%** allowshrink=yesmin works only for \begin{PSource}[srcstyle=leftboth] and +%** [srcstyle=leftleft] +\def\pexa@opt@@allowshrink@force{\def\pexa@default@allowshrink{2}}% +\def\pexa@opt@@allowshrink@yes{\def\pexa@default@allowshrink{1}}% +\def\pexa@opt@@allowshrink@no{\def\pexa@default@allowshrink{0}}% +\let\pexa@opt@@allowshrink\hfuzz +\def\pexa@opt@@allowbreak@yes{\def\pexa@default@allowbreak{1}}% +\def\pexa@opt@@allowbreak@no{\def\pexa@default@allowbreak{0}}% +\let\pexa@opt@@allowbreak\hfuzz +\def\pexa@opt@@inlineprefix#1{% + % Imp: separate our (local) usage of \verbfwr$percent from other applications + % Dat: \if instead of \ifx because of \active: + \def\verbfwr@percent##1##2\relax{% + \ifx##1\relax\def\VerbFwrLines{}\else + \if\noexpand##1#1\relax\def\VerbFwrLines{##2}\else\def\VerbFwrLines{##1##2}\fi\fi}% +} +\def\pexa@opt@@srcstyle#1{% + \expandafter\ifx\csname pexa@sh@#1\endcsname\relax + \PackageError{examplep}{Unknown srcstyle: srcstyle = #1}\@ehc + \else\edef\pexa@default@srcstyle{#1}\fi% +} +%** usewidth=hsize: use full \hsize +%** usewidth=linewidth: use only \linewidth (\hsize - \@totalleftmargin - +%** - total_right_margin) +%** usewidth=skipwidth: use \linewidth - \leftskip - \rightskip +\def\pexa@opt@@usewidth@skipwidth{\def\pexa@default@usewidth{2}}% +\def\pexa@opt@@usewidth@linewidth{\def\pexa@default@usewidth{1}}% +\def\pexa@opt@@usewidth@hsize {\def\pexa@default@usewidth{0}}% +\let\pexa@opt@@usewidth\hfuzz +\expandafter\def\csname pexa@opt@@pverb-leftbreakmin@0\endcsname {\def\pexa@default@pverbleftbreakmin{0}}% +\expandafter\def\csname pexa@opt@@pverb-leftbreakmin@1\endcsname {\def\pexa@default@pverbleftbreakmin{1}}% +\expandafter\def\csname pexa@opt@@pverb-leftbreakmin@2\endcsname {\def\pexa@default@pverbleftbreakmin{2}}% Dat: higher values not implemented +\expandafter\let\csname pexa@opt@@pverb-leftbreakmin\endcsname\hfuzz +%\def\pexa@@showparshook{} +\expandafter\def\csname pexa@opt@@source-par-align@left\endcsname {\def\pexa@@showparshook{\pexa@paralign@left}} +\expandafter\def\csname pexa@opt@@source-par-align@right\endcsname {\def\pexa@@showparshook{\pexa@paralign@right}} +\expandafter\def\csname pexa@opt@@source-par-align@center\endcsname {\def\pexa@@showparshook{\pexa@paralign@center}} +\expandafter\def\csname pexa@opt@@source-par-align@justify\endcsname{\def\pexa@@showparshook{\pexa@paralign@justify}} +\expandafter\def\csname pexa@opt@@source-par-align@justjust\endcsname{\def\pexa@@showparshook{\pexa@paralign@justjust}} +\expandafter\def\csname pexa@opt@@source-par-align@unchanged\endcsname{\def\pexa@@showparshook{}} +\expandafter\let\csname pexa@opt@@source-par-align\endcsname\hfuzz +\expandafter\def\csname pexa@opt@@source-space@invdisc\endcsname {\def\pexa@default@space{\nobreak\discretionary{\char32}{}{\hbox{\ }}\nobreak\hskip\z@skip}}% breakable with discretionary +\expandafter\def\csname pexa@opt@@source-space@invbreak\endcsname {\def\pexa@default@space{\ }}% breakable +\expandafter\def\csname pexa@opt@@source-space@invfixbreak\endcsname{\def\pexa@default@space{\ {\@tempdima\lastskip\unskip\hskip\@tempdima}}}% breakable +\expandafter\def\csname pexa@opt@@source-space@invnobreak\endcsname {\def\pexa@default@space{\leavevmode\nobreak\ }}% nonbreakable +\expandafter\def\csname pexa@opt@@source-space@visnobreak\endcsname {\def\pexa@default@space{\char32 }}% visible in \tt, nonbreakable +\expandafter\def\csname pexa@opt@@source-space@visbreak\endcsname {\def\pexa@default@space{\hskip\z@skip\char32 \hskip\z@skip}}% visible in \tt, breakable +\expandafter\let\csname pexa@opt@@source-space\endcsname\hfuzz +% vvv Dat: pverb-space=invbreak will break, but not stretch or shrink +% vvv Dat: they need \pexa@cverb@skipbreak@i +\expandafter\def\csname pexa@opt@@pverb-space@invbreak\endcsname {\def\pexa@cverb@@space{\ \pexa@cverb@skipbreak@i}}% breakable +\expandafter\def\csname pexa@opt@@pverb-space@invdisc\endcsname {\def\pexa@cverb@@space{\nobreak\discretionary{\char32}{}{\hbox{\ }}\nobreak\hskip\z@skip \pexa@cverb@skipbreak@i}}% breakable with discretionary +\expandafter\def\csname pexa@opt@@pverb-space@invbreakleft\endcsname{\def\pexa@cverb@@space{\ \nobreak\hskip0pt plus1fil\null\hskip0pt plus-1fil\pexa@cverb@skipbreak@i}}% breakable; SUXX: has infinite stretchability in the middle of a line(??) +\expandafter\def\csname pexa@opt@@pverb-space@invnobreak\endcsname{\def\pexa@cverb@@space{\leavevmode\nobreak\ \pexa@cverb@skipbreak@i}}% nonbreakable +\expandafter\def\csname pexa@opt@@pverb-space@visnobreak\endcsname{\def\pexa@cverb@@space{\char32 \pexa@cverb@skipbreak@i}}% visible in \tt, nonbreakable +\expandafter\def\csname pexa@opt@@pverb-space@visbreak\endcsname {\def\pexa@cverb@@space{\hskip\z@skip\char32 \hskip\z@skip\pexa@cverb@skipbreak@i}}% visible in \tt, breakable +% +\expandafter\let\csname pexa@opt@@pverb-space\endcsname\hfuzz +\expandafter\def\csname pexa@opt@@pverb-hash@full\endcsname{\def\pexa@default@fullhash{1}}% +\expandafter\def\csname pexa@opt@@pverb-hash@half\endcsname{\def\pexa@default@fullhash{0}}% +\expandafter\let\csname pexa@opt@@pverb-hash\endcsname\hfuzz +\expandafter\def\csname pexa@opt@@pverb-hyphenchar@char'30\endcsname {\def\pexa@cverb@@hyphenchar{\hyphenchar\font=\string'30 }}% allow auto-hyphenation of words +\expandafter\def\csname pexa@opt@@pverb-hyphenchar@hyphen\endcsname {\def\pexa@cverb@@hyphenchar{\hyphenchar\font=\string`-}}% allow auto-hyphenation of words +\expandafter\def\csname pexa@opt@@pverb-hyphenchar@none\endcsname {\def\pexa@cverb@@hyphenchar{\hyphenchar\font=-1 }}% disallow auto-hyphenation of words +\expandafter\def\csname pexa@opt@@pverb-hyphenchar@unchanged\endcsname{\def\pexa@cverb@@hyphenchar{}}% keep default \hyphenchar\font +\expandafter\let\csname pexa@opt@@pverb-hyphenchar\endcsname\hfuzz +\expandafter\def\csname pexa@opt@@pverb-verbatimfont@ttfamily\endcsname {\def\pexa@cverb@@verbatimfont{\ttfamily}}% +\expandafter\def\csname pexa@opt@@pverb-verbatimfont@pexavf\endcsname {\def\pexa@cverb@@verbatimfont{\pexa@@verbatimfont}}% +\expandafter\def\csname pexa@opt@@pverb-verbatimfont@latexvf\endcsname {\def\pexa@cverb@@verbatimfont{\verbatim@font}}% +\expandafter\def\csname pexa@opt@@pverb-verbatimfont@unchanged\endcsname{\def\pexa@cverb@@verbatimfont{}}% +\expandafter\let\csname pexa@opt@@pverb-verbatimfont\endcsname\hfuzz +\expandafter\def\csname pexa@opt@@psource-verbatimfont@ttfamily\endcsname {\def\pexa@default@verbatimfont{\ttfamily}}% +\expandafter\def\csname pexa@opt@@psource-verbatimfont@pexavf\endcsname {\def\pexa@default@verbatimfont{\pexa@@verbatimfont}}% +\expandafter\def\csname pexa@opt@@psource-verbatimfont@latexvf\endcsname {\def\pexa@default@verbatimfont{\verbatim@font}}% +\expandafter\def\csname pexa@opt@@psource-verbatimfont@unchanged\endcsname{\def\pexa@default@verbatimfont{}}% +\expandafter\let\csname pexa@opt@@psource-verbatimfont\endcsname\hfuzz +\expandafter\def\csname pexa@opt@@pverb-linebreak@char\endcsname{\def\pexa@cverb@@tbreak{\PexaAllowBreak}}% +\expandafter\def\csname pexa@opt@@pverb-linebreak@yes\endcsname {\def\pexa@cverb@@tbreak{\allowbreak}}% allow silent line break +\expandafter\def\csname pexa@opt@@pverb-linebreak@no\endcsname {\def\pexa@cverb@@tbreak{}}% disallow line break +\expandafter\let\csname pexa@opt@@pverb-linebreak\endcsname\hfuzz +\expandafter\def\csname pexa@opt@@pverb-linebreakchar\endcsname#1{\def\pexa@cverb@@tbreakchar{#1}}% +\expandafter\def\csname pexa@opt@@pverb-stretchshrink@unchanged\endcsname{\def\pexa@cverb@@stretchshrink{}}% keep default +\expandafter\def\csname pexa@opt@@pverb-stretchshrink@yes\endcsname {\def\pexa@cverb@@stretchshrink{\fontdimen3\font=0.166666666\fontdimen6\font\relax \fontdimen4\font=0.111111111\fontdimen6\font\relax}}% Dat: \fontdimen6 is quad +\expandafter\def\csname pexa@opt@@pverb-stretchshrink@no\endcsname {\def\pexa@cverb@@stretchshrink{\fontdimen3\font=\z@ \fontdimen4\font=\z@}}% disallow line break +\expandafter\let\csname pexa@opt@@pverb-stretchshrink\endcsname\hfuzz +\expandafter\def\csname pexa@opt@@baseline-grid@yes\endcsname {\def\pexa@default@baselinegrid{1}}% +\expandafter\def\csname pexa@opt@@baseline-grid@no\endcsname {\def\pexa@default@baselinegrid{0}}% +\expandafter\let\csname pexa@opt@@baseline-grid\endcsname\hfuzz +\expandafter\def\csname pexa@opt@@mp-equation-reset@yes\endcsname {\def\pexa@@equation{}}% +\expandafter\def\csname pexa@opt@@mp-equation-reset@no\endcsname {\def\pexa@@equation{equation}}% +\expandafter\let\csname pexa@opt@@mp-equation-reset\endcsname\hfuzz +% vvv reset auxilary \newcounter{vrcnt} defined by varioref.sty to zero? Recommended: no. +\expandafter\def\csname pexa@opt@@mp-varioref-reset@yes\endcsname {\def\pexa@@vrcnt{}}% +\expandafter\def\csname pexa@opt@@mp-varioref-reset@no\endcsname {\def\pexa@@vrcnt{vrcnt}}% +\expandafter\let\csname pexa@opt@@mp-varioref-reset\endcsname\hfuzz + +% --- + +\def\PexaAllowBreak{% + \nobreak\hskip\z@skip + %\penalty\hyphenpenalty% Dat: this is completely wrong here, because it + % allows a line break at the \penalty. TeX will insert \hyphenpenalty or + % \exhyphenpenalty automatically. + \discretionary{\hbox{\pexa@cverb@@tbreakchar}}{}{}\nobreak\hskip\z@skip} + +%** `\begin{PSource}[srcstyle=leftboth]' is an alternative of +%** `\begin{WBoth}...\PexaShowBoth'. The former allows page breaks between +%** lines, but uses the non-\catcode-based \PVerb. +\def\PexaShowBoth#1{% + \clubpenalty\@clubpenalty % allow club lines after \paragraph{x}y\par + \begingroup + \pexa@doopts{#1}% + \expandafter\@temptokena\expandafter{\pexa@default@samplewidth}% + \edef\reserved@a{\noexpand\PexaShowBothMany + {\the\@temptokena}% 1 + {\pexa@default@xalign}% 2 + {\pexa@default@yalign}% 3 + {\pexa@default@boxstyle}% 4 + {\pexa@default@allowshrink}% 5 + {\pexa@default@allowbreak}% 6 + {\pexa@default@srcstyle}% 7 + {\pexa@default@usewidth}% 8 + {{\pexa@default@xindent}{\pexa@default@yindent}}% 9 + }% + %%\show\reserved@a + \expandafter\endgroup\reserved@a +}% +\def\pexa@xyindent#1#2{% + %\expandafter\show\csname pexa@doyindent@#2\endcsname + \let\pexa@@oncedeeper\pexa@movedeeper + \csname pexa@doyindent@#2\endcsname + \vskip\z@skip% do this after doyindent, so \@trivlist\ifvmode might decide about \@partopskip + \csname pexa@doxindent@#1\endcsname +} + +%** Shows the Source (to the left) and the Sample (to the right), facing, in +%** the specified style. +%** @param #1 dimen: width of Sample (\hsize, paragraph width). Example: .4\hsize or .4\PexaWidth +%** @param #2 Sample horizontal alignment: `l' is left; `r' is right. `r' +%** almost always makes sense only with #4=`h' +%** @param #3 vertical alignment of Sample and Source: `b': align top +%** baselines. `u': align upper bounding box lines +%** @param #4 boxing style of Sample: `h' is \hbox, `v' is \vbox (or \vtop, +%** respectively), `m' is minipage, `p' is PexaMinipage (recommended). +%** Capital letters disallowed. +%** @param #5 `1': allow Sample to shrink if Source is too wide, `0': don't +%** @param #6 `1': allow page break in Source, `0': don't +%** @param #7 source display style, see possible values at \PexaShowSource +%** @param #8 width selector, see docs at \PexaShowSource +%** @param #9 {{xindent}{yindent}} +%** Special one-pass case for #5=`1', #6='0' etc. +\def\PexaShowBothMany#1#2#3#4#5#6#7#8#9{% + \begingroup + %\hrule%!! + \let\pexa@optboxstyle@noboth\pexa@optboxstyle@inboth + \csname pexa@opt@@boxstyle@#4\endcsname% verify correct usage + \pexa@setupverb@read% interpret ^ for measurements + % Dat: not late to test \ifvmode now + \pexa@xyindent#9% + % ^^^ do this early, so will have a chance to measure correct width + % Now: We have \leftskip, \rightskip, \linewidth and \@totalleftmargin + % set up. These won't affect the sample, because \pexa@setsample@... + % calls \pexa@hsizesetup, which zero them all out. + \pexa@setup@calcwidths{#8}% sets \PexaWidth and possibly clobbers \@tempdimb + % Dat: \pexa@setup@calcwidths might have said \let\PexaWidth\@tempdimb, + % which isn't safe, so we want to expand it + % Dat: safe to clobber \@tempdima and \@tempdimb, we're in \begingroup + \@tempdimb\PexaWidth\relax + \let\PexaWidth\@tempdimb + \@tempdima#1\relax% do arithmetic: .5\PexaWidth + \edef\PexaWidth{\the\@tempdimb\space}% + \expandafter\pexa@showbothmany@low\expandafter{\the\@tempdima}{#2}{#3}{#4}{#5}{#6}{#7}% +} +\def\pexa@showbothmany@low#1#2#3#4#5#6#7{% + % Dat: #1 might be .5\PexaWidth + \if#50% Don't allow the sample to shrink. Its width will be exactly #1. + \@tempdima#1\relax + \else% + % #5 allows the Sample to shrink. Now we call \pexa@sh@#7 just to measure + % the width of the Source. From that we will be able to deduce the width of + % the Sample. + \@tempdima\PexaWidth + %\showthe\tabskip + % vvv This is the first time we call \pexa@default@verbatimfont + \setbox0\vtop{\leftskip\z@skip \@totalleftmargin\z@ \let\pexa@@tolinewidth\@empty \csname pexa@sh@#7\endcsname}% + %%\vbox{\hrule\copy0\hrule}% + \advance\@tempdima-\wd0 \setbox0\box\voidb@x + \setbox1\hbox{\pexa@@vrule{}}\advance\@tempdima-\wd1 + \ifdim#1<\@tempdima \@tempdima#1\relax\fi + %%\@tempdima=200pt + \fi% + % \advance\@tempdima\@totalleftmargin\advance\@tempdima\leftskip% !! Dat: a failed attempt to put the \vrule to the middle + %\edef\pexa@@samplewidth{\the\@tempdima}% superfluous + % Dat: now \@tempdima is actual Sample width + \if#60\def\pexa@@preamblecr{\cr\noalign{\nobreak}}% disallow page break in Source + \else\let\pexa@@preamblecr\pexa@preamblecr@keep\fi + \edef\reserved@a{\catcode`^7\relax% change \catcode back to superscript (undo \pexa@setupverb@read) + \setbox1\expandafter\noexpand\csname pexa@setsample@#4\endcsname{\the\@tempdima}}% + \edef\reserved@b{% + %\noexpand\pexa@xyindent#9% + % Dat: too late to \noexpand\verbfwr@default@acts + \noexpand\pexa@setupverb@read% do correct display + \noexpand\pexa@setup@savetabskip + %\def\no\pexa@default@verbatimfont{\bbbbb}% + \expandafter\noexpand\csname pexa@sa@#3\endcsname + {\if#2r\wd1\else\the\@tempdima\fi}% will expand \@tempdima early + \expandafter\noexpand\csname pexa@sh@#7\endcsname + }% + %\show\reserved@a% \catcode `^7\relax \setbox 1\pexa@setsample@p {184.9429pt}. + %\show\reserved@b% \pexa@setupverb@read \pexa@setup@savetabskip \pexa@sa@u {184.9429pt}\pexa@sh@leftnumhang + \expandafter\reserved@a\reserved@b + % ^^^ This \expandafter trick expands \@tempdima early + \pexa@@undoyindent + \pexa@endparenvgroup +} +%** \pexa@@undoyindent calls \endtrivlist, which sets \@endpetrue, and if we +%** are in an environment (such as \begin{PWSource}), \end calls \@doendpe, +%** which which sets up \par and \everypar, so an automatic \noindent can be +%** forced. +\def\pexa@endparenvgroup{% + \if@endpe\endgroup\@endpetrue\else\endgroup\@endpefalse\fi% see also \PexaShow +} +\def\pexa@setup@savetabskip{% + \begingroup + \pexa@@calcwidths + \edef\reserved@a{\def\noexpand\pexa@@savetabskip{\the\tabskip}}% + \expandafter\endgroup\reserved@a +} +\def\pexa@hsizesetup{% + % Imp: possibly zero out \@listdepth etc., but don't forget to set it back. + \leftskip\z@skip + \rightskip\z@skip + \textwidth\hsize + \linewidth\hsize + \columnwidth\hsize + \parshape\z@ + \@totalleftmargin\z@ + \@twocolumnfalse +} +\def\pexa@setsample@h#1{% + % Dat: _not_ \hbox to#1. But why?? + \hbox{\hsize#1\relax\pexa@hsizesetup\input\pexa@@samplename\space\par}% +} +\def\pexa@setsample@v#1{% + \vtop{\hsize#1\relax\pexa@hsizesetup\input\pexa@@samplename\space\par}% +} +\def\pexa@setsample@V#1{% + \vbox{\hsize#1\relax\pexa@hsizesetup\input\pexa@@samplename\space\par}% +} +\def\pexa@setsample@m#1{% + \hbox{% + \noindent\begin{minipage}[t]{#1}% + \input\pexa@@samplename\space\par + \end{minipage}% + }% +} +\def\pexa@setsample@p#1{% + \hbox{% + \noindent\begin{PexaMinipage}[t]{#1}% + \pexa@hsizesetup + \input\pexa@@samplename\space\par + \end{PexaMinipage}% + }% +} +\def\pexa@setsample@M#1{% + \hbox{% + \noindent\begin{minipage}[b]{#1}% + \pexa@hsizesetup + \input\pexa@@samplename\space\par + \end{minipage}% + }% +} +\def\pexa@setsample@P#1{% + % \def\pexa@@bpmp{\begin{PexaMinipage}} + % \expandafter\pexa@@bpmp\input\pexa@@samplename\space % doesn't work :-( + \hbox{% + \noindent\begin{PexaMinipage}[b]{#1}% + \pexa@hsizesetup + \input\pexa@@samplename\space\par + \end{PexaMinipage}% + }% +} +\def\pexa@setsample@G#1{\begingroup\hsize#1\relax\pexa@hsizesetup\input\pexa@@samplename\space\endgroup} + +%** Dat: height of \pexa@@vrule only depends on the height of the sample +%** @param #1 desired Sample width +%** @param #2 one of \pexa@sh@... +\def\pexa@sa@b#1#2{ + %\leftskip\z@ \rightskip\z@ \parshape\z@% Wrong. Too Early. + \vskip\z@skip + \def\pexa@@cnta{0}% + \@tempdima\dp1 % not modified by \pexa@show@halign + \advance\@tempdima\baselineskip + \setbox0\hbox{\pexa@@vrule{}}% + \@tempdimc\PexaWidth \advance\@tempdimc-\wd0 \advance\@tempdimc-#1\relax %\advance\linewidth\tabskip + \edef\pexa@@savetabskip{\the\@tempdimc\space}% + \def\pexa@@firstlinebeg{% + \vadjust{\kern\dp1 \hrule\@height\z@\vskip-\dp1 }% ensure that figure fits + \vtop to\z@{\hb@xt@\z@{\kern\pexa@@savetabskip + \@tempdima\dp1 \advance\@tempdima\ht1 + \lower\dp1\hbox{\expandafter\pexa@@vrule\expandafter{\the\@tempdima}}% + \box1 \hss}\vss}% Dat: \hb@xt@\z@ is needed + % ^^^ Dat: \@totalleftmargin and \leftskip takes place here (as part of initial \tabskip) + }% + #2% \pexa@show@halign etc. + \advance\@tempdima\pexa@@cnta\baselineskip + % vvv Dat: a little less than \baselineskip, because \vtop has less?? + \advance\@tempdima-\baselineskip \advance\@tempdima\topskip + % vvv Dat: use \kern, not \vskip, so \unskip won't undo it + \ifdim\@tempdima>\z@ \kern\@tempdima\fi% display is longer than source + %%\message{Left=\pexa@@cnta} +} +%** \box1 already contains the Sample +%** @param #1 desired Sample width +%** @param #2 one of \pexa@sh@... +\def\pexa@sa@u#1#2{% + %%\show\pexa@@tolinewidth \showthe\PexaWidth + %%\tracingcommands1 \tracingmacros1 + \vskip\z@skip% go to vertical mode + \edef\pexa@@restore@prevdepth{\prevdepth\the\prevdepth}% + \def\pexa@@cnta{0}% + %\@tempdima\dp1 \advance\@tempdima10.54352pt \dp1\@tempdima + \@tempdima\dp1 \advance\@tempdima\ht1 + \if1\pexa@default@baselinegrid + \ifdim\@tempdima<256\baselineskip\else \advance\@tempdima-256\baselineskip\fi + \ifdim\@tempdima<128\baselineskip\else \advance\@tempdima-128\baselineskip\fi + \ifdim\@tempdima <64\baselineskip\else \advance\@tempdima -64\baselineskip\fi + \loop\ifdim\@tempdima>\z@ \advance\@tempdima-\baselineskip\repeat + \@tempdima-\@tempdima + \advance\@tempdima\dp1 \dp1\@tempdima + \fi + \@tempdima\dp1 \advance\@tempdima\ht1 + % !! sample might be too tall, try single-line samples: (??) + % \begin{WBoth}Foo\end{WBoth}\PexaShowBoth{}\PexaShowBoth + \nointerlineskip\vbox to\z@{% This \vbox screws up \vskip{}s at page break + \setbox0\hbox{\pexa@@vrule{}}% + % Dat: now we \advance\PexaWidth, but this won't affect #2, because + % advancement is inside a group + %\advance\PexaWidth-\wd0 \advance\PexaWidth-#1\relax + %\showthe\PexaWidth + \kern\baselineskip \kern-\topskip + \hbox{% implies \noindent + \kern\pexa@@savetabskip + \kern\PexaWidth \kern-\wd0 \kern-#1\relax + \@tempdima\dp1 \advance\@tempdima\ht1 + \lower\dp1\hbox{\expandafter\pexa@@vrule\expandafter{\the\@tempdima}}% + %\pexa@@vrule + \box1% Dat: \box0 would emit a rule not tall enough + }% + \vss + }% + \pexa@@restore@prevdepth% let baselines align smoothly + \nobreak % disallow page break between Sample and Source + #2% \pexa@sh@..., which calls \pexa@show@halign etc. + % Dat: now \pexa@@cnta is -1 times nr of source lines printed + % vvv Dat: a little less than \baselineskip, because \vtop has less?? + % Imp: even less + \advance\@tempdima\pexa@@cnta\baselineskip + % vvv Dat: use \kern, not \vskip, so \unskip won't undo it + \ifdim\@tempdima>\z@ \kern\@tempdima\fi% Sample is longer than Source + %%\message{Left=\pexa@@cnta} +} + +%** Similar to \vskip#1\relax, but adds #1 to \lastskip +\def\PexaAddlastskip#1{% + \begingroup + % Imp: try \unpenalty somehow so \lastskip won't be 0pt after \vskip10pt\nobreak + \@tempskipa=#1\relax + \advance\@tempskipa\lastskip + \vskip-\lastskip + \vskip\@tempskipa + \endgroup% Dat: \lastskip survives +} + +\def\pexa@default@vextravskip{\z@} +\def\pexa@default@vsmallht{1pt} +%** Like \pexa@sa@u, but works at a page break with baseline grid +%** \box1 already contains the Sample. +%** @param #1 desired Sample width +%** @param #2 one of \pexa@sh@... +\def\pexa@sa@v#1#2{% + %%\setbox1\hbox{\vrule\box1}% + %%\show\pexa@@tolinewidth \showthe\PexaWidth + %%\tracingcommands1 \tracingmacros1 + \ifhmode\unskip\par\fi% go to vertical mode, keep \lastskip + %\show\pexa@default@vextravskip + \ifdim\prevdepth>-\@m\p@ + \@tempdima\prevdepth \advance\@tempdima-\pexa@default@vextravskip\relax + \prevdepth\@tempdima + \vskip-\pexa@default@vextravskip\relax% !! \vspace etc. + \fi + \def\pexa@@cnta{0}% + %\@tempdima\dp1 \advance\@tempdima10.54352pt \dp1\@tempdima + \def\pexa@@thefirstline{}% + \setbox0\hbox{\pexa@@vrule{}}% + \@tempdimc\PexaWidth \advance\@tempdimc-\wd0 \advance\@tempdimc-#1\relax %\advance\linewidth\tabskip + \edef\pexa@@savetabskip{\the\@tempdimc\space}% + \def\pexa@@dohalign{% + \noalign\bgroup + %\pexa@@beforefirstline% called after the \cr of the preamble, should contain \noalign{...} + %\relax\pexa@setupverb@read% Dat: already called + % vvv Dat: \@@input is the original \input primitive, which we definitely + % need here (and not a macro) + \expandafter\pexa@inputfirstline\@@input\pexa@@cursourcename\space + % ^^^ Dat: \relax instead of \space would begin an extra line and demand + % an extra \cr (at end) + \egroup% terminate \halign + }% + \global\def\pexa@@vdepth{\z@}% + \global\let\pexa@@thefirstline\@empty + \def\pexa@@firstlinebeg{% + \setbox0=\hbox{\pexa@@thefirstline}% Source + \@tempdima\ht0 + \advance\@tempdima\pexa@default@vextravskip\relax + \ifnum1<1% + \ifdim\ht1<\pexa@default@vsmallht\relax1% typical: \ht1 (Sample) is 0pt or 0.4pt + \else\ifdim\@tempdima<\ht1 1\fi\fi% Sample (\box1,\vtop) is a lot higher than Source. + \space + % Dat: now we raise Sample to the height of Source (should this be \strut??) + % Dat: in lb.sty: \ht0=7.14pt and \ht0=9.10pt + \advance\@tempdima-\ht1 + % Dat: this example shows that \raise correctly shifts \ht and \dp + % \setbox0=\hbox{\vrule height 30pt depth50pt} + % \setbox0=\hbox{\raise6pt\box0} + % \showthe\ht0 \showthe\dp0 + \setbox1\hbox{\raise\@tempdima\box1}%\raise10pt\box1}% + \fi + % vvv Dat: save new \dp1, as \raise{}d above + % vvv Dat: we need \global because we are in a \halign + \global\edef\pexa@@vdepth{\the\dp1}% + % Dat: ne don't need \@tempdima anymore + %%\vrule height\ht0 depth\dp0 width1pt + \vadjust{\kern\dp1 \hrule\@height\z@\vskip-\dp1 }% ensure that Sample fits page + \vtop to\z@{\hb@xt@\z@{\kern\pexa@@savetabskip + \@tempdima\dp1 \advance\@tempdima\ht1 + \lower\dp1\hbox{\expandafter\pexa@@vrule\expandafter{\the\@tempdima}}% + \box1 \hss}\vss}% Dat: \hb@xt@\z@ is needed + % ^^^ Dat: \@totalleftmargin and \leftskip takes place here (as part of initial \tabskip) + \global\let\pexa@@thefirstline\@empty + } + %%\hrule + #2% \pexa@sh@..., which calls \pexa@show@halign etc. + \ifx\pexa@@undoyindent\@empty + \@tempdimc\z@ + \else + \@tempdimc\@topsepadd + \fi + \ifdim\@tempdimc>\pexa@default@vextrabotdepth\relax + \@tempdimc\pexa@default@vextrabotdepth\relax + \fi + % Dat: now \@tempdimc is the extra Sample depth that can be tolerated. + % This can be quite much (>50pt etc.) + \@tempdima\pexa@@vdepth\relax% depth of the Sample + % Dat: now \pexa@@cnta is -1 times nr of source lines printed + \if1\pexa@default@baselinegrid + \advance\@tempdima\pexa@@cnta\baselineskip + \advance\@tempdima\baselineskip% don't count the first line + \ifdim\@tempdima<\@tempdimc % Source is tall enough, no \vskip needed + \@tempdima\z@ + \else + \ifdim\@tempdima<256\baselineskip\else \advance\@tempdima-256\baselineskip\fi + \ifdim\@tempdima<128\baselineskip\else \advance\@tempdima-128\baselineskip\fi + \ifdim\@tempdima <64\baselineskip\else \advance\@tempdima -64\baselineskip\fi + \loop\ifdim\@tempdima>\@tempdimc \advance\@tempdima-\baselineskip\repeat + \@tempdima-\@tempdima + \advance\@tempdima\pexa@@vdepth\relax + \advance\@tempdima\pexa@@cnta\baselineskip% BUGFIX at Fri Apr 16 00:56:52 CEST 2004 + \advance\@tempdima\baselineskip + \fi + % vvv Dat: this would force a better page break, but might be dangerous + %\ifx\pexa@@undoyindent\@empty\else + % \advance\@tempdima\@tempdimc + % \advance\@topsepadd-\@tempdimc + %\fi + \else + % This usually has no effect, except only with a single-line \vtop Sample + \advance\@tempdima\pexa@@cnta\baselineskip% negative + \advance\@tempdima\baselineskip% don't count the first line + \advance\@tempdima-\@tempdimc + \ifdim\@tempdima<\z@ \@tempdima\z@\fi + \fi + % vvv Dat: this \vskip will be extended by \addvspace + % vvv Dat: reset \lastskip to zero if \@tempdima=0pt + \ifdim\@tempdima<\z@\else \nobreak\vskip\@tempdima\fi% Sample is longer than Source + \global\let\pexa@@thefirstline\@empty + \global\let\pexa@@vdepth\@empty + %%\message{Left=\pexa@@cnta} +} +\begingroup\lccode`~=`\^^M\lowercase{\endgroup\def\pexa@inputfirstline#1~}{% + \global\def\pexa@@thefirstline{#1}% + % ^^^ Dat: \global is needed, because we're in \halign + \egroup% \noalign + #1\par% Put it back so it will be typeset +} + +% --- + +% Dat: superfluous macros +%\def\PexaShowSourceLeft {\PexaShowSource{left}}% +%\def\PexaShowSourceCenter {\PexaShowSource{center}}% +%\def\PexaShowSourceNumLeft{\PexaShowSource{leftnum}}% +%\def\PexaShowSourceNumCol {\PexaShowSource{leftnumcol}}% +%\def\PexaShowSourceNumHang{\PexaShowSource{leftnumhang}}% +%\def\PexaShowPexaMinipage {\PexaShowSample{\hsize}{P}}% +%\def\PexaShowSourceSampleLeft{\PexaShowBoth{#1}{l}{b}{v}{0}{1}{left}{2}} +%\def\PexaShowSourceSampleRight{\PexaShowBoth{#1}{r}{b}{v}{0}{1}{left}{2}} +%\def\PexaShowSourceSampleLeftPexaMinipage{\PexaShowBoth{#1}{l}{b}{p}{0}{1}{left}{2}} + +%** Shows the source and the sample, facing, both left flushed, top baselines +%** aligned, disallowing page break, width of sample maximized so both source +%** and sample fit. +%** Deprecated. Use \PexaShowBoth with #1 \hsize-..., #6=0 +%** @param #1 dimen: minimum width for the source (hint: specify 0pt) +%** Uses \pexa@@vrule +%** Imp: pre-calculate width of \pexa@@vrule +%** Imp: typeset the source once +%\def\PexaShowSourceSampleFit#1{% +% \vskip\z@skip +% \setbox0\vtop{\pexa@show@halign}% +% \ifdim\wd0<#1 \wd0=#1\fi +% \setbox1\vtop{% +% \advance\hsize-\wd0 +% \setbox0\hbox{\pexa@@vrule{}}\advance\hsize-\wd0 +% \input\pexa@@cursourcename\space +% }% +% \noindent\box0 \pexa@@vrule{}\relax\box1\par +%} + +% --- \begin{PexaMinipage} + +\let\pexa@@restore\empty +%** @param #1 something whose 1st token will be expanded once +\def\pexa@restore@appendex#1{% + \expandafter\expandafter\expandafter\def + \expandafter\expandafter\expandafter\pexa@@restore + \expandafter\expandafter\expandafter{% + \expandafter\pexa@@restore#1}% +} + +\def\pexa@@equation{equation} +\def\pexa@@vrcnt{vrcnt} + +%** @param #1 counter name; e.g `section' means \c@section +%** @param #2 true code +%** @param #2 false code +\def\pexa@ifignore#1#2#3{% + % Imp: multiple ignorable counters + \def\reserved@b{#1}% + \ifx\reserved@b\pexa@@equation#2% + \else\ifx\reserved@b\pexa@@vrcnt#2% + \else#3\fi\fi +} + +%** Appends a counter restoration command to \reserved@a +%** @param #1 counter name; e.g `section' means \c@section +\def\pexa@elt#1{% + \pexa@ifignore{#1}{}{% + \edef\reserved@a{\noexpand\setcounter{#1}{\the\csname c@#1\endcsname}}% + \pexa@restore@appendex\reserved@a + }% +} +%** @param #1 counter name; e.g `section' means \c@section +\def\pexa@resetcounter#1{% + \pexa@ifignore{#1}{}{% + \expandafter\global\csname c@#1\endcsname\z@ + }% + %\begingroup% superfluous + % \let\@elt\@stpelt + % \csname cl@#1\endcsname + %\endgroup +} +%\def\pexa@minipage@setcounter{% overrides latex.ltx +% \@ifundefined{c@#1}% +% {\@nocounterr{#1}}% +% {\pexa@elt{#1}\global\csname c@#1\endcsname#2\relax}} + +\long\def\pexa@kill@minipagefalse#1\@minipagefalse#2\hfuzz${#1} +%** A dumb emulation of article.cls: displays the page footer. +\def\pexa@finishpage{% + \begingroup + \expandafter\pexa@kill@minipagefalse\endminipage\hfuzz$% + % ^^^ stop after footnotes at \@minipagefalse + \let\relax\relax% elminate possible \global before \@minipagefalse + \endgroup + \ifhmode\unskip\par\fi %\vskip\z@skip + \pexa@@saved@newpage + \ifhmode\unskip\par\fi %\vskip\z@skip + \unpenalty\unskip + \stepcounter{page}% 0 -> 1 + \ifx\@oddfoot\@empty\else% \pagestyle{empty} -> \let\oddfoot\@empty + \bigskip + \begingroup + \if@specialpage + \global\@specialpagefalse\@nameuse{ps@\@specialstyle}% define \@evenfoot + \fi + \hbox to\hsize{\if@twoside\ifodd \@oddfoot\else \@evenfoot\fi\else\@evenfoot\fi}% + \endgroup + \fi +} +\def\pexa@newpage{% + \pexa@finishpage + \global\let\pexa@@finishlastpage\pexa@finishpage + \smallskip\hrule\smallskip +} + +\def\pexa@everydisplayfirst#1{% + \everydisplay{#1}% + \abovedisplayshortskip\z@skip \abovedisplayskip\z@skip + #1% +} + +%** \begin{PexaMinipage} is similar to \begin{minipage} (and accepts the same +%** args), but section etc. +%** counters (including \thepage) will restart, and their previous values are +%** restored at \end{PexaMinipage}. Also \mark and \@themark are restored. +%** Footnotes are numbered normally. The first paragraph is set with \noindent, +%** but subsequent ones are indented. Skips (including \belowdisplayskip) are +%** canceled at the bottom of the page. \abovedisplayskip above the very first +%** displayed formula is canceled; you can avoid this by saying \everydisplay{} +%** before the formula. +%** A space after \end{PexaMinipage} (as with minipage) is significant. +%** +%** Usage: \begin{PexaMinipage}[vert-alignment]{width}, just like the minipage +%** environment. +%** +%** Example: +%** \begin{PexaMinipage}{99pt} +%** \hrule\relax +%** \selectlanguage{english} +%** \section{mp-foo} +%** Aword\footnote{a hello, world} +%** Bword\footnote{b hello, world} +%** \end{PexaMinipage} +%** \hrule +\def\PexaMinipage{% + \begingroup + \let\pexa@@restore\@empty + \let\@elt\pexa@elt \cl@@ckpt % append `\setcounter{equation}{42}' to \pexa@@restore + \let\c@footnote\c@mpfootnote% don't reset original \c@footnote; BUGFIX at Tue Dec 23 18:46:30 CET 2003 + \let\c@footnote@ch\c@mpfootnote% don't reset footnote generation counter -- for magyar.ldf + \let\@elt\pexa@resetcounter \cl@@ckpt + \pexa@restore@appendex{\expandafter\gdef\expandafter\@themark\expandafter{\@themark}}% + \edef\reserved@a{\noexpand\global\if@specialpage\noexpand\@specialpagetrue\else\noexpand\@specialpagefalse\fi}\pexa@restore@appendex\reserved@a + \if@specialpage\edef\reserved@a{\gdef\noexpand\@specialstyle{\@specialstyle}}\pexa@restore@appendex\reserved@a\fi + \expandafter\endgroup\expandafter\def\expandafter\pexa@@restore\expandafter{\pexa@@restore}% + %\show\pexa@@restore + % Dat: \selectlanguage is restored automatically + % Dat: \c@mpfootnote is reset to zero each time + %\let\c@footnote\c@mpfootnote + \def\thempfootnote{\thefootnote}% show normal footnotes (`1') instead of `a' + \let\c@mpfootnote\c@footnote + \let\cl@mpfootnote\cl@footnote% magyar.ldf footnote renumbering compatibility + \pexa@elt{secnumdepth}% + \let\pexa@@saved@newpage\newpage + \let\newpage\pexa@newpage% override + \let\finishpage\pexa@finishpage% new command + \let\pexa@@finishlastpage\@empty + \let\addtocontents\@gobbletwo + % ^^^ Don't modifty the TOC etc. of the host document. \addcontentsline isn't + % redefinied, because hyperref.pdf overrides the number of args + \expandafter\ifx\csname chapter\endcsname\relax + % Doesn't modify section numbering etc. + \let\chaptermark\@gobble + \let\p@chapter\@empty + \newcount\c@chapter%\newcounter{chapter}% \newcounter wouldn't allow redef + \def\chapter{\@startsection{chapter}{0}{\z@ }{-3.5ex \@plus -1ex \@minus -.2ex}{2.3ex \@plus .2ex}{\normalfont \Large \bfseries}}% + % ^^^ copied article.cls definition for section + \def\thechapter{\@Roman\c@chapter}% + \fi + %\aftergroup\pexa@@restore% no effect, because \pexa@@restore will have been changed back by \endgroup + % vvv Modify latex.ltx to avoid \parindent\z@ + \def\@parboxrestore{% + \edef\reserved@a{\noexpand\@arrayparboxrestore\parindent\the\parindent\relax}% + \reserved@a \let\\\@normalcr}% + \def\@setminipage{% + \@minipagetrue + \everypar{% + {\setbox\z@\lastbox}% cancel \indent + \@minipagefalse\everypar{}% + }}% + \expandafter\everydisplay\expandafter{% + \expandafter\abovedisplayskip\expandafter\z@skip% for gridmath.sty + \expandafter\pexa@everydisplayfirst\expandafter{\the\everydisplay}}% + \@listdepth\z@ % Imp: put this into \PexaShowBoth etc. + \def\makelabel##1{% + \@latex@error{Lonely \string\item--perhaps a missing + list environment}\@ehc}% + % vvv with `Figure 1' (article)-style figure numbering + \def\figure{\pexa@mp@fakefloat{figure}}% + \let\endfigure\pexa@mp@endfloat + \def\table{\pexa@mp@fakefloat{table}}% + \@namedef{table*}{\table}\@namedef{endtable*}{\endtable}% + \@namedef{figure*}{\figure}\@namedef{endfigure*}{\endfigure}% + % ^^^ BUGFIX at Mon Apr 19 17:08:49 CEST 2004: + % need to redefine \endtable*, too; problem caused by \marginpar in a + % very different part of the document. + \let\endtable\pexa@mp@endfloat + \pexa@@minipage@setuphook + \minipage% accept args etc. +} +\def\endPexaMinipage{% + \pexa@@finishlastpage + \par\unskip% cancels \belowdisplay(short)skip and others + \unpenalty\unskip\unpenalty\unskip\unpenalty\unskip\unpenalty + % ^^^ Dat: `\unskip\unpenalty\unskip' cancels \bigskip + % + \let\c@mpfootnote\@tempcnta + \let\cl@footnote\@empty + \let\cl@mpfootnote\@empty + %\show\pexa@@restore + %\let\c@mpfootnote\c@secnumdepth% restoring of \cl@@ckpt will be overridden later + %\let\c@footnote\c@secnumdepth + %\showthe\count63 + \pexa@@restore% will not reset original \c@footnote + %\global\c@footnote=77 + %\setcounter{footnote}{77} + \expandafter\@temptokena\expandafter{\@themark}% + \mark{\the\@temptokena}% prevent double expansion of \@themark + \endminipage +} + +\def\pexa@mp@fakefloat#1{\@ifnextchar[{\pexa@mp@begfloat{#1}}{\pexa@mp@begfloat{#1}[]}} +\def\pexa@mp@begfloat#1[#2]{% + \def\@captype{#1}% figure or table + % vvv ripped from \@xfloat in latex.ltx + %\global \setbox\@currbox + \vskip\intextsep + \color@vbox + \normalcolor + \vbox \bgroup + \hsize\columnwidth + \@parboxrestore + \@floatboxreset +} +\def\pexa@mp@endfloat{\@endfloatbox\vskip\intextsep}% + +\let\pexa@@minipage@setuphook\@empty +\def\pexa@mp@article{% + \@twosidefalse + \pagestyle{plain}% + \renewcommand\thepart {\@Roman\c@part}% + \renewcommand\thesection {\@arabic\c@section}% + \renewcommand\thesubsection {\thesection.\@arabic\c@subsection}% + \renewcommand\thesubsubsection{\thesubsection .\@arabic\c@subsubsection}% + \renewcommand\theparagraph {\thesubsubsection.\@arabic\c@paragraph}% + \renewcommand\thesubparagraph {\theparagraph.\@arabic\c@subparagraph}% +} + +% --- \PVerb et al. + +%** \PVerb is a command that typesets its argument verbatim, in a typewriter +%** font. It similar to the LaTeX \verb command, but has additional features: +%** -- \PVerb{NESTED} is allowed (as well as \PVerb+TEXT+), where NESTED must +%** have braces properly nested, but no other constraints are given +%** -- the only constraint on TEXT in \PVerb+TEXT+ is tht it cannot contain +%** the delimiter (+) +%** -- \PVerb{NESTED} can be put inside macro command arguments, for example: +%** \fbox{\PVerb{\def\foo{\csname bar\endcsname}}} +%** -- accented characters (with \usepackage[...]{inputenc}) work properly +%** -- accents \H and \. work even in OT1 encoding (the font cmr is +%** substituted if necessary) +%** -- customizable behaviour via options pverb-space=, pverb-hyphenchar=, +%** pverb-verbatimfont=, pverb-linebreak=, pverb-linebreakchar=, +%** pverb-stretchshrink= +%** -- options can be specified as \PVerb[...] or \PexaDefaults{...} +%** Some downsides: +%** -- a newline inside the argument of \PVerb is converted to a space +%** -- inner mode: comments are lost +%** -- inner mode: line breaks are lost (converted to spaces) +%** -- inner mode: multiple space tokens are condensed into one +%** -- inner mode: exact layout of space tokens after \cs are lost +%** -- inner mode: only \PVerb{NESTED} syntax is allowed +%** -- inner mode: only \PVerb[pverb-hash=half] works inside \textrm +%** -- inner mode: +%** Dat: \verb~...~ will work well, because it is forced to be outer. +%** Suggested brace delimiters: {} +%** Suggested other \dospecial delimiters: \ $ & # ^ _ % ~ +%** Suggested other delimiters: ` ! @ * - + = | : ; ' " < > , . / ? [] () +%** Dat: test: \showhyphens{\PVerb{kismocsok}} +\DeclareRobustCommand\PVerb{} +\expandafter\def\csname PVerb \endcsname{% + \relax\ifmmode\hbox\else\leavevmode%\null prevents break of 1st word + \fi\bgroup + {\pexa@cverb@@verbatimfont}% load .fd files with undisturbed \catcodes + \pexa@setupverb% sets \catcodes, similar to `\let\do\@makeother \dospecial\@noligs \@vobeyspaces' + \pexa@cverb@catcodes + \afterassignment\pexa@cverb@maybeopts\let\reserved@a= % +} +%** Same as \PVerb, but converts `##' to `#'. +%** @example \textit{And type: \PVerbH{##ifdef}} +\DeclareRobustCommand\PVerbH{\PVerb[pverb-hash=half]} +%** Usage: \PVerbInner\PVerb{text} or \PVerbInner\PVerbH{text} +\def\PVerbInner#1#2{#1{#2}} +%** \item[\PVerb[pverb-space=visbreak]{foo}] doesn't work because of the nested +%** `['. Use this instead: \item[\PVerbOpt{pverb-space=visbreak}{foo}], or: +%** \item[{\PVerb[pverb-space=visbreak]{foo}}] +\DeclareRobustCommand\PVerbOpt{} +\expandafter\def\csname PVerbOpt \endcsname#1{% + \relax\ifmmode\hbox\else\leavevmode%\null prevents break of 1st word + \fi\bgroup + \pexa@doopts{#1}% in \begingroup, at last + {\pexa@cverb@@verbatimfont}% load .fd files with undisturbed \catcodes + \pexa@setupverb% sets \catcodes, similar to `\let\do\@makeother \dospecial\@noligs \@vobeyspaces' + \pexa@cverb@catcodes + \afterassignment\pexa@cverb@gottoken\let\reserved@a= + %\afterassignment\pexa@cverb@outerbrace\let\reserved@a= % +} + +\def\pexa@cverb@catcodes{% + \let\do\pexa@cverb@makemathshift \dospecials \pexa@cverb@donormals + % ^^^ converts allowed delimiters to math-shift (\catcode 3) + %\@tempcnta127 \loop\ifnum\@tempcnta<256 \catcode\@tempcnta3 \advance\@tempcnta\@ne\repeat + % ^^^ also allows accented letters, such as \PVerb^^e1sz^^e1 + \ifx\\\@tabularcr \catcode`\{1 \fi % is \realx with array.sty + \ifx\\\@arraycr \catcode`\{1 \fi % with array.sty + % ^^^ disable outerbrace mode for \begin{tabular}, because braces must be + % properly nested inside a \halign cell, so we are not allowed to swallow + % a brace as math-shift. Unfortunately, this doesn't fix the problem for + % pure \halign, for which `! Missing { inserted' will be shown. +} + +% Sentinel sensible defaults -- overridden by \pexa@doopts above. +\def\pexa@cverb@@space{\ }% breakable +\def\pexa@cverb@@hyphenchar{\hyphenchar\font=-1 }% disallow auto-hyphenation of words +\def\pexa@cverb@@verbatimfont{\pexa@@verbatimfont}% +\def\pexa@cverb@@tbreak{\allowbreak}% allow silent line break +\def\pexa@cverb@@stretchshrink{}% keep original + +%** Prepend a \do to every >=127 accented character. +%** Iteration terminated by \vfuzz. +%** Add \break statements if necessary +\def\pexa@cverb@addacc#1{% + \ifx\vfuzz#1\else + \ifnum`#1>126 \ifnum\catcode`#1=13 \noexpand\do\fi#1\else% prepend \do to accented character + \ifnum`#1=32 \noexpand\pexa@cverb@@space\else%\ifnum`#1<127 + \ifnum\catcode`#1=11 #1\else + % vvv Dat: add \break to both sides of any nonletter + \noexpand\break#1\noexpand\break\fi + \fi\fi + \expandafter\pexa@cverb@addacc + \fi +} + +\def\pexa@cverb@removespace@v#1 #2{% + #1\ifx\hfuzz#2\else + \ifnum\catcode\string`#2=11 \reserved@a\fi% keep space iff letter follows + #2\expandafter\pexa@cverb@removespace@v + \fi +} +%** Similar to \EempVerbatimDef5 in eempost.sty +%** Defines parameterless macro named #1 to expand to a verbatim +%** representation of token list #2, with only catcode 10 (space) and +%** catcode 12 (other). +%** -- `%' won't appear in the output +%** -- emits `\relax' as `\relax ', but `\<' as `\<' (without space) +%** -- comments etc. have already been removed +%** -- caller should end each line with `^^J%' +%** -- \cs containing non-letter chars are printed without caution +%** -- low (0..31) and high (127..256) chars will be emmited with ^^ +%** -- char 10 (^^J) will be emitted as newline +%** -- ^^A (1) chars will be converted to spaces +%** -- spaces in #1 are kept with catcode 12 (other possibilities: keep with +%** catcode 10; remove) +%** -- trailing spaces of `\cs ' are +%** removed unless necessary (a letter follows it), keep with catcode 12 +\long\def\pexa@cverb@vdef#1#2{% \long: allow \par in #2 + \begingroup + \@tempcnta0 \loop\ifnum\@tempcnta<256 \lccode\@tempcnta0 \advance\@tempcnta\@ne\repeat + \lccode\string`\ =1 + \lowercase{\toks@{#2}}% convert space to ^^A + \edef\reserved@a{\the\toks@}% convert `#' to `##' (catcode 6) + %\edef\reserved@b##1>{}% macro:...->... + \edef\reserved@b{\expandafter\strip@prefix\meaning\reserved@a\string##\hfuzz}% + % ^^^ Dat: \meaning expands to ^^A with catcode 12, because it's charcode isn't 32 + % vvv !! SUXX, removes changes 'a\#b' to `a\b', too + \edef\reserved@b{\expandafter\pexa@removehash\reserved@b}% convert `##' to `#' (catcode 12) + \lccode\string`\ =0 % keep spaces generated by `\cs...' + \lccode1=\string`\ % + \expandafter\lowercase\expandafter{\expandafter\edef\expandafter\reserved@b\expandafter{\reserved@b\space\hfuzz}}% convert `^^A' -> ` ' (catcode 12) + % Dat: now we have the space tokens in #1 with catcode 12, and spaces at the + % end of multi-letter `\cs ' with catcode 10 (space). + \lccode`\-=\string`\ \lowercase{\edef\reserved@a{-}}% Dat: assume catcode('-')==12 + \edef\reserved@b{\def\noexpand#1{\expandafter\pexa@cverb@removespace@v\reserved@b}}% + % ^^^ Dat: it is safe to call \eemp@removespace@v, because there will be + % no consecutive spaces in \reserved@b emitted by \meaning + \expandafter\endgroup\reserved@b +} + +\def\pexa@swaprelax#1#2\relax{#2#1} +%\def\pexa@swap#1#2{#2#1}% SUXX, doesn't evaluate \else correctly + +%** Cancel \break{}s in the beginning of \reserved@a, and also cancel break after +%** the very first character. +\def\pexa@cverb@skipbreak@ii#1#2{% + \ifx#1\break + \pexa@swaprelax{\pexa@cverb@skipbreak@ii#2}% + %\expandafter\pexa@cverb@skipbreak\expandafter#2% + \else + \ifx#2\break + \pexa@swaprelax{\pexa@cverb@skipbreakf@ii#1}% + \else + \pexa@swaprelax{#1#2}% Dat: don't insert \relax into `\do ^^f5' etc. + \fi% + \fi\relax +} +\def\pexa@cverb@skipbreakf@ii#1#2{% + \ifx#2\break + \pexa@swaprelax{\pexa@cverb@skipbreakf@ii#1}% + \else + \pexa@swaprelax{#1\relax#2}% Dat: \relax breaks ligatures + \fi\relax +} +%** Cancel \break{}s in the beginning of \reserved@a. +%** (formerly \pexa@cverb@eatbreaks) +\def\pexa@cverb@skipbreak@i#1{% + \ifx#1\break \expandafter\pexa@cverb@skipbreak@i + \else\expandafter#1\fi +} +%** Doesn't cancel \break. +\let\pexa@cverb@skipbreak@\@empty +%** Cancels break according to option pverb-leftbreakmin +\def\pexa@cverb@skipbreak{% + \relax% break ligatures + \csname pexa@cverb@skipbreak@\romannumeral\pexa@default@pverbleftbreakmin\endcsname +} + +%** Cancel a single break in the beginning of \reserved@a. +%\def\pexa@cverb@skipbreak#1{% +% \ifx#1\break\else\expandafter#1\fi +%} + +% Test. +%\def\pexa@default@pverbleftbreakmin{2}% see defaults below +%\edef\reserved@a{\pexa@cverb@skipbreak alma} +%\show\reserved@a +%\edef\reserved@a{\pexa@cverb@skipbreak\break\break alma} +%\show\reserved@a +%\tracingmacros1 +%\edef\reserved@a{\pexa@cverb@skipbreak\break a\break\break l\break ma} +%\show\reserved@a +%\tracingmacros0 \zzzz + +%** Typesets already verbatized contents of \reserved@a +%** @example \begingroup\makeatletter\pexa@cverb@vdef\reserved@a{#1}\pexa@cverb@typeset\endgroup +\def\pexa@cverb@typeset{% + \makeatother% make \@delfin@ablakban@ hyphenatable: \@ del-fin @ ab-lak-ban @ + \edef\reserved@a{\expandafter\pexa@cverb@addacc\reserved@a\vfuzz\noexpand\@empty}% + \pexa@cverb@typeset@low +} + +%** Also called by \pexa@nobackslash +\def\pexa@cverb@typeset@low{% + % ^^^ Dat: \@empty is for ##1 of a possible \break + %\showthe\hyphenchar\font + %%\show\reserved@a + \def\break##1{% + \ifx##1\@empty\else \ifx##1\pexa@cverb@@space\else% Dat: \ifx is slow + % ^^^ don't allow break before a space + % ^^^ ignore trailing break (followed by \@empty) + \pexa@cverb@@tbreak + \fi\fi + \ifx##1\break\else\expandafter##1\fi% gobble next token if it's \break + % ^^^ Dat: \break is a macro, so \ifx may be slow + % ^^^ Dat: we never ever have \break\break\break in \reserved@a + }% + % Imp: cancel \break if \pexa@cverb@@tbreak is \@empty + %** @param ##1 accented, \active char with catcode 12 + \def\do##1{\lccode`~`##1\lowercase{~}}% + %\pexa@cverb@@verbatimfont + %\pexa@cverb@@hyphenchar + %\showthe\hyphenchar\font + % vvv Restore modified font values at \egroup + % vvv Dat: it would be too early to restore \hyphenchar at the end of the + % group, because \hyphenchar is examined by TeX when the paragraph has + % to be broken to lines. + % The only solution I can think of for changing \hyphenchar locally + % is defining a font with a very similar size (see below). Unfortunately, + % dvips(1) embeds two different fonts. + % \font\f=cmr10 at 10pt + % \font\g=cmr10 at 10.00001pt + % \hyphenchar\f=99 + %\edef\reserved@b{\noexpand\pexa@aftergroup\noexpand\hyphenchar\the\font=\the\hyphenchar\font\relax\hfuzz}\reserved@b + \edef\reserved@b{\noexpand\pexa@aftergroup\noexpand\fontdimen3\the\font=\the\fontdimen3\font\relax\hfuzz}\reserved@b% normal stretch + \edef\reserved@b{\noexpand\pexa@aftergroup\noexpand\fontdimen4\the\font=\the\fontdimen4\font\relax\hfuzz}\reserved@b% normal shrink + %\show\pexa@cverb@@verbatimfont + %\showhyphens{irgumburgum id}% + \pexa@cverb@@verbatimfont + %\showhyphens{irgumburgum ie}% + \pexa@cverb@@hyphenchar + %\showhyphens{irgumburgum if}% + \pexa@cverb@@stretchshrink + %\showthe\hyphenchar\font + %\showhyphens{irgumburgum ig}% + %\showhyphens{\reserved@a}% + %\showhyphens{\tt\reserved@a}% + %\hyphenpenalty\z@ + %\expandafter\MINUSCHECK\reserved@a......\hfuzz% + \expandafter\pexa@cverb@skipbreak\reserved@a\@empty\@empty% Dat: \@empty is sentinel +} +%\def\MINUSCHECK#1#2#3\hfuzz{% +% \edef\reserved@b{\meaning#1}\show\reserved@b +% \edef\reserved@b{\meaning#2}\show\reserved@b +% \edef\reserved@b{\meaning#3}\show\reserved@b +%} + +%** Usage: \pexa@aftergroup TOKENS\hfuzz +\def\pexa@aftergroup#1{% + \ifx#1\hfuzz + \else\aftergroup#1\expandafter\pexa@aftergroup\fi +} +\def\pexa@cverb@donormals{\do`\do!\do @\do*\do-\do+\do=\do|\do:\do;\do'\do"\do,\do.\do/\do?\do<\do>\do(\do)\do[\do]}% +\def\pexa@cverb@makemathshift#1{\catcode`#13\relax}% +%\def\pexa@afterelse#1\else#2\fi{\fi#1}% +\def\pexa@cverb@maybeopts{% + \if\noexpand\reserved@a[% + %\catcode`]12 + \egroup\bgroup% restore various catcodes + \expandafter\pexa@cverb@withopts + \else + \expandafter\pexa@cverb@gottoken + \fi +}% +\def\pexa@cverb@withopts#1]{% + \pexa@doopts{#1}% in \begingroup, at last + % vvv Dat: fonts already loaded + \pexa@setupverb% sets \catcodes, similar to `\let\do\@makeother \dospecial\@noligs \@vobeyspaces' + \pexa@cverb@catcodes + \afterassignment\pexa@cverb@gottoken\let\reserved@a= % +} +\def\pexa@cverb@mustbebrace#1{% + \PackageError{examplep}{\noexpand\PVerb inner delimiter must be brace,\MessageBreak not #1}\@ehc + \let\reserved@b\egroup +} +\def\pexa@cverb@mustntbe#1{% + \PackageError{examplep}{\noexpand\PVerb delimiter mustn't be #1}\@ehc + \let\reserved@b\egroup +} +%** Got token in \reserved@a +\def\pexa@cverb@gottoken{% + \pexa@cverb@@verbatimfont + % ^^^ do this before we do too many \catcode changes to load the .fd file. + \let\reserved@b\pexa@cverb@outer + \ifcat\noexpand\reserved@a$% math-shift + \if\noexpand\reserved@a$\else + \if\noexpand\reserved@a\space\pexa@cverb@mustntbe{space}\else + \if\noexpand\reserved@a\expandafter\@gobble\string\{\let\reserved@b\pexa@cverb@outerbrace + \fi\fi\fi + \else\ifcat\noexpand\reserved@a\expandafter{\iffalse}\fi% open-brace + \let\reserved@b\pexa@cverb@innerbrace + \else\ifcat\noexpand\reserved@a\relax + % Dat: the \cs token name has been lost, we only have the meaning of \reserved@a + \pexa@cverb@mustbebrace{backslash or control sequence or active char}% + \else\ifcat\noexpand\reserved@a a% letter + \pexa@cverb@mustntbe{a letter,\MessageBreak but got \meaning\reserved@a\space}% + % Dat: the outer `\PVerb x' would try to delimit by space, not `x' + % Dat: it is possible to get an outer letter: `\expandafter\PVerb\@empty x' + \else\ifcat\noexpand\reserved@a,% other + \pexa@cverb@mustbebrace{\meaning\reserved@a\space}% + % Dat: impossbile to skip to \reserved@a, because I cannot convert it back + % to a character token anymore + % Imp: write a slow loop + \else + \pexa@cverb@mustbebrace{\meaning\reserved@a\space(strange)}% + \let\reserved@b\egroup + %\let\reserved@b\pexa@cverb@inner + \fi\fi\fi\fi\fi + \reserved@b +} + +% 1: begin-group character { +% 2: end-group character } +% 3: math shift character $ +% 4: alignment tab character & +% 6: macro parameter character # +% 7: superscript character ^ +% 8: subscript character _ +% 10: "blank space " +% 11: the letter b +% 12: the character / +% 13: macro:..., undefined, \hbox etc. +% cs: macro:..., undefined, \hbox etc. +\def\pexa@meaning@beg#1 #2 #3{{1}{#3}}% +\def\pexa@meaning@end#1 #2 #3{{2}{#3}}% +\def\pexa@meaning@mat#1 #2 #3 #4{{3}{#4}}% +\def\pexa@meaning@ali#1 #2 #3 #4{{4}{#4}}% +\def\pexa@meaning@mac#1 #2 #3 #4{{6}{#4}}% +\def\pexa@meaning@sup#1 #2 #3{{7}{#3}}% +\def\pexa@meaning@sub#1 #2 #3{{8}{#3}}% +\def\pexa@meaning@bla#1 #2 #3 {{10}{\ }}% +\def\pexa@meaning@the#1 #2#3 #4{{\if#2l11\else12\fi}{#4}}% +\def\pexa@meaningiii#1#2#3{\csname pexa@meaning@#1#2#3\endcsname}% +%** @param #1 a catcode (positive) +%** @param #2 character token or `\ ' +\def\pexa@cverb@makeeg#1#2#3\vfuzz{% + \ifnum#1<1 \@latex@error{Invalid character token}\@ehc\fi + %\catcode`#22 % \catcode 2 == end-group + \catcode`#213 % \catcode 13 == active + \lccode`~`#2\lowercase{\def\reserved@a##1~{\pexa@cverb@outerc{##1}}}% +}% + +\def\pexa@cverb@innerbrace{% + \catcode`\{1 %begin-group + \catcode`\}2 %end-group + \catcode`\ =12 + % ^^^ These \catcode changes will become useful when argument of \PVerb has + % only been partially seen by TeX's eyes, for example in: + % \expandafter\PVerb{foo} + \expandafter\pexa@cverb@innerc\expandafter{\iffalse}\fi% put back the extra open-brace +} +\def\pexa@cverb@vdef@fullhash#1{\pexa@cverb@vdef\reserved@a{#1}}% +\def\pexa@cverb@vdef@halfhash#1{% + \def\reserved@a{#1}% halves the hashes + \expandafter\pexa@cverb@vdef\expandafter\reserved@a\expandafter{\reserved@a}% +} +%** Takes an argument in braces. +\def\pexa@cverb@innerc#1{% + \makeatletter% keep space in `\csname @foo' + \ifnum\pexa@default@fullhash>0 \expandafter\pexa@cverb@vdef@fullhash + \else \expandafter\pexa@cverb@vdef@halfhash\fi + {#1}% + \pexa@cverb@typeset + \egroup +} +%** Doesn't work inside \halign :-( +\def\pexa@cverb@outerbrace{% + \catcode`\{1 %begin-group + \catcode`\}2 %end-group + \catcode`\ =12 + \expandafter\pexa@cverb@outerc\expandafter{\iffalse}\fi% !! \halign +} +\def\pexa@cverb@outer{% + \catcode`\{12 %restore to other + \edef\reserved@b{\noexpand\pexa@cverb@makeeg\expandafter\pexa@meaningiii\meaning\reserved@a00\vfuzz}% + \reserved@b% equivalent to `\catcode\reserved@a=13 \def\reserved@a...' + \catcode`\ =12 + \reserved@a + %\expandafter\pexa@cverb@outerc\expandafter{\iffalse}\fi + % ^^^ nice trick, but doesn't work inside a cell of \halign (! Missing { inserted) + % ^^^ why doesn't it work in \halign?? -- even the arg may contain open-brace +} +\begingroup\lccode\string`\+=\string`\#\lowercase{\toks@{% + %** `\pexa@removehash foo#Xbar#Yand#\hfuzz' expands to `fooXbarYand', if + %** # has catcode 12. + \def\pexa@noremovehash#1+\hfuzz{#1}% + \def\pexa@removehash#1+#2{#1\ifx\hfuzz#2\else#2\expandafter\pexa@removehash\fi}% +}}\expandafter\endgroup\the\toks@ +\def\pexa@cverb@outerc#1{% + % Dat: #1 might contain begin-group and end-group tokens. Change them to other. + % vvv Dat: setting \lccode`a=0 will prevent \showhyphens from working + \@tempcnta0 \loop\ifnum\@tempcnta<256 \ifnum\lccode\@tempcnta=\@tempcnta\else \lccode\@tempcnta\z@\fi \advance\@tempcnta\@ne\repeat + \lccode`\ =1 + %%\lccode`\ =32 \showhyphens{csukafogta b}% + \lowercase{\def\reserved@a{#1}}% don't convert `#' to `##' (catcode 6) + % ^^^ change space to '\001', so \meaning won't convert it to catcode 10 + % Dat: don't expand \reserved@a now, because it might contain high accented tokens + \edef\reserved@b##1>{}% macro:...->... + \edef\reserved@b{\expandafter\reserved@b\meaning\reserved@a}% + \lccode\string`\ =0 % keep spaces generated by `\cs...' + \lccode1=\string`\ % + \ifnum\pexa@default@fullhash=0 % convert `##' to `#' + \edef\reserved@b{\expandafter\expandafter\expandafter\pexa@removehash\expandafter\reserved@b\string##\hfuzz}% + \fi + \expandafter\lowercase\expandafter{\expandafter\def\expandafter\reserved@b\expandafter{\reserved@b}}% + % ^^^ change '\001' back to space + %%\show\reserved@a + \let\reserved@a\reserved@b \pexa@cverb@typeset + \egroup +} + +%** Dat: `\ X' doesn't work, the space will be gobbled :-( +%** Dat: a space will be forced after `\W ' if W is a word +\begingroup\lccode\string`*\string`\\\lowercase{\endgroup +\def\pexa@cverb@nobackslash@lowa#1*\break#2}{% + % ^^^ Dat: \break is the \break following the backslash + #1\ifx#2\hfuzz\else + \ifx#2\break + \expandafter\expandafter\expandafter\pexa@cverb@nobackslash@more + \else + \if#2V\noexpand\char32\relax% visible, unbreakable + \else\if#2S\noexpand\pexa@cverb@@space% default space + \else\if#2B\noexpand\PexaAllowBreak + \else\if#2n\noexpand\hfil\noexpand\break + \else\noexpand#2\fi\fi\fi\fi% Dat: #2 is usually the \break preceding a non-letter char + \expandafter\expandafter\expandafter\pexa@cverb@nobackslash@lowa + \fi + \fi +} +\edef\pexa@cverb@nobackslash@more{\noexpand\pexa@cverb@nobackslash@lowa + \expandafter\@gobble\string\\\noexpand\break}% + +\def\pexa@cverb@removespace@vv#1 #2{% + #1\ifx\hfuzz#2\else + #2\expandafter\pexa@cverb@removespace@vv + \fi +} +\long\def\pexa@cverb@nobackslash#1{% + \begingroup + % vvv remove all spaces emitted by \meaning. Fine but ugly. + \let\pexa@cverb@removespace@v\pexa@cverb@removespace@vv + \let\pexa@removehash\pexa@noremovehash% don't remove \#. Ugly hack. + \pexa@cverb@vdef\reserved@a{#1}% + %\show\reserved@a + %\expandafter\expandafter\expandafter\show\expandafter\@gobble\reserved@a + \makeatother% make \@delfin@ablakban@ hyphenatable: \@ del-fin @ ab-lak-ban @ + \edef\reserved@a{\expandafter\pexa@cverb@addacc\reserved@a\vfuzz + \noexpand\@empty\expandafter\@gobble\string\\\noexpand\break}% + % Dat: expandable constructs emitted by \pexa@cverb@addacc: + % \do(unsave OK) \break \pexa@cverb@@space + \let\pexa@@save@pcs\pexa@cverb@@space + \let\pexa@@save@break\break + \let\pexa@cverb@@space\relax + \let\do\relax + \let\break\relax + \edef\reserved@a{\expandafter\pexa@cverb@nobackslash@lowa\reserved@a\hfuzz}% + \let\pexa@cverb@@space\pexa@@save@pcs + \let\break\pexa@@save@break + \pexa@cverb@typeset@low + \endgroup +} + +% --- One-character verbatim environments +% +% !! translate this Hungarian text to English. +% +% -- A kis-verbatim \verb+...+ helyett \'irhat\'o az, hogy ^^f7...^^f7 +% (az italic correction az\'ert kell el\'e, hogy ha parancs defin\'ici\'okn\'al +% italic-kal \'irunk egy opcion\'alis param\'etert, ne kelljen ut\'ana k\'ezzel +% korrig\'alni.) Mostm\'ar sorv\'ege jel is lehet benne, mert \PVerb-et haszn\'al +% (sorv\'ege==sz\'ok\"oz), de ha a k\"ovetkez\H{o} sor sz\'ok\"ozzel kezd\H{o}dik, akkor t\"obb +% sz\'ok\"oz lesz. Haszn\'alhat\'o \section-ben is, \'es (\'ovatosan) tabular-ban is, +% ha minden oszlop-ban a brace-ek balance-ol\'odnak. Lehet benne \'ekezetes +% bet\H{u}. +% +% Legjobb emacsban azt \'irni, hogy +% sz\"oveg..... +% %%% +% ^^f7aaa aaa aaa^^f7 sz\"oveg folytat\'asa ... +% mert akkor a comment miatt nem t\"ori el a verbatimos sz\"oveget. +% +% -- \^^f7...^^f7 olyan, mint a ^^f7...^^f7, de minden speci\'alis karakter el\'e backslash +% kell. P\'eld\'aul: \^^f7\{\}\%\\^^f7. Ily m\'odon k\"onnyebben adhat\'o +% makr\'o-argumentumnak. \^^f7\V^^f7 egy l\'athat\'o sz\'ok\"ozt sz\'ur be, \^^f7\B^^f7 +% \PexaAllowBreak-et (kis jellel sort\"or\'est enged\'elyez), \^^f7\S^^f7 ugyanaz, +% mint ^^f7 ^^f7. Ha minden el\'e gondosan kirakjuk a +% backslash-t, akkor haszn\'alhat\'o \section-ben is. +% +% -- \Q{...} \'es \Q. olyan, mint \^^f7...^^f7. Teh\'at l\'athat\'o sz\'ok\"oz: \Q\V +% +% -- !! ^^f7#^^f7 nem megy, de \Q\^^f7 igen +% + +\begingroup \catcode`^^f7=13 \@firstofone{\endgroup +\def\pexa@div@setcodes{\catcode`^^f7=13 % /divide-sign + \lccode`^^d7=0 \uccode`^^d7=0 % /multiply-sign isn't a lower-upper case variant (\OE?) + \lccode`^^f7=0 \uccode`^^f7=0 } +%** Can be used in \section (as ``inner'' \PVerb), with limitations. +%** !! parameters, as with ^^f7#^^f7 +\def\pexa@div{% Dat: not \long. File. ^^f7 + \ifx\protect\@typeset@protect + \expandafter\pexa@overb@low + \else + \noexpand\pexa@div + %\expandafter\pexa@overb@ignore doesn't work :-(( + \fi +} + +%** Works in math mode, too. What about robustness? +\def\pexa@overb@low{% ASCII 247 + % Dat: would be too late for \catcode of `\PVerb^^f7' here + % Imp: check for innerness-outerness + \relax\ifmmode\hbox\else\leavevmode\/\fi + \bgroup + %\pexa@doopts{#1}% in \begingroup, at last + {\pexa@cverb@@verbatimfont}% load .fd files with undisturbed \catcodes + \pexa@setupverb + \pexa@cverb@catcodes + \catcode\string`\{12 % restore to other + \catcode\string`\ 12 + \catcode`^^f7=13 + \def\reserved@a##1^^f7{% Dat: define with current \catcode`^^f7 + %\showthe\catcode`-% 3 (math-shift) + \pexa@cverb@outerc{##1}}% defined in examplep.sty + \reserved@a + %\expandafter\pexa@cverb@outerc\expandafter{\iffalse}\fi + % ^^^ nice trick, but doesn't work inside a cell of \halign (! Missing { inserted) + % ^^^ why doesn't it work in \halign?? -- even the arg may contain open-brace +} + +\def\pexa@nomath{\relax\ifmmode\hbox\else\leavevmode\/\fi} + +%** Dat: we need \long for index generation of \Q{\par} +\long\def\pexa@Q#1{\pexa@bsdiv#1^^f7}% \Q +\long\def\pexa@bsdiv#1^^f7{% \^^f7 + % An evil #1 may contain \fi here, so we have to be very careful. + \ifx\protect\@typeset@protect + \expandafter\@gobble\fi\@thirdofthree\@firstoftwo + \pexa@nomath\pexa@overb@noe@a + {\pexa@cverb@nobackslash{#1}}% + %\ifx\protect\@typeset@protect \pexa@nomath{\pexa@cverb@nobackslash{#1}}% + %%\else \noexpand\^^f7#1\noexpand^^f7\fi % Undefined control sequence \V + %%\else \BackslashDivideIsFragile \fi + %\else \noexpand\^^f7\expandafter\pexa@overb@noexpand#1^^f7\fi +}% +\long\def\pexa@overb@noe@a#1{\pexa@overb@noe@b#1}% +\long\def\pexa@overb@noe@b\pexa@cverb@nobackslash#1{% + \noexpand\^^f7\expandafter\pexa@overb@noexpand#1^^f7} +\long\def\pexa@overb@noexpand#1{% + \noexpand#1% + \ifx#1^^f7\else\expandafter\pexa@overb@noexpand\fi +} +\def\pexa@activate@Q{\let\Q\pexa@Q} +\def\pexa@activate@bsdiv{\pexa@div@setcodes \let\^^f7\pexa@bsdiv} +\def\pexa@activate@div {\pexa@div@setcodes \let^^f7\pexa@div} +\def\pexa@activate@url {\def\url{\PVerbOpt{}}} +}% ^^f7 has catcode 13 + +% --- + +%** Apply default options. +\pexa@doopts{% + samplewidth=.5\PexaWidth,xalign=l,yalign=u,boxstyle=p, + allowshrink=yes,allowbreak=yes,srcstyle=left,usewidth=skipwidth, + xindent=none,yindent=none,source-space=invfixbreak,firstlinenum=1, + pexaminipage-setuphook={},addvspace-top=\addvspace, + addvspace-bottom={\vskip\z@skip\addvspace},% don't accumulate Sample>Source \vskip + vextravskip=\z@,vsmallht=1pt, + linenumbersep={},linenumberformat={{\normalfont\rmfamily\scriptsize\number-\pexa@@cntb}\pexa@default@linenumbersep}, + pverb-space=invbreak,pverb-hyphenchar=hyphen,pverb-verbatimfont=pexavf, + pverb-linebreak=char,pverb-linebreakchar={$\lnot$},pverb-stretchshrink=yes, + pverb-hash=full,psource-verbatimfont=pexavf,baseline-grid=no, + vextrabotdepth=\z@,pverb-leftbreakmin=2,mp-equation-reset=yes, + mp-varioref-reset=no,Q=unchanged,bsdiv=unchanged,div=unchanged,url=unchanged, + source-par-align=left, + } +% Dat: inlineprefix= is missing. + +\AtEndOfPackage{\let\@unprocessedoptions\relax} +\expandafter\ifx\csname opt@\@currname.\@currext\endcsname\relax\else + \expandafter\expandafter\expandafter\pexa@doopts + \expandafter\expandafter\expandafter{% + \csname opt@\@currname.\@currext\endcsname}\fi +%\edef\reserved@a{\noexpand\pexa@doopts{\@ptionlist{\@currname.\@currext}}}% +%\reserved@a + +\pexa@@restorecat \let\pexa@@restorecat\@undefined +\endinput% examplep.sty diff --git a/macros/latex/contrib/examplep/houses.eps b/macros/latex/contrib/examplep/houses.eps new file mode 100644 index 0000000000..421e850c79 --- /dev/null +++ b/macros/latex/contrib/examplep/houses.eps @@ -0,0 +1,34 @@ +%!PS-Adobe-3.0 EPSF-3.0 +%%BoundingBox: -4 -1 91 30 +%%HiResBoundingBox: -3.37561 -0.25 90.25 29.71527 +%%Creator: MetaPost +%%CreationDate: 2005.01.10:0943 +%%Pages: 1 +%%EndProlog +%%Page: 1 1 + 0 0.5 dtransform truncate idtransform setlinewidth pop [] 0 setdash + 1 setlinejoin 10 setmiterlimit +gsave newpath 0 0 moveto +35.45288 6.25122 lineto +32.32727 23.97766 lineto +-3.12561 17.72644 lineto + closepath +[0.9848 0.17365 -0.17365 0.9848 0 0] concat stroke grestore + 1 0 0 setrgbcolor +newpath -3.12561 17.72644 moveto +32.32727 23.97766 lineto +13.03802 29.71527 lineto + closepath fill + 0 setgray +newpath 54 0 moveto +90 0 lineto +90 18 lineto +54 18 lineto + closepath stroke + 1 0 0 setrgbcolor +newpath 54 18 moveto +90 18 lineto +72 27 lineto + closepath fill +showpage +%%EOF diff --git a/macros/latex/contrib/examplep/houses.pdf b/macros/latex/contrib/examplep/houses.pdf new file mode 100644 index 0000000000..53a80cd176 Binary files /dev/null and b/macros/latex/contrib/examplep/houses.pdf differ diff --git a/macros/latex/contrib/examplep/pexaminipage.eps b/macros/latex/contrib/examplep/pexaminipage.eps new file mode 100644 index 0000000000..c59d8997b8 --- /dev/null +++ b/macros/latex/contrib/examplep/pexaminipage.eps @@ -0,0 +1,1230 @@ +%!PS-Adobe-2.0 EPSF-2.0 +%%Creator: dvips(k) 5.86e Copyright 2001 Radical Eye Software +%%Title: ttt.dvi +%%BoundingBox: 133 476 478 665 +%%DocumentFonts: CMBX12 CMR10 CMR7 CMR6 CMR8 CMMI10 CMTT10 +%%EndComments +%DVIPSWebPage: (www.radicaleye.com) +%DVIPSCommandLine: dvips -E -Pdfp -ottt.ps ttt +%DVIPSParameters: dpi=600, compressed +%DVIPSSource: TeX output 2005.01.11:2140 +%%BeginProcSet: texc.pro +%! +/TeXDict 300 dict def TeXDict begin/N{def}def/B{bind def}N/S{exch}N/X{S +N}B/A{dup}B/TR{translate}N/isls false N/vsize 11 72 mul N/hsize 8.5 72 +mul N/landplus90{false}def/@rigin{isls{[0 landplus90{1 -1}{-1 1}ifelse 0 +0 0]concat}if 72 Resolution div 72 VResolution div neg scale isls{ +landplus90{VResolution 72 div vsize mul 0 exch}{Resolution -72 div hsize +mul 0}ifelse TR}if Resolution VResolution vsize -72 div 1 add mul TR[ +matrix currentmatrix{A A round sub abs 0.00001 lt{round}if}forall round +exch round exch]setmatrix}N/@landscape{/isls true N}B/@manualfeed{ +statusdict/manualfeed true put}B/@copies{/#copies X}B/FMat[1 0 0 -1 0 0] +N/FBB[0 0 0 0]N/nn 0 N/IEn 0 N/ctr 0 N/df-tail{/nn 8 dict N nn begin +/FontType 3 N/FontMatrix fntrx N/FontBBox FBB N string/base X array +/BitMaps X/BuildChar{CharBuilder}N/Encoding IEn N end A{/foo setfont}2 +array copy cvx N load 0 nn put/ctr 0 N[}B/sf 0 N/df{/sf 1 N/fntrx FMat N +df-tail}B/dfs{div/sf X/fntrx[sf 0 0 sf neg 0 0]N df-tail}B/E{pop nn A +definefont setfont}B/Cw{Cd A length 5 sub get}B/Ch{Cd A length 4 sub get +}B/Cx{128 Cd A length 3 sub get sub}B/Cy{Cd A length 2 sub get 127 sub} +B/Cdx{Cd A length 1 sub get}B/Ci{Cd A type/stringtype ne{ctr get/ctr ctr +1 add N}if}B/id 0 N/rw 0 N/rc 0 N/gp 0 N/cp 0 N/G 0 N/CharBuilder{save 3 +1 roll S A/base get 2 index get S/BitMaps get S get/Cd X pop/ctr 0 N Cdx +0 Cx Cy Ch sub Cx Cw add Cy setcachedevice Cw Ch true[1 0 0 -1 -.1 Cx +sub Cy .1 sub]/id Ci N/rw Cw 7 add 8 idiv string N/rc 0 N/gp 0 N/cp 0 N{ +rc 0 ne{rc 1 sub/rc X rw}{G}ifelse}imagemask restore}B/G{{id gp get/gp +gp 1 add N A 18 mod S 18 idiv pl S get exec}loop}B/adv{cp add/cp X}B +/chg{rw cp id gp 4 index getinterval putinterval A gp add/gp X adv}B/nd{ +/cp 0 N rw exit}B/lsh{rw cp 2 copy get A 0 eq{pop 1}{A 255 eq{pop 254}{ +A A add 255 and S 1 and or}ifelse}ifelse put 1 adv}B/rsh{rw cp 2 copy +get A 0 eq{pop 128}{A 255 eq{pop 127}{A 2 idiv S 128 and or}ifelse} +ifelse put 1 adv}B/clr{rw cp 2 index string putinterval adv}B/set{rw cp +fillstr 0 4 index getinterval putinterval adv}B/fillstr 18 string 0 1 17 +{2 copy 255 put pop}for N/pl[{adv 1 chg}{adv 1 chg nd}{1 add chg}{1 add +chg nd}{adv lsh}{adv lsh nd}{adv rsh}{adv rsh nd}{1 add adv}{/rc X nd}{ +1 add set}{1 add clr}{adv 2 chg}{adv 2 chg nd}{pop nd}]A{bind pop} +forall N/D{/cc X A type/stringtype ne{]}if nn/base get cc ctr put nn +/BitMaps get S ctr S sf 1 ne{A A length 1 sub A 2 index S get sf div put +}if put/ctr ctr 1 add N}B/I{cc 1 add D}B/bop{userdict/bop-hook known{ +bop-hook}if/SI save N @rigin 0 0 moveto/V matrix currentmatrix A 1 get A +mul exch 0 get A mul add .99 lt{/QV}{/RV}ifelse load def pop pop}N/eop{ +SI restore userdict/eop-hook known{eop-hook}if showpage}N/@start{ +userdict/start-hook known{start-hook}if pop/VResolution X/Resolution X +1000 div/DVImag X/IEn 256 array N 2 string 0 1 255{IEn S A 360 add 36 4 +index cvrs cvn put}for pop 65781.76 div/vsize X 65781.76 div/hsize X}N +/p{show}N/RMat[1 0 0 -1 0 0]N/BDot 260 string N/Rx 0 N/Ry 0 N/V{}B/RV/v{ +/Ry X/Rx X V}B statusdict begin/product where{pop false[(Display)(NeXT) +(LaserWriter 16/600)]{A length product length le{A length product exch 0 +exch getinterval eq{pop true exit}if}{pop}ifelse}forall}{false}ifelse +end{{gsave TR -.1 .1 TR 1 1 scale Rx Ry false RMat{BDot}imagemask +grestore}}{{gsave TR -.1 .1 TR Rx Ry scale 1 1 false RMat{BDot} +imagemask grestore}}ifelse B/QV{gsave newpath transform round exch round +exch itransform moveto Rx 0 rlineto 0 Ry neg rlineto Rx neg 0 rlineto +fill grestore}B/a{moveto}B/delta 0 N/tail{A/delta X 0 rmoveto}B/M{S p +delta add tail}B/b{S p tail}B/c{-4 M}B/d{-3 M}B/e{-2 M}B/f{-1 M}B/g{0 M} +B/h{1 M}B/i{2 M}B/j{3 M}B/k{4 M}B/w{0 rmoveto}B/l{p -4 w}B/m{p -3 w}B/n{ +p -2 w}B/o{p -1 w}B/q{p 1 w}B/r{p 2 w}B/s{p 3 w}B/t{p 4 w}B/x{0 S +rmoveto}B/y{3 2 roll p a}B/bos{/SS save N}B/eos{SS restore}B end + +%%EndProcSet +%%BeginProcSet: texps.pro +%! +TeXDict begin/rf{findfont dup length 1 add dict begin{1 index/FID ne 2 +index/UniqueID ne and{def}{pop pop}ifelse}forall[1 index 0 6 -1 roll +exec 0 exch 5 -1 roll VResolution Resolution div mul neg 0 0]/Metrics +exch def dict begin Encoding{exch dup type/integertype ne{pop pop 1 sub +dup 0 le{pop}{[}ifelse}{FontMatrix 0 get div Metrics 0 get div def} +ifelse}forall Metrics/Metrics currentdict end def[2 index currentdict +end definefont 3 -1 roll makefont/setfont cvx]cvx def}def/ObliqueSlant{ +dup sin S cos div neg}B/SlantFont{4 index mul add}def/ExtendFont{3 -1 +roll mul exch}def/ReEncodeFont{CharStrings rcheck{/Encoding false def +dup[exch{dup CharStrings exch known not{pop/.notdef/Encoding true def} +if}forall Encoding{]exch pop}{cleartomark}ifelse}if/Encoding exch def} +def end + +%%EndProcSet +%%BeginFont: CMTT10 +%!PS-AdobeFont-1.0: CMTT10 1.00B +%%CreationDate: 1992 Apr 26 10:42:42 +% Filtered by type1fix.pl 0.08 +%%EndComments +11 dict dup begin +/FontInfo 7 dict dup begin +/FamilyName (Computer Modern) def +/FullName (CMTT10) def +/ItalicAngle 0 def +/Notice (Copyright \050C\051 1997 American Mathematical Society. All \ +Rights Reserved) def +/Weight (Medium) def +/isFixedPitch true def +/version (1.00B) def +end readonly def +/FontName /CMTT10 def +/PaintType 0 def +/FontType 1 def +/FontMatrix [0.001 0 0 0.001 0 0] readonly def +/Encoding 256 array +0 1 255 {1 index exch /.notdef put} for +dup 33 /exclam put +dup 43 /plus put +dup 46 /period put +dup 50 /two put +dup 61 /equal put +dup 73 /I put +dup 77 /M put +dup 84 /T put +dup 87 /W put +dup 92 /backslash put +dup 94 /asciicircum put +dup 97 /a put +dup 98 /b put +dup 99 /c put +dup 100 /d put +dup 101 /e put +dup 102 /f put +dup 103 /g put +dup 104 /h put +dup 105 /i put +dup 108 /l put +dup 109 /m put +dup 110 /n put +dup 111 /o put +dup 112 /p put +dup 113 /q put +dup 114 /r put +dup 115 /s put +dup 116 /t put +dup 117 /u put +dup 118 /v put +dup 119 /w put +dup 121 /y put +dup 123 /braceleft put +dup 125 /braceright put +readonly def +/FontBBox {-4 -235 731 800} readonly def +/UniqueID 5000832 def +currentdict end +currentfile eexec +D9D66F633B846A97B686A97E45A3D0AA052BD0CE60552BD63101D7CDBEEF5B11 +69C4683510B2FADF333ECD5F7DF46ABA2092A18017660DBFF15E4F680F239AE3 +BF900DCA9CEB2D89956EF631505D886FD9DC10B5F09511DDD76BF7D97B7294EB +87B7E694E1492FE4C8FF4647D78DBBE454FA5D21530B06067FA623D5A42084DC +D179DD50890D3BB55920461134B2D35FC10D67F1B738B92BB60A31C00C3B4286 +20C74043FEEED6B85355CBA09047C1E39FB7FFFB7327F5853FE5E14EF0C4D6CE +693E9AD35B6A143197D260EC37D46D70E6E1F341418D6B8D98F3EC5175534BFD +A1C5A59D970097EC281FD7551BF19757CA19B80A9A8F79FB8D001FAB0BD9D1F6 +BC5CF666D96BA6D1703E1F3F3C89C248650D82FCCE91CE5A4A808272A15DD312 +BAA1BC52182D3E5495422FBA55A03B0FECAC42A1FD9D30BAD89D0D9AB07C38E3 +70125F5F0178B96B256733B76F8E42C9DA733952F8E0A76C56DE4C1624B92E25 +4DC881886F50C742DD4F1AF138FC9102486423C42CC7DCF1944D452FD44780BA +2B566B2E9E703D7D267E343D3638900DF1BB1D1D677263274A65D749637F1D67 +956DA71D5D4A90CD652E619C850C3899BE5B495FF5866850E637B6AC4C1E0B09 +56824D780ACF953376CD08826A589493967FB86BFA92535875126F296AD982D2 +52F42C05A38D05E1FC2628EBBD513BB68191C068C97B39B06A11C78EA1B6EC3A +57B604B1E811491A7D4BD984FE1C837FC915745713FFF799F7CCF48604F9C87D +558A9530E14186945E0072217011906890011B8123173DA367001D7F1233F2BE +1A5A3D088CF2692D84EDC3933A05B14F8D5199634DCC462202526160D6A53A1F +A4584A23D81349744652CCD2BEB16B6DF2BCED6066E4E8E6E15FD0650FF31B98 +DDF0AF7E679BEFBC9AD6A7F3EEF427BD743926D0E025F2B4059CC63BEF986BBB +0B56E23D525237EC65BA6D44F8868A102FBD8168EA360DF37F9629615F4F6B76 +BE0ADC9236D03A32453D9DB22EFACE42066C1654D4BC834035091BA033A67F0D +05F66E65BCE490581DDD1534527869B773A633007B1D13EC54E032050F72CB9F +2475C88FCEDB89473A35FE1BF2B2598E058432B5A73B564B686DDCC9CC86DA95 +EBCFEEC78F2EB8D616C4154F728A9FB1351B4CDE8CFD79570254A3DAE5EC0D5C +BB03FB05FEF60444405DB6A1FAED4401056DB1EC0003BEDCDF05226EC28523A5 +105A981ADA74068843208137652ED54DE66F7844DD74DFBBA8DAE583FF40EDD0 +224BE4537DA0FA75D271A8AF594F457F6A083C4150686FBBE19CAD0A7D9EF756 +8770B4B0B8337273A729C4EAFC2F760DAF84AEA8C22737575C56E24E948DC181 +36C7E7711B19399E666CF4F05C5E999B0E5009664E3D8B2AFE2F6D1B7942425A +F95652CF8B3D7EE1C18DC6F5CFF32CFDC12E56C67571DB18074244706FF70C8F +0D99D0A7D13EC635CBFAC5E6B4A812BD40B5E72F5BE5C82AE50FBED4197710C4 +0CF3216D728EB8C2178830FB7F8688C8E9244135C1FDAFA7C6268DD65A69C99C +D462C904015B0F75F3C3598B9159C27A7474A14C2667BB0E61D844E61556913E +88A7B77D059C3F01FD43F7CBE8613AD9DEFE527E9840C2E17A046E6D0448DFDD +28BC5AC60665BE43E5B5D258C9877F73CB40C1A791398DBACCACFD9BA580690C +28C670CBFF1BC050B78C7A6252F69DCC51F96D615DD09F06C49A96405FBA882C +32B8B91CC2359CB1A5444DBD6465AD69F3E231D1BB06C3CFEA8EBC773D25C930 +9D669A7B77426DB286C81E5B0D9E53DDD54E0E5F7CF9DF173EFE85B2D105CE03 +A4115D35E651DC65C8B2F3EBFF3546094C740B89631B4473041793B28A94C493 +76C3884FD2E867C831AF3D34AE700CA6ECE3A5055D73E042A63D4DE17DA33B5E +DFF11A363BF6F34A6C369379F6AF0D737D2C31ED8AE05A83360A59F80E2AEA43 +59DC89AE50533BEFDB3604D0896F1A6A33544D9F886A489829A66A2B1AFE1E3B +999D7CBE7C0393290B8A96163BF0E3876D838F2377ACE01B35A144AD223C292C +1B2116521CB868DD4D8D4554EDE92FBA84DCAB7A7397E65DF162856C4FBEFDD4 +07BEBCCE3D5993A5B730CF1C9459A0BF59184190039FFC47EA7097F255A4F263 +7EB1D8669DE75644428683C0BFB9B12DC8F3FD9CD1D8FE11D2920E221724C4AC +4E78E39BFE7FB68A754132E3A65DD0DBB2534762684328DEA2A900498E6A6A35 +3D25B55E72492385FBF6890AF8BCF3C3C411D54E4BDA7E27C3E792B28ABE5420 +8C5AE5B1FEF559C8F91C03AB50894908A2462B71E9701E82D78E264C3FA9A72B +E92F7C3A8E82D991707F97574907F1363F5D619BA9AAD5C235612097FE0ADAD9 +966607D0DA406274912836AF1655EC07670B5834838147DFFD45DE6D0EBC98B5 +8D0F6932D6E89F812A3B59BE0850ED273F6D6391E0CC547E484CDE62CB3B169B +856933D03645CF9B88B6FF7865A963E753E4D0239CBB970684F269501ABF5F51 +47B1FB342C6AE1B3A2DCCAF54D7655B71786720AD01D02B9A625E5083115F079 +1575075773EAE8EB3DD6075C195F9B32F17246B50FA380399D85DEF4B83555AD +8116F4CE525248F015305E2759731057287BBC73EE14F066731C62B88064D155 +58A3899485094F18CB7192938D55D286205CFD205B5D9DE01BBF0CBCD6777890 +99F4356ADA3724A46BA33942F23DBABFBEFDAFE080F5F86999105105A36815AC +57C61DEB9A5D9AAE27529B28F0A04ECB0F54ACC3F52AC8D0994738EA457AC210 +796E2B014C0E9268BDC3FF4A78D4BBC26A3F90899771E21AFADC5F50A0E24EA0 +5C4D0EEE1DACCE823B76B2FFDA5DF09575F0E7D4EB9B531771101E6A4F70DA65 +A4E00ACDE3B8EE07824E0E38A6E68E00EDBE87B4FFF05FD3B9B86B9AC6474359 +F253AEBCADBBF4CBC12E094EEC7B6F5FA9DFD670DB44E4D9EDB833934E0C41E8 +AE2565DEBAF39C8B8D6916E23292375AB3AC6C202D45A0A359F4C562B4589917 +B033B60863D13CD4D71DD1505474EC5A8A984CEC21E2C8BC48D2368610A6333D +F18DE35696FEC1DE053D7B261D0C5175E169ABAD48FDA0A0E6924BC4927B3BD7 +97F87B0482769C8AF52B4833938A89C62DC041BA6CA245DE1B638E166E719E9E +D93BC6E68C9F01BED11BB089D2344E3B558E671836374FDCA45DCC9B9A0E9784 +459CDE53BC3506935F4A452AAF335FEBE7EB5ADD3B8D2267BB89E1DC42189D61 +CD055C20C6733F543E81334512F5CA831A56638A5934746C27AC40763C4BD68A +43FCC292A99219A6249A3F15D27B9D78976FD1C4E328F632E6B5BE5E604EEB22 +17124A53CB14241C7A01C8531F31F8FAD3DFC51131807025C8830C5E18429253 +684BE2580643C2733B09A0CA998B5ACEFFA43EF742A09B38C27BE0817CA1FE60 +F486B3DAF4677F409DFAAC7A4CFA68862BC8E0DB89EA9C0CC9CD63EEE8E4CD71 +74FC5BC285012A1B4F6310B101D84C58FBC3455E924C36326CF025EA24CCED63 +20EE170F865026F2C5E5F304EF461089ADD2BC4E646DF4E113779A251A26083E +89C9D9F6E69A557B8DBCAEFD9F0CAAB56EEEB10945EF46B4BB272F162A485198 +E11D6D98DAD0281DA1AE11CD10AD147C092E94E99B9C6A7E0E4D888FDCD9AB8A +4CCECB804C5932D367201140432F8709A373DCC6B4A5293A35D164E0DB5989A7 +8C57601750EA79B6E4FA0004EC7BF773ECBE1E5980C2964E89F21A6E07E7EE70 +435CCDC415381CCD4AA6ECD7F82E8198A5133EB108946A6E6E502313D161FEDA +247C838C4235424E04724320BF16BF8CCEBDC780049F6698D84A6AB853DA69E0 +F6A342CE4F21C998C4C9053A2E6F3B2D3E6EB56D69F3E9EE817630223C896E5D +C668831130B2A44E7783ADC67AC2834CD2F53A8650F3029772B93741C584029C +A8206993585DC6F44E342A82CDDA06A94F7DBA053B27A81747682F8AB48AA0C2 +1F91B4A9D07169D0F4CFFEEC124D9D6CB115AF830C36CA535F9249DCC97C234D +4DE794153AF188639951F9F79A5DA9D91BD67D0D3086C41C3E64E37EFE5B961C +1034BF69EDADD0128C5F3A726A0E888B0D303D730260153EFB0F930F6B3FB9FB +525CBE37F3AD9BC82BA673DBA9F7983C84434BB5A283282659C7C7D5FBDC84A0 +0A563D5550FD7FFD450FD8D37D77BA0144CED5DF51E402C28599962D48546B17 +F0DCA5DF3708F5ADF637C422D841C3CEE1C6FE8219CD831A36EE54C67D913200 +EDC96B54A24057C91B0C8E6349421244C1C305BB4B577E1EDD25CD014E4AA19E +6A740216F5B31A44360D4C45B58CAF1BF05B5323849A23504EAF9E1009D66BDD +F6E754EF62B22C0FFC6982B0C908AA2DA8A7615DB2D01DACA1BEA080E818A1B2 +32FEEEEE192F36423BFDB6B21EC0C6AFDE0A818835470016361A49D8181E2B55 +AE44FE0D940D7B65AC3B7B34B85DDCDD071D819D2257E69C6AD36493F50526B8 +4D8339D82AB5CB4876B57A8CE6E2B3AD31AD2D6C816DA49EAE41E7E2A9CB4941 +0E88597B200982E12C954F7127A87174FD8E43645B2778963EC938566BCE2222 +A48DD87BADBDD84C2B335A0B9AEC29B75A3228A0E6ADF9C5BB07584215BAA86D +76E7D5779CC18F150F3DEF16F96D0FC2056E31503E418B3C596B4B488F5E2080 +49861609FF0859BDCAE7C512FEC5B2DCB55E0C70C2F228EA462F94AC240E3A5C +3C826EAC1E5BEF9BE73B5EC03E11A974D7C7E5A927443C221564FA60BD17F69F +B79D395A7598DB87530CF3C863EF12B7A50DF1717FCF8FBFCB63CF0CF71AA505 +8AA8BF3834A8153C5956D5BD39A9B95940E8B09883DDA075608C28EB70654E55 +3812A6B985A843278926DDE3D1E3DAABE1F2E1004A06921036EEA90DC43DBAFF +883EE9C8679462B5967E172E7D042A663EC19E367D774D9C8099CE00B141CCAA +2AACA634CA5F09C539BD783023F1FBA5481B2FDE982D7419905B557676FF6AD3 +469A96D9848E092EBE0E12701424532E7BA16436A09AD86A508147B8AFD51D4A +7FB8ABAB5934D5BA5FB38C127EB6D0A6701B74CC339873B902BC0104464F2CD4 +7CBE7B1776FA19CEDAE12E28FF694175B79A45526A4A304A06205887E7370E1F +1EE9ADC9E59BE1901B19C688958D047C9F29345AB95082E3824B1A265C9AAC9F +AF9D140852FEC386C2F6A725E07C66F8CAE2BEFC66AE9B518351C5C4FB8D8E3C +AD01B5BB34F02D55C16BD3F22F8291A167263CB5E3DA51D044AC89006DB4E75D +A6B80CB8956546636950678155FF817035265D9CDFBBB1B1F37A23C93A7ED686 +FB5DF1BBDB281CB829FE2EBAC50ED4B270919E8A879070DE6EBE224549F86702 +33D52FAF0A6F223C90147B7EE309BE0AF7F8A989D88277BCE59084353F65C774 +F0DFB642D63057A1099387A6F8A01275B7F28880BBDD02DD56E18AFB02E938C6 +409FC32ED49B039AD70EAB88F468B62FCFC9EA3A81956B1BE166D30EE9A92787 +6D207AC144FBF051AC3282925C8E9A56747BC86C8CFA876E881732E3C7C2398E +0A766FB1CAB073CAD9F857124E7429AEFBA5387A67148C1FE73CA96739CDF03E +896C1C1BF36FD1EFC304EE793AD7AF01F6A17E3DE84DF0C489059C2A66D32BB6 +C7F1B779B66CBE8A633D7505D2D888A1AAC5D3C776B055EDCE49CC4E7AC4826C +B209E12AF02AC31F4B1CB3D20A528BB46667857CEEDDD2492196392570EEBB75 +3DA4FABAA51A4DDC7C97E9430CEE0B756B9BF915A794CB09F977CA47D7789B6A +124B6B61BD45C98F9D06255422156D188377E7CCC28A4AB72928C715219B8527 +5BFA00AB13A49DC5B1B51A4731F2F40E77283AA71CBB3D9D9B345DA4930F1264 +C36E37DEB502445978DEAECF0B2261B323B0A094BA7F94FF1F33F6524A41DA69 +3BBC390D2D01C14DE909BC3B7E6AD1D95AD37B8249469E620C9693DA39F5A262 +CA6D72FEAC9F541FE62005412FD1FC4183021B93C441DEA470609C12C3224B5A +36909EBA8A8CF956C27B3DDA368F567349C055EF97DA302A7B3E0400959D0AC1 +3867699A308E4DA45CEFE53C27CEFD94E2DB1C6326D85D2F97DD8EBAAF03B0F0 +2B9564C7695720EC97672B523BCB2A6383E332A7E269718EE84AE2D8F1CF3137 +C0D7871D4D984D4B61FC8DD9E1F257159748A24ABB08EA8748D13C1F8B378007 +FA2283D53D40C726563E5E2F855E07EB669FAF92AD9E0CA313AF85B3793BE344 +BEA4AA6656E681CF10C41556B47992BB3ED6AB89300638844AD37B1B398B8A8A +B575FFB3A9F1DB9725C8CE3326C445B86F9376E1832903041A36B6AB8DBF0CB2 +63B68E7CE4BFC24EDA3DC447CF3C73C8D9F77EDED5657396B8A882C72F026F99 +EA3233503548E3021BBE7C1CDE3F372927349A85C5FE46C8B5F41F1DC760D0D6 +0AB17DF3719BEC33EECC2009DFDC1141CCDF44519194358408CC739534826BE2 +01E807A1582517F581BD27F292537779697BDF5A02A96F5BCF9A42045026D975 +1E31BA13A17406A3ABFF6A9BF95D5AA11B697095199254A5B9B75CDA4987B85F +837DBC14EF72FD72090B701CDD64E2A72A6314E5619C64C87C71910461661214 +E595E76223EE16B1D02350E69392CC716031D9D9ADA7F578BEBD392E08A6297F +3867EF22624FA370661B27893399EB67C6B830CDE3776C4BEC3D4A761FB1C601 +31C5826FEE9D1943287939C2268BF71DFE3B9EF1132CDBFC583AB60F0E5A5517 +B44C80C3D3BF5644FE4D819697035A6B284075555BC824A0771E04E27459533F +73399708AA4F60B95975753C2CA39EED4220EC66965083F161B765D140F95EC1 +53C9B9B0B68D76501146E4AAFD79D2832A040E82203A5C2391A38C1AEA2683FC +1152B17E6840CFF81D3C3E4695F6753183A80ADC9BAD1B1A906A039A76AC0B3C +1CE33E0FCB7043DF2839896AE1E3365CFFF5D22FDEB499EA6B4A7697D6F57ED7 +DF0D7D6B033310E1F070C88C00CB2D80C4B2731074C47529ED943F8C2038086A +D53DFA586FA7D01ABF1DA98EA7B3E6AF0AEEB6C857BCDA2C8054217DC8CE03C4 +4853A3098CD6E5749520356E426424E191524706E9E0E7844F5857BAAF7205B3 +2F80222C6DD28187312640804F5861006ED823DB5733658779D5F0A52A222809 +875A952860F984F346DCDA996CA01909B01306031EB09D146ABE5E8BBB59A0AE +D6956872E83B52A08422C7EBD7AD06E3743ED74E46617AEA02EB7291C506CFB5 +CEA31718D58ED8E58EF3A76E0F7D1F99944E5B68339637D8B735CE59737052EF +22B71BD51D2B495950316F25FFF2A8A7750CCC9B31C7FBAAF06390072E716610 +62F229CA0A2360923C56A7EEDDCEDF6E5BDC52EFF2F2BCB8EB850630E4AA21A6 +50FA42DE2DF0921E7E81720152B67C9DC56BEB85B61F3ED453F539C5CB15D42E +87084853522860D17657D5202F3E7ADEB0ECE4B22D7048BAF3D9672C4A79134D +C41EC2348F8BB0B1B2EADC2A12A470800F58D0472216AF2433F2AEC2E323C727 +ECC9FA51374061504870958C5317B24287EE7D6D57EF6BA411B553402EFB6D1F +8BD267C75ECB0C459594F47DFCB9541C7E044E6E3809FDD24FA5ACAA152169B6 +2BCAE55A2265DA051169E097E6F3AF4312137275E8458D65D67A7FB33718BB3F +756C1C8A58D133FF7FE90E4DE309BBF63209032F09BDA9803E69857F81602FA9 +81D679535641F85B8B27F6D9A061FE8DAAE9CCF303AF3CBD6349BEF8F255CF01 +B8854451BF10F88A70A93C42715C7BABA7AF9E33ACFF97FD25EEFFC73EFE5E07 +7DE8B2408A998C00E66404ABB6499B679AA9C07A884BC32F9872948A8F80E40B +49A820BC5C0825CABFBF176BA1C2724AFA2C4C96CCD491BD863C6CD9FD56ADA4 +6F4B58A48A17591E36EC6D28DBF099DA5E0280729CD16C39ED7C138ABD06BF3F +D6C42C495B17FAE063EB866C76D080F19C672720BCE3DE1F68CBD822CE760726 +7940F4E3A98BEF9B627C34FD8CF2A3DCADFDF8D1CEB40774C9A31428201DC2F3 +56E0D0F64AC53776C8FA5798A7FAFA6E4C89F559A8D4FEE56C55674183A8D806 +79AE8893D6379C02DDF383AB794D919B9F8A969E66BB65091B8FA30C0072F526 +A71BF281D414B2EF5FF6785CD660CD9DE97BE6091D2D848DB21B98003F1754B1 +23311EF0E88974325039D6803A3685537DE558D57FE11D6B8DB158F08A8FE9C7 +9826FFD9EBF96860F6582C66656349943A3388E972498274653EAB5EB2AB684E +FC37F5E6AE824EE7472F10A568C440FD28C29B9CFD65A6EE35CE4A20C71F49D8 +F39147D03D4ACE8D1C1BF97E489028F0948F8065DFB870A3507B24BC4618C670 +1347377B053891C3ECE3C9ED173460E4EA5DF2F9BE82CEAB56AA9F5F0B99001C +42725ED81E522D07529EBC4BAE8A1992CDBB2E51CB95A03E6962405F9ADC91F5 +F5FBDA3C399131AA8A30633D9C4305BB5BE88939BB3B809DF5C851055E2E9B8C +668AC0D32C28455A90A504A63F805434A0B671A7EF1F701FF24113383527AD51 +EECD3FCF92918D0799027BC6AC8D7338222AD224D740810A72C69C3E6BB34FDF +8F6DE86784E6A2C46BD9469CE86C05CE23C4794EFCB09B6DE23E90F40D308B9F +970C6D6B644AB71DA41E1A66672A6D63EA1C9F62CD8EBBCBA03D77AC96BF4AF4 +D89EBE07BAC3261547B439A17F96893E38A3D13F842231D188413EB244C859D8 +9D6D0885535C91E0F0B5BE61BF3909FCECA6601FA3D5FF54792CC228ABCD2BF0 +AA8191A8B79FF2073828172E4F902AF0BF209E8893D7AC25F1F624E857A1B81B +5842D6CF8F992BD8ABFE8EEDB53C89C290CC25C2E6AE55B10D9ECF6ABA66584F +9869D5E8893E6D8C5ED81CB2EC303A12BF8212DDF5CA0433EBB844793B3EBD27 +162578DD0402A75A3158BF591F0A2152AA1520F795828356332ABDC7DE0C7AF7 +CBF749F7AB0B32BC02B2DF6CCC55D1EDA9F51ABB9B671A12CA4D3392363A90C9 +0642DCDEF5B2097B9608EF09C6D1F5DDBFE47AF7781E3F2B606839F81D3EA9A1 +C7D21529841F6CBC96856FAC82EE5EDB7FD800AD6AA6AE8644CAF46B7230A9D4 +8AF8D66B98B0F36074D686F0C1CB0AEECF7F2DE137F269126685A63C0BCA2D5D +0C95B082500474E6BB4E7B +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +cleartomark +%%EndFont +%%BeginFont: CMMI10 +%!PS-AdobeFont-1.0: CMMI10 1.100 +%%CreationDate: 1996 Jul 23 07:53:57 +% Filtered by type1fix.pl 0.08 +%%EndComments +11 dict dup begin +/FontInfo 7 dict dup begin +/FamilyName (Computer Modern) def +/FullName (CMMI10) def +/ItalicAngle -14.04 def +/Notice (Copyright \050C\051 1997 American Mathematical Society. All \ +Rights Reserved) def +/Weight (Medium) def +/isFixedPitch false def +/version (1.100) def +end readonly def +/FontName /CMMI10 def +/PaintType 0 def +/FontType 1 def +/FontMatrix [0.001 0 0 0.001 0 0] readonly def +/Encoding 256 array +0 1 255 {1 index exch /.notdef put} for +dup 97 /a put +dup 98 /b put +dup 99 /c put +readonly def +/FontBBox {-32 -250 1048 750} readonly def +/UniqueID 5087385 def +currentdict end +currentfile eexec +D9D66F633B846A97B686A97E45A3D0AA052A014267B7904EB3C0D3BD0B83D891 +016CA6E42BCBB280A712E801A197CB346052F4C19FFBC4E2402EF30C32AA4545 +6CB68C3444AC36E82BD2667B15C62A9FC6A432FCFEA1262B3B3D0D9DEE4469D0 +81E4D5C3C0EF25359BF9388651842C667C5BDF571D8D04532D71FF28EF96CB0A +32E052811F5C6CFFA489A6EEB7B93167A11A21E0E5FFAC944C8CBA8CFDBFEAF9 +10F34A12CAA8E1F6CA82E270D250D12B19956B2391F9E1DFD162BB039DB26FD1 +7EEB76E662919259A59B4CA4B2B38E245C0DE5FB9ECEC17D36DF12909D1E7CB6 +995F17A8D92B6D9D89E7D91FECC8E79704F17E7487696C6EAC08E19471B49412 +F660E77D745978B95D844CD10B246715A35B4212FCF8375ECB677B291AC2B9E5 +E3351C8127372F8D963B78592F289037983CE2C7A12E74C2A09281A9C6620048 +6BA2B27E63CE284C207A91A4F965C4557ECAD27CBCCF319D9F08BF5BDBA3344F +0F364FC5CA048A6002BD93E64331A3EE4C50558952BC3043E65197C99E8BF0FB +B4A636A90E5B313D2D3D6081015C16E17DF3E1F4AD2C9854E7E81B57A3DA43DD +32850859DE806F1A602FAA2BEED9CE72B115A0E9C354CE0EC01AC3C3DCD603F3 +51A64029BBB64344259B9B3542BE0B3BBA37E629193B647C2ACBDEEA78347962 +528E15A1C96B0B51D55D9A6FEAF0A2C62A2B36C1DDD6F8D34DE0A181F0CDD011 +52A3C048C275A6EB38FE21530A5CBAEE232170624548C86F7F2D0B6651D2E17B +79027B89ADC09DC2D316B01E66DA9C871D7C3CF660D9FA80FB48DE6F2FDADCA2 +3FD22F1C1FF1E027A19E94F802B0EA4CE5E25D2B88BFEE7BD06F69E1724FE7A9 +3ACF435FD6FF9A2D7CB519B74334990C2095161BF3A6D56D21E8ADB9970397D4 +C7F0F4C06A003CD5C0F481A760AB06EF328B4361687E16FF0D0BC97E8876DA97 +0B583923A97C5B4237BD36E7B8F65BD5289E37DBAEFE97B1CDF660C2AEED5157 +9711F9E46E15FDFB2DC8BBF5A5AD4273F9FC08F194229865BEAB2CC99ADEFD47 +1CD6B8CC5D7C0DD9FE3BECAA5304F2B4CFFB2CEBFE4F452B210A4B2DBD421DEC +20D9F1996D41E8ADA1EF4B7221B30C1D9E0C552C9C64B7E1D617F29DC00E95DF +325AEC4EF1C0AF1E23433B01D702B53CF858B331ACDC623396C17A2E9FF49FDF +8C14BBE51D0301B46D62DB22F33D860EEE8A1449D0F3BCA864D2CAAFFA46F357 +BCAD57A679CF6F259F6926D953CCFBC66C8DE63597DB85665BCB6240C6494090 +39DA4C3A435360B1CB1876D6A8874B0D402A84E710352C16723C309862733F07 +86FC3610C283AE00D3D87DE99CAB42ACD479CDB4B23CE777AC30E1ABDB99323D +4CC362A658D5BF6E3055A9C73F8957A0CBFC8990B3D816476B75BAD198596ACE +88C517F326F04B0408A51C8FAE06132B36772A8DAE5C7A1AE8085474C6A1510C +990AFB737580D3A6EFA4799764283587D02BA205A0E3DD0DC67421AD77E78F02 +A82C4AF2345F4F2928BEDC51D0359DF10390E2C64BC00E6B6EC338C15E4C491A +24C365E33F472EDA8754208F31B7682195A42A42C65ACA714A7440BC93E7429B +0EF43AA86EECA2E3AF6BB9997CA9DCBB5464FDADB7509D2DC7EC8D0700952B9D +EE5929B25A47C3701D390FAA7E8FD5C00CB68FA77CB688709A0BEB4A7EA249C8 +DF09CF46A9C4274D56DC32E1DB3C391701C182443EF9C0D87F311101FB8BBC57 +38741946093AB52CDA9247ED7DB13A2BA3CBB8403642A0C9D7C6490B147B0DD0 +B796C58AC1163FF17AD8CE04BAAA248CFF17174B52354C61D40326621251E905 +2CDAA3E3FFF3AC72B280799A631B3A79DDC02E8707B972B98D51C01A3995E7C2 +2CF23C6146060C64989E2ED96590CC5A65783DF2297E39216837796538A32ACA +E975CA8A3128BAFFF15B3D5473C6A56E72CF5AF338FFDF9CD8BB8753C01DAE69 +93AE9C4EF232018F5645A81A0784005310E1A2A8DF6195349065E90436E524D1 +AC9FE6C39607C3303746F460D22F842D34D6DBE35FDD2911BB092720EF19F220 +0B6BEA1453C800C04088D96F814CC83C879074BB172967561DDEF704E547C58F +171CBB4271E0D2DD14C19BB56EF60DFAEE158A49E44B058DDA51652008E1E023 +E7 +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +cleartomark +%%EndFont +%%BeginFont: CMR8 +%!PS-AdobeFont-1.0: CMR8 1.0 +%%CreationDate: 1991 Aug 20 16:39:40 +% Filtered by type1fix.pl 0.08 +%%EndComments +11 dict dup begin +/FontInfo 7 dict dup begin +/FamilyName (Computer Modern) def +/FullName (CMR8) def +/ItalicAngle 0 def +/Notice (Copyright \050C\051 1997 American Mathematical Society. All \ +Rights Reserved) def +/Weight (Medium) def +/isFixedPitch false def +/version (1.0) def +end readonly def +/FontName /CMR8 def +/PaintType 0 def +/FontType 1 def +/FontMatrix [0.001 0 0 0.001 0 0] readonly def +/Encoding 256 array +0 1 255 {1 index exch /.notdef put} for +dup 97 /a put +dup 100 /d put +dup 101 /e put +dup 103 /g put +dup 105 /i put +dup 108 /l put +dup 109 /m put +dup 110 /n put +dup 111 /o put +dup 112 /p put +dup 114 /r put +dup 115 /s put +dup 116 /t put +dup 117 /u put +dup 118 /v put +readonly def +/FontBBox {-36 -250 1070 750} readonly def +/UniqueID 5000791 def +currentdict end +currentfile eexec +D9D66F633B846A97B686A97E45A3D0AA052BD0CE60552BD63101D7CDBEEF5B11 +69C4683510B2FADF333ECD5F7DF46ABA2092A18017660DBFF15E4F680F239AE3 +BF900DCA9CEB2D89956EF631505D886FD9DC10B5F09511DDD76BF7D97B7294EB +87B7E694E1492FE4C8FF4647D78DBBE454FA5D21530B06067FA623D5A42084DC +D179DD50890D3BB55920461134B2D35FC10D67F1B738B92BB60A31C00C3B4286 +20C74043FEEED6B85355CBA09047C1E39FB7FFFFB4DD9E83B4F4E0C1A4125BC8 +80D4A83B6EDB84820A2B6F5929A73554F9823DAE4465E78DE6CA791561065B47 +D88DE05CBA8FB48D036EC0A4453FE878BDD8D41D419A8359A1A1B69EBEF51884 +7C7B7477BC127C316BBF99E15035A25608C82051C60EFD5588ADA24656DEB7BE +EC85237245ABAC79B2D2D02BAC1E59BC15C827CA93E90F1E91C74758DC315ED3 +26CD7C2B2A05855F60193D4E825697D12857FE306ED61181B54AFAA2576E17EF +6D3119D5FFD6250FEE58AD2D31870E0F0A3CECF0F2FB08F36CE7A9EE47069B6D +BB798B241AE07622348774A5B2522853821012000FF751F31406D9D80AA5B70F +54EFDCC70CB6143AD386D3CAE998C2BCF32D6F526B1686B0177CDBD70C6E5657 +17D00AA10751219301BF6FEEC25AFF26068E77D5A0AC4C8694D964F05B34FB0D +B96A52A3C3A3601D9EA9EA423D4826B32F9155699747DE2857529D345D4DE293 +D24C610C62CFEFD6F42507AE578E3D22BCE0E0541548842C5F687B2FD983939C +436F20BB8D5F6B587D01A798F500602D1E1AF7C5AAF497A9E2D12D72377688DA +5A37C411BCE8BDF61997382E4FE45D298F51CC21530773C448DA6552A7D130E5 +A4CE300CFD17F8FB8CFD16775CCDA8D6B006AC882BE120D5EBF554FA305D0143 +990A15DAE18B9D4CDDC5E091485C52B6568EC63419D1A221451323A25A2C3A33 +7CDB54C18BD8C7C4E7BB8955C7BABA5FF2814B5528D1EDBDFB183FF072EC27FE +251282514B448A7DE413C8889B38C142ECF18B52A9ACAA2D5A96DAB6777A82A1 +F8D4DA0D2E2DD8C421F055A2BC2E9EC584CAB5DE8F23699C41FF31F1E2FAC669 +C427841767FB94FF6652859B2B91DCC5B8AE6038889833A961CD348A965A5031 +E331E8919FA3E25915B32B1D2653DFC24EA63876BB35DA7E3F614770958909D0 +52243A2D97DF798B338402F8DF585B5D66B8212DBCE7137D3F667D3C4DC21C2E +DE6D89CF2C2290A0DF8B82DC7C200E3F6E05ABE44215DA025BC41EED389DB4E9 +04FE4859B74C6B300FAC9A88A1CED23BEFED7DB24C1897C90D0A55C17142BA71 +073904573F739E0AB4044AFF94C3CBE56A4C20E0F6981937566CBFE24360320A +C3F0DF69E0D21A0E21EFDB8B9D94706D22038BFC45CBD4DD7C35969D982B7B17 +0D670BF70990AAC89B61F717C3020BB8B401CBCD2BDC56797ED8BAF6EF23680D +DEC86E38306BFF32A9E70A9BCD97E2BAFD016BFDA1CCB212CDC5F4C0B311C9E7 +F4908F86CB5EB1E1F3CB7222F0D9CD44FDB4FA56AA5EFA4FF615FD12B6163040 +F8EBD489DA1845E2BD21B28048FEACD106353F478A71B5AD2E43566330F310D2 +2208A291D0DAE5D4B4088C8EC93FF33CBD452BA75AB269A87C19924C9AB7E08C +68F3A98E4C16362E5296B2D3D946BCEA1BDF789ECA49635B7E57A58C04F3A0F0 +0754D788F995D35BFC32F9FC7F1D1050631A5F5F003544AD1DEAE0F5A7C314D9 +68630ED81D4CC19F98330A3B44BC0FB010E7419BB33E840C68A730CB443F08B5 +3221F6C261599BA98C1F616F00784DFA4CF81C3DD72CB1B2229DA7413F4ABAFF +864F7F66C307841E9B2CB1AFC9E0D505C67BD3E465DA3E78BB46AC36610388CF +592E0AE6ABD49D62D00A7DCC1DE521BDBF598D6F8E53121BEDC4CEDE7F59E011 +99BB2CDF31CE345AF41CF96A03A80BFEA643C456A7C78CDD41F2E8194143E6AD +F0AB65036755100A3563B35D18D83FEF4BCDB3D602C191A02E592CC036FA1E95 +781CFDD4F3A90AABD71CF66DDD54212C59ECAC744BCFD5B6AF261A12B230B92B +32D8BAD55F8421AF85671EF67D805C6E76DA885BE5B4BAB4D15870BCBC0DE1FB +36DFF0B017A3BAE10F0A0A82ED2073C674ACCC9FE50CD31317275F449DADABD1 +54F4430B2EA8D630E1D034BC8B7AA6B265D60FFDAE5F20DC90E291CA73B7B7C7 +7EF6EA62C15488F1D1B218B6BB40F1247EA905FF8A86E15425B6CF441F118B85 +EE096289A87F761B6A1C73F526D768D0BEB20A290A416900FC1B3907F22F66CE +D04B4AE289CCB1AC07670BBFF428CC6342A02EA99DA2AFC4DABED35DC004FF31 +B614BE85E9849625062922BAC1C5B6C6D6D6E6C9237C06278B9E4247DD755631 +CCA586935E2B05F5B4F4BCA42BAF74FF481697C91AAB5632C120B3E6CEB60B68 +B307D962C097E7D4FFFC2B60350B2BEE2E551A5B8336CD6B26CCFA46C5AE0C0D +3330B5B3387DB4459EB6B942F4FA9F5C5C2BCAD11FE7AED03CF784DA57500B5F +AEDA4648FB308D4832F5087613D9222BCE50296B700EEECED993147696EEF029 +EFBBDAA2CD21857A64D70139CF59B223F09C429AA9B6379A59029C7DE48CB871 +D9C72072CF2A788095C62329FF3E560DD1FD2F4C16BEFAE89C43C4F33A930A56 +E74325A16E868296DF22991867730F290715FA887917EEEA7AA5CF290FD383D7 +0BB70A6A5599B54427F761F49D54E96A41DEF6DB702BFE5BB5C2D8AA07B0D3BB +9F9BC12A1240168DE14536E236E726BD8B4A6F754C9192F7219F450F4A8055A1 +02616FC93E36E5F5C7B0744D2D2401350F96DED4FE756B65DF93AD4CCF16CB52 +AB8BD92628F1285672AB4AF0DF4CE9C8583562BAC83B7012906F79AB24D40EE2 +232C35A86A8044ED5DF58DB1D28B214C37E0573DFFBAB3FDE9D5882EB6EBB237 +AD43A5C36C197FA1BE272E00CE400B6C3E380BEC8CE6657278B5A6B458382DD3 +434F9DF130F570A507F3C9B6B38E4529EEB1D9981943CEFD891CB398EC768D82 +59AAE3BE10585CD6C1665E2CF0BB6C8A14F6968C18CE3747C88A4ED9FD3D21AA +258FBB143ABDC73E955BF3A4A658D92BDE257C69CA170442542B147779488B44 +6713B6282A44440E1D5560C099466688AA78E5274DD4CA1E1579670809C11896 +6EBB468AB0B72AD778CFFC440ABE837A23D63B6D7BC18BB45198392FBA373475 +74E29931B0477413A28F6C44A3A7D58CDED92E6CC3C1EC76AE1ACDA8205E28ED +E35AE32E8F3A4B2FE1EF8E359D3C2068D60664FF60085CE7E4AA4426EB92D3C0 +E4319F6883C777F16C9728AE4217F52B21AFA5ED426969C0B395861711E3D3F5 +1FCFA7AB3167AA2AA43D2A2D630E65BAB2E980A793D4B384496EC98A9BF5B56B +90160FBBB7556F2F6C5209BE0FF6178E2B96BA884948BE2CB68F59CC0FDB12F4 +E7F3B2505D0AEA2242635B995EF290FFEA9BB5ACC5635DAE39F992C532904B59 +A3598F7021A4C058B7FCB7DC5506C0A3613245324360D5C6CB7AA09B4DD16432 +9CAD2001ED405D8185F6B3DA3EB0670269BE674A1AE6F19318F85DCAF7554F60 +CEC56066C1AAFC3E026C69C7A2053339BEE8C13936A96C3162F0908B8C30FA4E +BC3A65A13D7971B78DA7274242FF34DE1D71DE5404FAB769427C8BE7AD0771A4 +C589353BF6458728F61BBB7DC4CF7BFB51318B63BCA601D7E2306D8346759FCC +AA9AF883C7960D02CC8C4D39865B6A5286D077451321BD74224DC4CF750FCCBB +FFF4E3492AAA96D265BB5C0A78DD12EA31A9A43731C101F07F22665584AA3FE8 +FCB17C78F79C1D083BCA564CF101605DAFD017F8BCC7E2184FCEAA0A599F91BC +DDFB6F14AB9991C1551461A66F7CA2713C7832CEB1C3A79430EABD8766601DBE +9C46FE734845598D4BD4F64D702870A9C260D54C4614537D4A2B1E18423CFD50 +7E653AB6B78A6FC1DD7CA950A51730B1DA857A6DB50131FB7095FCECAD104746 +CA3C769940ADBA430A20E5E7BF312B27C3EDE263450C943F35F37E186D1F25F2 +711CC5BC92DBCB391502D73E348BF80752DB54AA581C0A2E8A5EC80E304F939D +1F6DEFACC30A526BABF816D2F60B24153C9862BF5B19E63C0086F5CD42CC9099 +A0A0B9CB620013DE43F3B2C63B8F1D7B5A2DEA34CFBD1AA46017E06FB3EC9FE3 +A69E4E475D47766440F41A004697DA311182AF2FF43B013AEC62626CBA9E9D8A +D7D4ADB8921C221609A951F8A4DAFE0824549EEEDE262FA11FD425813A210098 +FA1611013ED155DEB776063EA4EE72A2D21283C810C49A061D8A3796FEABAA85 +4663D1DAE5F59D81CFE9CA4ED92D6336DDC71075F3DF2D884E5D53C224E993B6 +3B22530C08F3D87642014B313FC7B4D89039794795E8BB559C6ABDFE8ECF393C +C6ADEC228AAF98362E5BB2859F5BAC5AD1A837B6CB2A6EE624B4861D26BFC560 +CC85C132EAF46EEA354C48287B98CD91343628B3DD7F1A76E449E68402B85ABD +DDAE1F0B1282BCF7C056DE1FC625939FCD7C8EBC4E9F4171EB05992E83CC3EC2 +B49588A1F420D718464CE30077625B7CCA2C46873C6BA83AF34E7469F648641B +8A108F3D93F2B6373478C67C68F61E7B0BC0A8F9E6B292A538462AB49C25BFDD +095CC7F8811DE6CC317BB78B793DC15D0F51045315AA1600A949D6D9FBCDFEC0 +C2A8FB9256DE5CB17F +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +cleartomark +%%EndFont +%%BeginFont: CMR6 +%!PS-AdobeFont-1.0: CMR6 1.0 +%%CreationDate: 1991 Aug 20 16:39:02 +% Filtered by type1fix.pl 0.08 +%%EndComments +11 dict dup begin +/FontInfo 7 dict dup begin +/FamilyName (Computer Modern) def +/FullName (CMR6) def +/ItalicAngle 0 def +/Notice (Copyright \050C\051 1997 American Mathematical Society. All \ +Rights Reserved) def +/Weight (Medium) def +/isFixedPitch false def +/version (1.0) def +end readonly def +/FontName /CMR6 def +/PaintType 0 def +/FontType 1 def +/FontMatrix [0.001 0 0 0.001 0 0] readonly def +/Encoding 256 array +0 1 255 {1 index exch /.notdef put} for +dup 49 /one put +readonly def +/FontBBox {-20 -250 1193 750} readonly def +/UniqueID 5000789 def +currentdict end +currentfile eexec +D9D66F633B846A97B686A97E45A3D0AA052BD0CE60552BD63101D7CDBEEF5B11 +69C4683510B2FADF333ECD5F7DF46ABA2092A18017660DBFF15E4F680F239AE3 +BF900DCA9CEB2D89956EF631505D886FD9DC10B5F09511DDD76BF7D97B7294EB +87B7E694E1492FE4C8FF4647D78DBBE454FA5D21530B06067FA623D5A42084DC +D179DD50890D3BB55920461134B2D35FC10D67F1B738B92BB60A31C00C3B4286 +20C74043FEEED6B85355CBA09047C1E39FB7FFFFB4DD9E83B4F4E0C1A4125BC8 +80D4A83B6EDB84820A2B6F5929A73554F9823DAE4465E78DE6CA791561065B47 +D88DE05CBA8FB48D036EC0A4453FE878BDD8D41D419A8359A1A1B69EBEF51884 +7C7B7477BC127C316BBF99E15035A25608C82051C60EFD5588ADA24656DEB7BE +EC85237245ABAC79B2D2D02BAC1E59BC15C827CA93E90F1E91C74758DC3B4E34 +A17FF40EDD56CA01EA39A4819BEFA96DB761FF48B1BBFB0131AAAA6943EFFB0A +4A6427A0B39C2B7A4DB0EBB6E2A4FBA4DEDE8AEBE2243E6D900791CB815A541A +40F1CC165A6E6B527C93C20CDD6E5F63673BE8DF2C89BFD8467CA7AD8D42090A +149C799385FDC4B73D0A14FAB987E5C34E921E7D08FC5B09FF09F98976219899 +61C5350BB08DCAF7E07F0343D971A023FA40E79CDB29908E9AC53F03AB51FBCE +D79BF1B2081EC5E0DF808A0680D833B55E57AC99E17FA0F903E58D39D6B25A99 +5CEF274F73598CC922330D0024568BD866E0BE3871AFB06473C334CCF16B6656 +116A1BF6747E4D52DA6BC08E0E9C0B6AA8AD528DA601A85991DFC472F51B984B +854F888A9CBC6B8DA3A3B481E649B3F9ADC17ED6F8038910D85E825DE420235C +8FA3A83D81082E39838C4FAECE0A18EB316D51C38FC330ABABD757AA62FE716A +B2010FC16A2BEF7B27BA303E42054FBEDA896C208F53F55E5A74FFE854C00720 +6174469CA1513FE36B3109B7F4BA33F8248CBDA067F50BCB6CE185E4BEBB80BF +43125E9F99B8BD7AD0B44690A4C98AEFF446EDB9A993B6CB1D09F9BAC6FBE292 +5F1EDFBB44E946C71E4790E8C941E1C2E1F7A6F1EDED8B840CBCEDA22A6523CA +2E8C9045FAF8B4B111C3565CB99B4A76DFBA1679233377C7A95C822C89746B5D +2430C8EB8F5909DF1916D5033F66832CCA0736EAF6D1A68354D0E954279ABF74 +A3E42E7D9E4EA572EADF04929D75987CC3A12CADFB93562847E0EB19C8384ADE +7A6AECC909FE1CB5C78E50898925881391D229294C958BC4EFE50A48922B4C95 +AECB84AE9D9916BE25B49E774C157DFF6B23BAF0826B070E0D3E3FF516F0C55E +350F5E956D5D55D67D9177A4DBD93C8808C3E69C39023D60FD3F4729703B13F4 +B6AD9059B905EC29DD61D3BF911D4609EBE8A3EB9433EDC279142A41649CB934 +8F7D601C014DC2CC3AC0B43F8CEDDCE863843A11A64027CB7D7EFA946E782AF2 +95438DE8DEFF8007CAA911972A7D346340E6F172DF932DA19B8C5BC5DCAE3699 +5D31671E8CEC137E93927B87628B39290D611B41F4016EA42B406642957DE9D4 +A3D38710B6BB4E8B72CBE201AC83ECFC3FF59C168939E5D624CE802FEED0 +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +cleartomark +%%EndFont +%%BeginFont: CMR7 +%!PS-AdobeFont-1.0: CMR7 1.0 +%%CreationDate: 1991 Aug 20 16:39:21 +% Filtered by type1fix.pl 0.08 +%%EndComments +11 dict dup begin +/FontInfo 7 dict dup begin +/FamilyName (Computer Modern) def +/FullName (CMR7) def +/ItalicAngle 0 def +/Notice (Copyright \050C\051 1997 American Mathematical Society. All \ +Rights Reserved) def +/Weight (Medium) def +/isFixedPitch false def +/version (1.0) def +end readonly def +/FontName /CMR7 def +/PaintType 0 def +/FontType 1 def +/FontMatrix [0.001 0 0 0.001 0 0] readonly def +/Encoding 256 array +0 1 255 {1 index exch /.notdef put} for +dup 48 /zero put +dup 49 /one put +dup 50 /two put +dup 51 /three put +dup 52 /four put +dup 53 /five put +dup 54 /six put +dup 55 /seven put +dup 56 /eight put +dup 57 /nine put +readonly def +/FontBBox {-27 -250 1122 750} readonly def +/UniqueID 5000790 def +currentdict end +currentfile eexec +D9D66F633B846A97B686A97E45A3D0AA052BD0CE60552BD63101D7CDBEEF5B11 +69C4683510B2FADF333ECD5F7DF46ABA2092A18017660DBFF15E4F680F239AE3 +BF900DCA9CEB2D89956EF631505D886FD9DC10B5F09511DDD76BF7D97B7294EB +87B7E694E1492FE4C8FF4647D78DBBE454FA5D21530B06067FA623D5A42084DC +D179DD50890D3BB55920461134B2D35FC10D67F1B738B92BB60A31C00C3B4286 +20C74043FEEED6B85355CBA09047C1E39FB7FFFFB4DD9E83B4F4E0C1A4125BC8 +80D4A83B6EDB84820A2B6E8BE0236687F741E66BC3BC2C69108C49495DC95217 +C9F5E39789D35353BAF80CC71C970184B119A03F16DDDBB02FF1915E44650ED2 +7C028CC20DD3DF4A6AECA3F7377285D7D837ED9D61B86F555BD6C5D3C9FF05D0 +CAFD9D39B23F6BF2AA967E062B642321619FDBDE6D62BE35501E722B362F6D8B +D90B0D01E5414B2932234D66A8CF409EC2182D7827B4CE725BC184DEBBFEB119 +39B60882DC31A880151DA6C7B54311BB848247258FADD3726FF65C465622C0D5 +D54FAF862AAF6081A8449D9D2A1A60AB0F3088E1A569D10B2A82B164690DCC99 +22E6CC34EBED1C89084600650F4E90D0C8444C0489555B0E53F9073BA3B2B9FA +F6C4CC19F88CD694F84A592042CE6FEE1E6437BE822C2B7B0BAD8499A55DC30B +C5E17E3594FEB0423C4EC7DECB6A368A5D7DCB7C3428A027EABCDC0B3754B87C +F5B105E316E71E0337B374EA1A27F960EFF1625638A0D41D97600C621FF8461E +6E6D053568B97E51C8923FDFFA2FB12D6E801453CB5FE19B4E306960C7717B76 +695189A6C681E79B1A617FB11876859E9B2D1290EE6AD36304396A1D27994200 +74412EBEA84A11512C51B5D19499694D029E9820031299FDC1B3592B9B91ED75 +A47EBCFFD4D3B1ED3EF57804A07F9F0C73948C41C75F00FB863D7EF69EEBFEAB +5E305913DD7D864E7B6A4C53380EB19F6B9730D6E9CEF7F2BDA9A2C25E635ECB +C49CE12AEF2A95C5D265C1422C3C11A4F092FD2DD4CFD9635515CF2D3D0CE3E3 +FA1DB7D64EFEE365C78CBA9BB91124DD1BB88C8C5F12F17BF1A3B21FDBE395B6 +E9B9980D4E4E0F089F893CE2BD777E6FB6065D16F2B693741B8FA22581BFA306 +F06252979997BF8F582ABFB167DBC6D6DBF2F7E039F703A800C8876668C386AF +345A9E539EEE11256CD87408694519B5B75F9C1E28B22641BF8ED941B811E4EC +24329AE13F40B1F923BFB3B0B47712BCBAFB83D25920326CC5EE3C6177ED7111 +5649B5BD93E6CC92C24D29706E24185F3E269D5C3A40BC4EE1550F8F0ACA365B +04042C45F13DEC7E2F57E2A3411BE0689585770A5602BD5E90492BBE310E2166 +5153E2C13685FD67F6A5DED29BFC03FBF56A96F3530C2B34C8405A61AD3E8902 +4C3DC7EA36CFE7B7BF715C5B73308A68BED840D9E9A172C73AACEBBCB278ECE8 +6C7B430B095BB5B2C648530FF2D0AB4AB7A66FACC1572AFF3F186A708C6F142B +B9EFB8767ED6671BCB50491B0ECE21C81F7ACF361B1ACB3521C73720A9B02726 +B015A1BE446B2A9DD87781CD74E552E7EA6B7B872524A851F45F484219E13E6C +6996A15C4CFE81ED44CE943FC6C0623EE8AA6A1E741DD40BE3AB73CE2570BAF0 +F27DE1F6968A5006C3ABE659938F97C8C14ACD37D76D401CE6E12C80ACE93A13 +1046AC40A9CD73F7A884934CD5EFF8CA2A3831974759448CC30135CE68052E8C +2E5D8314B8A12CB1666AB3CB10BFE1AEF598BDCE309D75229DB63653069C8232 +E85553135214B9B57BB7FB766D8214C6EE76C1C45D78CE628FC2506E4AAF7CF0 +0217C0588DB691677B76EEE3D6EB1230A431E25B6627165132124440B7D89A5C +412FE9876B164D45D56DA235A897ABC16B586AC0682B1BFFEAC03DEAF44144BD +EFC3F07FE3FD23FBAB43B5C54E0CBF54DD87457E0E8E05D77A6EC2CB3257B5B6 +72F09AAB583936F5473E0A3D08C4B5D356B7635793F17728B94E024F05C046C4 +1941C5E7DA84516DDC2650C813EF6C7EA9320CFB537EF9E6D8DCF9FA0D6CBFC4 +6C0DE748E498D868A95995870FEC48F3717E7EDDA8026EE3C71461089EB2DD32 +825D7C98B1BA602B09775228E9DE379F2419A94C0B1B8F64DFC8EE799F81FD7E +409BDE1C71CAFE42D0366E344AAD80FA67CA2705513C23F6CCAED76FA21EB319 +F1054FFD57189DA0F6E7957316673997CCCD902A88D23729AFC48B5A26A9606F +E9980D91C3A8E3C7BA643C25ECB904046B2AA2F6FB3F6ED0447D1C66ED6FFD5B +D58A3D6D2FF83F01AF50945B5A8554DA94933B9DAB10F898E6C476A642A3C768 +8F0A94C13A33E3C14A8F28FEF563CAEC23B4E1A09C93264D1FC15FF1B49F0658 +F08B392B3F436869543F9A2070BEC65D4E6377018070B40294F0AC3D3B162576 +6F11D71B8575BC222215239C0A6B030C68E92401969D5241CE2E7DEA6A6C153E +B48C50D0617319534E2E04ADE2796D9341757DE8D9315EC7C3E344B452A2DE8D +FCA852548CFF16045DB6D4E99524CBB3E8BC49BC57C6B91DE856EEED630CA254 +D70BD3DB284EB85321AE541F0B35E2C80A04B9E2D2466090BFAAFD76CF598FCF +B77F05CE1C6F879EBB5CD8929B7FD575B1EA69768ED9DE33AFDBC00EED9225C8 +8BCE6569372970D7F7718D6041336E7F44F990ED7941D1B861BAF144F2BB6FDD +50A76FC61E9CE01B213A6EF2F754251EDDC813442D75FBCC580FCF9D78B71D22 +1E9CB3AF2FEEED217F7D8FD2FECBD73499947E8416CF47B9D967B5B8AE1FF6FD +E6F24A56F881A3F1A34DDDD18A8559EEDA66759CF9DB3353B950368481F0FED9 +0DEC9809B45B05B3385F7EB82D17A01E7E86B8E1FC65904961EB150127FA4C6D +3CB6020314D7D83A1EFE676EB1095DDBE076D769286227F901A05DB78CE74AA3 +F60F01D7113BF4E07D51CF38EF780AED90C27A0C9B9DA88AA1F9AD2DC4716F7A +A1C0B71EE44FA69A8A92031D97A263DC3BF21357038CA97B04A23ADAC91F2C71 +1D2862249DBCD37211219818937112D2622C6F6B4AACF4299AD307763C6DF292 +AD0799A8D447864D272CE093348F8A576CE8C423BCD40E54FAE7700E1AE4D6C7 +CD46AE682C7A9EB56A9FDF438538FDCBA5843D8DF59C423A680D7C0A648F9472 +870F65D5E592BE0AB93DCF23D84FF6B9BF56CE8A8B2BFFFA601FD5A265FBF5FE +E7CC20C5DED4013FB9749359228B75D9AECF1B0C5C0600E4724EC72AED579267 +C4B28323DE3FA0224EFE3D4B77AB56D741DDA8E260A888B58211B37F31E536CF +77BE7D2E90AD8F7DEE4D5125DB7ADF5613EDA53A8AD5E8751289CEF68CF0B664 +192FA3C1886A0DC7407DFBA2DB6DE432518928E5411C1964A6FB6F0EF41923F9 +6E58D5C273A3C0446199B7DDE6E94F5C132176B8AC65A93AD24C60AD2C4D8682 +C9ED62351F8CE3DFDB5873CC472AFC38B17C0223D0D69BE7FB989BAE6EB43019 +F10D9EE3B7E1CBA1742E2AAC19C4A48A2C3B6AEAF58966D914A275CBB5DD2CF5 +A05BB2A9AD376DDD4D6AE1E4B70E9A2092F16FF6296AB7D1AC82C05EEDF0814D +9E0AE2DC2D7677624C4A2106B1227FE6099328668D93D17F75B20F4E4040CCFF +93799BD9A7FDBBF599F37507177253EA00FB036C74A3F799F4E673E92FCCE55B +E6166BEAF8EDE88F6DDDF40D31D0DC91E4F74B06D42F357627B13A8B55ADF495 +A91C3BB2FDCD651D6F2E40E67F21CFFB6F5432FC2410628E64A759EB67A21B3B +627190A2211055 +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +cleartomark +%%EndFont +%%BeginFont: CMR10 +%!PS-AdobeFont-1.0: CMR10 1.00B +%%CreationDate: 1992 Feb 19 19:54:52 +% Filtered by type1fix.pl 0.08 +%%EndComments +11 dict dup begin +/FontInfo 7 dict dup begin +/FamilyName (Computer Modern) def +/FullName (CMR10) def +/ItalicAngle 0 def +/Notice (Copyright \050C\051 1997 American Mathematical Society. All \ +\012Rights Reserved) def +/Weight (Medium) def +/isFixedPitch false def +/version (1.00B) def +end readonly def +/FontName /CMR10 def +/PaintType 0 def +/FontType 1 def +/FontMatrix [0.001 0 0 0.001 0 0] readonly def +/Encoding 256 array +0 1 255 {1 index exch /.notdef put} for +dup 33 /exclam put +dup 40 /parenleft put +dup 41 /parenright put +dup 43 /plus put +dup 46 /period put +dup 49 /one put +dup 50 /two put +dup 61 /equal put +dup 73 /I put +dup 84 /T put +dup 87 /W put +dup 97 /a put +dup 98 /b put +dup 99 /c put +dup 100 /d put +dup 101 /e put +dup 103 /g put +dup 104 /h put +dup 105 /i put +dup 108 /l put +dup 109 /m put +dup 110 /n put +dup 111 /o put +dup 112 /p put +dup 114 /r put +dup 115 /s put +dup 116 /t put +readonly def +/FontBBox {-251 -250 1009 969} readonly def +/UniqueID 5000793 def +currentdict end +currentfile eexec +D9D66F633B846A97B686A97E45A3D0AA052BD0CE60552BD63101D7CDBEEF5B11 +69C4683510B2FADF333ECD5F7DF46ABA2092A18017660DBFF15E4F680F239AE3 +BF900DCA9CEB2D89956EF631505D886FD9DC10B5F09511DDD76BF7D97B7294EB +87B7E694E1492FE4C8FF4647D78DBBE454FA5D21530B06067FA623D5A42084DC +D179DD50890D3BB55920461134B2D35FC10D67F1B738B92BB60A31C00C3B4286 +20C74043FEEED6B85355CBA09047C1E39FB7FFFFB4DD9E83B4F4E0C1A4125BC8 +80D4A83B6EDB84820A2B6C2EAD7203F81AB21F0A2A25A958A695BE6163730490 +91AC391ED5B24EE612C2C20F5664582049C649B80A8709737134412B5BE31A9D +E1610A5EBFFB186F94A9958A4F4C8A7B4E6F017C4A26D573A8BB78FA543AE26D +747222B00E31F88E70E7A9921A44414ABE7CF163F06926A8AD276B9E8F4C1E75 +05C1C4D71BCD6BEB6B0B82D02CA0A256639C64C59C009868FA1F15B0A73E6966 +0ABD0E902178D2EA6BB85BE763A0A575B8EDF375CDAB1217CE541B14021B851F +1F07CA6A829E8F8EC34E5F5D5FDBE08DBC38DE26CCEA24E1D99B5A3164C83C44 +D07BEFC130B21E66C4FB9ED245CA4D98B7E18AA1C784AFDD2946C71847D88FF3 +2350FF5467ADD254B753AFB5078DB3DE905CACC737D3CAE4C8E55495FB8ECD9E +707DBA0CA49BBE0984741DB9489EFC59110629A1B1EED0B1B3C3AA0A01B03277 +36953D564942DA8D74A1B058027097806D9B64FACD7CCC470C235A43AA21FF74 +83E9C68D1E79EAF3ABCDEF0398E9E870925220D7C6502A7915DCDB63947A49D0 +99D9FDA688FA3A3ADFFC7A1EC0C3EF408651D17971E9A578A12D68918AF6F014 +91D09E7A5DD83B3CD3A43DE86436A580E1B369077644F430ECEBBEABDC71B26A +B88C657816AE471D2088B51132EC2C3926A6D00BEC64091C208FBBC7984A6A88 +A6C2612711100F4EE1E698EEB6463E3006358DE53EF3D3A0172BD444CCC72139 +282041BF55FF834117A7635B4F07F8E5BA03985803C263B3034A408FA0793038 +BD601F5C610AE1549410DFF61AD14C2E68FE99AB4F530A6DFB4E1234F3899436 +F572F48E225C3998F8B33B5ABABBDAF34C42571CCDD9FA0684E1215E0D5F6CCE +02A627B76D716BDEE09D26D1B1C3B67CC61795C412FF97CB968FDFA076457620 +78DD3E501EBE62718348A96F59DE81051F30D1A14E1EB98EEBEDA61CD3880558 +ACD9168E082F5211F2F6038F07FC10D735BA9AA1317F148AAF88C3174C325D1B +A549101079D6A9A954C8B70615EE92276E5655214FF994E06AE15138930F2266 +A5E026E1AEC1962B0D77BFEC9F62F716A0D8D0709FF884A195A2ED60781C858F +6E6E37B1F58059EF59DFB3F56E9249A8191F204C5F205EE916190B1735816CAB +8DB67D03309E433044CDE2689ECBDF01ED106305D6E8267C66172E1F5BB5AD79 +22BF5BB093347879F2608CC6811E42D9A2BF21D725919E48A627A66E2E9C0BB7 +26927DAA9BF3A6E14B06E948D53F0F9C62338F7EB882D7D22D7A3F1ED323DEF2 +8A9FDBF618A9BC90D4113331F9CDE54BD8F6B16BBE5FE9118C53A7C56FAEF893 +615C4459845872149AC8A08C08FFF222CC3126DA25BF0DE649784E2369F52CED +AE2413F87545CA4DF7197A5F8DB894642096B3D28B5A4F49D28F95A3FCD25C83 +20E8D6C7D8C4F43F4899DD79D9A484B82B162A1C3C0EE4AD23230B6B76F39956 +4F5EE37E1C7B02BB27E6C4280377C50860ACAD15D17BFBEF2E470DA8CBD800BE +A2FDB95E264DB2D1A40B279C993BBAF0DC9D4BF8BE584D650EE6D10207A056D6 +18BD34E46A5F2C8B523C2F648C6330A30AFEA3906D89D24A302F8235D51FCBA0 +DCD0ACE1F7AACBD920F5FB79B85C6C2AE59AF80C851E4D571F85F55C426E3941 +75FE9010A9BCD77D7E78CC3D964075D8A0E5BB275660A688B26D4DCA36C8880B +7D64FEE55A96EBA3DBDEC91FE2AE6D850C40404A706A941921CA235559E2A608 +B288E1483595B28D586D7C9BB0EBF59BBB1A27A47395DFC9143430F816D1E4C1 +EE55A8F40837B5AA42BDDF63C0A69F1F082860F7BE9E1103904A2C16421E3173 +E18B19C8F7EAE856C74A46AAEA702B2D3D70C5768C0AB338B149BCE3F3C18A63 +BFD9EB849B45F279E5D030442DA9D8EDAA96D6B48173267A19908EA6E61C29D7 +DB1B2D199ABB1EF1CE723249C4F642E640F26ECF4E7C7E299A51F406B1C67323 +BF4B409B4B0C4681E51F605E0CAB7D27E0B681BA46591CD2F7C4F1B534EA4482 +4755EBAE2C1E80F68341F5F1B57F370AFB3BD4008CD0560C7D7E4B17FC6967BB +5376D15A03C45100AE08F6EFB8763F3AB328405BC35BAFCCCF665397ACE6DF32 +D60DE2A08FEDE4F17E0C02C8A16FF274C5206BEE992B43449839699D1DB4185B +FE5287C2E4D42FDC5CA15EF8C8775948A3B22F083D0C35F3CCE55B444A2A5C18 +6351488CBB929861CDB31901AA2DE4FDC6BA6C7083027F86414CCB85850A38DA +FCA29677F6F56F0CC5A82F1CEA73273A5AC7981D5D22BF3F69E7A9C83F899300 +6AB88A0D2F267A683C27F6052DA602A59DB204AF8472261467EC9AE880FDE85E +40578F73728FD791F8014AA698E447024F3CA2225DE65019D30C2E66973E89AF +E4E6A2313B5D88CB5D52CB7351963C99D3287FFE27E4073148B7EAEF3892B422 +E12D806EA3C60A9E9DED3DE2A540AF8E1E216C2D7453D893390E830C983C56D3 +EBC9118C8FA1B54234F36F025B164782B96187E9D23C4D172343FDFF4009623F +2D84DB828E08CBB7B9909727A1A95051D990341A20ACD2FA675DBDDB8C324639 +C1FCBB4DFB6F8AC0CCA504B453C25040597DCAD91460DD4892AD5BE478364401 +5D98FE67B87CBA062869A2CF22383074FB9457D7AEAB73CD97EEE4F99311E4F9 +4DF1FD3B1DF262133FD343FEF67AD334A4E2069CF8322C587FD9778B15E7712E +5D83ABCF95716B36A5102214949C093276D756448F1B4EC0BBA3BA92894E5858 +897E2B95DC3EDE2704B8BC8472B6C044C3C248C0C51E283FEB6A7EEF0F62048D +E37058AE991F9E2E64F806678C03EFEF6290FD2E1FAE9C2E4287F9942441C13B +0DB939070815A38B88610866831F23231E5A6A491E693046E0C6A35AD22A40EB +D50AB2B37DF6044160272443D8D99E60229AB78E93C3EEE768B95E145D187BA4 +988E8E054A84ACAAE1D2C333E16A665B940400DF1CDF8A1011838236EF0DADD3 +B95DBEB74EC39E96A100ACBAC4169034614652C81307EB11741FB24ED1B4F618 +5FFE24C882B221A0B79B94B4083F8BB3E0642C5E11A7144F4A3323FA61BE5678 +35AA368018F70BDCB63101432FF6F727F57CDA93E53188A561233D5CA3E2FC57 +1EEA69B6FBF17AAD827799B4C63CE92A5AC947FA467DBBE473288C8BABB91253 +FF7D912AED666A11E84C38CB44C8CE9ED82761782ADBD88E95F155A2E033CACB +566E0479744756FFA3801CCC7DA45FA908F682947F20D4E5B86CD439A1E2963E +6ACAB5215DE32AFCBAE83FD5484DA1912EDE9BF7D7D38E362077B06316EDA6C8 +79FC81FD5C86488B624A4757DE33F5B4052A84AA43FB0167B6756844E5BD9DE5 +810467B8A0C386AF059296E9D66D7E46ED4E194FD389F99F2676E45DEAC2FF6F +71CE6349EB1696A476ABFA9F1AFFC1DAC2291B7A3D346D10989E09F030D37F2E +69E086F406D23BF5C26F5A23EC5FB936E63546B9D1A05113240C722BC5B535D7 +E913DF7ADE0DA5A752E33D29BB1B6ADC510034B0D063D6AF12ABDBF1E2FF500B +734F328E600DAAC0D64BB2D7E4E23B4533DF6A06575AFDB9FA2D5BEADDF3C7BE +711A337039BC50A100D195AE9CEB7B8D85B1611BC81F53D96DC78CDB9D2B1A6D +5A7EE77963B305007E9E42A5ACA1FC2AB78E592ADD00A482E47B8C41B197AAA1 +605288A241B1F0A8761BE8BEB4D5BE83567E6D797703F06CF3BA0EFCD93D98F4 +A3AABD9429A1D02A793D861C666DAE6D429F4A00D0FB91AE7A0ABD0926FC811F +C001751C82D65CDBAC29956909247664FFD19CA0415B28D86D4AFF3DADD54F6D +A33435FC224A24B2B6C74D987404E4A99D96B899674D91B8558B377D7AB5988B +2ACD865F6F840893CD22924EB632FD578688DC0A42F7D04B2EF451452D30764C +EB112D660996F2482F6D37B9898A49C4512D197B1CD8449D1ED9654F730E7E04 +82F13C887A33143AC5CB78991DAF2B76DF625CE607681588D910756D65D1A776 +BDE86FED297630523C9E42A50FAD695811E87F8366B1E52492B23BC06C11ABED +8AF801B8CFE9CFD270D80E659F71F9FAF3A7B6DB7455A1255F148D688AD2D06B +20899820DB59FD87AF92A9C49E1136CCFCCECA7941476FA02C8CF51E829EAF6F +C74FEE923429ABE30C1CD99C03C8BD051BB448595EC25173B824C49BE51413D5 +6986D5ECB556484474FC519C42B00ECD098DB41D41BBD4D9DCD23B17BA894657 +28334D1DB23D58AE071FF1546F028B1EB1B077CB5A58DC6339D2D3B7DDD2F9CF +FB330452AF5319F339F17D351A4CA6D2CD66A958CC83981CCF47970E68702625 +F7322BE29786124690787A272BE1567D843B438BCC775B3F0FA8B4916C2E23D3 +8F4270FD965F77A3E7CD9D7573928B77316FCA85315EA3518B8CCC68B62AF294 +6DC1A19F80407232A25024AD509CFEEE4A617A2D8B8FAF097622F610B72EF8FA +FE46BDDAE5489205C67F110B33EF165F237E97DA8966ABF1BC71F69F3A19B961 +32F149B4550A7C55314D5B41236D7747E754210BB05FE556D234E4B8B10D20D0 +02375BA5A8D639913ACB36E841C04C65C64CCAF9B623B59A4C463E5089A8A3CE +8C030DB4703B5BD161ADB096C7F04EE658961C2D560480E5BA2B27B842473A3F +CEC9718D5659DF82C1E90802A3A133BDC6E034D36157AF264C5B4980A867FFA5 +9C7D1D0DEB65A74EEA3A51985EF538004F6E773406F5961A570EE547AA8E0B34 +91EDBF2D17A11A325581714769E9E7F12D7127B36C01E10780221A50AFB8AC00 +20A0C4CBFC1E0C6F3DA26D30B9D401184B926A25FBB00716D5D3D1A473F202BB +0DEADE46BE73BE00312A4C8A14FCA51E64B742F088BE48AD26A0988FDCFD0419 +AB89DBF72672D2F9CAEFBF21F702F61E372F4D0D08341DAAA081BA1547A8A355 +62FE1932E89552F13755049AFCB145289F3C488795D352BD6885390A04BDAD8F +04161048CDA211E78C5730CE198CF25BE05B21C9F3AB9AEA25D65C2D3E696CB4 +D271EE1A78A61B57D76AFDCC913B846349A453D1C29E2FE4DE8271AEAA86DAB5 +DD6C0CCFCAF48C2E4CB5F411C155CC284167326D1ADAC0547D3A8411A4EF8218 +DAC44714ACC6D277965FAD9259EF0C915A1A5914853F5E4B606AACB826A410A2 +8E1200D6AAC111F583F4E4EECBE7EAE982B9526A5F34099AC1CFC82BED0C4BBA +322B7308FDED0717B164AF9F8BB7E3DC99775AD672E12FD5A3945E08CB61E4D9 +F85C17485120620E7763274E71032C4FA2492FFB7FE09D95A5F53073ED0A9973 +35AEAD930EA8BB55CA41898D866D4B32322036098A45B925AD3FABB591CE39C5 +03539FB0622F5B7A3AA028201E6724D4DFDE7FD27037D98002A6CB9392384DF6 +058CB6EE1B26F2A90FDB66DD583E6B77980CDD4D2624DF8ECE40DF9ACB47A0B6 +9AB4F6FF14D15436ADD35144D08907307E339403A303CD7B8938DC4A8A106311 +8C14BFC4AC024F87D7279664277FC245D042382DDD922DE63F530ED0D96F5D3F +45A8E8BD734FDC78882595A4C1C8C8F1C9CD33A4005BFF2830BDCFC8D52A8072 +41598EB550B28E3DD4EC485ECEF0FA32681B7001571F500BF253D4067FF6CD08 +DCC7FFB66B0DE4C9C08149AD4A3152EC4282827FAFC84A4792CEF874FB975F3C +75B1AE8A9729A24511AE37881A57F44148EC990EBF572BFF8E57ADE62FB0E116 +070922B5117F66B3FB0CD1F4AFBB95061EB81B8AB06F5D2F8B261AEA9DAD1AAC +736103C84831405B802F0E7C8F747F4840F4635C6D1873A103D4066DC7C95688 +5E0D2E1969B482C360B196F948E2728D85EB8F7012B49667367E753DC792BFAB +4442F64C75B29F1358059F08F9BF6C7CAF5CCFCB814408DFE738D3A1CB60925B +AA58C1A741470722F5D30025EC2F72B2059138AB85C1198E8AA37502D434CF00 +C425FFE888886E90D2674D6706240D51F4FD77CD7CA5739797EB2215658F5443 +19208CEFE5D5EA1D85BD120A2928B62D87A0D01D5ADC7E3A8071FA9BEB0EFA6B +D5F880D9F4DAFED2B0DD8E6B8BD405D9A3AF93780C228C2AE9E630B5A4E4570B +E231E580631FC71EED30B8EA48593F5D59106A9B81A2CF86CF3AB1683D37F2D0 +BF25C91EE6EA3B1A7144BE338A058198F10531E90C8795B2D54E683E3A0514FC +CD3D7798BBE81DC12873E9415D4D725A04C5D4BAB193BE116F30A2F14A0ADB04 +4C44B85AD0F3EAD2250BE4DBEF6395E93FF2AEEC71F18CD0E127809616B2164F +68928EAE9F4B55C23279EEB8554410B5BF507A09ACC863BDE75FC9B1DCC397F8 +C35BF1ABC33D422A966FFFC8E51C9E358DC857AF7387FD735329A0FD20D32C49 +B79881737C0E0D5DB06A81389B8F3DD2FCF484C136EC523D0FFD659695E1A7F8 +6053FC82D0EAFBFD111670BA8B4A746BEF3FB8A94792F04C57D45EC4CB5FC4BD +A1CE8E2CA560A980AB406186FE1950C569A1A0E747A98C20CE31FEE3F2AD8E09 +0CD67F89D067EED48ABEDBA087F6B84DBCB9E4E102CCA5614C7A956E672F11AD +42068B7015DC4E663234C27B9AAC20653B2118AA87B34451CF3E6FCF82A6FEB3 +D0760326F6CC940388E5B5DFA392A4D88D1D7C1D02B5CDD249DBE7D99FD3B6F7 +8EF6E94F917E359D00D3CDEC82FBF576837023C716CE0559993D4F6D0C94591B +B7879D01B396CBA015D09D96A7E774E32D39F1C4F5ECAA051D445A26208EED1E +5A0E7D5A905D62ADC8C24CD22017840BF37C16942B51CF95A5AF24B3AD2413FE +CD73409306789EFA7B8577601D6B48BCB08F6E8A78B67F3343FD7042E96190B4 +6546C4EE95EB73A128A8CF480A41526A3DC17A130525BDCDABC7AD3D202C88D9 +C645533AF85DB74B09FBA928F7AB86F232874CF8A2FFDFAC188DC81C14199964 +6B432E4CC3840E44E394E0EA12BE20C78E3E7AE24D039F060C54EB0879F1E61F +9FCED72F06BF80F832F5D351F022D4AE0E28BB25D339A9A2B401F6D7393CB95B +C3B46E280251173D398E7B49CA1FD85B6C21C273561AF1AD1D477F52E9AC7710 +9F6BA4B7D8131BBBBA15E24221BA3A81A4C51BE4C6CCD6BE5343B5D8E822158C +BCE38B1A71938C4C143227B7BE635FC610F6B746584BC341ECC8655251DAE8E2 +5B37FC4B590445BE56BDF4F9200D9DE6FBE2692FD50DABABE6AB9E1FD638CB8C +B5C7C7B3225F5B4FD7A7154C1CA7C79D8139FC9AFE2729147C8212C1062BB950 +0DBC96BDE933B1C6576DEA6903A20BBBE9C948C5ECF36B834ACDA93CA0D9C48D +FF19D1E18C6E1D4B56EDFF1C78C01EF03C142D8B0F34CDD9B1A8213A2285D408 +ED55C60D8AA9F242CF0614D92FD48540FF7619CA0C469AA6BFC6BE401D32957C +549364CF3D0444AE4329B5FEAEFF44BEB38FCC1E258AE7759441A3C960364015 +205BF631ADE476308F557A1BB8D7966A29534ADD40A4BA972CCBFD3E763B4063 +77445964876919696E72E547D9B2C8F0FD6676E732E02CB06FFD0CD836700852 +E54E4C86DB1510C0FD97588D4DB1D62CF46E7525DEBDF40675743E72A49C728D +2A23F6A04226B93D1F5BC95BF03CD33719737583C87A97C8BED1C228A1A46F9C +8460C47086A413E6BB52D9967453C906F02CC9A89B729DE74DC4D9BBC06E0664 +3E5FD9546CB1FE2AE34AB1A3FE030E2E9DB81F06C226BD4C38B48E97586C6F6F +B92FC35C6DE0564DFC22FF8F819AC8C8AE33F6962119B80A949939BB48FB6679 +89846D643FE29AA6BE38A655A3E938C40D8E89CC406BCE09BA605288D221A888 + +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +cleartomark +%%EndFont +%%BeginFont: CMBX12 +%!PS-AdobeFont-1.0: CMBX12 1.0 +%%CreationDate: 1991 Aug 20 16:34:54 +% Filtered by type1fix.pl 0.08 +%%EndComments +11 dict dup begin +/FontInfo 7 dict dup begin +/FamilyName (Computer Modern) def +/FullName (CMBX12) def +/ItalicAngle 0 def +/Notice (Copyright \050C\051 1997 American Mathematical Society. All \ +Rights Reserved) def +/Weight (Bold) def +/isFixedPitch false def +/version (1.0) def +end readonly def +/FontName /CMBX12 def +/PaintType 0 def +/FontType 1 def +/FontMatrix [0.001 0 0 0.001 0 0] readonly def +/Encoding 256 array +0 1 255 {1 index exch /.notdef put} for +dup 49 /one put +dup 73 /I put +dup 77 /M put +dup 97 /a put +dup 99 /c put +dup 101 /e put +dup 104 /h put +dup 105 /i put +dup 110 /n put +dup 111 /o put +dup 112 /p put +dup 114 /r put +dup 115 /s put +dup 116 /t put +dup 121 /y put +readonly def +/FontBBox {-53 -251 1139 750} readonly def +/UniqueID 5000769 def +currentdict end +currentfile eexec +D9D66F633B846A97B686A97E45A3D0AA052BD0CE60552BD63101D7CDBEEF5B11 +69C4683510B2FADF333ECD5F7DF46ABA2092A18017660DBFF15E4F680F239AE3 +BF900DCA9CEB2D89956EF631505D886FD9DC10B5F09511DDD76BF7D97B7294EB +87B7E694E1492FE4C8FF4647D78DBBE454FA5D21530B06067FA623D5A42084DC +D179DD50890D3BB55920461134B2D35FC10D67F1B738B92BB60A31C00C3B4286 +20C74043FEEED6B85355CBA09047C1E39FB7FFFFB4DD9E83B4F4E0C1A4125BC8 +80D4A83B6EDB84820A28C1E9C502B9D29188A0746C11B35F066B6C81518A8722 +31178605D16C47F60E2630E3292A32E16A42E80830F97372AECA6713D3460542 +728F39610DDA4CD4DB473B4B71C18F8B6773C39BF9972D74E6EC4784726BF195 +502A2DDEE45C2918976FF99C03303F60F307A7D34EC292BE8AC3B50AD0D181E5 +7B459EDCEB4931C6958FF0644CE199BD440F2394ABC31DDAD46FC5BE23CF949D +38A22B3D135E8B38DD760DAEB76FD5B2F00CCD237C45F71F6E8CAA052F1B7C91 +3095B02853EE0D77431035E5175D1C225412758A69301CE0E4E9318AFDCEE108 +CDF3CDF1086760BF058AADCD6934DC33B20E4D05672B2E4D5EF987DD8826B9D6 +5B90A9EA3B607E994FCF47D183BAD5DEF2C0EAE021E01CC86B3D4790D7877935 +D426E65644E5787BDD1DA502EB8D0588AD3243EF0C8E399C6C39CD86CCD81959 +0E4D8E6FE4ADEEEAB58A310589638A6197E4FF89437F690FE9A9DB93F8213CD3 +FB1AADD7786B58ED37ABEB8FEF25DB797D0EF895773DB5127F1CED00E12121D9 +D33356152ED135713737BB4A77DA30B1A355C6F8350371C24C6D6783FCDDAAFA +CF1B80EC83A97B9AE498FBB8E27A94C9728CAC335891C9AC28A9C12B8A9BA32A +733B083A73A4F9F22D2F7EC0D5F494F290D4EB55BA1EBCF0E3A48BFE5568727A +55B21FC8B0796AC6847F78A1BF872E242AEC958F2A9D36B0306FED0AF94551B1 +D439AD79EE0CC9EBDAA3728F7AC2292CE0A9C16C387F15B5580B988D36AAC73E +A0D187EB3EE751B27779DDC0166DAB9CF589BC170ECA1870F9437B6F2AEAEB09 +C5644EC38107B1CDF32D79D1AA5D29D47933592367D000D180D7D49F225A6A7E +DA9444F60551E3B470DAFC00467D58F6DD065F075D57D8FE4384E6CA7738C8D7 +994A0BFFE1E318EA0CFB8A81381BB25D5596C4DE489411FB55E65BFCF8662F8B +3C74F3C583DE009F79BD7EE44371357059E19D2EF7306F286523468653761035 +2FB9D1C954A1A4704F1E371C9BA7C215F103C43E76C78C5AF953BC82B33CC694 +AC3E783CCD5E430F8CD5E0C0B052DDADE7825A676959AAD271D1CFE2A7CE7F0B +ADD7B7A53D8075F5E2C4E07F46F35FF9D45CB2ED9C39A116D847579DA069787F +9FB90B4629DED7C995202F538C6127BEC7DA92DA9E234F8B7DFC3EF39E511871 +C4FBEC725B3E61A4EA4881DE1C75574EE2395FEDD488CF48F21E4F68C80CD6E6 +69DDD0974C1F284FCD3558B06DE4898EC51DABFDE7CCB0750A13DFA74BD42B78 +DD20C60D7875E6BE77E47FD03622BCA9C327E2A04BEC1B2DDAF8489878C0F7C2 +C269D2716D54B6346D168CE94960209183E946A040D5398252E663FE77C0A39E +F2C4EFDF61F13705060805BC95EC542A175D10970BACE90E499B3752C1D8C001 +86392027948BCEDE3E9F8CBEF1B2F92FA0EE47B2FFFFB0D58E6164AAC434F4E2 +4F24B9B95C7B0DA3D731FA24CBCEEEDA08C990013DA94F4C8225903D10889D84 +8566963B566ADDC28A5A14B27BF82EDE1C962ADE62A08A0BA1DAA3F48AABDCAC +2AA1BF8BB6902E08D7B329789BDA46EF6CD47E6144B9492E66A8E20C2D7B1D2F +5F330637A7908703C32DE33D80A1D83993B287164CE9E3B0CAF86935ED585B86 +D8E9815F3B0B101B6D28A46CDED6F7EEE09E266FE195C1C925D9A87498ADBF85 +2D78A45FF079081ECE207A77BA46EAC68F472E00AD267FA502D018CAA6290CEB +27A7EAC803619A5046D322DFE17FD1CFD72F9A8669908F581DC30BC260CB44BB +D9388FF7E3770F07B724FEFE156DB2DBA74DAEAC7E129CC390AD8FCF85C6DB53 +38188CFCE7E3A3A6A0FD28E87FA23AE0473584D3F5166D480F0ADAEB73D9D664 +3438A6BA726DA8F02E6048A4541B18933BF9B04141E6826651B8087B1B2C62CA +4FDBC5F2EE9CD5757A78101699F1D715EA0A517EEB64D32BBE05360AFF53F7A4 +94C24EC5ED77F7736F3B8B872658FDDB80CE8C7E726F6A509732FABC65A3358B +BC16372A054A2ACB28134EBEBB4A955C6FFE4DCC038224429D19185323BEB922 +9F56B8C9219BEE0BF9B7206F69B01DE0750043D51D9EB7F67F88208EE56D98E2 +58B9EB7CFD00004F4D11A7677A51AA15C3AB784B7605C35436355CF3A34A3166 +7B449A75827C8B1062BA5950CF1CE07A818C9BE492B35F17D1193151A9E1EB8C +58050944B2108214B9069AFFBF77113DB0163BBBBE9F88138AAC3187E49C63BC +260A52246B7A70DBC6A47875BD8B5F9ABD923E3FA1AC8B7F1793974DA99A581C +BF723A67D8A90442AEAC1EC1C73AE98E19396C6751E28BFC94B53AF0E9B11035 +64A43925E34F8637708ABF43218CFCCE188A4B6933E2C295DF49C5BEA119D17F +DD4CF1C643A73F847FA40E705E8C7D706BE0D18924978AD36C7EA4F82A335090 +92049272C2F5C0D40F7A867A90E38C8CA029776DE60765867C3B16406BB63EDD +E2BD3F3A29841050FB9CE07B91CE2BB9F2317B9A083E534F0688A067B4B602C3 +AB65AFA467EB4CDCA6000A2D43160908FF36BA16B23509E584A86005BAFB11C6 +1BD62DFC8F1DC9E3A99CE053C255CC7B72E49F651A0854F9EFFB4FC11F5A6CAE +1BB742D5343FCD68D9E74AEDDD47A9AA32ACEBAAF09DC4B8511288634B785F64 +C6F5072422CE633FC47FE6C6195307CCDA12E579A6F677FE2781AD2663FCF57C +848B0E2995C97563BC43740A8CCE60C2D5FD395AB86C043DF23AEAD1E7237005 +BA38D449D72AF09A97E57DF82F6A815473F1F96A522AFD990C9F5C1F28BDD473 +35F90F2AEE54F7610C5C8FFE260D77D5CA16B14CB609C3A59D53C72EE5B062DB +F6EB69CE56B47F8C9E9E7C90B6BC17F489E2820768C5080BCC40BD45521C7290 +AE131636C436AD64425E840170C46232C263134F94AAE9DF890C3AE7433A2D36 +8B5553CD2F585F3713E4249623A4942EE21946CA348D78BE1596DBE060F4725B +F6D612F261D1312B8D91D99A4F1E77C6DE8DB8923C58642A352AA51ED6EEDFD3 +4808FD63EDE98B39822CC45B10B01BF72AE9E0ED4CB89B1E33CF54E6169F45AF +DE416FEA98A3BD7ADFAA3E2B2285DF4C39CF7B1667B3480DDC1923B44D24FB1F +8F450855FEBB274EC2962D287B86FD9DD4F853BF6CDCD8F365B7108EC0ECDE64 +19B7980A53C7E95E5B0D185C083D8207F45341D9ABF81AE52291FAB318DD6468 +BE99CBAA8E8F814A9F8DA40E29D6E6019B0DE6EE7A1889D442543476BE71E260 +41D5BB992F89E6291572CB28BB6B0331C5B7928B4384C5180605E6B304ABD42C +18A90F507BDF36C3806218ADCD6ABE322936E3327C681C0306382D4E834DF58B +31565A3C85D3596CC58E0FBCD06CEAB50D9D6ACBFDD658B415D4B99EE60ADAB0 +205CDDED28602DB995554E284EDE91170E13DDA95F03163E197BF50CF1ADDE5F +06DF48FAEC79B5E1A4A10EA70E5DCEF27C61D8C7BF435BF0BB08E0D18652940B +9D7344AD2F06E3F2DC37F8EC2EC3709D157D761B11B202D1D33A5D5D4F53CBDC +EF92697C3235BB158F97C162504C7A69A8081B4FFD8BB00F446D8E4D4568E725 +F68CC135CA9D6F348AB82A5665946C1979965822AA6AAE3536035E90AE3939D9 +23D13A522D6DC69D878C846D56B025A6CB22C232E9BD95DDB05628132ADFFDD3 +B6FDBCA9556EBA2F3442BF18F63860822FC22AA84B882D3D1D14EC6A031F5FD0 +E1EECB2EA10C39CDEBD97F4FF32A458E8B272033C6F8725DB4E07768907C5704 +7910AE39DBE111C2A6869897D08DA253318C34249873605907627E52CA086E16 +FAFBAF13779B55931AEFFCF2C4556103D227217F037FEC31CE6A8DE96573F91C +34EC5F5410AC47B38F4BFF8250DF6B96CC262775D29AA5464D98017024D0E2E0 +0ACCFFBCE88464EE5858B8CE5B269225DCF370EFCFA586124412F88115B178B7 +BE890EA0620BA51390A8D3EFE2EBC3304A6F3E9BBB9C8A98747B85C74B44FE13 +FE59CE6247AFECEA269D8064257F1CE75352A65BEDC8F0E253677BAAD94168E5 +3FC852683193BCA26F9536A884058BF2B4633F552FC591599D9D48EC7A2838 +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000000000000000 +cleartomark +%%EndFont +TeXDict begin 40258437 52099154 1000 600 600 (ttt.dvi) +@start /Fa 130[44 1[44 1[44 1[44 44 44 44 44 44 44 44 +44 44 44 44 2[44 44 44 44 44 44 44 44 44 2[44 1[44 4[44 +2[44 6[44 3[44 11[44 10[44 3[44 2[44 9[44 33[{}35 83.022 +/CMTT10 rf /Fb 156[36 36 44 97[{}3 83.022 /CMMI10 rf +/Fc 137[37 39 27 28 28 1[39 35 39 59 20 2[20 1[35 1[31 +39 2[35 97[{}15 66.4176 /CMR8 rf /Fd 206[30 49[{}1 49.8132 +/CMR6 rf /Fe 198[33 33 33 33 33 33 33 33 33 33 48[{}10 +58.1154 /CMR7 rf /Ff 139[32 33 33 1[46 42 46 69 23 2[23 +46 42 1[37 46 37 46 42 9[85 2[60 10[30 11[65 10[42 42 +2[23 2[65 1[32 32 6[23 33[{}27 83.022 /CMR10 rf /Fg 134[71 +4[52 53 55 1[75 67 75 4[37 75 2[61 1[60 1[65 19[128 3[50 +23[67 49[{}15 119.552 /CMBX12 rf end +%%EndProlog +%%BeginSetup +%%Feature: *Resolution 600dpi +TeXDict begin + +%%EndSetup +1 0 bop 1999 2028 4 1563 v 2025 548 a Fg(I)135 b(My)44 +b(c)l(hapter)2025 730 y Ff(W)-7 b(elcome)2348 700 y Fe(1)2386 +730 y Ff(!)p 2025 783 542 4 v 2118 837 a Fd(1)2153 861 +y Fc(to)24 b(our)f(isolated)h(minipage)g(en)n(vironmen)n(t)2681 +1037 y Ff(1)p 2025 1066 1354 4 v 2025 1299 a Fg(1)135 +b(My)45 b(section)2025 1480 y Ff(The)28 b(c)n(hapter)f(b)r(egins)g(on)h +(page)e(1.)2483 1680 y Fb(a)2527 1645 y Fe(2)2582 1680 +y Ff(+)18 b Fb(b)2701 1645 y Fe(2)2761 1680 y Ff(=)23 +b Fb(c)2885 1645 y Fe(2)3273 1680 y Ff(\(1\))2150 1829 +y(Inden)n(ted.)2681 2028 y(2)548 523 y Fe(1)p Fa(\\chapter{My)39 +b(chapter}\\label{c)o(})548 623 y Fe(2)p Fa(Welcome\\footnote)o({t)o(o) +f(our)k(isolated)548 722 y Fe(3)p Fa(minipage)e(environment}!)548 +822 y Fe(4)p Fa(\\newpage)548 922 y Fe(5)p Fa(\\section{My)f +(section}\\label{s)o(})548 1021 y Fe(6)p Fa(The)j(chapter)f(begins)g +(on)i(page)548 1121 y Fe(7)p Fa(\\pageref{c}.\\par)548 +1220 y Fe(8)p Fa(\\begin{equation})o(a^)o(2+b)o(^2)o(=c^)o(2)548 +1320 y Fe(9)p Fa(\\end{equation})515 1420 y Fe(10)p Fa(\\par)f +(Indented.)p eop +%%Trailer +end +userdict /end-hook known{end-hook}if +%%EOF diff --git a/macros/latex/contrib/examplep/pexaminipage.pdf b/macros/latex/contrib/examplep/pexaminipage.pdf new file mode 100644 index 0000000000..9574d2c3d6 Binary files /dev/null and b/macros/latex/contrib/examplep/pexaminipage.pdf differ diff --git a/macros/latex/contrib/examplep/shorthyp_t1xtts.eps b/macros/latex/contrib/examplep/shorthyp_t1xtts.eps new file mode 100644 index 0000000000..c8439df421 --- /dev/null +++ b/macros/latex/contrib/examplep/shorthyp_t1xtts.eps @@ -0,0 +1,32 @@ +%!PS-Adobe-3.0 EPSF-3.0 +%%BoundingBox: 0 0 301 342 +%%Pages: 0 +%%Title: shorthyp from t1xtts +%%Creator: PfaEdit +%%CreationDate: 11:26 16-1-2005 +%%EndComments +%%EndProlog +%%Page "shorthyp" 1 +%0 0 moveto /Times-Roman findfont 1000 scalefont setfont (a) show +newpath +50 315 moveto + 50 339 56 342 88 342 curveto + 105 342 124 340 140 340 curveto + 238 340 lineto + 248 340 260 341 272 341 curveto + 277 341 283 341 288 340 curveto + 299 337 301 326 301 314 curveto + 301 307 300 300 300 295 curveto + 300 165 lineto + 300 160 301 152 301 144 curveto + 301 132 300 120 290 118 curveto + 288 117 285 116 283 116 curveto + 268 116 268 137 268 148 curveto + 268 272 lineto + 73 272 lineto + 68 272 60 272 56 278 curveto + 50 282 50 290 50 298 curveto + 50 315 lineto +closepath +fill +%%EOF diff --git a/macros/latex/contrib/examplep/shorthyp_t1xtts.pdf b/macros/latex/contrib/examplep/shorthyp_t1xtts.pdf new file mode 100644 index 0000000000..7b62944ae2 Binary files /dev/null and b/macros/latex/contrib/examplep/shorthyp_t1xtts.pdf differ diff --git a/macros/latex/contrib/examplep/verbfwr.sty b/macros/latex/contrib/examplep/verbfwr.sty new file mode 100644 index 0000000000..4f3ebb1969 --- /dev/null +++ b/macros/latex/contrib/examplep/verbfwr.sty @@ -0,0 +1,252 @@ +% +% verbfwr.sty -- LaTeX package that writes verbatim to a file +% by pts@fazekas.hu at Sat Sep 27 23:40:12 CEST 2003 +% +% Code partially ripped from sverb.sty +% Dat: space tokens at EOL are ignored by TeX's eyes +% +% Dat: changed \@tempa to \VerbFwrLines, so we have: +% ! File ended while scanning use of \VerbFwrLines. +% !! use latex.ltx \begin{filecontents} +% +% Dat: callbacks are: (see below) +% \verbfwr@actemitlineone +% \verbfwr@actemitline +% \verbfwr@actemitdone +% + +\NeedsTeXFormat{LaTeX2e} +\ProvidesPackage{verbfwr}[2003/09/25 v0.02 Verbatim file write] + +\newif\ifverbfwr@matched +\def\verbfwr@matcher#1#2#3{% + \expandafter\def\csname\string#1$after\endcsname##1#2\relax{% + \def\verbfwr@@terminator{#2}% `\end{foo}' with \string + \def\verbfwr@@after{##1}}% + \expandafter\def\csname\string#1$match\endcsname##1#2##2##3\end{% + \ifx##2\relax\verbfwr@matchedfalse + \else\verbfwr@matchedtrue\csname\string#1$after\endcsname##2##3\fi + #3{##1}% + }% + \expandafter\def\expandafter#1\expandafter##\expandafter1\expandafter{% + \csname\string#1$match\endcsname##1#2\relax\end% + }% +} +\begingroup +\catcode\string`\%=12 +\gdef\verbfwr@percent#1#2\relax + {\ifx\check@percent\@@undefined + \ifx#1\relax\def\VerbFwrLines{}\else + \def\VerbFwrLines{#1#2}\fi\else + \ifx#1\relax\def\VerbFwrLines{}\else + \ifx#1%\def\VerbFwrLines{#2}\else + \def\VerbFwrLines{#1#2}\fi\fi\fi} +\endgroup +\begingroup +\lccode\string`\~32 +\lowercase{\endgroup + \def\verbfwr@isspaces#1{% + \ifx#1\relax \def\@tempb{\@tempswafalse}% + \else\ifx#1~\let\@tempb\verbfwr@isspaces% + \else\def\@tempb##1\relax{}% + \fi\fi% + \@tempb% + } + \def\verbfwr@safespc{\catcode32 13 \def~{ }} +} +\def\verbfwr@default@acts{% +%** Callback called before each line. Should call +%** `\let\verbfwr@actemitlineone\@empty' to prevent subsequent callbacks. +\gdef\verbfwr@actemitlineone{% + %\hrule + \let\verbfwr@actemitlineone\@empty +}% +%** Callback called after the last line (even if \verbfwr@actemitlineone +%** isn't \@empty). This can detect the presence of lines by checking +%** \ifx\verbfwr@actemitlineone\@empty . +\let\verbfwr@actemitdone\@empty +%** Called fore each line, with macro \VerbFwrLines containing the line itself +%** @param #1 \cs process-line-proc +\def\verbfwr@actemitline##1{% + \begingroup + \expandafter##1\expandafter{\VerbFwrLines}% + \endgroup +}% +} +\verbfwr@default@acts +%** Dat: discards spaces at EOL (but not at BOL if BOL!=EOL) +%** @param #1 end-text +%** @param #2 \cs process-line-proc +%** @param #3 \cs end-proc +\def\verbfwr@read#1#2#3{% + \begingroup% + \verbfwr@matcher\verbfwr@match{#1}\verbfwr@read@ii% + \@tempswafalse + \catcode13 13 \catcode32 13 + \lccode\string`\~13\lowercase{% + \def\verbfwr@read@i##1~{\verbfwr@match{##1}}% + }% + \def\verbfwr@read@ii##1{% + % Dat: The TeXbook, page 46 says that characters with code 32 are removed + % from the end of the lines. This is independent of \catcode32 + %%\def\VerbFwrLines{##1}\show\VerbFwrLines + \verbfwr@percent##1\relax\relax% + \ifverbfwr@matched\@tempswafalse\fi% + % vvv Dat: ignore the very first line (with \begin{VerbWrite}), entirely + % made of spaces -- will never occur, because + % trailing spaces have already been trimmed + \if@tempswa\else\@tempswatrue\expandafter\verbfwr@isspaces\VerbFwrLines\relax\fi% + \if@tempswa + \verbfwr@actemitlineone + \verbfwr@actemitline{#2}% + \fi% + \@tempswatrue + \ifverbfwr@matched + \ifx\verbfwr@@after\@empty\else + \PackageWarning{verbfwr}{Text right from \verbfwr@@terminator\space was ignored}% + \fi + %\def\reserved@a{##1}% + \def\VerbFwrLines{%\ifx\verbfwr@actemitlineone\@empty\verbfwr@actemitdone\fi + \verbfwr@actemitdone \endgroup#3}% + \else\let\VerbFwrLines\verbfwr@read@i\fi% + \VerbFwrLines + }% + \verbfwr@read@i +} +\begingroup +\lccode\string`\<=\string`\{ \lccode\string`\>=\string`\} \lccode\string`\|=\string`\\ +\lowercase{\endgroup + %** @example \verbfwr@readenv\verbfwr@read + \def\verbfwr@readenv#1{% + \expandafter\expandafter\expandafter% + #1\expandafter\verbfwr@readenv@i\@currenvir\hfuzz} + \def\verbfwr@readenv@i#1\hfuzz{{|end<#1>}{\end{#1}}} + %** @param #1 stop line + %** @param #2 code to call at stop + \def\verbfwr@readenv@ii#1\hfuzz#2{{|end<#1>}{#2}} +} +%** @param #1<-\end{VerbWrite} (with full catcode 12) +%** @param #2<-\end {VerbWrite} (with various catcodes for \, e, { and } +\def\verbfwr@write#1#2{% + \begingroup% + \@savsf1000 \@savsk\z@skip% in case \verbfwr@actemitlineone initiates horizontal mode + \@bsphack% Dat: too early to say \@bsphack here, because + \let\do\@makeother\dospecials% \catcode`\\=12 etc. (see latex.ltx for \dospecials) + \@tempcnta127 + \loop\ifnum\@tempcnta<256 \catcode\@tempcnta12 \advance\@tempcnta\@ne\repeat + \catcode9=12 % tab: \t, will be emitted as ^^I to the file (force this!) + % Dat: eempost.sty has to be updated (?! not sure) + %\catcode\string`\^13 % allow ^^e1 hex... + \verbfwr@safespc% each space counts when reading (similar to \obeyspaces) + \verbfwr@read{#1}\verbfwr@actwriteline{\@esphack\endgroup#2}% +} +%** \let\verbfwr@actwriteline\verbfwr@writeline +\def\verbfwr@writeline#1{% + %%\showthe\catcode92 \toks0{#1} \showthe\toks0 + \immediate\write\verbfwr@writecs{#1}% +} +\newwrite\verbfwr@writefile +%** Usage: \begin{VerbWrite}{filename.ext}...\end{VerbWrite}. File will end with \n. The +%** line contents after \end{verbwrite} are ignored. +\def\VerbWrite#1{% + \immediate\openout\verbfwr@writefile#1\relax% + \let\verbfwr@writecs\verbfwr@writefile + \let\verbfwr@actwriteline\verbfwr@writeline + \verbfwr@readenv\verbfwr@write + % \foo\bar % would write also this! +} +\def\endVerbWrite{\immediate\closeout\verbfwr@writefile} +%\expandafter\def\csname verbwrite*\endcsname#1#2{% +% \immediate\openout\verbfwr@writefile#2\relax% +% \let\verbfwr@writecs\verbfwr@writefile +% \verbfwr@write{#1}{\immediate\closeout\verbfwr@writefile\end{verbwrite*}}% +%} + +\begingroup\catcode\string`\^^M=3 % math shift. Weird enough. +% ^^^ Dat: Each line following the prev. catcode def. must end with `%' +% otherwise we get `! Missing $ inserted' for +% \begin{PSource}[srcstyle=leftleft] +% a&b +% \end{PSource} +\gdef\verbfwr@noter@endtest#1#2#3#4#5#6^^M{%% + \edef\reserved@a{\string#1}%% + \def\reserved@b{#1#2#3#4{#5}}%% +}%% +\gdef\verbfwr@noter@eachline#1^^M{%% + \expandafter\verbfwr@noter@endtest\string#1[][][]^^M% set \reserved@a and \reserved@b + %%\show\reserved@b% + \if\string^^M\reserved@a%% + % If we are here then our line, #1 begins with ^^M (with a \catcode + % different from 3, which we've set above). This means that somebody + % (our caller) has inserted a ^^M before we've been able to change + % \catcodes. The typical example is \@ifnextchar, looking for a `[', but + % finding only ^^M. That ^^M would have whatever catcode. Another typical + % example is \verbfwr@noter@read0, whose ^^M we should ignore immediately + % Our strategy is to ignore that extra ^^M. + \expandafter\expandafter\expandafter\verbfwr@noter@endtest%% + \expandafter\string\@gobble#1[][][]^^M%% + % ^^^ this sets \reserved@b, so we can properly end the environment here + \let\reserved@a\@gobble%% + \else%% + \let\reserved@a\@empty%% + \fi%% + \ifx\reserved@b\verbfwr@@noter@end%% + %\ifx\verbfwr@actemitlineone\@empty\verbfwr@actemitdone\fi% + \verbfwr@actemitdone%% BUGFIX: added `%' to this line at Fri Nov 12 00:03:26 CET 2004 + \endgroup%% &agroup; + \expandafter\end\expandafter{\@currenvir}%% + \else%% + \verbfwr@actemitlineone%% + \expandafter\def\expandafter\VerbFwrLines\expandafter{\reserved@a#1}%% + \verbfwr@actemitline{}%% + \expandafter\verbfwr@noter@eachline%% + \fi%% +}%% +\endgroup% \catcode + +%** by pts@fazekas.hu at Sun Dec 7 20:41:22 CET 2003 +%** Similar to \verbfwr@readenv\verbfwr@write (which doesn't write anything +%** to a file if all \verbfwr@actemit.. callbacks are redefined), but always +%** stops reading at end of \@currenvir (and doesn't gobble the rest of the +%** line) provided that it is at BOL (/^\s*/). Calls the usual callbacks +%** \verbfwr@actemitlineone, \verbfwr@actemitlineone and +%** \verbfwr@actemitline. Works with normal \catcodes, only the \catcode of +%** ^^M is changed. +%** @param #1 0|1. Insert an empty line if \begin{...} is followed by ^^M? +%** Dat: discards spaces at BOL and EOL +%** Dat: doesn't discard empty lines +%** Dat: accepts \end{...} marker only at BOL (/^\s*/) +\def\verbfwr@noter@read#1{% + \begingroup% &agroup; + \edef\verbfwr@@noter@end{\string\end{\@currenvir}}% + \if1\noexpand#1% + \expandafter\verbfwr@noter@ignore@start% remember ^^M just after \begin{foo} + \else + \obeylines% \catcode\string`^^M=13 + \expandafter\expandafter\expandafter\verbfwr@noter@ignore@start + \expandafter\noexpand% trick to ignore ^^M after \begin{foo} + \fi +} +\def\verbfwr@noter@ignore@start{% + \catcode\string`\^^M=3 + \verbfwr@noter@eachline% +} + +%** \begin{WFile}{filename}contents^^J\end{WFile} +\def\WFile#1{% + \immediate\openout\verbfwr@writefile#1\relax + \let\verbfwr@writecs\verbfwr@writefile + \let\verbfwr@actwriteline\verbfwr@writeline + \verbfwr@default@acts + \verbfwr@readenv\verbfwr@write}% finish this \cs here +\def\endWFile{\immediate\closeout\verbfwr@writefile} + +%** Writes directly to the aux file +\def\WAux{% + \let\verbfwr@writecs\@auxout + \let\verbfwr@actwriteline\verbfwr@writeline + \verbfwr@default@acts + \verbfwr@readenv\verbfwr@write}% finish this \cs here +\def\endWAux{}% + +\endinput%% End of verbfwr.sty diff --git a/macros/latex/contrib/examplep/wrfiles.pl b/macros/latex/contrib/examplep/wrfiles.pl new file mode 100644 index 0000000000..6dd6495dd0 --- /dev/null +++ b/macros/latex/contrib/examplep/wrfiles.pl @@ -0,0 +1,275 @@ +#! /bin/sh +eval '(exit $?0)' && eval 'PERL_BADLANG=x;PATH="$PATH:.";export PERL_BADLANG\ +;exec perl -x -S -- "$0" ${1+"$@"};#'if 0;eval 'setenv PERL_BADLANG x\ +;setenv PATH "$PATH":.;exec perl -x -S -- "$0" $argv:q;#'.q +#!perl -w ++push@INC,'.';$0=~/(.*)/s;do(index($1,"/")<0?"./$1":$1);die$@if$@__END__+if 0 +;#Don't touch/remove lines 1--7: http://www.inf.bme.hu/~pts/Magic.Perl.Header +# +# wrfiles.pl -- write single example files +# by pts@fazekas.hu at Mon Mar 15 17:01:41 CET 2004 +# +use integer; +use strict; + +#** @param $_[0] "config.ps", "config" or "pdftex.cfg" etc. +#** @param $_[1] argument of --progname +#** @param $_[2] argument of --format +#** @return the absoulte version of $_[0] -- or relative if in current dir +sub get_absname($$$) { + my $confrel=$_[0]; $confrel=~y@\\@/@; + my $confabs=$confrel; + if (substr($confrel,0,1)ne'/') { + if (index($confrel,'/')==-1 and (-f $confrel)) { # in current dir + return "./$confrel"; + } + # Dat: need to append $PWD to: 0>index($confrel,'/') and (-f$confrel + # vvv $confrel and $_[1] are assumed not to contain weird characters + my $cmd="kpsewhich --must-exist --progname=$_[1] --format=\"$_[2]\" -- \"$confrel\" 2>&1"; + $confabs=qx($cmd); + chomp $confabs; + } + # Dat: $confabs might begin with `./' + (length($confabs)0) { + if ($N>=1000) { $ret="m"x($N%1000); $N=$N%1000 } + if ($N>=900) { $ret.="cm"; $N-=900 } + if ($N>=500) { $ret.="d"; $N-=500 } + if ($N>=400) { $ret.="cd"; $N-=400 } + while ($N>=100) { $ret.="c"; $N-=100 } + if ($N>=90) { $ret.="xc"; $N-=90 } + if ($N>=50) { $ret.="l"; $N-=50 } + if ($N>=40) { $ret.="xl"; $N-=40 } + while ($N>=10) { $ret.="x"; $N-=10 } + if ($N>=9) { $ret.="ix"; $N-=9 } + if ($N>=5) { $ret.="v"; $N-=5 } + if ($N>=4) { $ret.="iv"; $N-=4 } + while ($N>=1) { $ret.="i"; $N-=1 } + } + $ret +} + +my $destdir='CDfiles'; +my $default_D="\\documentclass{article}\n\n"; +my $default_L="\\usepackage[latin2]{inputenc} +\\usepackage[T1]{fontenc} +\\usepackage[magyar]{babel}\n"; +my $default_B="\n\\begin{document}\n\n"; +my $default_E="\n\\end{document}\n"; + +my %to_coco=('0 '=>'p ','c '=>'< ','o '=>'> ','2 '=>' '); +my %to_class=('f '=>'F','v '=>'F','f!'=>'F','v!'=>'F','d '=>'D', + 'l '=>'L','p '=>'P','t '=>'P','b '=>'B','< '=>'C','> '=>'C','x '=>'C', + ' '=>'C','e '=>'E',"\n\n"=>'Z','w '=>'C','% '=>'C','s '=>'C'); + +my %cleanup_files; +sub cleanup() { while (my($k,$v)=each%cleanup_files) { unlink $k if $v!=0 } } +$SIG{INT}=$SIG{TERM}=$SIG{HUP}=sub { cleanup; exit 1 }; +END { cleanup } + +my %had_files; # $had_files{$filename}++ +sub do_code($$$) { + my($texfn,$lineno,$destfn)=@_; + die if $lineno<1; + my $texabs=get_absname($texfn,"latex","tex"); # adds .tex extension (but not needed) + die "$0: .tex file not found: $texfn\n" if !defined $texabs; + die unless open F, "< $texabs"; + if (exists $had_files{$destfn}) { + if ($destfn=~s@^((?:(?:\d+|[a-zA-Z])_)?(?:\d+|[a-zA-Z]{1,5}))([_.])@$2@) { + # vvv change `1_2_foo.tex' to `1_2ii_foo.tex'. It won't conflict with + # test (1) + $destfn=$1.romannumeral(++$had_files{$1.$destfn}).$destfn; + die if exists $had_files{$destfn}; + } else { + die "$0: multiple target file: $destfn ($texfn:$.)\n"; + } + } else { + $had_files{$destfn}=1 + } + $cleanup_files{"$destdir/$destfn"}++; + die unless open KI, "> $destdir/$destfn"; + my $S; + my $L=$lineno; + while ($L-->0) { die "$0: file too short\n" if !defined($S=) } + # Dat: now $S is the line of the original $lineno + chomp $S; + die "$0: not a code environment ($S) at $texfn:$lineno.\nMaybe wrong \\input{} or \\include{}?\n" + if $S!~m@\\begin{(pelda|peldak|kod|code)}(.*)@; + my $currenvir=$1; + $S=$2; $S=~s@[ \t\r\n]+\Z(?!\n)@@; # Dat: LaTeX also ignores this + my $going_p=1; + my %had_from_class; + print "Dumping env $currenvir from $texfn:$lineno to $destdir/$destfn\n"; + if ($currenvir eq 'kod' or $currenvir eq 'pelda') { + # Dat: kod, pelda and peldak are legacy environments from lakk + die if !print KI $default_D.$default_L.$default_B; + while ($going_p) { + if (0==length$S) { + die "$0: unexpected EOF\n" if !defined($S=); + $going_p=$currenvir eq 'kod' ? $S!~s@\\end\{kod\}.*@@s : $S!~s@\\end\{pelda\}.*@@s; + last if !$going_p and 0==length($S); + chomp $S; + } + die if !print KI "$S\n"; + $S=""; + } + die if !print KI $default_E; + } elsif ($currenvir eq 'code') { + my $oldclass='F'; + while (1) { + if (0==length$S) { + die "$0: unexpected EOF\n" if !defined($S=); + chomp $S; + $going_p=$S!~s@\\end\{code\}.*@@s; + $S="\n\n" if !$going_p and 0==length($S); + } + if (length($S)==0) { $S=" " } + elsif (length($S)==1) { $S.=" " } + do_end: + my $coco=substr($S,0,2); # code command + $S=substr($S,2); + ## print"[$coco][$S]\n"; + $coco=$to_coco{$coco} if exists $to_coco{$coco}; + my $curclass; + die "$0: unknown code command `$coco'\n" if !defined($curclass=$to_class{$coco}); + my $oldclass0=$oldclass; + while ($oldclass ne $curclass) { + if ($oldclass eq 'F') { + $oldclass='G'; + } elsif ($oldclass eq 'G') { + $oldclass='D'; + } elsif ($oldclass eq 'D') { + die if !exists $had_from_class{'D'} and !print KI $default_D; + $oldclass='L'; + } elsif ($oldclass eq 'L') { + die if !exists $had_from_class{'L'} and !print KI $default_L; + $oldclass='P'; + } elsif ($oldclass eq 'P') { + $oldclass='B'; + } elsif ($oldclass eq 'B') { + die if !exists $had_from_class{'B'} and !print KI $default_B; + $oldclass='C'; + } elsif ($oldclass eq 'C') { + $oldclass='E'; + } elsif ($oldclass eq 'E') { + die if !exists $had_from_class{'E'} and !print KI $default_E; + $oldclass='Z'; + } elsif ($oldclass eq 'Z') { + die "cannot move from class $oldclass0 to $curclass\n"; + } + } + ## print "($curclass)($coco)($S)\n"; + if ($curclass eq 'F') { + die "$0: inconsistent filename: $destfn\n" if length($destfn) ' or $coco eq '% ' or $coco eq 's ') { + } elsif ($curclass eq 'D' or $curclass eq 'L' or $curclass eq 'P' + or $curclass eq 'B' or $curclass eq 'E' or $curclass eq 'C') { + die if !print KI "$S\n"; + $had_from_class{$curclass}=1; + } elsif ($curclass eq 'Z') { + last + } else { die } + if (!$going_p) { $S="\n\n"; goto do_end } + $S=""; + } + } elsif ($currenvir eq 'peldak') { + die if !print KI $default_D.$default_L.$default_B; + if (!length$S) { $S="" if !defined($S=) } + die "$0: opening brace expected, got: $S ($.)\n" if substr($S,0,1) ne '{'; + $S=substr($S,1); + my $depth=1; + while (1) { + ##print "A$depth($S)\n"; + if ($depth!=0) { # skip to-document-Sample part + $S="" if substr($S,0,1)eq'%'; + my $T=$S; $S=""; + my $C; + while ($T=~m@\G(\\.?|[%{}]|[^\\%{}]+)@sg) { + if ($depth==0) { $S.=$1 } + elsif ('%'eq($C=substr$1,0,1)) { last } + elsif ($C eq '{') { $depth++ } + elsif ($C eq '}') { $depth-- } + } + if ($depth==0 and 0!=length$S) { + die if !print KI "$S\n"; + } + } else { + die if !print KI "$S\n"; + } + last if !$going_p; + die "$0: unexpected EOF\n" if !defined($S=); + chomp $S; + $going_p=$S!~s@\\end\{peldak\}.*@@s; + last if !$going_p and 0==length($S); + } + die if !print KI $default_E; + } else { die } + die unless close KI; + die unless close F; + $cleanup_files{"$destdir/$destfn"}--; +} + +my $gendepth=0; +#** @param #_[1] bool: must exist? +sub do_aux($$); +sub do_aux($$) { + no strict 'refs'; + my $auxfn=$_[0]; + my $auxabs=get_absname($auxfn,"latex","tex"); + if (!defined $auxabs) { + die "$0: .aux file not found: $auxfn\n" if $_[1]; + return + } + my $F=\*{'FILE'.$gendepth++}; + die unless open $F, "< $auxfn"; + print "Processing $auxfn\n"; + while (<$F>) { + if (/^\\\@gobble\{code:.*\}/) { + die "$0: syntax error ($.)\n" if !/^\\\@gobble\{code:([^:\}]+):(\d+):([^:\}]+)\}$/; + do_code($1,$2+0,$3); + } elsif (/^\\\@gobble\{(cd[dlbe]):(.*)\}/) { + my $ftype=uc($1); + die "$0: cannot open $ftype file: $2: $!\n" unless open CDL, "< $2"; + print "Using $ftype file: $2\n"; + my $S=join('',); + $S=~s@\A[\n\r]+@@; + $S=~s@\s+\Z(?!\n)@\n@; + ## die $S; + if ($ftype eq 'CDD') { $default_D="$S\n" } + elsif ($ftype eq 'CDL') { $default_L=$S } + elsif ($ftype eq 'CDB') { $default_B="$S\n" } + elsif ($ftype eq 'CDE') { $default_E=$S } + else { die } + die unless close CDL; + } elsif (/^\\\@input\{/) { + die "$0: syntax error ($.)\n" if !/^\\\@input\{([^}]+)\}$/; + do_aux($1,0); + } + } + die unless close $F; + $gendepth--; +} + +die "Usage: $0 [.tex|.aux]\n" if @ARGV!=1; +my $fn=$ARGV[0]; +$fn=~s@[.](tex|aux)\Z(?!\n)@@; # Imp: foo.bar.log? + +select STDERR; $|=1; select STDOUT; $|=1; +if (-e $destdir) { + print STDERR "warning: destination dir exists: $destdir\n" +} +mkdir $destdir; +die unless -d $destdir; +do_aux "$ARGV[0].aux", 1; + +__END__ -- cgit v1.2.3