如何在数学模式下获得 Ran(A)?

如何在数学模式下获得 Ran(A)?

代码

\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}

\ker 修改后的结果

相关内容