pub struct QuoteRule;Expand description
The implementation of the lowering rule QUOTE_RULE,
the default on every backend: a quotation lowers to one flm.pres.block
of role QUOTE_ROLE whose one kind token is the environment’s name,
holding one flm.pres.block per quotation section in the order written,
of the role of the section’s kind (QuoteSection::role):
- a text or an attribution section holds one paragraph over its content, the whitespace at both ends of it trimmed;
- a block section holds its content’s paragraphs and blocks, or one paragraph where its content is written as inline content;
- a lines section holds one
flm.pres.lineswith oneflm.pres.lineper line: the content is split at every\\, each line’s leading\indents are counted into its left indentation as that many tabs, and the whitespace at both ends of each line is trimmed.
The rule reads the body’s direct children as a sequence of
quotation-section commands and bare runs. A quotation-section command
in section position, written directly in the body of an environment that
accepts it, opens a quotation section; each maximal run of other content
between two of them is one bare run. Whitespace and source comments at a
run’s edges stage nothing, and a run that holds nothing else stages
nothing. A bare run is staged exactly as a quotation section of the
environment’s bare-content kind would be staged over the same content. In
an environment that reads no bare content, a bare run is reported once
(BareContent) and lowered in place inside the quotation’s block,
outside any quotation section. A quotation section that holds nothing,
such as \attributed{}, is an empty block of its role. An \indent
after the first content of its line is reported (IndentMidLine) and
left out.
A quotation-section command that the environment does not accept, written
in its body, can only be a command of an enclosing quotation, available
there because the body is inside one of that quotation’s quotation
sections. It is part of a bare run like any other content, and its own
rule (SectionRule) lowers it to its content without reporting it a
second time.
At every quotation the rule requires the feature’s style identifier
STYLE (flm.quote.style), which each backend resolves as it resolves
requirements: the stylesheet on the html backend, the definition pieces
delivering it on the latex-rendered backend, nothing on the text
backend.
§Errors
LowerError when the node carries no QuoteElement, and any error
from lowering the content.
Trait Implementations§
impl Copy for QuoteRule
Auto Trait Implementations§
impl Forget for QuoteRule
impl Freeze for QuoteRule
impl Move for QuoteRule
impl RefUnwindSafe for QuoteRule
impl Send for QuoteRule
impl Sync for QuoteRule
impl Unpin for QuoteRule
impl UnsafeUnpin for QuoteRule
impl UnwindSafe for QuoteRule
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CheckedAs for T
impl<T> CheckedAs for T
Source§fn checked_as<Dst>(self) -> Option<Dst>where
T: CheckedCast<Dst>,
fn checked_as<Dst>(self) -> Option<Dst>where
T: CheckedCast<Dst>,
Source§impl<Src, Dst> CheckedCastFrom<Src> for Dstwhere
Src: CheckedCast<Dst>,
impl<Src, Dst> CheckedCastFrom<Src> for Dstwhere
Src: CheckedCast<Dst>,
Source§fn checked_cast_from(src: Src) -> Option<Dst>
fn checked_cast_from(src: Src) -> Option<Dst>
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more