Add dotted leaders to generated contents entries
This commit is contained in:
1 parent
1b0ce27ed3
commit
6d4aa37189
8 files changed
+79
-18
No files matched your search
@@ -167,6 +167,9 @@ pub struct PageStyleOverride {
|
||||
|
||||
/// Marker character used by `\thepage` inside header/footer runs; the page
|
||||
/// renderer substitutes the concrete page number before measuring and painting.
|
||||
/// Private-use marker for a dotted leader in generated contents lines.
|
||||
pub const CONTENTS_LEADER_MARKER: char = '\u{F6000}';
|
||||
|
||||
pub const PAGE_NUMBER_MARKER: char = '\u{F5000}';
|
||||
|
||||
pub fn page_number_marker_text() -> String {
|
||||
|
||||
@@ -427,6 +427,9 @@ fn contents_kind(block: &Block) -> Option<ContentsKind> {
|
||||
fn contents_line_runs(title: &[Run], target: usize) -> Vec<Run> {
|
||||
let mut runs = title.to_vec();
|
||||
trim_run_end(&mut runs);
|
||||
runs.push(Run::plain(
|
||||
crate::document::CONTENTS_LEADER_MARKER.to_string(),
|
||||
));
|
||||
let mut filler = Run::plain(String::new());
|
||||
filler.glue = Some(TeXGlue {
|
||||
width: common::Scaled::ZERO,
|
||||
|
||||
Reference in new issue
Block a user