7

Compiling

\documentclass{article}

\usepackage{cool}
\usepackage{eulervm}

\begin{document}

$\D{a}{T}$
$\pderiv{a}{T}$

$\mathbold{T}$

$\D{a}{\mathbold{T}}$
$\pderiv{a}{\mathbold{T}}$

\end{document}

works until the derivatives are evaluated for bold euler letters. It fails with

! Missing control sequence inserted.
<inserted text> 
              \inaccessible 
l.13     $\D{a}{\mathbold{T}}
                         $

Perhaps this is related to Basic use of derivative with cool package fails with “Missing \endcsname inserted” but the fix proposed there does not work.

jmartinez
  • 773

1 Answers1

6

The error message is usually a sign of a fragile command in a moving argument, so a guess of making something robust seems to work:

\documentclass{article}

\usepackage{cool}
\usepackage{eulervm}

\let\oldmb\mathbold
\protected\def\mathbold{\oldmb}
\begin{document}

$\D{a}{T}$
$\pderiv{a}{T}$

$\mathbold{T}$

$\D{a}{\mathbold{T}}$
$\pderiv{a}{\mathbold{T}}$

\end{document}

This method also fixes Undefined control sequence and TeX capacity exceeded, sorry [parameter stack size=10000] errors that occur when using cool commands such as \D or \pderiv with denominator arguments containing math accents like \tilde and \dot.

Procyon
  • 129
David Carlisle
  • 757,742
  • Greate, thanks, I didn't knew about the existence of fragile commands, but protecting them seems to work! :) – jmartinez Feb 12 '13 at 22:56