Path: csiph.com!usenet.pasdenom.info!news.albasani.net!.POSTED!labrador.cs.tufts.edu!not-for-mail From: Sergio Spina Newsgroups: comp.programming.literate Subject: Re: [?] Re: !Undefined control sequence in a NOWEB document Date: Thu, 30 Aug 2012 05:12:05 -0400 (EDT) Organization: albasani.net Lines: 233 Sender: nr@labrador.cs.tufts.edu Approved: Litprog auto-moderator Message-ID: References: NNTP-Posting-Host: OG4zNpsf/SkSCEfUok3KMnJ7yPxPRYdD8kf7lLUhwVw= Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: news.albasani.net TSHw9szFgTgPXmI7lf1bDKUL9kpZLdm3R5vLmkcSDCvG22CJwetsn//ZBnOsA9YpDA2w8MOhf7ahUggAXZ8Uug== X-Complaints-To: abuse@albasani.net NNTP-Posting-Date: Thu, 30 Aug 2012 09:12:08 +0000 (UTC) Errors-To: /dev/null Cancel-Lock: sha1:LUssALCCOAB7+5FV/redXujIRtQ= Xref: csiph.com comp.programming.literate:68 Il giorno mercoled=EC 29 agosto 2012 22:47:09 UTC+2, Norman Ramsey ha scrit= to: > On Wednesday, August 29, 2012 4:43:58 PM UTC-4, Sergio Spina wrote: >=20 > > I'm writing a TeX-noweb document. >=20 >=20 >=20 > It may have been a long time since anyone used noweb with plain TeX and n= ot latex. Send me a short .nw file that exhibits the problem and I'll see = if I can reproduce it. >=20 >=20 >=20 >=20 >=20 > Norman Many thanks. Now comes a short test file (atest.nw), commands in the terminal, the deriv= ed file doc.tex, the xetex command in the terminal, the final file doc.log = with the error message "Undefined control sequence." System: Linux Mint 13 Maya file atest.nw >-------------< \def\title#1{{\font\zzz=3Dcmr7 scaled \magstep4 \vbox{\hrule\bigskip\centerline{\zzz#1}\bigskip\hrule}}} @ \title{A TEST}\vskip.5in \centerline{\it Lorem ipsum adequesque introitat qui eiusmod loquavit.}\bre= ak \chapter{Introduction} I wrote this format just for a test, taking inspiration from `[[lola.dtx]]'= by John Delmonte and from `[[samantha.dtx]]' by Betty Curtis. \section{Usage.} To load the format specify [[\input atest]] into your document. \chapter{The code} <>=3D Now comes another piece of the well-known ``Lorem Ipsum'' words flow. Lorem ipsum est juris vinculum quod necessitate advertimus secundum nostra civita= te legis. @ Almost every \TeX\ program begins with more or less the same introductory things. \bigskip Version informations in a comfortable place. <>=3D \def\version{2} \def\revision{3} \def\revisiondate{2012/08/28} @ The sign `@' for the private macros. <<@ catcode>>=3D \chardef\OldAtCatCode=3D\the\catcode`@ \catcode`@=3D11 @ Messages form the format to the [[.log]] file. It's nice to let them star= t all on a new line. <<@message>>=3D \def\@message#1{{\newlinechar=3D`=A7\message{=A7ATEST.TEX : #1 ::| }}} @ The first cry of this TeX child. <>=3D \@message{Version \version.\revision\space -- revision \revisiondate} @ Layout definitions <>=3D \hsize=3D6in \vsize=3D8in \hoffset=3D1.5in \voffset=3D-.5in @ That's all. <>=3D \endinput <>=3D <> <<@ catcode>> <<@message>> <> <> <> \bye >-------------< Commands in the terminal >-------------< $ notangle -Ratest.tex atest.nw > atest.tex $ noweave -tex -filter "elide comment" atest.nw > doc.tex >-------------< file doc.tex >-------------< \input nwmac \nwfilename{atest.nw}\nwbegindocs{0}\nwdocspar% =3D=3D=3D> thi= s file was generated automatically by noweave --- better not edit it \def\title#1{{\font\zzz=3Dcmr7 scaled \magstep4 \vbox{\hrule\bigskip\centerline{\zzz#1}\bigskip\hrule}}} \nwenddocs{}\nwbegindocs{1}\title{A TEST}\vskip.5in \centerline{\it Lorem ipsum adequesque introitat qui eiusmod loquavit. Ite = autem in culum facere.}\break \chapter{Introduction} I wrote this format just for a test, taking inspiration from `{\Tt{}lola.dt= x\nwendquote}' by John Delmonte and from `{\Tt{}samantha.dtx\nwendquote}' by Betty Curtis. \section{Usage.} To load the format specify {\Tt{}{\nwbackslash}input\ ates= t\nwendquote} into your document. \chapter{The code} \nwenddocs{}% % % % % \nwbegindocs{3}Almost every \TeX\ program begins with more or less the same introductory things. \bigskip Version informations in a comfortable place. \nwenddocs{}\nwbegincode{4}\moddef{version}\endmoddef\nwstartdeflinemarkup\= nwenddeflinemarkup \\def\\version\{2\} \\def\\revision\{3\} \\def\\revisiondate\{2012/08/28\} \nwendcode{}\nwbegindocs{5}The sign `@' for the private macros. \nwenddocs{}\nwbegincode{6}\moddef{@ catcode}\endmoddef\nwstartdeflinemarku= p\nwenddeflinemarkup \\chardef\\OldAtCatCode=3D\\the\\catcode`@ \\catcode`@=3D11 \nwendcode{}\nwbegindocs{7}Messages form the format to the {\Tt{}.log\nwend= quote} file. It's nice to let them start all on a new line. \nwenddocs{}\nwbegincode{8}\moddef{@message}\endmoddef\nwstartdeflinemarkup= \nwenddeflinemarkup \\def\\@message#1\{\{\\newlinechar=3D`=A7\\message\{=A7ATEST.TEX : #1 ::| \= }\}\} \nwendcode{}\nwbegindocs{9}The first cry of this TeX child. \nwenddocs{}\nwbegincode{10}\moddef{hello world}\endmoddef\nwstartdeflinema= rkup\nwenddeflinemarkup \\@message\{Version \\version.\\revision\\space -- revision \\revisiondate\= } \nwendcode{}\nwbegindocs{11}Layout definitions \nwenddocs{}\nwbegincode{12}\moddef{layout}\endmoddef\nwstartdeflinemarkup\= nwenddeflinemarkup \\hsize=3D6in \\vsize=3D8in \\hoffset=3D1.5in \\voffset=3D-.5in \nwendcode{}\nwbegindocs{13}That's all. \nwenddocs{}\nwbegincode{14}\moddef{goodbye}\endmoddef\nwstartdeflinemarkup= \nwenddeflinemarkup \\endinput \nwendcode{}\nwbegincode{15}\moddef{atest.tex}\endmoddef\nwstartdeflinemark= up\nwenddeflinemarkup \LA{}version\RA{} \LA{}@ catcode\RA{} \LA{}@message\RA{} \LA{}hello world\RA{} \LA{}layout\RA{} \LA{}goodbye\RA{} \\bye \nwendcode{}\bye >-------------< Command in the terminal >-------------< $ xetex -halt-on-error doc.tex >-------------< file doc.log >-------------< This is XeTeX, Version 3.1415926-2.4-0.9998 (TeX Live 2012) (format=3Dxetex= 2012.7.8) 30 AUG 2012 10:43 entering extended mode restricted \write18 enabled. %&-line parsing enabled. **doc.tex (./doc.tex (/home/sam/texmf/tex/plain/misc/nwmac.tex \textsize=3D\dimen16 \codehsize=3D\dimen17 \codemargin=3D\dimen18 \nwdefspace=3D\dimen19 \equivbox=3D\box16 \plusequivbox=3D\box17 \cont=3D\write0 \listlevel=3D\count28 \itemwidth=3D\dimen20 ) [1 \openout0 =3D `doc.toc'. ] [Introduction] [Usage.] [2] [The code] ! Undefined control sequence. ...on}\endmoddef \nwstartdeflinemarkup=20 \nwenddeflinemarkup=20 \bchack #1^^M->\relax #1 =20 l.27 ...ef\nwstartdeflinemarkup\nwenddeflinemarkup =20 Output written on doc.pdf (2 pages). >-------------< Sergio