I want to write math equations more "beautiful". My equations are shown as follows:
The vector looks ugly and disproportionate. And I like that they look it this way:
The vector looks good, in place and the letters clear and well defined.
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It only takes a minute to sign up.
Sign up to join this communityA 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:
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}
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.
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
...
mathpazo
to newtxmath
, in such a way it'll be more roman-like.
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]
.
\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.
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.
\documentclass{article}
\usepackage{newpxmath}
\begin{document}
$ d\vec{r} = dx\hat{\imath} + dy\hat{\jmath} + dz\hat{k} $
\end{document}
\imath
, \jmath
, and k
, with or without a \hat
symbol).
\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}
esvect
package or bold faced characters.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}
.