mirror of https://github.com/stelzo/typst.git
Fixed interaction of first_line_indent with outline (#3745)
This commit is contained in:
parent
1e645b3964
commit
f461b2059d
|
|
@ -10,8 +10,10 @@ use crate::foundations::{
|
||||||
NativeElement, Packed, Show, ShowSet, Smart, StyleChain, Styles,
|
NativeElement, Packed, Show, ShowSet, Smart, StyleChain, Styles,
|
||||||
};
|
};
|
||||||
use crate::introspection::{Counter, CounterKey, Locatable};
|
use crate::introspection::{Counter, CounterKey, Locatable};
|
||||||
use crate::layout::{BoxElem, Fr, HElem, HideElem, Length, Rel, RepeatElem, Spacing};
|
use crate::layout::{BoxElem, Em, Fr, HElem, HideElem, Length, Rel, RepeatElem, Spacing};
|
||||||
use crate::model::{Destination, HeadingElem, NumberingPattern, ParbreakElem, Refable};
|
use crate::model::{
|
||||||
|
Destination, HeadingElem, NumberingPattern, ParElem, ParbreakElem, Refable,
|
||||||
|
};
|
||||||
use crate::syntax::Span;
|
use crate::syntax::Span;
|
||||||
use crate::text::{Lang, LinebreakElem, LocalName, Region, SpaceElem, TextElem};
|
use crate::text::{Lang, LinebreakElem, LocalName, Region, SpaceElem, TextElem};
|
||||||
use crate::util::{option_eq, NonZeroExt};
|
use crate::util::{option_eq, NonZeroExt};
|
||||||
|
|
@ -265,6 +267,7 @@ impl ShowSet for Packed<OutlineElem> {
|
||||||
let mut out = Styles::new();
|
let mut out = Styles::new();
|
||||||
out.set(HeadingElem::set_outlined(false));
|
out.set(HeadingElem::set_outlined(false));
|
||||||
out.set(HeadingElem::set_numbering(None));
|
out.set(HeadingElem::set_numbering(None));
|
||||||
|
out.set(ParElem::set_first_line_indent(Em::new(0.0).into()));
|
||||||
out
|
out
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Binary file not shown.
|
After Width: | Height: | Size: 27 KiB |
|
|
@ -0,0 +1,15 @@
|
||||||
|
#set par(first-line-indent: 1.5em)
|
||||||
|
#set heading(numbering: "1.1.a.")
|
||||||
|
#show outline.entry.where(level: 1): it => {
|
||||||
|
v(0.5em, weak: true)
|
||||||
|
strong(it)
|
||||||
|
}
|
||||||
|
|
||||||
|
#outline()
|
||||||
|
|
||||||
|
= Introduction
|
||||||
|
= Background
|
||||||
|
== History
|
||||||
|
== State of the Art
|
||||||
|
= Analysis
|
||||||
|
== Setup
|
||||||
Loading…
Reference in New Issue