简体   繁体   中英

Undefined control sequence in a NOWEB document (\nwstartdeflinemarkup)

In a document NOWEB compiled with the following command

noweave -tex -filter "elide comment:*" adocument.nw > documentation.tex

and trying to compile the resulting file with the command

xetex -halt-on-error documentation.tex

I got the following error message

! Undefined control sequence.
<argument> ...on}\endmoddef \nwstartdeflinemarkup 
                                              \nwenddeflinemarkup

It seems that \\nwstartdeflinemarkup is not recognized.

If I delete from the document all the sequences

\nwstartdeflinemarkup\nwenddeflinemarkup

the document compile normally.

What can be the problem?

I believe the problem is an error in the distribution of noweb, where a few commands that I think should be present in both the support for TeX and for LaTeX is actually only available for LaTeX.

A simple fix is to add the two lines to the start of the source file:

\let\nwstartdeflinemarkup\relax
\let\nwenddeflinemarkup\relax

Some background information on this. Given this source file:

One line of documentation.  
<<SomeChunkname>>=  
// No real code  
@ %  
Second and last line of documentation.

and running noweave and then xelatex :

noweave -tex adocument.nw > documentation.tex
xetex -halt-on-error documentation.tex

replicate the error, hardly surprising because \\nwstartdeflinemarkup is not defined in nwmac.tex . Now, browsing a source file for nwmac.tex , namely support.nw in a ctan mirror site reveals that \\nwstartdeflinemarkup is defined for LaTeX, but not for TeX.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM