summaryrefslogtreecommitdiff
path: root/src/library/structure
diff options
context:
space:
mode:
authorLaurenz <laurmaedje@gmail.com>2022-04-10 23:23:50 +0200
committerLaurenz <laurmaedje@gmail.com>2022-04-10 23:36:36 +0200
commit34fa8df044f1491069c9ae69f1c1e73d635c8955 (patch)
tree30b9144690f55f0343a1fdbfcac6c9238c617077 /src/library/structure
parent29eb13ca6214461a4b0deb63d589cd39ad6d41c2 (diff)
Move language-related properties from `par` to `text`
Closes #67
Diffstat (limited to 'src/library/structure')
-rw-r--r--src/library/structure/heading.rs3
-rw-r--r--src/library/structure/list.rs4
-rw-r--r--src/library/structure/table.rs1
3 files changed, 7 insertions, 1 deletions
diff --git a/src/library/structure/heading.rs b/src/library/structure/heading.rs
index dcf87f90..07e5e662 100644
--- a/src/library/structure/heading.rs
+++ b/src/library/structure/heading.rs
@@ -25,6 +25,7 @@ impl HeadingNode {
let upscale = (1.6 - 0.1 * level as f64).max(0.75);
TextSize(Em::new(upscale).into())
});
+
/// Whether text in the heading is strengthend.
#[property(referenced)]
pub const STRONG: Leveled<bool> = Leveled::Value(true);
@@ -34,12 +35,14 @@ impl HeadingNode {
/// Whether the heading is underlined.
#[property(referenced)]
pub const UNDERLINE: Leveled<bool> = Leveled::Value(false);
+
/// The extra padding above the heading.
#[property(referenced)]
pub const ABOVE: Leveled<RawLength> = Leveled::Value(Length::zero().into());
/// The extra padding below the heading.
#[property(referenced)]
pub const BELOW: Leveled<RawLength> = Leveled::Value(Length::zero().into());
+
/// Whether the heading is block-level.
#[property(referenced)]
pub const BLOCK: Leveled<bool> = Leveled::Value(true);
diff --git a/src/library/structure/list.rs b/src/library/structure/list.rs
index c3eae1af..02a7cd38 100644
--- a/src/library/structure/list.rs
+++ b/src/library/structure/list.rs
@@ -33,6 +33,7 @@ impl<const L: ListKind> ListNode<L> {
/// How the list is labelled.
#[property(referenced)]
pub const LABEL: Label = Label::Default;
+
/// The spacing between the list items of a non-wide list.
#[property(resolve)]
pub const SPACING: RawLength = RawLength::zero();
@@ -42,6 +43,7 @@ impl<const L: ListKind> ListNode<L> {
/// The space between the label and the body of each item.
#[property(resolve)]
pub const BODY_INDENT: RawLength = Em::new(0.5).into();
+
/// The extra padding above the list.
#[property(resolve)]
pub const ABOVE: RawLength = RawLength::zero();
@@ -137,7 +139,7 @@ pub const UNORDERED: ListKind = 0;
/// Ordered list labelling style.
pub const ORDERED: ListKind = 1;
-/// Either content or a closure mapping to content.
+/// How to label a list or enumeration.
#[derive(Debug, Clone, PartialEq, Hash)]
pub enum Label {
/// The default labelling.
diff --git a/src/library/structure/table.rs b/src/library/structure/table.rs
index 40f25749..96d3bd5b 100644
--- a/src/library/structure/table.rs
+++ b/src/library/structure/table.rs
@@ -21,6 +21,7 @@ impl TableNode {
/// How to stroke the cells.
#[property(resolve, fold)]
pub const STROKE: Option<RawStroke> = Some(RawStroke::default());
+
/// How much to pad the cells's content.
pub const PADDING: Relative<RawLength> = Length::pt(5.0).into();