Skip to content

Commit f008f09

Browse files
authored
[203_26] Use standard LaTeX proof environment for semantic proof blocks (#2990)
1 parent c97f12f commit f008f09

File tree

5 files changed

+22
-12
lines changed

5 files changed

+22
-12
lines changed

TeXmacs/plugins/latex/progs/convert/latex/latex-define.scm

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -563,13 +563,9 @@
563563

564564
(smart-table latex-texmacs-environment
565565
("proof"
566-
(!append (noindent) (textbf (!append (!translate "Proof") "\\ "))
567-
---
568-
(hspace* (fill)) (!math (Box)) (medskip)))
566+
((!begin "proof") ---))
569567
("proof*"
570-
(!append (noindent) (textbf (!append 1 "\\ "))
571-
---
572-
(hspace* (fill)) (!math (Box)) (medskip)))
568+
((!begin "proof" (!option 1)) ---))
573569
("leftaligned"
574570
((!begin "flushleft") ---))
575571
("rightaligned"

TeXmacs/plugins/latex/progs/convert/latex/latex-drd.scm

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@
5555
(!verbatim "alltt")
5656
(!verbatim* "alltt")
5757
(begin-alltt "alltt")
58+
(begin-proof "amsthm")
5859

5960
(begin-tabularx "tabularx")
6061

TeXmacs/progs/convert/latex/latex-define.scm

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -563,13 +563,9 @@
563563

564564
(smart-table latex-texmacs-environment
565565
("proof"
566-
(!append (noindent) (textbf (!append (!translate "Proof") "\\ "))
567-
---
568-
(hspace* (fill)) (!math (Box)) (medskip)))
566+
((!begin "proof") ---))
569567
("proof*"
570-
(!append (noindent) (textbf (!append 1 "\\ "))
571-
---
572-
(hspace* (fill)) (!math (Box)) (medskip)))
568+
((!begin "proof" (!option 1)) ---))
573569
("leftaligned"
574570
((!begin "flushleft") ---))
575571
("rightaligned"

TeXmacs/progs/convert/latex/latex-drd.scm

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@
5555
(!verbatim "alltt")
5656
(!verbatim* "alltt")
5757
(begin-alltt "alltt")
58+
(begin-proof "amsthm")
5859

5960
(begin-tabularx "tabularx")
6061

devel/203_26.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# #2985 When proving semantic blocks to export PDF, use \begin{proof} \end{proof}
2+
3+
## 2026/03/16 Update LaTeX export for semantic proof blocks
4+
5+
### What
6+
Updated the LaTeX export logic for `proof` and `proof*` environments to use the standard LaTeX `proof` environment (from `amsthm`) instead of manual formatting.
7+
8+
### Why
9+
- **Semantic Correctness**: Moves from visual imitation (`\noindent\textbf{...}`) to logical LaTeX environments.
10+
- **Improved Maintenance**: Uses standard structures that align with typical LaTeX theorem environments.
11+
- **Global Styling**: Follows the document class and global `amsthm` settings for QED box placement and labels.
12+
13+
### How
14+
- Modified `latex-define.scm` (core and plugin) to map `proof` to `\begin{proof}` and `proof*` to `\begin{proof}[Title]`.
15+
- Added dependency on `amsthm` package in `latex-drd.scm` (core and plugin) to ensure it's automatically included in the preamble.
16+

0 commit comments

Comments
 (0)