Retain signed glue in native display lists
This commit is contained in:
1 parent
c6701204ec
commit
297431a547
3 files changed
+31
-9
No files matched your search
@@ -205,13 +205,8 @@ impl Executor {
|
||||
let separate_right = !left && e == 0 && number.is_some();
|
||||
let above_glue = (!separate_left).then(|| self.read_parameter(above).glue());
|
||||
let below_glue = (!separate_right).then(|| self.read_parameter(below).glue());
|
||||
for g in [above_glue, below_glue].into_iter().flatten() {
|
||||
if g.stretch.amount < 0 || g.shrink.amount < 0 || g.shrink.order != 0 {
|
||||
return self.fail(
|
||||
"unsupported negative flexibility or infinite shrink in native display skip",
|
||||
);
|
||||
}
|
||||
}
|
||||
// Keep the original glue spec. Packing a box can use every order,
|
||||
// while the page builder diagnoses infinite shrink on contributions.
|
||||
// hpack diagnostics are actual packaging results, not page costs.
|
||||
let threshold = self.read_parameter(Parameter::Hbadness).width();
|
||||
let fuzz = self.read_parameter(Parameter::Hfuzz).width() as i64;
|
||||
|
||||
@@ -158,8 +158,6 @@ fn display_assignments_scopes_and_strict_boundaries_have_real_consumers() {
|
||||
r"$$x\limits$$",
|
||||
r"$$\message{\the\prevdepth}x$$",
|
||||
r"$$\message{\the\spacefactor}x$$",
|
||||
r"\noindent$$\abovedisplayshortskip=0pt plus-1fil x$$",
|
||||
r"\noindent$$\belowdisplayshortskip=0pt minus1fil x$$",
|
||||
] {
|
||||
assert!(
|
||||
Executor::new(State::initex().with_etex(), Limits::default())
|
||||
@@ -343,6 +341,8 @@ fn display_lists_pre_width_baselines_depth_and_hanging_state_match_initex() {
|
||||
cases.push(format!(r"\noindent A$${inside} x$$After\par"));
|
||||
}
|
||||
cases.extend([
|
||||
r"\noindent$$\abovedisplayshortskip=0pt plus-1fil x$$".into(),
|
||||
r"\noindent$$\belowdisplayshortskip=0pt minus1fil x$$".into(),
|
||||
r"\noindent$$x$$$$y_2$$After\par".into(),r"$$x$$After\par".into(),r"\noindent$$x$$\par After\par".into(),
|
||||
r"\noindent$$\mkern300mu x$$After\par".into(),r"\noindent$$x\mskip0mu plus1fil y$$After\par".into(),
|
||||
r"\baselineskip=5pt \lineskip=2pt \lineskiplimit=3pt \noindent A$$x_2$$After\par".into(),
|
||||
|
||||
Reference in new issue
Block a user