-
Notifications
You must be signed in to change notification settings - Fork 26
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
[FR] automatically insert single space before and after single line comment %
#58
Comments
%
%
Thanks for the suggestion! We need to be a little careful with this as the first block below renders with a space between "latex" and "next", while the second block does not. latex % comment
next line latex%comment
next line Perhaps we could format the first block to the following, which should not change the output. latex% comment
next line This trick of using a comment to elide a space on a line break is very common so we should definitely preserve this behavior. |
I don’t understand what you mean sorry. Which space between "latex" and "next"? |
I mean when it is compiled to a PDF with pdflatex. |
Oh that's right! Thx for clarifying! |
I've put some more thought into this and it seems that there are some other cases where this is undesirable. Many people use "blocks" of comment symbols to navigate their source files more easily:
Sometimes people "block comment" a section which already contains comments. It is then convenient to be able to reverse this operation by deleting the first character in each line:
It may also be the case that certain editor configuration statements depend on whitespace inside comments; I want to avoid risking breaking these:
Perhaps we can try to avoid these cases, but more thought is probably required! |
First of all: awesome project, love it!
One more thing though: It'd be handy if single spaces before and after line comment
%
could be automatically inserted to increase readability and to be consistent to other programming languages.I'd expect this:
latex%comment
to be formatted to that:
latex % comment
Would be nice if this could be implemented. Keep up the good work! 😉
The text was updated successfully, but these errors were encountered: