# How to redefine \d within classicthesis?

For some unknown reason the following produces an error in classicthesis:

% at the beginning of classicthesis-config.tex
\renewcommand{\d}{\mathbf{d}}

\begin{document}
$\d$
\end{document}


The error says \d is invalid in math mode and \$ is missing. It doesn't occur with a simple test case, for sure it's related to the template settings.

• are you using hyperref? i think hyperref redefines \d, so all bets would be off. – barbara beeton May 7 '13 at 22:30
• Hopefully, this question helps. In particular, the point is that \d is already defined in the latex kernel. And, in this case, to make things complicated, as @barbara points out, hyperref redefines \d to be \PD1-cmd \d \PD1\d from \OT1-cmd \d \OT1\d. In particular, however, note that, just this example (together with \documentclass{...}) will compile. :-) – kan May 7 '13 at 22:33
• I'd simply use a different name: \newcommand{\bd}{\mathbf{d}} – egreg May 8 '13 at 8:28

\AtBeginDocument{\renewcommand{\d}{\mathbf{d}}}