TemmlMacro
Namespace: Temml
public sealed class TemmlMacroA macro definition: a string body, a token list, or a function. Maps to the values of upstream’s macros objects.
Inheritance: object
Constructors
Section titled “Constructors”TemmlMacro(Func<ITemmlMacroContext, TemmlMacro?>)
Section titled “TemmlMacro(Func<ITemmlMacroContext, TemmlMacro?>)”public TemmlMacro(Func<ITemmlMacroContext, TemmlMacro?> function)Initializes a new instance of the TemmlMacro class from a function. The function returns a string or token list macro, or null to leave the command unexpanded.
Parameters
| Name | Type | Description |
|---|---|---|
function |
Func<ITemmlMacroContext, TemmlMacro> |
TemmlMacro(string)
Section titled “TemmlMacro(string)”public TemmlMacro(string body)Initializes a new instance of the TemmlMacro class from TeX source.
Parameters
| Name | Type | Description |
|---|---|---|
body |
string |
TemmlMacro(TemmlMacroExpansion)
Section titled “TemmlMacro(TemmlMacroExpansion)”public TemmlMacro(TemmlMacroExpansion expansion)Initializes a new instance of the TemmlMacro class from a token list.
Parameters
| Name | Type | Description |
|---|---|---|
expansion |
TemmlMacroExpansion |
Properties
Section titled “Properties”public string? Body { get; }The TeX source, for a string macro.
Value: string
Expansion
Section titled “Expansion”public TemmlMacroExpansion? Expansion { get; }The token list, for a token list macro.
Value: TemmlMacroExpansion
IsFunction
Section titled “IsFunction”public bool IsFunction { get; }Whether this macro is a function.
Value: bool
Methods
Section titled “Methods”ToString()
Section titled “ToString()”public override string ToString()Returns the TeX source of a string macro.
Returns: string
Operators
Section titled “Operators”implicit operator TemmlMacro(string)
Section titled “implicit operator TemmlMacro(string)”public static implicit operator TemmlMacro(string body)Converts TeX source to a macro.
Parameters
| Name | Type | Description |
|---|---|---|
body |
string |
Returns: TemmlMacro
implicit operator TemmlMacro(TemmlMacroExpansion)
Section titled “implicit operator TemmlMacro(TemmlMacroExpansion)”public static implicit operator TemmlMacro(TemmlMacroExpansion expansion)Converts a token list to a macro.
Parameters
| Name | Type | Description |
|---|---|---|
expansion |
TemmlMacroExpansion |
Returns: TemmlMacro
MIT · Copyright 2020 Ron Kok · unofficial community port of Temml