Formatting fixes
This commit is contained in:
parent
6f7e8dd497
commit
815ee3254c
@ -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
|
||||
|
@ -39,7 +39,7 @@ use crate::prelude::*;
|
||||
/// ### Example
|
||||
/// ```
|
||||
/// #set align(center)
|
||||
///
|
||||
///
|
||||
/// #box(
|
||||
/// width: 80pt,
|
||||
/// height: 80pt,
|
||||
|
@ -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
|
||||
|
@ -45,7 +45,7 @@ impl Align {
|
||||
}
|
||||
|
||||
/// Returns the position of this alignment in a container with the given
|
||||
/// extentq.
|
||||
/// extent.
|
||||
pub fn position(self, extent: Abs) -> Abs {
|
||||
match self {
|
||||
Self::Left | Self::Top => Abs::zero(),
|
||||
|
Loading…
Reference in New Issue
Block a user