I am using the Baskervald font with KP fonts for the maths font. It is very nice, but it needs some manual fine-tuning.
For example, the \star
command gives an (oversized) italic star, which should not happen. I figured I just redefine \star
as
\renewcommand{\star}{\scalebox{.5}{\bigstar}}
but this doesn't seem to work (\star
is used in display mode).
What is the correct command to resize a particular command in math mode?
Minimal example:
\documentclass{article}
\usepackage{amssymb,amsmath}
\usepackage{kpfonts,baskervald}
\begin{document}
\begin{align*}
f\star g=fg+\hbar\{f,g\}\\
f\bigstar g=fg+\hbar\{f,g\}
\end{align*}
\end{document}
\star
is slanted, but \bigstar
is not.
Best Answer
In this case, I use
\scalerel
to replace the definition of\star
with a\bigstar
that is scaled to the same vertical footprint as the italic\star
. I tried putting a\mathrel
around it, but the spacing to thef
seemed odd, so I took it out.The nice thing about this
scalerel
approach is that it will work in smaller math styles, as well, as shown below.as I said in my initial comment, loading just
baskervald
does not give an italic star. Rather, the problem originates in thekpfonts
package. I get the same erroneous behavior loading just thekpfonts
package. Alternately, if I try to loadbaskervald
first, I get an option clash, which I presume iskpfonts
complaining thatbaskervald
already took control of\star
and it wants it too.