8

When using AMSmath and trying to put a \dot over a \vec of a bold symbol it works, but subsequent instances have a tilde instead of a vector over the bold symbol, and strangely my partial wrt become bold. If I don't use AMSmath, this works. I have tried many variants with extra brackets or interchanged orders, but nothing seems to fix this bug. Here is a tex snippet that reproduces the problem on the second row, the third row when preceding {\vec E} with \bf produces only tildes instead of vectors, but the \dot make the D not be bold.

Any ideas what I am missing?

\documentclass [12pt] {article}
\usepackage{amsmath,amssymb}

%\let\vec\relax
%\DeclareMathAccent{\vec}{\mathord}{letters}{"7E}
\newcommand{\pdt}[1]{\frac{\partial^{#1}}{\partial t^{#1}}}
\begin{document}

\LARGE
$
\vec E \cdot \dot{{\vec D}} =
\vec E \cdot \pdt{} (\epsilon \vec E )
$

$
\vec {\bf E} \cdot \dot {\vec {\bf D}} =
\vec {\bf E} \cdot \pdt{} (\epsilon \vec {\bf E} )
$

$
 {\bf {\vec E}} \cdot \dot{ {\bf {\vec D}}} =
 {\bf {\vec E}} \cdot \pdt{} (\epsilon  {\bf {\vec E}} )
$
\end{document}
3
  • 1
    \dot{{\vec {\mathbf D}}} did not work for you?
    – user11232
    Aug 31 '12 at 0:07
  • 2
    Please also have a look at Does it matter if I use \textit or \it, \bfseries or \bf etc.
    – percusse
    Aug 31 '12 at 8:27
  • 3
    the misrendering of \vec with \mathbf is a known bug, and it is on the list to be addressed when amsmath is next overhauled. sadly, that overhaul has not yet been definitively scheduled. Aug 31 '12 at 12:12
7

The following should work:

\documentclass [12pt] {article}
\usepackage{amsmath,amssymb}

%\let\vec\relax
%\DeclareMathAccent{\vec}{\mathord}{letters}{"7E}
\newcommand{\pdt}[1]{\frac{\partial^{#1}}{\partial t^{#1}}}
\begin{document}

\LARGE
$
\vec {E} \cdot \dot{{\vec {D}}} =
\vec {E} \cdot \pdt{} (\epsilon \vec {E} )
$

$
\vec {\mathbf {E}} \cdot \dot {\vec {\mathbf {D}}} =
\vec {\mathbf {E}} \cdot \pdt{} (\epsilon \vec {\mathbf {E}} )
$

$
 {\vec {\mathbf {E}}} \cdot \dot{{\vec {\mathbf {D}}}} =
 {\vec {\mathbf {E}}} \cdot \pdt{} (\epsilon  {\vec {\mathbf {E}}} )
$
\end{document}

enter image description here

PS: Since you are in math mode, it is better to use \mathbf instead of \bf.

3

As one can extrapolate from the comments and answers (I had to) the problem lies with the order of \vec and \mathbf. (Shouldn't use \bf in math mode.) Both examples are given below.

\documentclass[11pt]{article}
\usepackage{amsmath}

\begin{document}
This is the wrong order and gives a tilda:
 $\mathbf{\vec{x}}$\par
This is the right order and gives an arrow:
 $\vec{\mathbf{x}}$
\end{document}

Output

1
  • 3
    Shouldn't use \bf in text mode either – at least not when using LaTeX.
    – cgnieder
    Oct 23 '16 at 10:01

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.