Skip to content

[0130] 移除 LaTeX 相关 C++ 死代码和 LaTeX_Preview 插件#3376

Merged
da-liii merged 7 commits into
mainfrom
da/0130/latex_tools_cpp
May 15, 2026
Merged

[0130] 移除 LaTeX 相关 C++ 死代码和 LaTeX_Preview 插件#3376
da-liii merged 7 commits into
mainfrom
da/0130/latex_tools_cpp

Conversation

@da-liii
Copy link
Copy Markdown
Contributor

@da-liii da-liii commented May 15, 2026

摘要

在移除工具菜单 LaTeX 子菜单的 scheme 入口后,进一步清理对应的 C++ glue 实现和 LaTeX_Preview 插件。

修改内容

C++ 死代码清理

  • src/Plugins/Tex/latex_recover.cpp:移除 try_latex_export 及所有辅助函数
    • number_latex_errorsget_latex_errors
    • latex_error_headlatex_error_taillatex_error_message
    • latex_error_findtexmacs_error_find
    • get_line_numberget_column_number
  • src/Plugins/Tex/tex.hpp:移除对应声明
  • src/Scheme/Plugins/glue_tex.lua:移除 try-latex-exportnumber-latex-errorsget-line-numberget-column-number 的 glue 定义

LaTeX_Preview 插件移除

  • 删除 src/Plugins/LaTeX_Preview/latex_preview.cpp.hpp
  • 删除 TeXmacs/plugins/latex/progs/binary/pdflatex.scm
  • xmake.lua:移除编译规则和 USE_PLUGIN_LATEX_PREVIEW
  • src/System/config.h.xmake:移除宏定义
  • src/Scheme/Plugins/init_glue_plugins.cpp:移除头文件引用
  • src/Data/Convert/Verbatim/verbatim.cpp:移除 latex_preview 类型检查
  • src/Plugins/Tex/fromtex.cpp:将 latex_fallback_on_pictures 改为空实现,移除内部辅助函数
  • src/Plugins/Tex/fromtex_post.cpp:移除调用和声明

测试

  • 本地编译通过 (xmake b mogan)

da-liii and others added 7 commits May 15, 2026 22:29
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
- 移除 try_latex_export 及所有辅助函数(number_latex_errors、
  get_latex_errors、latex_error_*、texmacs_error_find、
  get_line_number、get_column_number)
- 移除 src/Plugins/LaTeX_Preview 插件及其所有引用
- 移除 pdflatex binary plugin
- 更新 glue_tex.lua、xmake.lua、config.h.xmake

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
- 移除 glue_tex.lua 中的 set-latex-command(其实现在 LaTeX_Preview 插件中已删除)
- 移除 tm-server.scm 中的 notify-latex-command 和 latex command 首选项

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
- fromtex.cpp:彻底移除 LaTeX_Preview 引用,将 latex_fallback_on_pictures 改为空实现
- latex_recover.cpp:移除未使用的 using namespace moebius

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@da-liii da-liii merged commit 19aa958 into main May 15, 2026
5 checks passed
@da-liii da-liii deleted the da/0130/latex_tools_cpp branch May 15, 2026 15:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant