summaryrefslogtreecommitdiff
path: root/src/library/par.rs
diff options
context:
space:
mode:
authorLaurenz <laurmaedje@gmail.com>2022-02-24 18:47:43 +0100
committerLaurenz <laurmaedje@gmail.com>2022-02-24 19:15:11 +0100
commit49c0bac44dda8be643480df2c4e68623eeec91bd (patch)
tree6f697031013e4259bdfefc7977edc8d9d683e823 /src/library/par.rs
parent90132b0d658f1b2a5df75eb458150e6782b2c30c (diff)
First-line indents
Co-Authored-By: Martin Haug <mhaug@live.de>
Diffstat (limited to 'src/library/par.rs')
-rw-r--r--src/library/par.rs3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/library/par.rs b/src/library/par.rs
index e5122166..cc5dd9b6 100644
--- a/src/library/par.rs
+++ b/src/library/par.rs
@@ -36,6 +36,8 @@ impl ParNode {
pub const LEADING: Linear = Relative::new(0.65).into();
/// The extra spacing between paragraphs (dependent on scaled font size).
pub const SPACING: Linear = Relative::new(0.55).into();
+ /// The indent the first line of a consecutive paragraph should have.
+ pub const INDENT: Linear = Linear::zero();
fn construct(_: &mut Context, args: &mut Args) -> TypResult<Template> {
// The paragraph constructor is special: It doesn't create a paragraph
@@ -75,6 +77,7 @@ impl ParNode {
styles.set_opt(Self::ALIGN, align);
styles.set_opt(Self::LEADING, args.named("leading")?);
styles.set_opt(Self::SPACING, args.named("spacing")?);
+ styles.set_opt(Self::INDENT, args.named("indent")?);
Ok(())
}