1

I'm using classico as my everyday font, together with \usepackage[EULERGREEK]{sansmath}\sansmath when there are formulas. My problem is: I don't like the shape of the "equals" sign of classico. I find it much too narrow, e.g. in a \Longrightarrow, but also quite everywhere else. (MWE on pastebin)

simple text rendered in "Classico" font

After quite some reasearch on tex.sx (e.g. Importing a single symbol from a different font, etc) I was able to convince math mode to keep the equals sign from computer modern.

\DeclareSymbolFont{mysymbols}{T1}{cmr}{m}{n}
\DeclareMathSymbol{=}{\mathrel}{mysymbols}{`=}

I don't know if this is the right way to do it but it looks good enough to me

same text but with math-equals taken from "Computer modern" font

I'd like to change the font for the equals sign in text mode as well. Is this possible ?

I tried playing with even more things I don't understand (like catcodes, cf MWE) but could get nothing out of it.

\documentclass{article}

\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}

\usepackage[sfdefault]{classico}
\usepackage[EULERGREEK]{sansmath}\sansmath

\DeclareSymbolFont{mysymbols}{T1}{cmr}{m}{n}
\DeclareMathSymbol{=}{\mathrel}{mysymbols}{`=}

% \catcode`==13 \def ={\ensuremath{=}}

\begin{document}


\begin{center}
text: 1 2 3 = 4 5 6
\end{center}

\begin{center}
math:  $ 1 2 3 = 4 5 6$
\end{center}

\begin{center}
 arrow: $\Longrightarrow$
\end{center}

\end{document}
1
  • 2
    Please post your MWE code here instead of linking to one.
    – Sverre
    Commented Oct 6, 2014 at 10:29

1 Answer 1

2

Here is a fontspec way to get the equals sign in a separate font in text mode, if you compile with LuaLaTeX or XeLaTeX.

\documentclass{article}

\usepackage{lmodern}
\renewcommand*\familydefault{\sfdefault}              % Use sans as base font

\usepackage{fontspec}
\newfontfamily{\mymathfont}{Latin Modern Math}        % Family for math symbols
\newcommand{\mymath}[1]{\bgroup\mymathfont #1\egroup} % Command to apply family
\newcommand{\EQ}{\mymath{=}}                          % Specific command for equals sign

\begin{document}
text: 1 2 3 \EQ\ 4 5 6
\end{document}
2
  • 1
    Thanks for your suggestion. However, I'm looking for a solution which lets me type the regular equals sign.
    – Gyom
    Commented Oct 8, 2014 at 14:36
  • Plus, if I decide to got for a \newcommand, then \ensuremath{=} will probably do the trick even in pdflatex.
    – Gyom
    Commented Oct 8, 2014 at 14:38

You must log in to answer this question.

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