; TeX output 1997.03.28:1741soеDtGGcmr17The7tGGcmss17compscipacqkagedXQ ff cmr12macros/forwritingabdCoutmacros(F4rankenstein'sconscience)?XQ cmr12MattSwift߆T cmtt12VVersion:8v0.92(bSeta) *DoScumenrtationrevision:81996/10/04"$D!Kt : cmbx9Abstract oo cmr9TheX q[ cmsl9compsciSpac9k|rageprovidesL5Aacmr6A TuAEXmacrosforwritingabAoutL5ATuAEX bmacros.@Mostvoftenthispac9k|ragewillbAeusedtosupplementtheltxdoAcbclass,TbutitcanbAeusedwithotherclasses.oInqthisinitialv9ersion,thereareafewcosmeticbugs,someminorbugs,bandTsomefeaturesbreakify9ouarenotusingtheltxdoAc\class.#8I Nff cmbx12PartffII!Nq cmbx12DiscussionꨍI1aLTfextualffelementsI#'ExXenvironment.pF*or+\envIexample,UUtheenumerateenvironment.X\bst{hbibstylename[iCNz}typGesetsthenameofaB&- cmcsc10iDb32TU>ExXbibliographystyle.OFF*or+\bstIexample,UUtheachicagobibstyle.X\package {hp}'ackagename[iD}typGesetsthenameofaL5ffA͉TU>'ExXpackqage.F*orex-3P\packageIample,UUthecompscipackqage.X\class{hclassname[i8}typGesetsthenameofaL5ffA͉TU>'ExXclass.F*orexample,the!|\classIletter class.X\filed.{h lename[i0eF}typGesetsthenameofadisk le.SF*orexample,the le&`\fileIMakefile.in.X\ext{hextensionci17}typGesetsthenameofadisk leextension.nF*orexample,+\extItheextensiondvi.TheargumentshouldnotincludethedotthatseparatestheIroGotLdnamefromtheextension.nThedotcanbeinsertedbythemacroifyouwantIit.1*soX\caveats{hwarningtextظi? }typGesetsawarningparagraphs.&Y*oucanalsoenclose\caveat warning Ithe^ cmmi10e^xdx !#@$^&\^^Aforemacs$XThe?earlierexampleshadthreeunmatchedopen-braceswhichhadtobeXclosed?inthisenvironment. Alsothebackslashhadtobedoubled.XPercent?signsgetignored--abug.XW arning: jThe+codeexamplexenvironment+ideallyshouldignore%(MsintheI rstcolumnandprintallothers.rThebGestIcandoforthemomentistoignoreI%(Ms.XThebothexampleandbothexample*environmentstypGesettheircontentstwo bothexampleLbothexample*Itimes,sidebyside.@Theleftsideissetlikeeitheracodeexampleorcodeexample*Ienvironment,UUandtherightsideissetlikeatypesetexampleenvironment.I% ?This?isonepartofa\env{bothexample}environment:c?\(\int?e^x\,dx\) \fbox{jub-jub}\par2 soc?The?contentsmustnotcontainany\LaTeX{}errors. c?There?isanannoying\plusthreeexplicitspacesatthebeginningofc?the?firstpart. Theyareabug!Alsonoticealsothemissingpercentc?sign?afterthebackslashafter``annoying''--anotherbugthataffectsc?the?verbatimpartonly. I*R6 cmss12LOOKSLIKE:(ZI۶ ffi̟C荄Cff 9ThisUUisonepartofabothexampleenvironment:qǟīR e^ 0ercmmi7xdxUU9ff&w}㎍ff9jub-jub%ffffff&w} ITheUUcontentsmustnotcontainanyL5ffA͉TU>'ExXerrors.ThereGisanannoying%plusthreeexplicitspacesatthebGeginningofthe rstpart.Theyareabug!KAlsonoticealsothemissingpGercentsignafterthebackslashafter\annoying"UU{anotherbugthata ectstheverbatimpartonly*.iCffffffi̎-!XThe#splitexampleenvironment#takesanargumentwhichisusedontherightLsplitexamplebsplitexample*Isiden(thetypGesetside)ofanelementthatloGokslikebothexample.ThecontentsIoftheenvironmentaresetontheleftside.hgThisisawaytocheat,&makingtheIrightUUsidesomethingotherthanthestricttyepsettingofwhat'sontheleft.XW arning: Thesplitexampleandbothexampleenvironmentskexecuteex-IampleS'coGde.q Theexamplecodeisexecutedinagroup,SbutbecarefulwithglobalIassignments, -andwithassignmentsthatmightscrewuptheexampleenvironmentIitselfUUbGeforethegroupends.qNoticethat\setcounter}isglobal.XW arning: Thea%characterisentirelyignoredinsidebothexampleenviron-Iments.qDon'tUUcountonthem.qThisisabug.XThebothexampleandsplitexampleenvironmentsuseanauxiliary lewithIextensionUUvrb,butasecondpasswithL5ffA͉TU>'ExXisnotnecessary*.XT oTdo:GetUUtheannoyinginitial% outofthebGeginningofbothexample.XT oTdo:qImplementUUsplitexampleandsplitexample*.XT omdo:Get\`thebothexamplesub-environments\`sidebyside!RightnowtheyIare#sequential.aI# recommendkeepinglinelengthinsidethisenvironmentlessthanI40,Ohowever,incasetheside-by-sidepresentationiseverpGossible.| IhavenotIfollowedUUthisadvicemyself.XT o.X\option*:{hoptionname[i>R}typGesetsthenameofapackqageorclassoption.ciF*or\optionIexample,UUthelandscapeoption.X\program{hpr}'ogramname[iF}typGesetsthenameofacomputerprogram.F*or3P\programIexampleUUthexdviprogram.qSeealso\newprogrambGelow.XThe}compsci%packqageusesthelipspackqage,Bsoyoucanusethe\lipscommand&`\lipsIforUUtextellipses.qMyloveUUislikearedredrose....XTheJIcompscipackqageusesthetitlesƲpackqage,soseveralcommandslike$\booktitleI\booktitleUUareavqailable.3soI2aLReferringfftocommandsI\csU{hc}'ommandsequence[iZ}typGesetsacommandsequence,suchastheonethat/>\cs +\cmd Istarts thissentence.\cmddoGesthesamething.F*orexample,-v\cs\fooloGoks IIlike9ff  ff*\foo ffffff.Whenwriting,@e.g.,\cs\foothefollowingspacingisautomaticallyIhandled.kTheA@resultdoGesn'tlookdi erentfromusingthe|...|or\codesyntax,Ibut^vthemarkupallowstheparsingofthemacronameitselfforsomefuturepurpGoseIsuchUUasforindexing.XW arning: "Y*ou$cannotsay\cs\(Mfoo@barMCwhen$@isnotaletter(categoryIcoGdeUU11),youmustsay\cs{(M\foo@bar}}orUU\cname{foo@bar}instead.XNorUUcanyousay\cs\(Mpar.qItUUtripson\text@(Mcommand.XNorUUcanyousay\cs\(Miffoo.qUseUU\cname{iffoo}}instead.X\cname.{hc}'ommandname[iM}islike\csbutitsargumentisevqaluatedandpre-!|\cnameI xedwwithabackslashcharacter.F*orexample,lwriting\cname{@tfor}givesyouI9ff&L  ff*\@tfor% ffffff&LoL.X\marg){hmandatoryar}'gumentظicr}typGesetsamandatoryargument,^and\oarg&`\marg&`\oargI{hoptionalar}'gumentظiW}UUtypGesetsanoptionalargument.qF*orexample,I% ?\cs\GobbleMOM\marg{first?arg}\oarg{optionalsecondarg}\marg{thirdarg} ILOOKSLIKE:Iffi̟ff\GobbleMOMUU{h rstar}'g}i*}[hoptionalse}'condarg}i\[;]{hthir}'darg}i-,}iffffffi̎ffX\meta@{htextظi}referstoasyntacticplaceholder.Y*ouwouldusethisforexample&`\metaItoktalkabGoutoneoftheargumentsofacommandyou'veintroGduced,likehtextظiIabGove,UUwhichcancontainnormaltextbutisbrokenacrosslinesonlyatspaces.!čI3aLMiscellaneousIThe?ucompscipackqageusestheabbrevspackqagetode netheProgramcategoryof \newprogramIabbreviation.Use8\newprogram{h\csname[i-ߘ}{hinitialexp}'ansionciPd}[hsubse}'quentexpansioncidS]ItoUUde neanewabbreviation{h\csname[i-ߘ}foraprogram.X\ProcessDTXFilegcanbGeusedbyadocumentationdriver leofthekindyou 6\ProcessDTXFileImight; bGeinclinedtomakeusingthedoGcNpackqage."ItspurpGoseistobeabletoIloadϼapackqageuptoacertainpGointsothatjustdescriptiveinformationcanbGeIread{withoutreadinginthewhole le.F\ProcessDTXFile{h lename[i,_}de nestheIvqariableV?\JuStLoAdInFoRmAtIoNandinputsthe leh lename[i0'.tT*obGeuseful,VztheI lemusthaveastatementthatbranchesonwhether\JuStLoAdInFoRmAtIoNisIde ned.qF*orUUanexampleofitsuse,seethepresentpackqage.X\AddToCheckSuma/{hnumb}'eri(}simplyaddshnumb}'eri/wgloballytothechecksum\AddToCheckSumIcounter,$implementedinthedoGchpackqage.d Thismacro ndsapplicationswhentheIsources{ofapackqagearespreadoveroneormore lessuchascon guration lesIor+^ lesconcatenatedbyaMakeproGcess.cF*oranexampleofitsuse,3seethepresentIpackqage.XTheUUBiDb32TU>ExXlogoisprovidedifitisn'talreadyde ned.\BibTeX4/qsoIPartffIs3IIImplemenZtationꨍI4aLVfersionffcontrol$\fileinfo b\fileversion $\filedate y\docdate $\PPOptArgITheseUUde nitionsmustbGethe rstonesinthe le. Ls1S\def\fileinfo{macrosforwritingaboutmacros(Frankenstein'sconscience)} Ls2S\def\DoXNeeDME{}Ls3S\def\fileversion{v0.92(beta)}Ls4S\def\filedate{1996/10/04}Ls5S\def\docdate{1996/10/04}Ls6S\edef\PPOptArg{%Ls7]\filedate\space\fileversion\space\fileinfoLs8S}퍑XStoprighthereifwe'rejustloadingthe le'sinformation,janddon'twantto IloadMthiscoGdefortypesettingitsdocumentation(onlymakessenseforcertainpack-Iages).3TheHJuStLaAdInFoRmAtIoN! agwillbGesetbythedocumentationdriver;ItheUUDoXNeeDME agwillbGesetinthedtx le,andwillappearaboveUUifit'sset.Ls9S\makeatletter I10S\@ifundefined{JuStLoAdInFoRmAtIoN}{%I11]}{%ELSEI12]\@ifundefined{DoXNeeDME}{%I13f}{%ELSEI14f\UndefineCS\JuStLoAdInFoRmAtIoNI15f\usepackage{compsci}%I16]}I17]\makeatotherI18]\endinputI19S}XNowUUwecheckforL5ffA͉TU>'ExX2eanddeclarethepackqage.I20S\NeedsTeXFormat{LaTeX2e}I21S\ProvidesPackage{compsci}[\PPOptArg]!?I5aLRequirementsffandcontextI22S\RequirePackage{abbrevs,alltt,lips,moredefs,moreverb,relsize,shortvrb,%I23Dslemph,titles,url,verbatim}I24S\@ifclassloaded{ltxdoc}{%I25]}{%ELSEI26S\MonsterWarning{compsci}I27]{Youmayencountererrorswiththisversionofthecompscipackage\MessageBreakI28apsinceyouarenotusingtheltxdocclass.\MessageBreakI29apThiswillbefixedinafutureversion.}%I30S}􍍑I6aLTfextualffelements'|\code '||...| H\url@ttnobreakstyleIW*eusetheurlŲpackqagetoimplement\codeandtheshortvrbSpackqagetoimple- Imentq|...|.Therearenolinebreaksineither.SeetherespGectivepackqagesfor5?soIconsiderationsUUofrobustness. XT oTdo:qsummarizeUUrobustnessconsiderationshere.I31S\MakeShortVerb{\|} I32S\newcommand\code{%I33]\begingroupI34]\urlstyle{ttnobreak}%I35]\UrlI36S}I37S\newcommand\url@ttnobreakstyle{%I38]\def\UrlFont{\ttfamily}%I39]\def\UrlSpecials{\do\{\}}%I40]\def\UrlOrds{\do\*\do\-}%I41S}XW arning: Alltheverbatim-likeenvironmentsbGelowarehackedandqueer.IIiqhaveivbGeenmeaningtobecomeaverbatimexpertforalongtime,n~butIiqamnotIevenUUcloseyet.XWhatneedstobGedoneistocreatetheequivqalentof\@(Mdocverbatim,AaboveIbut}usingthenewverbatimpackqage.ThenbGoththecodeexamplexenvironmentIandthebothexampleenvironmentscouldusethiswhenwritingoutthevrb leIofDtheircontents. seemsunavoidablebGecausewewanttoreadthemwithdi erentcatcoGdesIeachUUtime.XT oTdo:FigureUUwhetherthetabstu hereisgoingisahelporahindrance.9\@verbatimtabinputIFirst+Nwewanttorede ne\@verbatimtabinputsothatitignores%s.cOnceagain,Iwe_shouldliketoprint%sthatarenotinthe rstcolumn,*butthisimplementationIignoresUUthemall.7T,soE106S{\catcode`\~=\active\lccode`\~=`\^^M\lccode`\N=`\N E107XdD\lowercase{%E108]\gdef\@verbatimtabinput[#1]#2{\begingroupE109kJ\do@verbatimtab{#1}{%E110t\@verbatim\frenchspacing\@vobeyspaces\@vobeytabs}%E111kJ\def\verbatim@addtoline##1~{%E112yw^\verbatim@line\expandafter{\the\verbatim@line##1}}%E113kJ\openin\verbatim@in@stream=#2E114kJ\ifeof\verbatim@in@stream\typeout{Nofile#2.}\elseE115t\verbtab@oktrueE116t\catcode`\%=9E117t\loopE118\read\verbatim@in@streamto\verbtab@lineE119\ifeof\verbatim@in@stream\verbtab@okfalse\elseE120L\expandafter\verbatim@addtoline\verbtab@lineE121L\verbatim@processlineE122L\verbatim@startlineE123\fiE124t\ifverbtab@ok\repeatE125t\closein\verbatim@in@stream\fiE126kJ\endtrivlist\endgroup\@doendpe}}}t] Lbothexample bbothexample*IThe˳ rst\begingroup...\endgroupIˑthinkisnecessarytocontaintheverbatim Iactivity*.>The8secondisnecessarysothatactivityintheexampleenvironmentdoGesInote ectanythingoutsideit.Ofcourseglobalactivitywill,?sobGecareful!TheI\minipageUUe ectsthesecondgroup. tE127S\newenvironment{bothexample}{% E128f\parE129f\begingroupE130f\verbatimwrite{\jobname.vrb}%E131]}{%E132]\endverbatimwriteE133]\verbatimtabinput{\jobname.vrb}%E134]\endgroupE135]\partIW*eUUcompGensateherefortheextralinecausedbythe nalnewlineabove.E136]\addvspace{-\baselineskip}%E137]\noindent{\sffamily\largeLOOKSLIKE:}%E138]\par\smallskipE139]\noindent\fbox{%E140f\minipage{\textwidth}E141f\DocInput{\jobname.vrb}% s,^^AFIXDocInputnotdefinedE142f\endminipageE143]}%E144]\par\medskipE145S}t]bsplitexample splitexample*IW*ecan'tuse#1intheend-environmentpart, sowewriteitout.%Againwehave ItheUUproblemof%s.XW arning:qThisUUisbroken!鍍E146S\newenvironment{gogog}[1] E147]{\verbatimwrite{\jobname.vrb}#1}E148]{\endverbatimwrite}8 ]NsoE149S\newenvironment{splitexample}[1]{% E150]\gogog{#1}\endgogogE151]\codeexampleE152]}{%E153]\endcodeexampleE154]\par\smallskipE155]\noindent\fbox{%E156f\minipage{\textwidth}E157f\catcode`\%=9E158f\input{\jobname.vrb}%E159f\endminipageE160]}%E161]\par\medskipE162S}3P\caveat 3Pwarning \cs@caveat '|\todo 3Ptodoenv y\cs@todoE163S\newcommand\caveat[1]{%E164]\cs@caveatE165]#1%E166]\endgroupE167]\parE168S}E169S\newenvironment{warning}{%E170f\cs@caveatE171]}{%E172]\endgroupE173]\parE174S}E175S\newcommand\cs@caveat{%E176]\parE177]\begingroupE178f\em{\bfseriesWarning:}\spaceE179S}E180S\newcommand\todo[1]{%E181]\cs@todoE182f#1%E183]\endgroupE184]\parE185S}E186S\newenvironment{todoenv}{%E187f\cs@todoE188]}{%E189]\endgroupE190]\parE191S}E192S\newcommand\cs@todo{%E193]\parE194]\begingroupE195f\em{\bfseriesTodo:}\spaceE196S}'|\word '|\term '|\defn ,`\env 3P\option y\package y\program "\class '|\file ,`\bst ,`\ext "\email y\typesetIAbstractUUmarkupoftermsandob8jects.E197S\NewTextFontCommand\program\TMFontProgram%genericnameofcomputerprogramE198S\NewTextFontCommand\bst\ttfamilyY%nameofBibTeXbibliographystyle9 gݠsoE199S\NewTextFontCommand\cat\sffamilyY%nameofacategory E200S\NewTextFontCommand\class,\slshape!%nameofLaTeXclassE201S\newlet=l\defnX\textslswitch s,%definitionE202S\requirecommand\email,{\url}*F%emailaddressE203S\NewTextFontCommand\env\ttfamilyY%nameofenvironmentE204S\NewTextFontCommand\ext\ttfamilyY%nameoffileextensionE205S\requirecommand\fileX{\url}*F%nameofdiskfileE206S\NewTextFontCommand\option s,\ttfamilyY%nameofpackageorclassoptionE207S\NewTextFontCommand\package\slshape!%nameofLaTeXpackageE208S\newlet=l\termX\textslswitch s,%technicaltermE209S\newlet=l\typeset\fbox/?%textasitappearswhentypesetE210S\newlet=l\wordX\textitswitch s,%refertoawordasaword!čI7aLReferringfftocommands'|\meta '|\m@ta $\do@space "\sp@ce 3P\sp@@ceIHereyIMrede ne\metatoincludea\normalfontrightatthebGeginninginsidea Igroup,sincethecommandwasworkingstrangelywhen\ttfamilywasine ect.IAlso,UUIrede ne\\tobGeatypesetbackslash.E211S\begingroup E212S\obeyspaces%E213S\catcode`\^^M\active%E214S\gdef\meta{\begingroup\def\\{\char`\\}\normalfont\obeyspaces\catcode`\^^M\active%E215S\let^^M\do@space\let\do@space%E216S\def\-{\egroup\discretionary{-}{}{}\hbox\bgroup\itshape}%E217S\m@ta}%E218S\endgroupITheseUUaresimplyfromthedoGcpackqage.E219S\defcommand\m@ta[1]{%E220]\leavevmodeE221]\hbox\bgroup$\langle$\itshape#1\/$\rangle$\egroupE222]\endgroupE223S}E224S\def\do@space{%E225]\egroupE226]\spaceE227]\hbox\bgroup\itshape\futurelet\next\sp@ceE228S}E229S\def\sp@ce{%E230]\ifx\next\do@spaceE231f\expandafter\sp@@ceE232]\fiE233S}E234S\defcommand\sp@@ce[1]{%E235]\futurelet\next\sp@ceE236S}'|\marg '|\oargIThese~use\metaandarethereforeslightlydi erentthantheircounterpartsin IltxdoGc.qAUUtinybitofbreakqabilityisaddedatthebGeginning.E237S\defcommand*\marg[1]{%E238]\penalty9999%E239]{\ttfamily\char`\{\meta{#1}\char`\}}%E240S}10 psoE241S\defcommand*\oarg[1]{% E242]\penalty9999%E243]{\ttfamily[\meta{#1}]}%E244S}"\cname ,`\cmd 1\csIF*or{referringtoaL5ffA͉TU>'ExXmacro. ThecoGdeisamixfromtheltxdocclassandthe Iabbrevsapackqage.msThereSisnoneedtocheckfor\nocorrcommandsinsidetheIargument0soweskip\text@command.xYW*emightconceivqablybGeinatypGewriterIslanted,usoo%wedocheckforitaliccorrections.6W*edon'thandlethecaseofcallingIthiszinmathmoGde(seethede nitionofM\DeclareTextFontCommandinthekernel).XW*ehandlethecasesof\cmd{\foo}and\foodi erently.23ThelatterneedslogicItodeterminethefollowingspace,whereastheformerdoGesnot.TheybothneedIitalicUUcorrections.E245S\DeclareRobustCommand*\cname[1]{% E246]\expandafter\code\expandafter{\bslash#1}%E247S}E248S\DeclareRobustCommand*\cmd{%E249]\leavevmodeE250]\@ifnextchar\bgroupE251p2\cs@cmd@groupedE252f\cs@cmd@ungroupedE253S}E254S\newcommand\cs@cmd@grouped[1]{%E255]\begingroupE256f\maybe@icE257f\code{#1}%E258f\aftergroup\maybe@icE259]\endgroupE260S}E261S\newcommand\cs@cmd@ungrouped[1]{%E262]\begingroupE263f\maybe@icE264f\code{#1}%E265f\aftergroup\maybe@ic@spaceE266]\endgroupE267S}E268S\let\cs\cmd!čI8aLMiscellaneous$\partname f\ProcessDTXFile 6\AddToCheckSumISeetheversioncontrolsectionabGoveforanexampleofwhenyoumightwantto IuseUUthesecommands.E269S\def\partname{%E270]Part%E271S}E272S\newcommand*\ProcessDTXFile[1]{%E273]\InitCS\JuStLoAdInFoRmAtIoNE274]\def\filename{#1}%E275]\UndefineCS\DoXNeeDMEE276]\input{#1}%E277]\UndefineCS\JuStLoAdInFoRmAtIoNE278S}11 | soE279S\newcommand*\AddToCheckSum[1]{% E280]\global\advance\check@sum#1%E281S} L\newprogram 6\TMFontProgram 6\TMHookProgram f\TMResetProgramIProvideUUforprogramabbreviations.E282S\TMNewCategory{Program}E283S\NewUserAbbrevDefiner\newprogram{Program}E284S\def\TMFontProgram{%E285]\relsize{-1}\ttfamilyE286S}3P\BibTeXITheUUBiDb32TU>ExXlogo.E287S\providecommand\BibTeX{%E288]{\rmfamilyB\kern-.05em{\scshapei\kern-.025emb}\kern-.08emE289fT\kern-.1667em\raisebox{-.7ex}{E}\kern-.125emX}%E290S}!čI9aLCon gurationIOtherUUthingsaredeferredtoacon guration le.E291S\InputIfFileExists{compsci.cfg}{}{}XTheUUcontentsofthedistributedcon guration learebGelow.E292S\def\fileinfo{Compscipackageconfiguration}E293S\def\fileversion{v1.0}E294S\def\filedate{1996/03/23}E295S\def\docdate{1996/03/23}E296S\ProvidesFile{compsci.cfg}3P\ALaTeX \Frankenstein y\monster '|\CTAN '|\kpse 3P\gemacs 3P\auctex ,`\nts \MakeIndex '|\etex $\LaTeXiiiIV*ariousUUprogramnames.E297S\newprogram\Frankenstein{Frankenstein}E298S\newlet\monster\FrankensteinE299S\requirecommand\ALaTeX{%E300]A\LaTeX%E301S}E302S\newtextmacro\ctan{CTAN}E303S\newprogram\kpse{kpathsea}E304S\newprogram\gemacs{\textrm{GNU}Emacs}E305S\newprogram\auctex{AUC-\TeX}E306S\newprogram\nts{$\calNTS$}E307S\newprogram\MakeIndex{{\normalshape\emMakeindex\/}}E308S\newprogram\etex{e-\TeX}E309S\newprogram\LaTeXiii{\LaTeX~3}12; *R6 cmss12( cmmi10 0ercmmi7K`y cmr10ٓRcmr7u cmex10