1

When using \bm, I can't use \dot and \hat on uppercases A-F (lowercases and the rest of the alphabet are fine), and it instead writes the Gamma character, along with an error message the the value input to \bm was to high.

\documentclass{article}
\usepackage{amsmath}
\usepackage{bm}

%this is just the layout of the "table"
\newcommand{\layer}[2]{&#1&&\dot #1&&\hat #1&&\widehat #1&&#2&&\dot #2&&\hat #2&&\widehat #2\\&\bm{#1}&&\bm{\dot #1}&&\bm{\hat #1}&&\bm{\widehat #1}&&\bm{#2}&&\bm{\dot #2}&&\bm{\hat #2}&&\bm{\widehat #2}\\}

\begin{document}

\begin{equation}
\begin{aligned}
\layer{a}{A}\\
\layer{b}{B}\\
\layer{c}{C}\\
\layer{d}{D}\\
\layer{e}{E}\\
\layer{f}{F}\\
\layer{g}{G}
\end{aligned}
\end{equation}

\end{document}

cropped screenshot of compiled pdf

And the console says

\layer{a}{A}
            \\
A mathchar number must be between 0 and 32767.
I changed this one to zero.

and similar for the other letters B-F.

New contributor
Ishan Singh is a new contributor to this site. Take care in asking for clarification, commenting, and answering. Check out our Code of Conduct.
6
  • \bm uses different fonts than normal. Not all of them are complete. See also Knuth's poor man's boldface. Commented 14 hours ago
  • @JohnKormylo bm does not specify any fonts not already specified in the ocument Commented 14 hours ago
  • Is there a different bold math command that has a complete latin alphabet with the accents? Commented 14 hours ago
  • It is not a problem with the fonts or bm it is an input error in the example document. Commented 14 hours ago
  • Ah, it doesn't install new fonts, it just uses the boldface versions already installed (if there). Commented 14 hours ago

1 Answer 1

4

A better/simpler example is

\documentclass{article}
\usepackage{amsmath}
\usepackage{bm}

\begin{document}

$\bm{\hat A}$


\end{document}

The problem is the invalid syntax \hat A it sometimes works but does not work here.

You need \hat{A}

This applies in general to LaTeX commands (you would get similar errors if you use utf-8 input as the unbraced form would only pick up the first byte of a multi-byte character).

Here A is changed to \mathchar<number for a bold A> and \dot{\mathchar<number for a bold A>} works and

\dot \mathchar<number for a bold A> is the same as

\dot{\mathchar}<number for a bold A> which gives the low level errors you show.

2
  • I feel stupid now. But also, why are the braces necessary? In unbold math (where I haven't seen this error before, but maybe it's there too) \hat a works fine, it recognises it as one displayed character. And why would this only apply to A-F? Commented 14 hours ago
  • 1
    @IshanSingh as I wrote in the answer latex command arguments should be braced, In some cases if the argument is a single token then the unbraced version more or less accidentally work, but bm changes the single token A to the multiple tokens \mathchar 1234 (where the number is the mathcode for a bold A) so the unbraced version stops working Commented 13 hours ago

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.