Skip to main content

Cell

Struct Cell 

Source
pub struct Cell {
Show 51 fields pub empty: bool, pub skippable: bool, pub omitted: bool, pub omit_text_box: bool, pub skipped: bool, pub thead_in_row: bool, pub thead_in_column: bool, pub before: Option<Tokens>, pub after: Option<Tokens>, pub align: Option<Align>, pub width: Option<Dimension>, pub height: Option<Dimension>, pub depth: Option<Dimension>, pub cached_width: Option<Dimension>, pub cached_height: Option<Dimension>, pub cached_depth: Option<Dimension>, pub colspan: Option<usize>, pub colspanned: Option<usize>, pub rowspan: Option<usize>, pub rowspan_up: Option<usize>, pub rowspanned: Option<usize>, pub boxes: Option<Digested>, pub cell_type: Option<char>, pub content_class: Option<ColumnSpec>, pub content_length: Option<usize>, pub border_left: Option<usize>, pub border_right: Option<usize>, pub border_top: Option<usize>, pub border_bottom: Option<usize>, pub top_padding: Option<usize>, pub bottom_padding: Option<usize>, pub right_padding: Option<usize>, pub left_padding: Option<usize>, pub vattach: Option<String>, pub cell: Option<Node>, pub x: Option<Dimension>, pub y: Option<Dimension>, pub border: String, pub border_color: [Option<String>; 4], pub border_dashed: [bool; 4], pub tabskip: Option<Glue>, pub lspaces: Option<Digested>, pub rspaces: Option<Digested>, pub class: Option<String>, pub has_intercol_before: bool, pub has_intercol_after: bool, pub backgroundcolor: Option<String>, pub prefix_at: Option<usize>, pub suffix_at: Option<usize>, pub overprint: bool, pub overprint_columns: Option<usize>,
}

Fields§

§empty: bool§skippable: bool§omitted: bool§omit_text_box: bool

An \omitted cell of an alignment whose math is its template’s (amsmath’s, template_math): TeX sets it in restricted horizontal mode (tex.web §789), so its material is boxed as text ([crate::alignment::Alignment:: get_column_before]).

§skipped: bool§thead_in_row: bool§thead_in_column: bool§before: Option<Tokens>§after: Option<Tokens>§align: Option<Align>§width: Option<Dimension>§height: Option<Dimension>§depth: Option<Dimension>§cached_width: Option<Dimension>§cached_height: Option<Dimension>§cached_depth: Option<Dimension>§colspan: Option<usize>§colspanned: Option<usize>§rowspan: Option<usize>§rowspan_up: Option<usize>

The rows a negative \multirow{-n} spans, this one and the n-1 above it (multirow.sty:172 raises the box over them): normalize_upward_spans moves the content to the top row with that rowspan when the cells above are empty.

§rowspanned: Option<usize>§boxes: Option<Digested>§cell_type: Option<char>§content_class: Option<ColumnSpec>§content_length: Option<usize>§border_left: Option<usize>§border_right: Option<usize>§border_top: Option<usize>§border_bottom: Option<usize>§top_padding: Option<usize>§bottom_padding: Option<usize>§right_padding: Option<usize>§left_padding: Option<usize>§vattach: Option<String>§cell: Option<Node>§x: Option<Dimension>§y: Option<Dimension>§border: String§border_color: [Option<String>; 4]

The colour of each side’s rule when it was drawn (colortbl’s \arrayrulecolor, the RULE_COLOR, or a | rule box’s border_color), by BorderSpec: top, bottom, left, right; None the default ink.

§border_dashed: [bool; 4]

Whether each side’s rules are dashed (arydshln’s \hdashline, \cdashline, :), by BorderSpec: a side is dashed only when every rule on it is.

§tabskip: Option<Glue>

Perl: $$colspec{tabskip} — intercolumn glue from \halign template

§lspaces: Option<Digested>

Perl: $$colspec{lspaces} — left-side spacing (incl. tabskip)

§rspaces: Option<Digested>

Perl: $$colspec{rspaces} — right-side spacing

§class: Option<String>

Perl: $$cell{class} — CSS class for the cell

§has_intercol_before: bool

Whether this column has \lx@intercol in its before tokens (from template). Set during template building, used by nopad heuristic to distinguish regular columns (has intercolumn padding) from @{}-disabled columns.

§has_intercol_after: bool

Whether this column has \lx@intercol in its after tokens (from template). Set during template building, used by nopad heuristic to distinguish regular columns (has intercolumn padding) from @{}-disabled columns.

§backgroundcolor: Option<String>

Background color from \columncolor/\cellcolor (set during digestion by @setcellcolor)

§prefix_at: Option<usize>

Where the column’s array.sty >{…} tokens begin in before (Template::add_column): right after the column type’s own before tokens (a paragraph column’s box opening), ahead of the >{…} declarations and \ignorespaces.

§suffix_at: Option<usize>

Where the column’s array.sty <{…} tokens end in after (Template::add_column, add_after_column), ahead of the column type’s own after tokens (its fills, a paragraph column’s box end) and the intercolumn material: the cell’s group ends there (array.sty:146-148 \d@llarbegin\insert@column\d@llarend\do@row@strut\hfil).

§overprint: bool

The cell’s content overprints the cells to its right, as an \rlap does (\lefteqn, latex.ltx:15800): the empty cells that follow it join its span (normalize_overprint_spans). Set by \lx@alignment@cell@overprint.

§overprint_columns: Option<usize>

The most columns an overprinting cell spans, its own included (a nicematrix \Block{i-j}’s j); None for no bound.

Implementations§

Source§

impl Cell

Source

pub fn mark_intercol_after(&mut self)

Marks the column padded on its right when its after tokens hold an intercolumn macro (\lx@intercol, or a binding’s …intercol one), for the nopad heuristic: a column built outside Template::add_column’s own marking (tabular_bindings, blkarray’s block columns).

Source

pub fn add_border(&mut self, sides: &str, color: Option<&str>, dashed: bool)

Adds the border letters (t/b/l/r, upper case alike), each side now drawn in color: a rule drawn later is on top, as in TeX. A side stays dashed only while every rule added to it is dashed.

Source

pub fn border_color_at(&self, side: BorderSpec) -> Option<&str>

Source

pub fn border_dashed_at(&self, side: BorderSpec) -> bool

Source

pub fn border_dashed_classes(&self) -> Vec<String>

The classes of the dashed sides the cell’s border keeps (ltx_border_r_dashed), in the border attribute’s order.

Source

pub fn border_color_style(&self) -> Option<String>

The cssstyle of the coloured sides the cell’s border keeps (border-top-color:#FF0000).

Source

pub fn border_at(&self, side: BorderSpec) -> Option<usize>

Trait Implementations§

Source§

impl Clone for Cell

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Cell

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for Cell

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl PartialEq for Cell

Source§

fn eq(&self, other: &Self) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for Cell

Auto Trait Implementations§

§

impl !RefUnwindSafe for Cell

§

impl !Send for Cell

§

impl !Sync for Cell

§

impl !UnwindSafe for Cell

§

impl Freeze for Cell

§

impl Unpin for Cell

§

impl UnsafeUnpin for Cell

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.