Skip to main content

Cmd

Enum Cmd 

Source
#[repr(u8)]
pub enum Cmd {
Show 157 variants Relax = 0, LeftBrace = 1, RightBrace = 2, MathShift = 3, TabMark = 4, CarRet = 5, MacParam = 6, SupMark = 7, SubMark = 8, Endv = 9, Spacer = 10, Letter = 11, OtherChar = 12, ParEnd = 13, Stop = 14, DelimNum = 15, CharNum = 16, MathCharNum = 17, Mark = 18, Node = 19, Xray = 20, MakeBox = 21, Hmove = 22, Vmove = 23, UnHbox = 24, UnVbox = 25, RemoveItem = 26, Hskip = 27, Vskip = 28, Mskip = 29, Kern = 30, Mkern = 31, LeaderShip = 32, Halign = 33, Valign = 34, NoAlign = 35, Vrule = 36, Hrule = 37, Novrule = 38, Nohrule = 39, Insert = 40, Vadjust = 41, IgnoreSpaces = 42, AfterAssignment = 43, AfterGroup = 44, PartokenName = 45, BreakPenalty = 46, StartPar = 47, ItalCorr = 48, Accent = 49, MathAccent = 50, Discretionary = 51, EqNo = 52, LeftRight = 53, MathComp = 54, LimitSwitch = 55, Above = 56, MathStyle = 57, MathChoice = 58, NonScript = 59, Vcenter = 60, CaseShift = 61, Message = 62, Normal = 63, Extension = 64, Option = 65, LuaFunctionCall = 66, LuaBytecodeCall = 67, LuaCall = 68, InStream = 69, BeginGroup = 70, EndGroup = 71, Omit = 72, ExSpace = 73, Boundary = 74, Radical = 75, SuperSubScript = 76, NoSuperSubScript = 77, MathShiftCs = 78, EndCsName = 79, CharGhost = 80, AssignLocalBox = 81, CharGiven = 82, MathGiven = 83, XmathGiven = 84, LastItem = 85, ToksRegister = 86, AssignToks = 87, AssignInt = 88, AssignAttr = 89, AssignDimen = 90, AssignGlue = 91, AssignMuGlue = 92, AssignFontDimen = 93, AssignFontInt = 94, AssignHangIndent = 95, SetAux = 96, SetPrevGraf = 97, SetPageDimen = 98, SetPageInt = 99, SetBoxDimen = 100, SetTexShape = 101, SetEtexShape = 102, DefCharCode = 103, DefDelCode = 104, ExtdefMathCode = 105, ExtdefDelCode = 106, DefFamily = 107, SetMathParam = 108, SetFont = 109, DefFont = 110, Register = 111, AssignBoxDirection = 112, AssignBoxDir = 113, AssignDirection = 114, AssignDir = 115, Combinetoks = 116, Advance = 117, Multiply = 118, Divide = 119, Prefix = 120, Let = 121, ShorthandDef = 122, DefLuaCall = 123, ReadToCs = 124, Def = 125, SetBox = 126, HyphData = 127, SetInteraction = 128, LetterspaceFont = 129, ExpandFont = 130, CopyFont = 131, SetFontId = 132, UndefinedCs = 133, ExpandAfter = 134, NoExpand = 135, Input = 136, LuaExpandableCall = 137, LuaLocalCall = 138, IfTest = 139, FiOrElse = 140, CsName = 141, Convert = 142, Variable = 143, Feedback = 144, The = 145, TopBotMark = 146, Call = 147, LongCall = 148, OuterCall = 149, LongOuterCall = 150, EndTemplate = 151, DontExpand = 152, GlueRef = 153, ShapeRef = 154, BoxRef = 155, Data = 156,
}
Expand description

A command code (TeX’s eq_type/cur_cmd).

Variants§

§

Relax = 0

relax.

§

LeftBrace = 1

left_brace.

§

RightBrace = 2

right_brace.

§

MathShift = 3

math_shift.

§

TabMark = 4

tab_mark.

§

CarRet = 5

car_ret.

§

MacParam = 6

mac_param.

§

SupMark = 7

sup_mark.

§

SubMark = 8

sub_mark.

§

Endv = 9

endv.

§

Spacer = 10

spacer.

§

Letter = 11

letter.

§

OtherChar = 12

other_char.

§

ParEnd = 13

par_end.

§

Stop = 14

stop.

§

DelimNum = 15

delim_num.

§

CharNum = 16

char_num.

§

MathCharNum = 17

math_char_num.

§

Mark = 18

mark.

§

Node = 19

node.

§

Xray = 20

