Add minipage and vbox block boxes

This commit is contained in:
gloamxun committed 2026-10-19 13:05:43 +08:00
1 parent 2552008d4b
commit 5fa301fdcd
7 files changed
+116 -20

No files matched your search

+2
View File
@@ -26,6 +26,8 @@ const PRELUDE: &str = r#"
\def\maketitle{\texrramaketitle}
\def\tableofcontents{}
\def\noindent{\texrranoindent}
\def\vbox#1{\parbox{\textwidth}{#1}}
\def\vtop#1{\parbox{\textwidth}{#1}}
\def\hfill{\hskip0pt plus 1fil\relax}
\def\hfil{\hskip0pt plus 1fil\relax}
\def\allowbreak{\penalty0}
+10
View File
@@ -5513,6 +5513,16 @@ fn begin_environment_primitive(
.filter_map(|token| token.char())
.collect::<String>(),
)
} else if name == "minipage" {
// \begin{minipage}[t]{50mm}: skip the optional position and return
// the mandatory width argument.
let _ = read_optional_bracketed_argument(input, token, "minipage position")?;
Some(
read_scanned_token_list(input)?
.into_iter()
.filter_map(|token| token.char())
.collect::<String>(),
)
} else {
None
};