File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ # [ 203_34] 导出的 .tex 使用了 \algostate,但 Overleaf 缺少定义该命令的宏包
2+
3+ ## 相关文档
4+ - [ env-pseudo-code.ts] ( file:///d:/vscode/mogan/TeXmacs/packages/environment/env-pseudo-code.ts ) - 伪代码环境定义
5+
6+ ## 任务相关的代码文件
7+ - [ latex-define.scm] ( file:///d:/vscode/mogan/TeXmacs/plugins/latex/progs/convert/latex/latex-define.scm ) - LaTeX 宏翻译映射表
8+ - [ 203_34.scm] ( file:///d:/vscode/mogan/TeXmacs/tests/203_34.scm ) - 集成测试文件
9+
10+ ## 如何测试
11+ ``` bash
12+ xmake b 203_34
13+ xmake r 203_34
14+ ```
15+
16+ ## 2026/06/26 修复 LaTeX 导出时 algo-state 映射缺失问题
17+
18+ ### What
19+ 在导出为 LaTeX 格式时,将内部表示 ` <algo-state|body> ` 映射转换为 LaTeX 标准的 ` \State {body} ` 。
20+
21+ ### Why
22+ 之前没有配置映射关系,默认的转换器会将 ` algo-state ` 去掉连字符转换成 ` \algostate ` 。而 standard LaTeX 的 ` algpseudocode ` / ` algorithmic ` 宏包只定义了 ` \State ` 。用户在 LaTeX 工具中编译会报错 ` undefined control sequence \algostate ` 。
23+
24+ ### How
25+ 在 ` latex-define.scm ` 的一元宏表 ` smart-table latex-texmacs-macro ` 中新增映射:
26+ ``` scheme
27+ (algo-state (!group "\\State " 1))
28+ ```
You can’t perform that action at this time.
0 commit comments