-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
\label
must directly follow preceding control sequence without newline in between
#20
Comments
How frustrating...do you have an example of a document where this happens? |
Nope, but chktex warns about this. It'm getting warnings after reformatting: % original.tex
\section{Hello}\label{foo}
Lorem ipsum dolor sit amet.
% reformatted.tex
\section{Hello}
\label{foo}
Lorem ipsum dolor sit amet.
|
I'll have to think about this. I don't think The only place I could see this going wrong is if there were a bunch of blank sections in a row. The sections headings wouldn't be glued to each other, so maybe this pushes the pageref to the other side? In any case, I can also see how it's annoying to pretty-print code and suddenly get As a temporary workaround, you should be able to do
|
Before:
After reformatting:
Although it looks nicer, this actually introduces a bug. Because the newline is treated as a space, it's possible that the space does not fit on the same page, which means that the
\label
ends up on the next page (resulting in a wrong page number).The text was updated successfully, but these errors were encountered: