代码
\documentclass{article}
\usepackage[T1]{fontenc}
\usepackage{amsmath, amsthm, amssymb}
\begin{document}
$\ker(A)$ works!
$\ran(A)$ does not work.
\end{document}
如何在数学模式中获得 Ran(A)?
答案1
包中amsmath
没有定义所有类型的运算符,因此\ran
需要定义:
\documentclass{article}
\usepackage[T1]{fontenc}
\usepackage{amsmath, amsthm, amssymb}
\DeclareMathOperator{\ker}{Ker}
\DeclareMathOperator{\ran}{Ran}
\begin{document}
$\ker(A)$ works!
$\ran(A)$ works after it is defined.
\end{document}
也\ker
可以改变:
\documentclass{article}
\usepackage[T1]{fontenc}
\usepackage{amsmath, amsthm, amssymb}
\let\ker\relax % "undefine \ker"
\DeclareMathOperator{\ker}{Ker}
\DeclareMathOperator{\ran}{Ran}
\begin{document}
$\ker(A)$ redefined!
$\ran(A)$ works after it is defined.
\end{document}