简体   繁体   中英

Unwanted question marks in noweb output

I have the following noweb file, titled test

\documentclass{article}
\usepackage{noweb}
\begin{document}
\section{Hello World}
This is a program

<<example.py>>=
print("Hello, world!")
@
\end{document}

I type the following commands:

pdflatex test.tex
evince test.pdf

The pdf looks something like this:

??    <example.py ??>=
         print("Hello, world!")
      This code is written to file example.py

What are these question marks and how do I get rid of them?

You have to run pdflatex test.tex a second time. The first run generates warnings about undefined cross-references. Those cross-references are defined in the generated aux file, which is then used with the second pass.

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