pub struct ItemElement { /* private fields */ }Expand description
The data of the ITEM element, and its Referenceable aspect, which
declares the reference point of the item an \item begins.
It holds the templates the feature compiled when the registry was built. For an untagged item of an unnumbered list that writes no usable label of its own, the reference point carries as its content the list kind’s fixed label template for the depth (the bullet), as the tree compiled once for that template.
Trait Implementations§
Source§impl Clone for ItemElement
impl Clone for ItemElement
Source§impl Debug for ItemElement
impl Debug for ItemElement
Source§impl Referenceable for ItemElement
Declares one reference point per \item that begins an item of a list,
and none for any other \item. The point’s labels are the \label
fields written after the \item, of the label type item; its anchor is
derived from its first label or, for an unlabeled item, from its
position.
impl Referenceable for ItemElement
Declares one reference point per \item that begins an item of a list,
and none for any other \item. The point’s labels are the \label
fields written after the \item, of the label type item; its anchor is
derived from its first label or, for an unlabeled item, from its
position.
An untagged item of a numbered list kind declares a number source
(NumberSource): the list kind’s counter; the scoped instances under
which it is counted (below), outermost first; the counter style of its
list’s depth, whose number format is the depth’s reference template; the
advance of level 0 by one; and, as the number template, the list’s own
reference template where the list writes one
(ListOptions::ref_template). The item’s counter value is therefore
recorded in the form a reference to it shows, and the list’s rule writes
the label beside the item from the same record.
§The content the reference point carries
A reference to an item shows what is shown beside the item, so the point carries the item’s label as its content wherever the label is not a number:
- for a tagged item, its tag, however it is written (
\item[Custom],\item[tag=Custom],\item[tag={Custom}]); such an item declares no number source, so it is counted in no counter; - for an untagged item of an unnumbered list, the list’s own label where
its bracket writes one that can be used (
[-],[label=*],[label={--}]), and otherwise the label template its list kind declares for the depth, by default the bullet•of anitemize. A list’s own label that holds a placeholder (label=#{arabic},[1.]) is an error on an unnumbered list (LabelNamesNumber); the item shows the depth’s label instead, and a reference to the item shows the same; - for any other item, nothing: its number is what a reference shows.
This content is not a node of the document that the point could refer to
(a bullet comes from the configuration, and Custom in tag=Custom
shares a run of characters with its key), so the point carries it as a
small tree of its own (ContentRef::Synthesized). The bullet’s tree is
built once per configured template, when the registry is built, and
shared by every item that shows it. A tag or a list’s own label is copied
into a new tree each time the points are computed, which the
refpoints feature does once per
run.
§The scoped instances under which an item is counted
Each list is a scoped instance of its list kind’s counter (see
scoped instances),
and a nested list’s instance is numbered within the number of the item
that holds it. A tagged item has no number, so no list can be numbered
within it. An item is therefore counted under its own list and, among the
enclosing lists of the same list kind, under each one whose item holding
the nested list is untagged. A list held by a tagged item, or written
before the first \item of the enclosing list, is numbered within the
nearest untagged item of its list kind further out; where there is none,
it is an outermost instance. The nesting depth, which selects the counter
style, still counts every enclosing list of the list kind. In an
enumerate, \item[T] \begin{enumerate}\item x\end{enumerate} therefore
numbers x as (i) regardless of the items before T, and no nesting
joiner writes a number of the enclosing list.
Auto Trait Implementations§
impl !RefUnwindSafe for ItemElement
impl !UnwindSafe for ItemElement
impl Forget for ItemElement
impl Freeze for ItemElement
impl Move for ItemElement
impl Send for ItemElement
impl Sync for ItemElement
impl Unpin for ItemElement
impl UnsafeUnpin for ItemElement
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