9

I want to write math equations more "beautiful". My equations are shown as follows:

equation

The vector looks ugly and disproportionate. And I like that they look it this way:

equation

The vector looks good, in place and the letters clear and well defined.

3
  • 2
    Use esvect package or bold faced characters. Commented Oct 19, 2013 at 16:37
  • 7
    Conversely I find the latter very ugly and Word-like. So professional doesn't mean usual
    – percusse
    Commented Oct 19, 2013 at 16:53
  • 2
    Why does the r in the latter have an arrow to represent it's a vector when it is already in boldface? It's quite confusing. The professional way of doing it is writing \vec{r}, which usually wouldn't let you something like \vec{\mathbf r}.
    – Manuel
    Commented Oct 19, 2013 at 17:37

3 Answers 3

10

A first note: The equations shown below represent an identical copy of the second expression shown by the OP. Since they are not correct, according to the accepted vector notation, I apologize in advance.

From the first equation it can be easily recognized that the \usepackage{palatino} and \usepackage{mathpazo}has been used, because of the typical italic setting, so with a basic MWE the bold faced variant could be defined as you like:

\documentclass{article}
%
\usepackage{amsmath}
\usepackage{palatino}
\usepackage{mathpazo}
%
\begin{document}
\[
\mathrm{d}\mathbf{r}=%
\mathrm{d}x\hat{\mathbf{i}}+%
\mathrm{d}y\hat{\mathbf{j}}+%
\mathrm{d}z\hat{\mathbf{k}}
\]
\end{document}

Here is the (I hope it's beautiful enough) example output:

enter image description here


EDIT:

This workaround has been done by substituting mathpazo with newtxmath:

\documentclass{article}
%
\usepackage{amsmath}
\usepackage{palatino}
\usepackage{newtxmath}
%
\begin{document}
\[
\mathrm{d}\mathbf{r}=%
\mathrm{d}x\hat{\mathbf{i}}+%
\mathrm{d}y\hat{\mathbf{j}}+%
\mathrm{d}z\hat{\mathbf{k}}
\]
\end{document}

enter image description here

As you can see the plus and equal sign are smaller by default. To change directly these operators inside the old font would require some kind of sorcery that at the end won't match a default setting.

11
  • 1
    These days, mathpazo is only one of several LaTeX packages that provides Palatino-based text and math fonts. There's also pxfonts, newpx[text,math], and the TeX-Gyre tgpagella family, to name but three alternatives to mathpazo...
    – Mico
    Commented Oct 19, 2013 at 16:55
  • Looks great! It's possible to change size of the plus sign?
    – Kiyoshi
    Commented Oct 19, 2013 at 16:56
  • @Kiyoshi you could do this by changing the basic font to mathpazo to newtxmath, in such a way it'll be more roman-like.
    – TheVal
    Commented Oct 19, 2013 at 16:58
  • 1
    @AndreaL. - A quick note: newtx[math,text] loads a Times Roman-type font family. To get a Palatino font (which is what the OP may want), be sure to specify \newpx[math,text].
    – Mico
    Commented Oct 19, 2013 at 17:05
  • 2
    @Kiyoshi - I suppose you could specify \usepackage{newpxtext,newtxmath} to get your wish. However, the x-heights of the two font families aren't exactly the same, so the result may not be all that great.
    – Mico
    Commented Oct 19, 2013 at 17:06
24

You don't mention how the ugly-looking "r with arrow above" was created, but it looks like it was done with \overset{r}{\to}. If one uses \vec instead, one gets more normal looking arrows.

I would also recommend using "dotless" i and j unit vectors.

enter image description here

\documentclass{article}
\usepackage{newpxmath}
\begin{document}
$ d\vec{r} = dx\hat{\imath} + dy\hat{\jmath} + dz\hat{k} $
\end{document}
2
  • Even further, I would recommend dotless bold i and j.
    – Ingo
    Commented Oct 22, 2013 at 7:34
  • @Ingo - I didn't go quite that far, i.e., I didn't explicitly recommend using bold dotless i's and j's, because I couldn't tell what the OP's method is for using boldface for the vectors (including \imath, \jmath, and k, with or without a \hat symbol).
    – Mico
    Commented Oct 22, 2013 at 8:57
5
\documentclass[preview,border=12pt]{standalone}
\usepackage{amsmath}
\usepackage[d]{esvect}

\newcommand\dd{\textrm{d}}

\newcommand\xhat{\,\hat{x}}
\newcommand\yhat{\,\hat{y}}
\newcommand\zhat{\,\hat{z}}

\newcommand\ihat{\,\hat{\imath}}
\newcommand\jhat{\,\hat{\jmath}}
\newcommand\khat{\,\hat{k}}

\newcommand\xu{\,\boldsymbol{x}}
\newcommand\yu{\,\boldsymbol{y}}
\newcommand\zu{\,\boldsymbol{z}}

\newcommand\iu{\,\boldsymbol{i}}
\newcommand\ju{\,\boldsymbol{j}}
\newcommand\ku{\,\boldsymbol{k}}

\begin{document}
\abovedisplayskip=0pt\relax
\begin{align}
\dd\vv{r} &=\dd x\xhat+\dd y\yhat+\dd z\zhat\\
\dd\vv{r} &=\dd x\ihat+\dd y\jhat+\dd z\khat\\
\dd\boldsymbol{r} &=\dd x\xu+\dd y\yu+\dd z\zu\\
\dd\boldsymbol{r} &=\dd x\iu+\dd y\ju+\dd z\ku
\end{align}
\end{document}

enter image description here

1
  • OH my ghost, they look very professional, don't they? Commented Oct 20, 2013 at 6:31

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .