Closed AllenDowney closed 12 years ago
Well, doing this in tree_cleaner turns out to be difficult.
And doing it by intercepting the stream of input tokens turns out to be difficult.
So I think the solution for now is to put the responsibility on the author to leave off the extra text.
However, I have a short program called preprocess.py that automates this, and I've changed the Makefile to run it automatically.
See commit 101db49..fea69e8
In LaTeX most references look like "Figure~\ref{blah}" or "Chapter~\ref{blah}"
In the DocBook we want to drop the redundant "Figure" or "Chapter"
In my previous books I have done this by pre-scanning the LaTeX input.
But here I think we want to add it to tree_cleaner.
Working...