When using \DeclareMathOperator
from the amsmath package and the mathpazo package (for fonts) the greek letters aren't printed correctly.
For example, with the following code
\documentclass{article}
\usepackage{mathpazo}
\usepackage{amsmath}
\DeclareMathOperator{\proj}{\pi}
\begin{document}
$\proj$
\end{document}
I should get a pi, but I don't get a pi at all, instead I get an esszet (a german letter that looks like a beta).
Does anyone understand why this happens?
Thanks in advance! Any help will be appreciated.
\DeclareMathOperator
is meant for stuff like sin, cos, Max, Min... The problem you are seeing here appears already for ` $\operatorname{\pi}$. Depending on what you want to get, I would just go for
\newcommand{\proj}{\pi}`.\newcommand{\proj}{\pi}
worked, thanks! The reason why I used\DeclareMathOperator
is because I was defined a series of operators with it (most of them like\DeclareMathOperator{\defrag}{defrag}
and some of them much more simple like\DeclareMathOperator{\proj}{\pi}
\DeclareMathOperator
is intended to be applied to alphabetic strings.\pi
doesn't count as alphabetic, but only as a math symbol, so i'm not surprised that the result is "unpredictable".