pub struct BadLabel {
pub environment: String,
pub key: String,
pub template: String,
pub detail: String,
}Expand description
The error that is reported when a label template or a reference template
in the optional argument of a list is not valid (flm.lists.bad-label).
These templates are written in the language of the number templates of the
numbering feature. Each #{name}
stands for the number of the item in the number format name, and the
rest of the template is FLM content, as in label=(#{alph}) or
label={\textbf{#{arabic}}.}. A template is not valid if it contains a
placeholder that is not a number format, or content that is not valid FLM.
Reported by the lowering rule of the list, on every backend. If the label
template is not valid, the list uses the label template of its
list kind for its nesting depth. On the
latex-recomposed backend, the key of the template is left out of the
recomposed LaTeX, and LaTeX uses its default instead.
Each template that is not valid is reported once. The reference template of
a numbered list is compiled by the numbering feature, which reports a
reference template that is not valid as flm.numbering.bad-number-format.
This also holds for a template given with label= alone, which sets both
the label template and the reference template. This condition therefore
reports a reference template only in a registry without the numbering
feature.
Fields§
§environment: StringThe list environment’s name.
key: StringThe key of the template: label for the label template, also when it
is given as a short label form, or ref for the reference template.
template: StringThe template. A short label form is given as the label template that it
stands for, e.g. (#{roman}) for (i).
detail: StringThe messages that were reported when the template was compiled, separated by semicolons.
Implementations§
Trait Implementations§
Source§impl DiagnosticInfo for BadLabel
impl DiagnosticInfo for BadLabel
Source§const IDENTIFIER: &'static str = "flm.lists.bad-label"
const IDENTIFIER: &'static str = "flm.lists.bad-label"
<crate-or-lang>.<area>.<condition>. Read moreSource§fn serializable_data(&self) -> DiagnosticValue
fn serializable_data(&self) -> DiagnosticValue
Source§fn identifier(&self) -> &str
fn identifier(&self) -> &str
impl Eq for BadLabel
impl StructuralPartialEq for BadLabel
Auto Trait Implementations§
impl Forget for BadLabel
impl Freeze for BadLabel
impl Move for BadLabel
impl RefUnwindSafe for BadLabel
impl Send for BadLabelwhere
RawVecInner: Send,
impl Sync for BadLabelwhere
RawVecInner: Sync,
impl Unpin for BadLabel
impl UnsafeUnpin for BadLabel
impl UnwindSafe for BadLabelwhere
RawVecInner: UnwindSafe,
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> DiagnosticData for Twhere
T: DiagnosticInfo,
impl<T> DiagnosticData for Twhere
T: DiagnosticInfo,
Source§fn identifier(&self) -> &str
fn identifier(&self) -> &str
DiagnosticInfo::identifier — for every
ordinary condition, the IDENTIFIER const).Source§fn serializable_data(&self) -> DiagnosticValue
fn serializable_data(&self) -> DiagnosticValue
DiagnosticInfo::serializable_data).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