From 3622d400435e4e3dabe7152ae044fc95735159d1 Mon Sep 17 00:00:00 2001 From: GloamXun Date: Tue, 20 Oct 2026 00:06:27 +0800 Subject: [PATCH] Cover longtable headers with math body rows --- tests/typeset.rs | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/tests/typeset.rs b/tests/typeset.rs index 4fe7cde..71aeff0 100644 --- a/tests/typeset.rs +++ b/tests/typeset.rs @@ -1764,3 +1764,32 @@ $O_{ird}^m,q_{ird}^m$ & x \\ let value = fresh_preview(source, "longtable-scripts.tex"); assert_eq!(value["status"], "ok"); } + +#[test] +fn e_full_header_math_compiles() { + let source = r"\documentclass{article} +\usepackage{booktabs} +\begin{document} +\begingroup +\small +\begin{longtable}{@{}p{0.29\linewidth}p{\dimexpr0.71\linewidth-2\tabcolsep\relax}@{}} +\caption{符号约定}\\ +\toprule +符号 & 含义 \\ +\midrule +\endfirsthead +\multicolumn{2}{l}{\small 表\ \thetable\ (续)}\\ +\toprule +符号 & 含义 \\ +\midrule +\endhead +\bottomrule +\endfoot +$i,j$;$m\in\mathcal M$ & x \\ +$O_{ird}^m,q_{ird}^m$ & y \\ +\end{longtable} +\endgroup +\end{document}"; + let value = fresh_preview(source, "e-full-header.tex"); + assert_eq!(value["status"], "ok"); +}