[0629] 修复 coloneqq 相关的 mathtools 宏包依赖导出缺失问题#3559
Open
JackYansongLi wants to merge 2 commits into
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
[0629] 修复 coloneqq 相关的 mathtools 宏包依赖在 LaTeX 导出中的缺失问题
相关文档
任务相关的代码文件
TeXmacs/progs/convert/latex/latex-drd.scmTeXmacs/plugins/latex/progs/convert/latex/latex-drd.scmTeXmacs/tests/0629.scmTeXmacs/tests/tex/0629_coloneqq_dependency_export.texTeXmacs/tests/tmu/0629.tmu如何测试
确定性测试(单元与集成测试)
非确定性测试(文档验证)
:=(LaTeX 中的\coloneqq)。.tex文件的导言区中正确包含了\usepackage{mathtools},避免 LaTeX 编译时报错 "Undefined control sequence \coloneqq"。如何提交
提交前执行以下最少步骤:
一个 PR 至少分为两个 commit:
devel/0629.md任务文档What
修复在 LaTeX 导出中,凡是使用了定义符号
:=(对应 LaTeX 中的\coloneqq命令)的数学公式文档,由于缺失对mathtools宏包依赖的匹配声明,导致导出的 LaTeX 文件导言区没有引入\usepackage{mathtools}而引发编译报错的问题。Why
定义运算符
:=(在 LaTeX 中由\coloneqq表示)在数学和物理论文中极为常用。该符号并不是标准 LaTeX 或amsmath的内置命令,而是由mathtools宏包提供。但是在 LaTeX 依赖定义表
latex-drd.scm中,虽然注册了coloneqq作为一个合法命令,却完全缺失了对mathtools包依赖的声明映射。导致当用户在 TeXmacs 里使用:=导出为 LaTeX 时,导出的.tex文档导言区没有包含\usepackage{mathtools},使得 LaTeX 编译崩溃。How
在
latex-drd.scm的latex-needs%依赖映射表中注册coloneqq宏包依赖:(coloneqq "mathtools")这样一旦导出的 LaTeX 文档中包含
\coloneqq,就会自动在导言区正确引入mathtools宏包。