summaryrefslogtreecommitdiff
path: root/library/src/layout
diff options
context:
space:
mode:
authorLaurenz <laurmaedje@gmail.com>2023-01-22 13:18:30 +0100
committerLaurenz <laurmaedje@gmail.com>2023-01-22 13:18:30 +0100
commit815ee3254c1f087771b7c38e6f85622f3aeddf7c (patch)
treec8d7f3bbbb86990cf50fd70804925509e4a3652a /library/src/layout
parent6f7e8dd497b61326babd4f60d559e8b5ad61603b (diff)
Formatting fixes
Diffstat (limited to 'library/src/layout')
-rw-r--r--library/src/layout/columns.rs16
-rw-r--r--library/src/layout/place.rs2
-rw-r--r--library/src/layout/spacing.rs24
3 files changed, 21 insertions, 21 deletions
diff --git a/library/src/layout/columns.rs b/library/src/layout/columns.rs
index 6d90ecb2..2b09bb69 100644
--- a/library/src/layout/columns.rs
+++ b/library/src/layout/columns.rs
@@ -3,29 +3,29 @@ use crate::text::TextNode;
/// # Columns
/// Separate a region into multiple equally sized columns.
-///
+///
/// The `column` function allows to separate the interior of any container into
/// multiple columns. It will not equalize the height of the columns, instead,
/// the columns will take up the height of their container or the remaining
/// height on the page. The columns function can break across pages if
/// necessary.
-///
+///
/// ## Example
/// ```
/// = Towards Advanced Deep Learning
-///
+///
/// #box(height: 68pt,
/// columns(2, gutter: 11pt)[
/// #set par(justify: true)
/// This research was funded by the
/// National Academy of Sciences.
-/// NAoS provided support for field
+/// NAoS provided support for field
/// tests and interviews with a
/// grant of up to USD 40.000 for a
/// period of 6 months.
/// ]
/// )
-///
+///
/// In recent years, deep learning has
/// increasingly been used to solve a
/// variety of problems.
@@ -150,11 +150,11 @@ impl Layout for ColumnsNode {
/// # Column Break
/// A forced column break.
-///
+///
/// The function will behave like a [page break](@pagebreak) when used in a
/// single column layout or the last column on a page. Otherwise, content after
/// the column break will be placed in the next column.
-///
+///
/// ## Example
/// ```
/// #set page(columns: 2)
@@ -163,7 +163,7 @@ impl Layout for ColumnsNode {
/// revealed a hitherto unknown
/// phenomenon of extraordinary
/// significance.
-///
+///
/// #colbreak()
/// Through rigorous experimentation
/// and analysis, we have discovered
diff --git a/library/src/layout/place.rs b/library/src/layout/place.rs
index 26ab7b18..c51c8289 100644
--- a/library/src/layout/place.rs
+++ b/library/src/layout/place.rs
@@ -39,7 +39,7 @@ use crate::prelude::*;
/// ### Example
/// ```
/// #set align(center)
-///
+///
/// #box(
/// width: 80pt,
/// height: 80pt,
diff --git a/library/src/layout/spacing.rs b/library/src/layout/spacing.rs
index 01bd9bea..640cd53a 100644
--- a/library/src/layout/spacing.rs
+++ b/library/src/layout/spacing.rs
@@ -4,11 +4,11 @@ use crate::prelude::*;
/// # Spacing (H)
/// Insert horizontal spacing into a paragraph.
-///
+///
/// The spacing can be a length or a fractional. In the latter case, the
/// remaining space on the line is distributed among all fractional spacings
/// according to their relative fractions.
-///
+///
/// ## Example
/// ```
/// #circle(fill: red)
@@ -26,7 +26,7 @@ use crate::prelude::*;
/// If true, the spacing collapses at the start or end of a paragraph.
/// Moreover, from multiple adjacent weak spacings all but the largest one
/// collapse.
-///
+///
/// ### Example
/// ```
/// #h(1cm, weak: true)
@@ -70,13 +70,13 @@ impl HNode {
impl HNode {
/// Normal strong spacing.
- pub fn strong(amount: Spacing) -> Self {
- Self { amount, weak: false }
+ pub fn strong(amount: impl Into<Spacing>) -> Self {
+ Self { amount: amount.into(), weak: false }
}
/// User-created weak spacing.
- pub fn weak(amount: Spacing) -> Self {
- Self { amount, weak: true }
+ pub fn weak(amount: impl Into<Spacing>) -> Self {
+ Self { amount: amount.into(), weak: true }
}
}
@@ -99,7 +99,7 @@ impl Behave for HNode {
/// # Spacing (V)
/// Insert vertical spacing.
-///
+///
/// The spacing can be a length or a fractional. In the latter case, the
/// remaining space on the page is distributed among all fractional spacings
/// according to their relative fractions.
@@ -111,15 +111,15 @@ impl Behave for HNode {
/// considerations that must be
/// taken into account when
/// conducting psychological
-/// research:
+/// research:
/// #v(5mm)
-///
+///
/// - Informed consent
/// - Participant confidentiality
/// - The use of
/// vulnerable populations.
/// ```
-///
+///
/// ## Parameters
/// - amount: Spacing (positional, required)
/// How much spacing to insert.
@@ -129,7 +129,7 @@ impl Behave for HNode {
/// from multiple adjacent weak spacings all but the largest one collapse.
/// Weak spacings will always collapse adjacent paragraph spacing, even if the
/// paragraph spacing is larger.
-///
+///
/// ### Example
/// ```
/// The following theorem is