Lead table-of-contents entries with dots
This commit is contained in:
1 parent
7dd94d7fbe
commit
ae61d11859
5 files changed
+88
-16
No files matched your search
@@ -930,6 +930,9 @@ pub struct Unit {
|
||||
/// For a table-of-contents entry, the unit whose page number it shows.
|
||||
#[serde(default)]
|
||||
pub toc_target: Option<UnitId>,
|
||||
/// Whether a table-of-contents page number has already been stamped.
|
||||
#[serde(default)]
|
||||
pub toc_stamped: bool,
|
||||
}
|
||||
|
||||
impl Unit {
|
||||
@@ -1048,6 +1051,7 @@ impl Unit {
|
||||
space_stretch: 0,
|
||||
space_shrink: 0,
|
||||
toc_target: None,
|
||||
toc_stamped: false,
|
||||
items: vec![VerticalItem::Halign(halign)],
|
||||
}
|
||||
}
|
||||
@@ -1364,6 +1368,7 @@ impl Unit {
|
||||
space_stretch: 0,
|
||||
space_shrink: 0,
|
||||
toc_target: None,
|
||||
toc_stamped: false,
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1386,6 +1391,7 @@ impl Unit {
|
||||
space_stretch: 0,
|
||||
space_shrink: 0,
|
||||
toc_target: None,
|
||||
toc_stamped: false,
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1410,6 +1416,7 @@ impl Unit {
|
||||
space_stretch: 0,
|
||||
space_shrink: 0,
|
||||
toc_target: None,
|
||||
toc_stamped: false,
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1464,6 +1471,7 @@ impl Unit {
|
||||
space_stretch: 0,
|
||||
space_shrink: 0,
|
||||
toc_target: None,
|
||||
toc_stamped: false,
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4467,6 +4475,7 @@ mod tests {
|
||||
space_stretch: 0,
|
||||
space_shrink: 0,
|
||||
toc_target: None,
|
||||
toc_stamped: false,
|
||||
items: vec![
|
||||
VerticalItem::Insertion(Insertion {
|
||||
class: 0,
|
||||
@@ -4803,6 +4812,7 @@ mod tests {
|
||||
space_stretch: 0,
|
||||
space_shrink: 0,
|
||||
toc_target: None,
|
||||
toc_stamped: false,
|
||||
items: vec![VerticalItem::Box(VerticalBox {
|
||||
width: 10,
|
||||
height: 10,
|
||||
@@ -4829,6 +4839,7 @@ mod tests {
|
||||
space_stretch: 0,
|
||||
space_shrink: 0,
|
||||
toc_target: None,
|
||||
toc_stamped: false,
|
||||
items: vec![
|
||||
VerticalItem::Box(VerticalBox {
|
||||
width: 10,
|
||||
@@ -4883,6 +4894,7 @@ mod tests {
|
||||
space_stretch: 0,
|
||||
space_shrink: 0,
|
||||
toc_target: None,
|
||||
toc_stamped: false,
|
||||
items: vec![
|
||||
VerticalItem::Box(VerticalBox {
|
||||
width: 10,
|
||||
@@ -4951,6 +4963,7 @@ mod tests {
|
||||
space_stretch: 0,
|
||||
space_shrink: 0,
|
||||
toc_target: None,
|
||||
toc_stamped: false,
|
||||
items: vec![
|
||||
VerticalItem::Box(VerticalBox {
|
||||
width: 10,
|
||||
@@ -5014,6 +5027,7 @@ mod tests {
|
||||
space_stretch: 0,
|
||||
space_shrink: 0,
|
||||
toc_target: None,
|
||||
toc_stamped: false,
|
||||
items: vec![
|
||||
VerticalItem::Box(VerticalBox {
|
||||
width: 10,
|
||||
@@ -5052,6 +5066,7 @@ mod tests {
|
||||
space_stretch: 0,
|
||||
space_shrink: 0,
|
||||
toc_target: None,
|
||||
toc_stamped: false,
|
||||
items: vec![
|
||||
VerticalItem::Box(VerticalBox {
|
||||
width: 10,
|
||||
@@ -5762,6 +5777,7 @@ mod tests {
|
||||
space_stretch: 0,
|
||||
space_shrink: 0,
|
||||
toc_target: None,
|
||||
toc_stamped: false,
|
||||
items: vec![
|
||||
VerticalItem::Box(VerticalBox {
|
||||
width: 10,
|
||||
@@ -5802,6 +5818,7 @@ mod tests {
|
||||
space_stretch: 0,
|
||||
space_shrink: 0,
|
||||
toc_target: None,
|
||||
toc_stamped: false,
|
||||
items: vec![
|
||||
VerticalItem::Box(VerticalBox {
|
||||
width: 10,
|
||||
@@ -5839,6 +5856,7 @@ mod tests {
|
||||
space_stretch: 0,
|
||||
space_shrink: 0,
|
||||
toc_target: None,
|
||||
toc_stamped: false,
|
||||
items: vec![
|
||||
VerticalItem::Float(Float {
|
||||
gap_before: 0,
|
||||
@@ -8198,6 +8216,7 @@ b & 2 \\
|
||||
space_stretch: 0,
|
||||
space_shrink: 0,
|
||||
toc_target: None,
|
||||
toc_stamped: false,
|
||||
items: vec![
|
||||
VerticalItem::Float(Float {
|
||||
placement: FloatPlacement::Top,
|
||||
@@ -8699,6 +8718,7 @@ b & 2 \\
|
||||
space_stretch: 0,
|
||||
space_shrink: 0,
|
||||
toc_target: None,
|
||||
toc_stamped: false,
|
||||
};
|
||||
let mut document =
|
||||
Document::new(100, vec![math, Unit::vskip(2, 0), Unit::rule(3, 100, 20)]);
|
||||
@@ -8855,6 +8875,7 @@ b & 2 \\
|
||||
space_stretch: 0,
|
||||
space_shrink: 0,
|
||||
toc_target: None,
|
||||
toc_stamped: false,
|
||||
};
|
||||
let mut document = Document::new(800_000, vec![math]);
|
||||
document.max_depth = 400_000;
|
||||
|
||||
Reference in new issue
Block a user