xray.

§

MakeBox = 21

make_box.

§

Hmove = 22

hmove.

§

Vmove = 23

vmove.

§

UnHbox = 24

un_hbox.

§

UnVbox = 25

un_vbox.

§

RemoveItem = 26

remove_item.

§

Hskip = 27

hskip.

§

Vskip = 28

vskip.

§

Mskip = 29

mskip.

§

Kern = 30

kern.

§

Mkern = 31

mkern.

§

LeaderShip = 32

leader_ship.

§

Halign = 33

halign.

§

Valign = 34

valign.

§

NoAlign = 35

no_align.

§

Vrule = 36

vrule.

§

Hrule = 37

hrule.

§

Novrule = 38

novrule.

§

Nohrule = 39

nohrule.

§

Insert = 40

insert.

§

Vadjust = 41

vadjust.

§

IgnoreSpaces = 42

ignore_spaces.

§

AfterAssignment = 43

after_assignment.

§

AfterGroup = 44

after_group.

§

PartokenName = 45

partoken_name.

§

BreakPenalty = 46

break_penalty.

§

StartPar = 47

start_par.

§

ItalCorr = 48

ital_corr.

§

Accent = 49

accent.

§

MathAccent = 50

math_accent.

§

Discretionary = 51

discretionary.

§

EqNo = 52

eq_no.

§

LeftRight = 53

left_right.

§

MathComp = 54

math_comp.

§

LimitSwitch = 55

limit_switch.

§

Above = 56

above.

§

MathStyle = 57

math_style.

§

MathChoice = 58

math_choice.

§

NonScript = 59

non_script.

§

Vcenter = 60

vcenter.

§

CaseShift = 61

case_shift.

§

Message = 62

message.

§

Normal = 63

normal.

§

Extension = 64

extension.

§

Option = 65

option.

§

LuaFunctionCall = 66

lua_function_call.

§

LuaBytecodeCall = 67

lua_bytecode_call.

§

LuaCall = 68

lua_call.

§

InStream = 69

in_stream.

§

BeginGroup = 70

begin_group.

§

EndGroup = 71

end_group.

§

Omit = 72

omit.

§

ExSpace = 73

ex_space.

§

Boundary = 74

boundary.

§

Radical = 75

radical.

§

SuperSubScript = 76

super_sub_script.

§

NoSuperSubScript = 77

no_super_sub_script.

§

MathShiftCs = 78

math_shift_cs.

§

EndCsName = 79

end_cs_name.

§

CharGhost = 80

char_ghost.

§

AssignLocalBox = 81

assign_local_box.

§

CharGiven = 82

char_given.

§

MathGiven = 83

math_given.

§

XmathGiven = 84

xmath_given.

§

LastItem = 85

last_item.

§

ToksRegister = 86

toks_register.

§

AssignToks = 87

assign_toks.

§

AssignInt = 88

assign_int.

§

AssignAttr = 89

assign_attr.

§

AssignDimen = 90

assign_dimen.

§

AssignGlue = 91

assign_glue.

§

AssignMuGlue = 92

assign_mu_glue.

§

AssignFontDimen = 93

assign_font_dimen.

§

AssignFontInt = 94

assign_font_int.

§

AssignHangIndent = 95

assign_hang_indent.

§

SetAux = 96

set_aux.

§

SetPrevGraf = 97

set_prev_graf.

§

SetPageDimen = 98

set_page_dimen.

§

SetPageInt = 99

set_page_int.

§

SetBoxDimen = 100

set_box_dimen.

§

SetTexShape = 101

set_tex_shape.

§

SetEtexShape = 102

set_etex_shape.

§

DefCharCode = 103

def_char_code.

§

DefDelCode = 104

def_del_code.

§

ExtdefMathCode = 105

extdef_math_code.

§

ExtdefDelCode = 106

extdef_del_code.

§

DefFamily = 107

def_family.

§

SetMathParam = 108

set_math_param.

§

SetFont = 109

set_font.

§

DefFont = 110

def_font.

§

Register = 111

register.

§

AssignBoxDirection = 112

assign_box_direction.

§

AssignBoxDir = 113

assign_box_dir.

§

AssignDirection = 114

assign_direction.

§

AssignDir = 115

assign_dir.

§

Combinetoks = 116

combinetoks.

§

Advance = 117

advance.

§

Multiply = 118

multiply.

§

Divide = 119

divide.

§

Prefix = 120

prefix.

§

Let = 121

let.

§

ShorthandDef = 122

shorthand_def.

§

DefLuaCall = 123

def_lua_call.

§

