Is there a reason why I cant use \DeclareMathOperator{\H}{\mathbb H}?

\H is not defined normally, so why can I define this?

\DeclareMathOperator{\R}{\mathbb R} and others similar work just fine.

  • mathbb needs amsfonts. Also, it is strange to define \mathbb{R} as a math operator. Maybe you want simply a \newcommand{\R}{\mathbb{R}}. – Sigur Nov 19 '17 at 18:45
  • 1
    \H: macro:#1->{\accent "7D #1} is defined. – Sigur Nov 19 '17 at 18:46

The error message is fairly precise in this case:

\DeclareMathOperator{\H}{\mathbb H}
$\H a$

Compiling the document gives:

! LaTeX Error: Command \H already defined.
               Or name \end... illegal, see p.192 of the manual.

See the LaTeX manual or LaTeX Companion for explanation.
Type  H <return>  for immediate help.

l.3 \DeclareMathOperator{\H}{\mathbb H}

which is telling you that \H is already defined.

There are also other single letter commands (e.g., \A). In general, it is better to avoid defining your own single letter commands. Instead use \RR, \HH, etc.

Also, as @Sigur pointed out, it does not make sense to define \mathbb{R} or \mathbb{H} as a math operator. It is better to use

\newcommand\RR{\mathbb R}
\newcommand\HH{\mathbb H}


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.