Open jpgoldberg opened 4 years ago
Thank you for reporting this issue! I will investigate the section and label transformation code to see if this can be fixed.
Would it be possible for you to share the markdown code that is used to output the following:
\subsection{External references\# Browser extension in Chrome}
\label{External references# Browser extension in Chrome}
\label{external-references-browser-extension-in-chrome}
I'm not really sure that this counts as a bug as source markdown is malformed. However the fact that mdbook produces valid HTML while mdbook-latex produces an error on the same input, I thought I would report it.
Note that I have not tested this as a minimal example. It is part of a larger thing that I was porting from gitbook.
The working
Many of my source files end with an empty section, with the last line of the file being
These correctly are turned into TeX (yes, your ugly debugging technique really works) as
which is correct.
The broken
But in one case, I did not have a newline terminator on that last header line, and so what was generated was
The "
# Browser extension in Chrome
" is the first line of the next markdown file.tectonic failed with
as a good TeX engine should, due to the unescaped "
#
" in the label.Probably not a bug
As I said, my markdown was malformed. (And your debugging technique helped me fix it.) And just because the same malformed input produces HTML for plain mdbook does not mean that such (broken) behavior should be replicated. But I did want to at least leave a record of this issue.