` tag only for paragraphs.
+///
+/// When creating custom reusable components, you can and should take charge
+/// over whether Typst creates paragraphs. By wrapping text in a [`block`]
+/// instead of just adding paragraph breaks around it, you can force the absence
+/// of a paragraph. Conversely, by adding a [`parbreak`] after some content in a
+/// container, you can force it to become a paragraph even if it's just one
+/// word. This is, for example, what [non-`tight`]($list.tight) lists do to
+/// force their items to become paragraphs.
///
/// # Example
/// ```example
@@ -37,7 +93,7 @@ use crate::model::Numbering;
/// let $a$ be the smallest of the
/// three integers. Then, we ...
/// ```
-#[elem(scope, title = "Paragraph", Debug, Construct)]
+#[elem(scope, title = "Paragraph")]
pub struct ParElem {
/// The spacing between lines.
///
@@ -53,7 +109,6 @@ pub struct ParElem {
/// distribution of the top- and bottom-edge values affects the bounds of
/// the first and last line.
#[resolve]
- #[ghost]
#[default(Em::new(0.65).into())]
pub leading: Length,
@@ -68,7 +123,6 @@ pub struct ParElem {
/// takes precedence over the paragraph spacing. Headings, for instance,
/// reduce the spacing below them by default for a better look.
#[resolve]
- #[ghost]
#[default(Em::new(1.2).into())]
pub spacing: Length,
@@ -81,7 +135,6 @@ pub struct ParElem {
/// Note that the current [alignment]($align.alignment) still has an effect
/// on the placement of the last line except if it ends with a
/// [justified line break]($linebreak.justify).
- #[ghost]
#[default(false)]
pub justify: bool,
@@ -106,7 +159,6 @@ pub struct ParElem {
/// challenging to break in a visually
/// pleasing way.
/// ```
- #[ghost]
pub linebreaks: Smart Hello From Hello From The World Hello From Hello From The World I'm a paragraph. We are two. So we are paragraphs.
+
+
+
+
+
+
+
+
+
+
+
+ Heading is no paragraph
+ Compose papers faster
+ Compose papers faster