Skip to content

Custom LaTeX Commands

fedemelo edited this page Sep 7, 2024 · 6 revisions

This section provides an overview of the custom LaTeX commands I defined for this project. These commands have been defined to comply with the standards from the International Organization for Standardization (ISO). If no command is defined for a specific symbol, the native LaTeX command suffices to comply with the standards. The commands are organized by the sections of the ISO 80000-2:2019 standard.

Defined commands

Sets

(ISO 80000-2:2019, §6)

Macro Expansion Description Notes
\set Set Set notation (2-6.3). Defined by default in KaTeX.
\abs Absolute value Cardinality of a set (2-6.5). Used for absolute values.

Miscellaneous Symbols

(ISO 80000-2:2019, §8)

Macro Expansion Description Notes
\coloneqq Colon equals, definition Equal by definition (2-8.3). Defined by default in KaTeX.
\colonminus Colon minus Redefines \coloneq symbol, :-, to be used as \colonminus, because the \coloneq name can be misleading. The \coloneq name can be wrongfully thought of as colon equals. The original LaTeX macro name was intended to mean eq for one bar and eqq for two, but that convention isn't widespread. This macro is rarely used, if ever. It is only defined to avoid the use of \coloneq entirely, opting for \colonminus for :- and \coloneqq for :=.

Operations

(ISO 80000-2:2019, §10)

Macro Expansion Description
\avg Arithmetic mean Arithmetic mean (2-10.12).
\sgn Signum Signum function (2-10.13).

Functions

(ISO 80000-2:2019, §12)

Macro Expansion Description
\ran Domain Domain of a function (2-12.3).
\dom Range Range of a function (2-12.4).
\cod Codomain Codomain of a function.
\inv Inverse Inverse of a function (2-12.10).

Calculus

Macro Expansion Description
\der Derivative Represents a derivative (2-12.18).
\tder Textstyle derivative Textstyle derivative.
\dder Displaystyle derivative Displaystyle derivative.
\nder Nth derivative Nth derivative (2-12.20).
\tnder Textstyle nth derivative Textstyle nth derivative.
\dnder Displaystyle nth derivative Displaystyle nth derivative.
\parder Partial derivative Partial derivative (2-12.21).
\tparder Textstyle partial derivative Textstyle partial derivative.
\dparder Displaystyle partial derivative Displaystyle partial derivative.
\nparder Nth partial derivative Nth partial derivative.
\tnparder Textstyle nth partial derivative Textstyle nth partial derivative.
\dnparder Displaystyle nth partial derivative Displaystyle nth partial derivative.
\du Total differential Total differential (2-12.22).
\indint Indefinite integral Indefinite integral (2-12.24).
\defint Definite integral Definite integral (2-12.25).

Exponential and Logarithmic Functions

(ISO 80000-2:2019, §13)

Macro Expansion Description
\lb Binary logarithm Binary logarithm (2-13.7).

Circular and Hyperbolic Functions

(ISO 80000-2:2019, §14)

Macro Expansion Description Notes
\uppi Pi constant Pi (2-14.1). Native LaTeX macro does not format the symbol as upright, which is required for mathematical constants.
\arccot Inverse cotangent Inverse cotangent (2-14.11).
\arcsec Inverse secant Inverse secant (2-14.12).
\arccsc Inverse cosecant Inverse cosecant (2-14.13).
\sech Hyperbolic secant Hyperbolic secant (2-14.18).
\csch Hyperbolic cosecant Hyperbolic cosecant (2-14.19).
\arsinh Inverse hyperbolic sine Inverse hyperbolic sine (2-14.20).
\arcosh Inverse hyperbolic cosine Inverse hyperbolic cosine (2-14.21).
\artanh Inverse hyperbolic tangent Inverse hyperbolic tangent (2-14.22).
\arcoth Inverse hyperbolic cotangent Inverse hyperbolic cotangent (2-14.23).
\arsech Inverse hyperbolic secant Inverse hyperbolic secant (2-14.24).
\arcsch Inverse hyperbolic cosecant Inverse hyperbolic cosecant (2-14.25).

Complex Numbers

(ISO 80000-2:2019, §15)

Macro Expansion Description
\iu Imaginary unit Imaginary unit (2-15.1).
\Rep Real part Real part of a complex number (2-15.2).
\Imp Imaginary part Imaginary part of a complex number (2-15.3).

Matrices

(ISO 80000-2:2019, §16)

Macro Expansion Description
\bmat Bold matrix Matrix notation in bold (2-16.1).
\transpose Transpose matrix Transpose of a matrix (2-16.7).
\hermitian Hermitian conjugate matrix Hermitian conjugate of a matrix (2-16.9).
\rank Rank Rank of a matrix (2-16.11).
\tr Trace Trace of a matrix (2-16.12).
\norm Norm Norm of a matrix or vector (2-16.13).

Scalars, Vectors, and Tensors

(ISO 80000-2:2019, §18)

Macro Expansion Description
\bvec Bold vector Vector notation in bold (2-18.1).
\grad Gradient Gradient of a function (2-18.14).
\div Divergence Divergence of a vector field (2-18.15).
\rot Rotation Rotation of a vector field (2-18.16).

Special Functions

(ISO 80000-2:2019, §20)

Macro Expansion Description
\erf Error function Error function (2-20.9).
\erfc Complementary error function Complementary error function (2-20.9).

Additional Math

Macro Expansion Description
\uveci i unit vector i unit vector: dotless, with hat, upright boldface
\uvecj j unit vector j unit vector: dotless, with hat, upright boldface
\uvec Unit vector Unit vectors with hat in upright boldface.
\proy Projection Projection of a vector.
\adj Adjugate matrix Adjugate of a matrix.
\im Image Image of a linear transformation.
\lcm Least common multiple Least common multiple of two numbers.

Custom Environments

Environment Description
apmatrix Augmented parenthesis matrix.
abmatrix Augmented bracket matrix.