2

I am trying to write the following equation:

enter image description here

But when I write this in the equation:

\documentclass[applsci,article,submit,moreauthors,pdftex,10pt,a4paper]{Definitions/mdpi} 
\begin{document}
\begin{equation} \label{eq:1}
\nabla \cdot \mathbf{\sigma+f^{b}}=0
\end{equation}
\end{document}

It gives me this:

enter image description here

This is not working for a specific class of file, a journal prescribed. I have used this similar expression elsewhere and it has worked.

7
  • 1
    What happens if you load the bm package and use \bm instead of \marhbf? – Mico Sep 25 '18 at 16:05
  • 1
    i can't reproduce your result. it works fine ... please extend your code snippet to complete small document beginning with \documentclass .... and ending with \end{document} which reproduce your result. – Zarko Sep 25 '18 at 16:08
  • @Mico: This is a document class supplied by a journal, I am not sure I can add packages to this. However, your suggestion works. Will it be possible to do this without adding other packages? – Schneider Sep 25 '18 at 16:15
  • 2
    BTW, this isn't a problem with \cdot, but with the font displaying \sigma (and $f$ and $b$ are also roman type, not math type). – Teepeemm Sep 25 '18 at 16:43
  • 1
    @Sauradeep - Both the amsmath and the bm packages are standard packages. I've never heard of a document class not allowing the loading of these packages. – Mico Sep 26 '18 at 9:21
6

I have two suggestions:

  • Load the amsmath package and rewrite the equation as

    \nabla \cdot \boldsymbol{\sigma} + \mathbf{f}^{\mathbf{b}}=0
    
  • Load the bm ("bold math") package and rewrite the equation as

    \nabla \cdot \bm{\sigma} + \bm{f^b}=0
    

The former method will generate upright-bold letters "f" and "b"; the second will generate italic-bold letters "f" and "b". Your choice.

enter image description here

Note that the + symbol should (almost certainly) not be rendered in bold. For sure, \mathbf{\sigma} is not good; write either \boldsymbol{\sigma} or \bm{\sigma}.

\documentclass[applsci,article,submit,moreauthors,
               pdftex,10pt,a4paper]{mdpi} % see https://www.mdpi.com/authors/latex
\usepackage{amsmath} % for "\boldsymbol" macro
\usepackage{bm}      % for "\bm" macro

\makeatletter  % just to make the code minimally compilable
\let\@Title\relax
\let\@Author\relax
\let\@address\relax
\makeatother

\begin{document}

\begin{equation} \label{eq:boldsymb}
\nabla \cdot \boldsymbol{\sigma} + \mathbf{f}^{\mathbf{b}}=0
\end{equation}

\begin{equation} \label{eq:bm}
\nabla \cdot \bm{\sigma} + \bm{f^b}=0
\end{equation}

\end{document}
5

Use \bm, not \mathbf:

\documentclass[
  applsci,
  article,
  submit,
  moreauthors,
  10pt,
  a4paper,
]{Definitions/mdpi}

\usepackage{amsmath}
\usepackage{bm}

\Title{Title}
\Author{Author}
\address{x}

\begin{document}

\begin{equation} \label{eq:1}
\nabla \cdot \bm{\sigma}+\bm{f}^{\bm{b}}=0
\end{equation}

\end{document}

enter image description here

4
  • May I ask why you didn't write \boldsymbol? I always use it... Should I leave and start using \bm? – manooooh Sep 25 '18 at 17:24
  • 1
    @manooooh If you load bm after amsmath, \bm and \boldsymbol are synonyms; if you don't load bm you get less good results. – egreg Sep 25 '18 at 17:29
  • I'm not sure if I'm understanding you. By "synonyms" do you mean that I can use both of them no matter the context? Then, you say "if you don't load \bm you get less good results": why only loading a package " is good"? Shouldn't I use \bm command? Because here's a topic where compares \bm vs. \boldsymbol, and the first one won. – manooooh Sep 25 '18 at 17:34
  • 1
    @manooooh \boldsymbol gives less good result in several cases, compared to \bm (which needs \usepackage{bm} after amsmath). Since the bm package does \let\boldsymbol\bm, you can use the two commands interchangeably (but \bm is admittedly shorter). The difference of course can only be seen if you don't load bm (and don't use \bm). – egreg Sep 25 '18 at 17:36

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.