; TeX output 1996.10.01:1551soиDtGGcmr17The7tGGcmss17moqreverbpackage!", cmsy10XQ cmr12RobinFVairbairns(ߤN cmtt9rf@cl.cam.ac.uko cmr9)Bafterw/AngusDuggan,RainerScrh opfandVictorEijkhout437 1996/10/01:ōINff cmbx12ContentsI"V cmbx101XThisTpac9k\rage |21 XK`y cmr101.1oT*abUUexpansion.............................V1X1.2oLineUUnumbGering.............................V2X1.3oMiscellenea֍...............................V2I2XTheTcoQdeofthepac9k\rage53X2.1oInitialUUcoGde)...............................V3X2.2oW*ritingUUtoa le.............................V3X2.3oT*abUUexpansion.............................V3!čI1aLThisffpackageIThispackqageusesthefacilitiesprovidebythe m#R cmss10verbatimpackqageintheL5ffٓRcmr7A͉TU>'ExX2 b> cmmi10"I!': cmti10to}'ols&distributiontoprovideanumbGerofthingsthatwererejectedasunnecessaryIinthedevelopmentofthatpackqage.Z(Nevertheless,thetab-expansioncoGdeinthisIpackqageUUrespGondstooneoftheFAQsof"'ExX2.09andearlyIL5ffA͉TU>'ExX2"sFpversionsofthispackqage. JHowever,Z"itscapabilitiesarenowprovidedIbypalltt,طwhichisde nedbytheallttpackqage,طnowpartoftheL5ffA͉TU>'ExXbasedis-Itribution,UUandsoverbatimcmdhasbGeenwithdrawn.IX-ffr @ -:q% cmsy6L|{Ycmr8ThisX lehasvÎersionnumb'ExXIusesUUtoGomanycountersasitis...).I17S\def\verbatimtabsize{8\relax}\@xobeytabI\@xobeytabUUactuallyexecutesthepGositioningwhenatabisencountered.I18S\def\@xobeytab{\leavevmode\penalty\@M I19ap{\loop\\global\advance\tab@position-1\ifnum\tab@position>0\repeat}} L\@vobeytabsI\@vobeytabs finitialisesuseofӃ\@xobeytab.YxNeedstobGeexecutedwithinagroup, IasUUmustn'tbGeallowedtoleakoutintothewideworld.I20S\begingroup I21]\catcode`\^^I=\activeI22]\gdef\@vobeytabs{\catcode`\^^I\active\let^^I\@xobeytab}%I23S\endgroup3soH\verbatim@tabexpandI\verbatim@tabexpandhb}'odywCof&line[i; \@nilproGcesseseverycharacterofalineby Itailrecursion,countingthecharactersandjugglingthingswhenatabisencoun-Itered.q(WhatUUusedtobGecalled`lineimaging'...)I24S\def\verbatim@tabexpand#1{% I25]\ifx#1\@nil\expandafter\par\elseI26f\ifx#1\@xobeysp\@xobeysp\advance\tab@position-1\elseI27f\ifx#1\@xobeytab\@xobeytab\elseI28t#1\advance\tab@position-1I29f\fi\fiI30f\ifnum\tab@position=0\tab@position\tab@size\fiI31f\expandafter\verbatim@tabexpandI32]\fiI33S}3PlistingI\begin{listing}[hintervali)]{hstartline[i0"} XDe nesRaverbatimenvironmentwithnumbGeredlines;theoptionalargumentIhintervaliuspGeci esthenumberoflinesbetweennumberedlines,0andtheargumentIhstartdHline[i|spGeci esUUthestartingline. LlistingcontI\begin{listingcont}XContinuesURfromtheplacewherelistinglefto .qThestyleinwhichthelabGelisIsetUUcanbGealteredbyre-de ningx\listinglabel.X`*'UUversionsofbGothenvironmentsareprovided.\listing@lineI\listing@lineתholdsthecurrentlinenumbGer;itsdefaultvqalueis1,>soonecanImerrilyHuselistingcontthroughoutadoGcumentifthere'sbutonestreamofIverbatimUUtextbGeingwritten.I34S\newcount\listing@line\listing@line=1\listing@stepI\listing@stepgȲisanothercasewhereacounterusedtobGeused,KtonoveryobviousIutility*,nbutn6usingupavqaluablecountregister.jAgain,nthevqalueismoGdal;theItrailingx\relaxUUisnecessary*.I35S\def\listing@step{1\relax}XAdding;san\hboxinfrontofthelinecausesalinebreak,@soI^1߲gothroughthisIrigmaroletogetthelinesalignednicely*.%IprobablymissedsomeobviousreasonIwhyx\hboxesUUdon'twork^2|s.I36S\def\listinglabel#1{\rlap{\small\rmfamily\the#1}\hskip2.5em} I37S\def\thelisting@line{%I38]\setbox0\hbox{\listinglabel\listing@line}%I39]\@tempcnta=\listing@lineI40]\divide\@tempcnta\listing@step\multiply\@tempcnta\listing@stepI41]\ifnum\listing@line=1I42f\unhbox0I43]\elseI44f\ifnum\@tempcnta=\listing@lineI45p2\unhbox0I&effr J= "5-:Aacmr61LThe p "5-:2LIt'skb\listingsimplytosuckinparametersandthentouse\listingcontI50S\newcommand\listing[2][1]{%I51]\global\listing@line=#2\relaxI52]\gdef\listing@step{#1\relax}I53]\listingcont}X\listingcontUUisthebusinessendofthetwoUUenvironments.I54S\def\listingcont{%I55]\tab@size=\verbatimtabsizeI56]\def\verbatim@processline{\tab@position\tab@sizeI57f\thelisting@line\global\advance\listing@line1I58f\expandafter\verbatim@tabexpand\the\verbatim@line\@nil}%I59]\@verbatim\frenchspacing\@vobeyspaces\@vobeytabs\verbatim@start}XNothingUUspGecialattheendofthetwoUUenvironments.I60S\let\endlisting=\endtrivlistI61S\let\endlistingcont=\endtrivlistXNowUUthesamerigmaroleforthe`*'versions.I62S\expandafter\newcommand\csnamelisting*\endcsname[2][1]{%I63]\global\listing@line=#2\relaxI64]\gdef\listing@step{#1\relax}I65]\csnamelistingcont*\endcsname}I66S\@namedef{listingcont*}{%I67]\def\verbatim@processline{%I68f\thelisting@line\global\advance\listing@line1I69f\the\verbatim@line\par}%I70]\@verbatim\verbatim@start}XNobbut"abitofhassleinthenamede nitionsfortheendoftheenvironmentsI71S\expandafter\let\csnameendlisting*\endcsname\endtrivlistI72S\expandafter\let\csnameendlistingcont*\endcsname\endtrivlistblistinginputI\listinginput[hintervali)]{hstartline[i0"}{h lename[i,_}wjisa leinputversionoflist- Iing.I73S\def\listinginput{%I74ap\@ifnextchar[%]I75kJ{\@listinginput}%I76kJ{\@listinginput[1]}}I77S{\catcode`\~=\active\lccode`\~=`\^^M\lccode`\N=`\NI78XdD\lowercase{%I79]\gdef\@listinginput[#1]#2#3{\begingroupI80kJ\global\listing@line=#2I81kJ\gdef\listing@step{#1\relax}I82kJ\tab@size=\verbatimtabsizeI83kJ\def\verbatim@processline{\tab@position\tab@sizeI84yw^\thelisting@line\global\advance\listing@line1I85yw^\expandafter\verbatim@tabexpand\the\verbatim@line\@nil}%I86kJ\@verbatim\frenchspacing\@vobeyspaces\@vobeytabs55soI87kJ\def\verbatim@addtoline##1~{% I88yw^\verbatim@line\expandafter{\the\verbatim@line##1}}%I89kJ\openin\verbatim@in@stream=#3I90kJ\ifeof\verbatim@in@streamI91t\PackageWarning{moreverb}{Nofile#3.}%I92kJ\elseI93t\verbtab@oktrueI94t\loopI95\read\verbatim@in@streamto\verbtab@lineI96\ifeof\verbatim@in@streamI97L\verbtab@okfalseI98 \elseI99L\expandafter\verbatim@addtoline\verbtab@lineE100L\verbatim@processlineE101L\verbatim@startlineE102\fiE103t\ifverbtab@ok\repeatE104t\closein\verbatim@in@stream\fiE105kJ\endtrivlist\endgroup\@doendpe}}} LverbatimcmdIverbatimcmdܲwasaverbatimenvironmentwiththeexceptionoftheescapGeand Igroupingcharacters\,2{,}.Thisis(err)exactlythespGeci cationoftheallttIenvironment,andthatisintheallttpackqagethatisnowpartofthebasedistri-Ibution.E106S\def\verbatimcmd{% E107]\PackageError{moreverb}{Theverbatimcmdenvironmentisobsolete%E108΃\MessageBreakE109΃Useallttinitsplace}%E110S}E111S\let\endverbatimcmd\relaxboxedverbatimIboxedverbatimUUputsthecontentsUUofaverbatimenvironmentinaframingbGox. X(W*rittenUUbyVictorEijkhout.)XBugUU x(suppliedbyDavidCarlisle)1995/12/28,marked%%%DPC%%%XFirst,Srede neR`proGcessline'toproduceonlyalineaswideasthenaturalwidthIofUUthelineE112S\def\boxedverbatim{% E113]\def\verbatim@processline{%E114f{\setbox0=\hbox{\the\verbatim@line}%E115f\hsize=\wd0\the\verbatim@line\par}}%XNowUUsavetheverbatimcoGdeinaboxE116]\@minipagetrue%%%DPC%%%E117]\@tempswatrue%%%DPC%%%E118]\setbox0=\vbox\bgroup\verbatimE119S}XAttheendoftheenvironment,}we(umm)simplyhavetosticktheresultsinto IaUUframe.E120S\def\endboxedverbatim{%E121]\endverbatimE122]\unskip\setbox0=\lastbox%%%DPC%%%6@ soXNowUUeverything'sinthebGox,sowecancloseit...E123]\egroupXT*oUUchangethecoGdeforcentring,thenetlineneedsaspGotofhacking.E124]\fbox{\box0}%<<<===changehereforcentering,... E125S} LverbatimtabI\begin{verbatimtab}[htabwidthci0iM]Yisaverbatimenvironmentwhichexpandstab Icharacters;UUtheoptionalargumentspGeci esthedistancebetweeUUtabstops.E126S\newcommand\verbatimtab[1][\verbatimtabsize]{%E127]\do@verbatimtab{#1}{%E128kJ\@verbatim\frenchspacing\@vobeyspaces\@vobeytabs\verbatim@start}%E129S}E130S\def\do@verbatimtab#1#2{%E131]\tab@size=#1E132]\def\verbatim@processline{\tab@position\tab@sizeE133kJ\expandafter\verbatim@tabexpand\the\verbatim@line\@nil}#2E134S}E135S\let\endverbatimtab=\endtrivlistXThisUUconditionalisusedin\listinginputand\verbatimtabinputaswell:E136S\newif\ifverbtab@okt\verbatimtabinputI\verbatimtabinput[htabwidthci0iM]{h lename[i0eF}#isa leinputversionofthe IverbatimtabUUenvironment.XW*e.usetheinputstreamacquiredbytheverbatimpackqage;wedidafterallIrequire?ittobGeloaded.1(Onehastoadmitthatthenameofthatstreamisn'tIactuallyq:partofthepackqage'sde nedinterface,x3butontheotherhandthere'snoIparticularUUlikelihoGodthatitwilleverchange.)XW*ek7can'tusefancyfeaturesof2T\newcommandsincethede nitionhastobGeinsideIagroup,Qandhenceglobal.wWSo...W/`traditional'coGdetoprovideacommandwithIanUUoptionalargument:E137S\def\verbatimtabinput{%E138ap\@ifnextchar[%]E139kJ{\@verbatimtabinput}%E140kJ{\@verbatimtabinput[\verbatimtabsize]}}E141S{\catcode`\~=\active\lccode`\~=`\^^M\lccode`\N=`\NE142XdD\lowercase{%E143]\gdef\@verbatimtabinput[#1]#2{\begingroupE144kJ\do@verbatimtab{#1}{%E145t\@verbatim\frenchspacing\@vobeyspaces\@vobeytabs}%E146kJ\def\verbatim@addtoline##1~{%E147yw^\verbatim@line\expandafter{\the\verbatim@line##1}}%E148kJ\openin\verbatim@in@stream=#2E149kJ\ifeof\verbatim@in@streamE150t\PackageWarning{moreverb}{Nofile#2.}E151kJ\elseE152t\verbtab@oktrueE153t\loopE154\read\verbatim@in@streamto\verbtab@lineE155\ifeof\verbatim@in@stream\verbtab@okfalseE156\else7IsoE157L\expandafter\verbatim@addtoline\verbtab@line E158L\verbatim@processlineE159L\verbatim@startlineE160\fiE161t\ifverbtab@ok\repeatE162t\closein\verbatim@in@streamE163kJ\fiE164ap\endtrivlist\endgroup\@doendpe}}}E165Sh$5" cmmi9=mo9reverb'^i8U;+Cscmtt8&ow cmss9% cmsy9$5" cmmi9#N cmbx12" cmmi10K`y cmr10ٓRcmr7Wj