ReadToCs = 124

read_to_cs.

§

Def = 125

def.

§

SetBox = 126

set_box.

§

HyphData = 127

hyph_data.

§

SetInteraction = 128

set_interaction.

§

LetterspaceFont = 129

letterspace_font.

§

ExpandFont = 130

expand_font.

§

CopyFont = 131

copy_font.

§

SetFontId = 132

set_font_id.

§

UndefinedCs = 133

undefined_cs.

§

ExpandAfter = 134

expand_after.

§

NoExpand = 135

no_expand.

§

Input = 136

input.

§

LuaExpandableCall = 137

lua_expandable_call.

§

LuaLocalCall = 138

lua_local_call.

§

IfTest = 139

if_test.

§

FiOrElse = 140

fi_or_else.

§

CsName = 141

cs_name.

§

Convert = 142

convert.

§

Variable = 143

variable.

§

Feedback = 144

feedback.

§

The = 145

the.

§

TopBotMark = 146

top_bot_mark.

§

Call = 147

call.

§

LongCall = 148

long_call.

§

OuterCall = 149

outer_call.

§

LongOuterCall = 150

long_outer_call.

§

EndTemplate = 151

end_template.

§

DontExpand = 152

dont_expand.

§

GlueRef = 153

glue_ref.

§

ShapeRef = 154

shape_ref.

§

BoxRef = 155

box_ref.

§

Data = 156

data.

Implementations§

Source§

impl Cmd

Source

pub const MAX_CHAR_CODE: Cmd = Cmd::DelimNum

The largest category code of a character token (max_char_code).

Source

pub const MIN_INTERNAL: Cmd = Cmd::CharGiven

The smallest command that can follow \the (min_internal).

Source

pub const MAX_NON_PREFIXED: Cmd = Cmd::LastItem

The largest command that cannot be prefixed by \global.

Source

pub const MAX_INTERNAL: Cmd = Cmd::Register

The largest command that can follow \the (max_internal).

Source

pub const MAX_COMMAND: Cmd = Cmd::SetFontId

The largest unexpandable command (max_command).

Source

pub fn from_u8(n: u8) -> Cmd

The command with numeric code n.

Source

pub fn is_expandable(self) -> bool

Whether the command is expandable.

Source

pub fn is_call(self) -> bool

Whether the command is a macro call (call … long_outer_call).

Source

pub fn is_outer_or_special(self) -> bool

Whether the command is an outer macro or a special outer marker (cur_cmd >= outer_call).

Source

pub fn is_internal(self) -> bool

Whether the command denotes an internal quantity. LuaTeX’s direction parameters (\pardirection, \pardir, …) come after max_internal but are read as quantities too (observed).

Source§

impl Cmd

Source

pub const ALL: [Cmd; 157]

All command codes, indexed by their numeric value.

Source

pub fn name(self) -> &'static str

LuaTeX’s name for the command (token.get_cmdname).

Trait Implementations§

Source§

impl Clone for Cmd

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 Copy for Cmd

Source§

impl Debug for Cmd

Source§

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

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

impl Eq for Cmd

Source§

impl Hash for Cmd

Source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

impl Ord for Cmd

Source§

fn cmp(&self, other: &Self) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 (const: unstable) · Source§

fn max(self, other: Self) -> Self
where Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 (const: unstable) · Source§

fn min(self, other: Self) -> Self
where Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 (const: unstable) · Source§

fn clamp(self, min: Self, max: Self) -> Self
where Self: Sized,

Restrict a value to a certain interval. Read more
Source§

fn clamp_to<R>(self, range: R) -> Self
where Self: Sized, R: ClampBounds<Self>,

🔬This is a nightly-only experimental API. (clamp_to)
Restrict a value to a certain range. Read more
Source§

impl PartialEq for Cmd

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 PartialOrd for Cmd

Source§

fn partial_cmp(&self, other: &Self) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 (const: unstable) · Source§

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

Tests less than (for self and other) and is used by the < operator. Read more
1.0.0 (const: unstable) · Source§

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

Tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 (const: unstable) · Source§

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

Tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 (const: unstable) · Source§

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

Tests greater than or equal to (for self and other) and is used by the >= operator. Read more
Source§

impl StructuralPartialEq for Cmd

Auto Trait Implementations§

§

impl Freeze for Cmd

§

impl RefUnwindSafe for Cmd

§

impl Send for Cmd

§

impl Sync for Cmd

§

impl Unpin for Cmd

§

impl UnsafeUnpin for Cmd

§

impl UnwindSafe for Cmd

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> ErasedDestructor for T
where T: 'static,

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.