Jean Baldraque
Jean Baldraque

Reputation: 141

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?

Upvotes: 2

Views: 153

Answers (1)

Baard
Baard

Reputation: 829

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.

Upvotes: 1

Related Questions