pub enum LatexArgShape {
Star,
Optional,
Mandatory,
EscVerb,
}Expand description
The shape of one argument of a macro or environment construct: how the emitter writes the argument, and whether the argument has a content slot.
The shapes are the syntactic forms LaTeX has for an argument. A * and a
[…] are what an author writes for a starred variant and an optional
argument; a {…} is a mandatory argument. The fourth shape, EscVerb,
is a mandatory argument whose content is verbatim text written in the
encoding that the \EscVerb command of the fvextra package reads (a
backslash before every printable ASCII character that is not a letter or a
digit), so that verbatim content survives inside a moving argument such as
a section title. With this shape a lowering rule only declares the shape,
and the sink does the encoding (super::sink::LatexSink::escverb).
Variants§
Star
A star: written as *; no content slot.
Optional
An optional argument: written as […], or [{…}] when the content
could be misread — the emitter decides from the slot’s nodes.
Mandatory
A mandatory argument: always written as {…}.
EscVerb
A mandatory argument holding verbatim content, written as {…} in the
\EscVerb encoding; its slot holds the verbatim text as text nodes.
Implementations§
Source§impl LatexArgShape
impl LatexArgShape
Trait Implementations§
Source§impl Clone for LatexArgShape
impl Clone for LatexArgShape
impl Copy for LatexArgShape
Source§impl Debug for LatexArgShape
impl Debug for LatexArgShape
Source§impl Display for LatexArgShape
impl Display for LatexArgShape
impl Eq for LatexArgShape
Source§impl Hash for LatexArgShape
impl Hash for LatexArgShape
Source§impl PartialEq for LatexArgShape
impl PartialEq for LatexArgShape
impl StructuralPartialEq for LatexArgShape
Auto Trait Implementations§
impl Forget for LatexArgShape
impl Freeze for LatexArgShape
impl Move for LatexArgShape
impl RefUnwindSafe for LatexArgShape
impl Send for LatexArgShape
impl Sync for LatexArgShape
impl Unpin for LatexArgShape
impl UnsafeUnpin for LatexArgShape
impl UnwindSafe for LatexArgShape
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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