summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbluebear94 <uruwi@protonmail.com>2024-05-13 08:14:07 -0400
committerLaurenz <laurmaedje@gmail.com>2024-05-17 15:34:20 +0200
commit1b405832a3e63fdcfd75defbac56b5a41cb3e846 (patch)
treeeb88d71314ad1e3f40967f9ff3f3014d31d44e7f
parent3cc6e58eabc7261e04baa28423756ab69f6dc220 (diff)
Revise docs for `place` element (#4105)
-rw-r--r--crates/typst/src/layout/place.rs12
1 files changed, 10 insertions, 2 deletions
diff --git a/crates/typst/src/layout/place.rs b/crates/typst/src/layout/place.rs
index 176eaf47..7d41b037 100644
--- a/crates/typst/src/layout/place.rs
+++ b/crates/typst/src/layout/place.rs
@@ -30,8 +30,8 @@ use crate::realize::{Behave, Behaviour};
pub struct PlaceElem {
/// Relative to which position in the parent container to place the content.
///
- /// Cannot be `{auto}` if `float` is `{false}` and must be either
- /// `{auto}`, `{top}`, or `{bottom}` if `float` is `{true}`.
+ /// - If `float` is `{false}`, then this can be any alignment other than `{auto}`.
+ /// - If `float` is `{true}`, then this must be `{auto}`, `{top}`, or `{bottom}`.
///
/// When an axis of the page is `{auto}` sized, all alignments relative to
/// that axis will be ignored, instead, the item will be placed in the
@@ -77,9 +77,17 @@ pub struct PlaceElem {
/// place(center, dx: amount - 32pt, dy: amount)[A]
/// }
/// ```
+ ///
+ /// This does not affect the layout of in-flow content.
+ /// In other words, the placed content is treated as if it
+ /// were wrapped in a [`move`] element.
pub dx: Rel<Length>,
/// The vertical displacement of the placed content.
+ ///
+ /// This does not affect the layout of in-flow content.
+ /// In other words, the placed content is treated as if it
+ /// were wrapped in a [`move`] element.
pub dy: Rel<Length>,
/// The content to place.