Labels and tags\ref

\refCommand

Used for cross-references to previously labeled equations or other numbered objects in mathematical expressions.

\ref{eq1}
Available in
base, textmacros
Kind
prefix
Allowed mode
math, text
Frequency
<0.01% of corpus formulasrank 215 of 263
Commonality
high
Renderer support
PackageMathJaxKaTeXXeTeX
baseMathJax: FullKaTeX: NoneXeTeX: Full
textmacrosMathJax: FullKaTeX: NoneXeTeX: Full
About the test scope

Syntax#

\refm:N{\cs}control sequence

Argspec m:N — one mandatory argument. Same argspec in base and textmacros. Reading argspecs

Examples#

base

\ref x

textmacros

\text{\ref{eq1}}

Package variants#

PackageSignatureAllowed modeNotes
basem:NmathUsed for cross-references to previously labeled equations or other numbered objects in mathematical expressions.
textmacrosm:NtextUsed in prose to insert the number or tag of a labeled equation, theorem, section, or similar object by label name.

In TeXForm#

TeXForm parses this entry as prefix syntax; the package determines its argument specification.

See also#

Test cases#

base
InputCaseMathJaxKaTeXXeTeX
\ref{a}Positive · baselinePassFailPass
\ref aPositive · bare[0]PassFailPass
\ref{\alpha}Negative · neg:N[0]PassFailFail
textmacros
InputCaseMathJaxKaTeXXeTeX
\ref{a}Positive · baselinePassFailPass
\ref aPositive · bare[0]PassFailPass
\ref{\alpha}Negative · neg:N[0]PassFailFail
All 6 in Labels and tags