Add an unnumbered heading for the abstract environment
This commit is contained in:
1 parent
b4ee4c1330
commit
c7b7660049
2 files changed
+34
No files matched your search
@@ -871,3 +871,28 @@ After.
|
||||
"rules should not be painted as image XObjects"
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn abstract_environment_gets_an_unumbered_heading() {
|
||||
let source = r"\documentclass{article}
|
||||
\begin{document}
|
||||
\begin{abstract}
|
||||
This is the abstract body.
|
||||
\end{abstract}
|
||||
\section{Introduction}
|
||||
Body.
|
||||
\end{document}";
|
||||
let preview = CompilerSession::default()
|
||||
.preview_json(source, "abstract.tex")
|
||||
.expect("abstract preview");
|
||||
let value: serde_json::Value = serde_json::from_str(&preview).expect("preview JSON");
|
||||
let svg = value["pages"][0]["svg"].as_str().expect("svg");
|
||||
assert!(
|
||||
svg.contains(">Abstract</text>"),
|
||||
"missing abstract heading: {svg}"
|
||||
);
|
||||
assert!(
|
||||
svg.contains(">1</text>"),
|
||||
"section numbering changed: {svg}"
|
||||
);
|
||||
}
|
||||
Reference in new issue
Block a user