I like the looks of the Optima font for my figure notations, which often include mathematical notations. I also prefer pdflatex. So I have found the Epigrafica font to be a nice Optima clone, which runs in pdflatex. However, the native epigrafica
package switches to pxfonts
for its math support.
Since I prefer the native epigrafica
italic for my figure's math notations, I chose to combine the package with mathastext
, with the [italic]
option chosen. Everything works great except for one thing: the minus sign -
in math appears as a non-italic left brace {
. Other operators seem to translate just fine, such as +
, =
, >
, <
, etc. Only the -
seems affected.
I have a workaround, in which I use \mathchardef
to define a symbol \minus
that gives me the desired glyph. However, it would be so much simpler if I could redefine things in a way such that a -
in math mode produces the proper glyph directly.
In practice, I use a setup like this with the standalone
document class and tikz
to create my graphics images, and then I simply use \includegraphics
to insert them into a report that uses a different text font altogether. Here, the MWE dispenses with most of that.
\documentclass{article}
\usepackage[greek,english]{babel}
\usepackage[iso-8859-7]{inputenc}
\usepackage{epigrafica}
\usepackage[italic]{mathastext}
\mathchardef\minus="2200
\begin{document}
Epigrafica
-a-b
$-a-b$
$\minus a\minus b$
\end{document}
I realize that one approach would be to make -
"math"-active, fixing the issue in the MWE with the following preamble addition:
{\catcode`-=\active \gdef-{\minus}}
\AtBeginDocument{\mathcode`-="8000 }
However, unless I am mistaken, there could not be a worse character to apply that sort of "fix" to, as an active hyphen would break all kinds of dimensional and integer arithmetic. So I don't really consider an active hyphen as a viable solution, unless you convince me that this has no negative side effects.
\usepackage[italic,nominus]{mathastext}
"8000
approach is not a true "active". So the question remains...will this"8000
fix have any adverse side effects? Is there a more official way to resolve this?\mathcode
.