TEX(1) TEX(1) NAME tex,virtex,initex−textformattingandtypesetting SYNOPSIS tex[options][commands] DESCRIPTION Thismanualpageisnotmeanttobeexhaustive.Thecompletedocumentationforthisversionof TEXcanbefoundintheinfofileormanualWeb2C:ATeXimplementation. TEXformatstheinterspersedtextandcommandscontainedinthenamedfilesandoutputsa typesetterindependentfile(calledDVI,whichisshortforDeViceIndependent).TEX’scapabilitiesandlanguagearedescribedinTheTEXbook.TEXisnormallyusedwithalargebodyofprecompiledmacros,andthereareseveralspecificformattingsystems,suchasLATEX,whichrequire thesupportofseveralmacrofiles. ThisversionofTEXlooksatitscommandlinetoseewhatnameitwascalledunder.Bothinitex andvirtexaresymlinkstothetexexecutable.Whencalledasinitex(orwhenthe--inioption isgiven)itcanbeusedtoprecompilemacrosintoa.fmtfile.Whencalledasvirtexitwilluse theplainformat.Whencalledunderanyothername,TEXwillusethatnameasthenameofthe formattouse.Forexample,whencalledastexthetexformatisused,whichisidenticaltothe plainformat.ThecommandsdefinedbytheplainformataredocumentedinTheTEXbook. Otherformatsthatareoftenavailableincludelatexandamstex. ThecommandsgivenonthecommandlinetotheTEXprogramarepassedtoitasthefirstinput line.(Butitisofteneasiertotypeextendedargumentsasthefirstinputline,sinceUNIXshells tendtogobbleupormisinterpretTEX’sfavoritesymbols,likebackslashes,unlessyouquote them.)AsdescribedinTheTEXbook,thatfirstlineshouldbeginwithafilename,a\controlsequence,ora&formatname. Thenormalusageistosay texpaper tostartprocessingpaper.tex.Thenamepaperwillbethe‘‘jobname’’,andisusedinformingoutputfilenames.IfTEXdoesn’tgetafilenameinthefirstline,thejobnameistexput.Whenlookingforafile,TEXlooksforthenamewithandwithoutthedefaultextension(.tex)appended, unlessthenamealreadycontainsthatextension.Ifpaperisthe‘‘jobname’’,alogoferrormessages,withrathermoredetailthannormallyappearsonthescreen,willappearinpaper.log,and theoutputfilewillbeinpaper.dvi. TEXwilllookinthefirstlineofthefilepaper.textoseeifitbeginswiththemagicsequence%&. Ifthefirstlinebeginswith%&format--translate-filetcxnamethenTEXwillusethenamedfor-matandtransationtabletcxnametoprocessthesourcefile.Eithertheformatnameorthe --translate-filespecificationmaybeomitted,butnotboth. TheeresponsetoTEX’serrorpromptcausesthesystemdefaulteditortostartupatthecurrent lineofthecurrentfile.TheenvironmentvariableTEXEDITcanbeusedtochangetheeditor used.Itmaycontainastringwith"%s"indicatingwherethefilenamegoesand"%d"indicating wherethedecimallinenumber(ifany)goes.Forexample,aTEXEDITstringforemacscanbe setwiththeshcommand TEXEDIT="emacs+%d%s";exportTEXEDIT Aconvenientfileinthelibraryisnull.tex,containingnothing.WhenTEXcan’tfindafileit thinksyouwanttoinput,itkeepsaskingyouforanotherfilename;responding‘null’getsyouout oftheloopifyoudon’twanttoinputanything.YoucanalsotypeyourEOFcharacter(usually control-D). OPTIONS ThisversionofTEXunderstandsthefollowingcommandlineoptions. Web2C7.32x 29March1999 1 TEX(1) TEX(1) --fmtformat Useformatasthenameoftheformattobeused,insteadofthenamebywhichTEXwas calledora%&line. --helpPrinthelpmessageandexit. --iniBeinitex,fordumpingformats;thisisimplicitlytrueiftheprogramiscalledasinitex. --interactionmode Setstheinteractionmode.Themodecanbeoneofbatchmode,nonstopmode,scrollmode, anderrorstopmode.Themeaningofthesemodesisthesameasthatofthecorresponding \commands. --ipcSendDVIoutputtoasocketaswellastheusualoutputfile.Whetherthisoptionis availableisthechoiceoftheinstaller. --ipc-start As--ipc,andstartstheserverattheotherendaswell.Whetherthisoptionisavailable isthechoiceoftheinstaller. --kpathsea-debugbitmask Setspathsearchingdebuggingflagsaccordingtothebitmask.SeetheKpathseamanual fordetails. --maketexfmt Enablemktexfmt,wherefmtmustbeoneoftexortfm. --mltex EnableMLTEXextensions. --no-maketexfmt Disablemktexfmt,wherefmtmustbeoneoftexortfm. --output-commentstring UsestringfortheDVIfilecommentinsteadofthedate. --prognamename Pretendtobeprogramname.Thisaffectsboththeformatusedandthesearchpaths. --shell-escape Enablethe\write18{command}construct.ThecommandcanbeanyBourneshellcommand.Thisconstructisnormallydisallowedforsecurityreasons. --translate-filetcxname Usethetcxnametranslationtable. --version Printversioninformationandexit. ENVIRONMENT SeetheKpathsearchlibrarydocumentation(the‘Pathspecifications’node)forprecisedetailsof howtheenvironmentvariablesareused.Thekpsewhichutilitycanbeusedtoquerythevalues ofthevariables. Onecaveat:InmostTEXformats,youcannotuse˜ inafilenameyougivedirectlytoTEX, because˜ isanactivecharacter,andhenceisexpanded,nottakenaspartofthefilename.Other programs,suchasMETAFONT,donothavethisproblem. TEXMFOUTPUT Normally,TEXputsitsoutputfilesinthecurrentdirectory.Ifanyoutputfilecannotbe openedthere,ittriestoopenitinthedirectoryspecifiedintheenvironmentvariable TEXMFOUTPUT.Thereisnodefaultvalueforthatvariable.Forexample,ifyousay texpaperandthecurrentdirectoryisnotwritable,ifTEXMFOUTPUThasthevalue /tmp,TEXattemptstocreate/tmp/paper.log(and/tmp/paper.dvi,ifanyoutputis Web2C7.32x 29March1999 2 TEX(1) TEX(1) produced.) TEXINPUTS Searchpathfor\inputand\openinfiles.Thisshouldprobablystartwith‘‘.’’,sothat userfilesarefoundbeforesystemfiles.Anemptypathcomponentwillbereplacedwith thepathsdefinedinthetexmf.cnffile.Forexample,setTEXINPUTSto ".:/home/usr/tex:"toprependthecurrentdirecoryand‘‘/home/user/tex’’tothestandardsearchpath. TEXEDIT Commandtemplateforswitchingtoeditor.Thedefault,usuallyvi,issetwhenTEXis compiled. FILES Thelocationofthefilesmentionedbelowvariesfromsystemtosystem.Usethekpsewhichutilitytofindtheirlocations. tex.pool EncodedtextofTEX’smessages. texfonts.map Filenamemappingdefinitions. *.tfmMetricfilesforTEX’sfonts. *.fmtPredigestedTEXformat(.fmt)files. $TEXMFMAIN/tex/plain/base/plain.tex ThebasicmacropackagedescribedintheTEXbook. BUGS ThisversionofTEXfailstotraparithmeticoverflowwhendimensionsareaddedorsubtracted. Caseswherethisoccursarerare,butwhenitdoesthegeneratedDVIfilewillbeinvalid. SEEALSO mf(1), DonaldE.Knuth,TheTEXbook,Addison-Wesley,1986,ISBN0-201-13447-0. LeslieLamport,LATEX−ADocumentPreparationSystem,Addison-Wesley,1985,ISBN 0-201-15790-X. K.Berry,Eplain:ExpandedplainTEX,ftp://ftp.cs.umb.edu/pub/tex/eplain/doc. MichaelSpivak,TheJoyofTEX,2ndedition,Addison-Wesley,1990,ISBN0-8218-2997-1. TUGboat(thejournaloftheTEXUsersGroup). TRIVIA TEX,pronouncedproperly,rhymeswith‘‘blecchhh.’’Theproperspellingintypewriter-likefonts is‘‘TeX’’andnot‘‘TEX’’or‘‘tex.’’ AUTHORS TEXwasdesignedbyDonaldE.Knuth,whoimplementeditusinghisWEBsystemforPascalprograms.ItwasportedtoUnixatStanfordbyHowardTrickey,andatCornellbyPavelCurtis. TheversionnowofferedwiththeUnixTEXdistributionisthatgeneratedbytheWEBtoCsystem(web2c),originallywrittenbyTomasRokickiandTimMorgan. Web2C7.32x 29March1999 3