Honour finite parfillskip on the last line
This commit is contained in:
1 parent
8993186005
commit
bd109d03c5
6 files changed
+146
-16
No files matched your search
@@ -333,6 +333,22 @@ fn hang_indent_shifts_lines_like_tex() {
|
||||
);
|
||||
}
|
||||
|
||||
/// A paragraph whose `\parfillskip` has no `fil` must justify its final
|
||||
/// line, so every line matches pdfLaTeX.
|
||||
#[test]
|
||||
fn parfillskip_without_fil_justifies_the_last_line() {
|
||||
let width = 120;
|
||||
let Some(reference) = pdftex_lines(¶graph_fixture_with(WORDS, width, "\\parfillskip=0pt "))
|
||||
else {
|
||||
eprintln!("skipping: pdflatex/pdftotext are not installed");
|
||||
return;
|
||||
};
|
||||
let ours = route_d_lines_with(WORDS, f64::from(width), |style| {
|
||||
style.par_fillskip_fil = false;
|
||||
});
|
||||
assert_lines_match("parfillskip 120pt", &ours, &reference);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn paragraph_breaks_match_pdftex_at_150pt() {
|
||||
compare_fixture(WORDS, 150);
|
||||
|
||||
Reference in new issue
Block a user