I have this simple code,
\documentclass[12pt]{book}
\usepackage{mathtools}
\usepackage{newtxtext}
\usepackage[lite]{mtpro2}
\begin{document}
$d\bar{p}$ and $dt$.
\end{document}
with this output,
I think it's a canonical space is due to the presence of the \bar{...}
command? Sometimes to bring it back I insert a negative space \!
to bring the p
to the left near the d
.
This little adjustment must always be done or I should create a particular macro. Which one could be always using the same command \bar
? It gets a bit complicated for me in my book to change the original command \bar{...}
. Thank you.
Using Steven Segletes' suggestion of \ooalign{$d\bar{#1}$\cr$d#1$}
, one can see if the problem is universal across \bar
. If the superposition produces a "thick" second letter, the kerning is not correct. (using newtxmath
as Steven does not have mtpro2
)
Unfortunately, that proves not to be the case, as some cases seem kerned correctly and others not:
\documentclass[12pt]{book}
\usepackage{mathtools}
\usepackage{newtxtext}
\usepackage{newtxmath}%instead of \usepackage[lite]{mtpro2}
\newcommand\testkern[1]{%
\ooalign{$d\bar{#1}$\cr$d#1$}}
\textwidth 1in
\begin{document}
\noindent\testkern{a}
\testkern{b}
\testkern{c}
\testkern{d}
\testkern{e}
\testkern{f}
\testkern{g}
\testkern{h}
\testkern{i}
\testkern{j}
\testkern{k}
\testkern{l}
\testkern{m}
\testkern{n}
\testkern{o}
\testkern{p}
\testkern{q}
\testkern{r}
\testkern{s}
\testkern{t}
\testkern{u}
\testkern{v}
\testkern{w}
\testkern{x}
\testkern{y}
\testkern{z}
\end{document}
Applying a universal -1mu
kern to \bar
\newcommand\xbar{\mkern-1mu\bar}
\newcommand\testkern[1]{%
\ooalign{$d\xbar{#1}$\cr$d#1$}}
therefore, may fix some letter combinations, but will inevitably break others:
mtpro2
, the space does not manifest. However, it does show, when, instead ofmtpro2
, one usesnewtxmath
.\bar
in that font, you could always do\let\svbar\bar\renewcommand\bar{\mkern-1mu\svbar}
p
's are "thick", that means the kerning is different between the two cases. If the superimposed p's look like one, then the kerning is correct.