You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This example is helpful considering various scenarios when deleting comments in tex files. And I show the example below:
\begin{document}
hello world
% comment after %
20\% just a percent
new line \\%still a comment
\begin{comment}
comment even without percent % haha
\end{comment}
\begin{verbatim}
% not a comment though with %
\end{verbatim}
\end{document}
after document
In current version of this script:
No support for verbatim package. Since every char within verbatim env is not comment even with %.
Cannot delete comment directly attached after the newline \\, it will recognize \\% as \ \% where \% is just a percent symbol instead of the beginning of comment.
Maybe it is also relevant to delete everything below \end{document} since they would never be involved with the file.
1, 3 are more like feature requests while I think it would be better to fix 2.
The text was updated successfully, but these errors were encountered:
Hi @refraction-ray
Thanks for the example and for pointing out current limitations! I'll mark this issue as 'enhancement' for 1 and 3, bug for 2.
In any case, I always recommend quickly checking the output code to see if some comment has been missed.
You could have a look at #31, which introduces a general regex replacement pipeline. You could use this feature to build a multi-line regular expression for your comment string and replace it with an empty string ("").
This example is helpful considering various scenarios when deleting comments in tex files. And I show the example below:
In current version of this script:
No support for verbatim package. Since every char within verbatim env is not comment even with %.
Cannot delete comment directly attached after the newline
\\
, it will recognize\\%
as\ \%
where\%
is just a percent symbol instead of the beginning of comment.Maybe it is also relevant to delete everything below
\end{document}
since they would never be involved with the file.1, 3 are more like feature requests while I think it would be better to fix 2.
The text was updated successfully, but these errors were encountered: