🧽 arXiv 投稿 LaTeX 清理(删除注释)arXiv LaTeX Cleaner (Remove Comments)
arXiv 会公开你上传的全部 LaTeX 源码(包括注释)。本工具在浏览器里批量清理 .tex:删除 % 注释(保留 \% 和行尾 %)、comment 环境、\iffalse…\fi 块、\todo 等批注命令,合并多余空行,支持直接导入 Overleaf 下载的 ZIP 并列出没有被引用的图片。arXiv publishes all the LaTeX you upload, comments included. Clean your .tex in the browser: remove % comments (keeping \% and line-end %), comment environments, \iffalse…\fi blocks and \todo-style notes, collapse blank lines — or import the Overleaf ZIP directly and see which images are never referenced.
使用说明与常见问题How-to & FAQ
「arXiv 投稿 LaTeX 清理(删除注释)」是什么?What is the arXiv LaTeX Cleaner (Remove Comments)?
arXiv 会公开你上传的全部 LaTeX 源码(包括注释)。本工具在浏览器里批量清理 .tex:删除 % 注释(保留 \% 和行尾 %)、comment 环境、\iffalse…\fi 块、\todo 等批注命令,合并多余空行,支持直接导入 Overleaf 下载的 ZIP 并列出没有被引用的图片。arXiv publishes all the LaTeX you upload, comments included. Clean your .tex in the browser: remove % comments (keeping \% and line-end %), comment environments, \iffalse…\fi blocks and \todo-style notes, collapse blank lines — or import the Overleaf ZIP directly and see which images are never referenced.
如何使用「arXiv 投稿 LaTeX 清理(删除注释)」?How do I use the arXiv LaTeX Cleaner (Remove Comments)?
把 Overleaf 的“下载源码 ZIP”或若干 .tex 文件拖进来(也可以直接粘贴单个文件)。勾选要清理的内容,查看每个文件删除了多少注释和命令,然后点“下载清理后的文件”得到新的 ZIP(非 .tex 文件原样保留),再上传到 arXiv。Drop the Overleaf source ZIP or some .tex files (or paste one file). Choose what to remove, review the per-file counts, then download the cleaned ZIP (non-.tex files kept as-is) and upload it to arXiv.
会不会误删 \% 或 URL 里的 %?Will it break \% or % inside URLs?
不会。转义的 \% 不会被当成注释;verbatim、lstlisting 等环境里的内容保持不变。\url{} 中的 % 请写成 \%,否则 LaTeX 本身也会把它当注释。No. Escaped \% is kept and verbatim/lstlisting content is untouched. In \url{} write \%, as LaTeX itself treats bare % as a comment.
为什么保留行尾的 %?Why keep a trailing %?
行尾单独的 % 用来去掉换行带来的空格(常见于宏定义),删掉可能改变排版,所以只删除 % 后面的文字。A bare % at the end of a line suppresses the newline space (common in macros); removing it can change the output, so only the comment text is removed.
和 Google 的 arxiv_latex_cleaner 有什么区别?How does it differ from Google’s arxiv_latex_cleaner?
思路相同,但本工具无需安装 Python,在浏览器里即可完成;暂不压缩图片尺寸。Same idea, no Python needed; it does not resize images.
「arXiv 投稿 LaTeX 清理(删除注释)」免费吗?文件会上传吗?Is the arXiv LaTeX Cleaner (Remove Comments) free? Are my files uploaded?
「arXiv 投稿 LaTeX 清理(删除注释)」完全免费,无需注册。文件只在你的浏览器里读取和处理,不会上传到任何服务器,关闭页面后不留痕迹,适合处理未发表的稿件。The arXiv LaTeX Cleaner (Remove Comments) is free with no sign-up. Files are read and processed only in your browser, never uploaded to any server, and nothing is kept after you close the page — safe for unpublished manuscripts.