LaCheck(1) LaCheck(1) NAME lacheck-AconsistencycheckerforLaTeXdocuments. SYNOPSIS lacheckfilename[.tex] DESCRIPTION LaCheckisageneralpurposeconsistencycheckerforLaTeXdocuments.ItreadsaLaTeXdocumentanddisplayswarningmessages,ifitfindsbadsequences.Itshouldbenoted,thatthebadnessisverysubjective.LaCheckisdesignedtohelpfindcommonmistakesinLaTeXdocuments, especiallythosemadebybeginners. Thethingscheckedare: Mismatchedgroups(braces),environmentsandmathmodedelimiters.Whenamismatchis found,linenumbersforbothstartandendofthemismatchisgiven.Theerrormessagescomesin pairs,onefortheendmatchandoneforthebeginning,markedwith` <-´ and` ->´ respectively. Badspacingincludingmissinga` \´ afteranabbreviation,missingan` \@´ beforeapunctuation markinaparagraphthatisendedbyancapitalletter,doublespaceslike` ´ ,badusageofellipsis(likeusing...insteadof\ldots,orusing\ldotswhere\cdotsshouldbeused),missingbeforea \citeor\refcommands,spacebeforefootnotes,italiccorrectionsbeforecomma,point,oritalic text,italiccorrectionafternormaltext,missingitaliccorrectionwhenswitchingfromitalictonormaltext,anddoubleitaliccorrection. Badlyplacedpunctuationmarksaroundendofmathmodedelimiters.Thisis,punctuationplaced rightafterdisplaymathendorpunctuationplacedrightbeforetextmathend.Sequencesof whitespacefollowedbypunctuationmarksarealsocaught. Baduseofquotationcharacters,i.e.constructslike"´ word"or"word` "arewarnedabout,tabsin verbatimenvironmentsarecaught,certainTeXprimitivesarefrownedupon,attemptstogivefont specifiersargumentssuchas\em{text}arenoted,anduseof@inLaTeXmacrosarereported. LaCheckwillreadfilesthatareinputusing\inputor\include.Fileswithsuffix` .sty´ areomitted,astheyprobablywillcauseLaChecktocrash. LaCheckmaybeinvokedfromwithinEmacs(1)usingcompile: Torun:M-xcompileRETlacheckRET,andthenC-x‘toparsethemessages OUTPUT TheoutputisUNIX-errorlike,andmaybeparsedusingEmacs(1)compilemode.Hereisasam-ple: lacheckcompiler "/usr/mef/compiler.tex",line34:missing` \\\\´ after"etc." "/usr/mef/compiler.tex",line179:doublespaceat"˜ " "/usr/mef/compiler.tex",line186:<-unmatched"}" "/usr/mef/compiler.tex",line181:->unmatched"$$" Acontrolspace` \´ shouldbeinsertedatline34,topreventanend-of-sentencespace.Also,at line179,thefirstspaceofthesequence"˜ "shouldprobablybedeleted.Thelasttwolinesisan example,wheretheusermistyped,andprobablyinsertedanextra"}"somewhere. DIAGNOSTICS Somespecialcasesshouldbeexplained.Incaseswhereasentenceendswithsomethingthat LaCheckthinksisanabbreviationanmissing` \´ errormayalsooccur,ifthefollowingsentence beginswithalowercaseletter. 1Release1.251 11LACHECKDATE11 1 LaCheck(1) LaCheck(1) Amismatcherrormaycausemoretofollow,duetothechosenalgorithm.InsuchcasesjustcorrectthefirsterrorandrunLaCheckagain Braces,environmentsandmathmodemustbebalancedwithinafile. LaCheckmaybeconfusedbyunmatchedstuffplacedinsideverbatim-likeenvironmentscalled somethingelsethanexactly` verbatim´ . FILES %d:/Local/TeXLive/bin/win32/lacheck% SEEALSO tex(1),emacs(1),latex(1) BUGS LaCheckgetsconfusedbyadvancedmacros,isfooledbysimplemacros,can’tfigureoutifyouuse anon-standardwaytoswitchitaliconoroff,doesnotlikeTeXatall,doesnotprovideany optionstoturnoffspecificwarnings,andisatbestacrudeapproximation. Ideasforimprovementsandbugreportsareverywelcome.Suchshouldbedirectedtothemaintainers,theiremailaddressis<auc-texmgr@sunsite.auc.dk>. AUTHOR KrestenKrabThorupwithmodificationsbyPerAbrahamsen. 2Release1.252 22LACHECKDATE22 2