Skip to content
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

Labels in LaTeX snippets #33

Closed
beojan opened this issue Mar 2, 2020 · 2 comments · Fixed by #66
Closed

Labels in LaTeX snippets #33

beojan opened this issue Mar 2, 2020 · 2 comments · Fixed by #66

Comments

@beojan
Copy link

beojan commented Mar 2, 2020

Can you add a % at the end of the line preceding labels so chktex doesn't complain about potentially getting page numbers wrong?

@hlissner
Copy link
Member

hlissner commented Mar 2, 2020

Could you expand on what the problem is here? Why would % fix this? Why does the lack of it cause chktex to complain about page numbers?

Are you talking about a literal % (perhaps some syntax I'm not aware of) or our alias for yas-selected-text? Could you be more specific about where the end of the line preceding labels means?

Since your issue title mentions "latex snippets" and labels, are you talking about https://github.com/hlissner/doom-snippets/blob/master/latex-mode/label? Or "labels" generally?

@beojan
Copy link
Author

beojan commented Mar 2, 2020

It comments out the linebreak after \section or \subsection so the \label is on the same (logical) line.

Chktex complains because it's theoretically possible that the heading is the last line on a page, and the page number corresponding to the label won't be the same as that corresponding to the heading.

visika added a commit to visika/doom-snippets that referenced this issue Apr 29, 2021
@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 7, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants