4

I'm using Minion Pro for my thesis but I would like to use some Computer Modern symbols in math mode for some symbols. I don't particularly like the \partial or \int or \in or \sum symbols, as in here:

MinionPro

and would prefer to use Computer Modern. Is there some global option or package to use CM fonts in math mode for specific symbols like the ones above? I want to keep the other letters and numbers in Minion Pro. I know this has been done before but after much searching I haven't been able to find a way to do this. I'm using pdflatex on TexStudio.

Thanks in advance!

2
  • For int, the package uses the symbol from \Mnsymbol. You have the option minionint option, which produces the much neater symbol from Minion Pro. For the rest, are you sure it will mix well, especially letter-like symbols like partial?
    – Bernard
    Oct 11, 2015 at 9:38
  • I guess I'm giving myself more options - I definitely wanted the CM integral for a start - I think that fits pretty well.
    – user89635
    Oct 11, 2015 at 13:05

1 Answer 1

5

It's not at all difficult. According to fontmath.ltx we have

\DeclareMathSymbol{\sum}{\mathop}{largesymbols}{"50}
\DeclareMathSymbol{\intop}{\mathop}{largesymbols}{"52}
\DeclareMathSymbol{\in}{\mathrel}{symbols}{"32}
\DeclareMathSymbol{\partial}{\mathord}{letters}{"40}

First we need to have available the necessary math symbol fonts and we find

\DeclareSymbolFont{letters}     {OML}{cmm} {m}{it}
\DeclareSymbolFont{symbols}     {OMS}{cmsy}{m}{n}
\DeclareSymbolFont{largesymbols}{OMX}{cmex}{m}{n}

We can't call them the same, because the symbolic names are preempted by the font package you're using for Minion. So you can add

\makeatletter
\AtBeginDocument{%
  \DeclareSymbolFont{CMletters}     {OML}{cmm} {m}{it}%
  \DeclareSymbolFont{CMsymbols}     {OMS}{cmsy}{m}{n}%
  \DeclareSymbolFont{CMlargesymbols}{OMX}{cmex}{m}{n}%
  %
  \let\sum\relax\let\intop\relax\let\in\relax\let\partial\relax
  \DeclareMathSymbol{\sum}{\mathop}{CMlargesymbols}{"50}%
  \DeclareMathSymbol{\intop}{\mathop}{CMlargesymbols}{"52}%
  \DeclareMathSymbol{\in}{\mathrel}{CMsymbols}{"32}%
  \DeclareMathSymbol{\partial}{\mathord}{CMletters}{"40}%
  \DeclareMathSymbol{\CMslash}{\mathord}{CMletters}{"3D}%
  \DeclareRobustCommand\notin{\mathrel{\m@th\mathpalette\c@ncel\in}}%
  \renewcommand\c@ncel[2]{%
    \m@th\ooalign{$\hfil#1\mkern1mu\CMslash\hfil$\crcr$#1#2$}%
  }%
}
\makeatother

Note that changing \in would make \notin to become wrong, so I added also the necessary corrections.

Here's a test, where I used kpfonts instead of Minion that I don't have. The differences are still well noticeable.

\documentclass{article}
\usepackage{kpfonts}

\makeatletter
\AtBeginDocument{%
  \DeclareSymbolFont{CMletters}     {OML}{cmm} {m}{it}%
  \DeclareSymbolFont{CMsymbols}     {OMS}{cmsy}{m}{n}%
  \DeclareSymbolFont{CMlargesymbols}{OMX}{cmex}{m}{n}%
  %
  \let\sum\relax\let\intop\relax\let\in\relax\let\partial\relax
  \DeclareMathSymbol{\sum}{\mathop}{CMlargesymbols}{"50}%
  \DeclareMathSymbol{\intop}{\mathop}{CMlargesymbols}{"52}%
  \DeclareMathSymbol{\in}{\mathrel}{CMsymbols}{"32}%
  \DeclareMathSymbol{\partial}{\mathord}{CMletters}{"40}%
  \DeclareMathSymbol{\CMslash}{\mathord}{CMletters}{"3D}%
  \DeclareRobustCommand\notin{\mathrel{\m@th\mathpalette\c@ncel\in}}%
  \renewcommand\c@ncel[2]{%
    \m@th\ooalign{$\hfil#1\mkern1mu\CMslash\hfil$\crcr$#1#2$}%
  }%
}
\makeatother

\begin{document}
\[
\sum_{i=1}^n\int_0^1 \frac{\partial f}{\partial y}(x)\,dx\in X \notin \mathcal{Y}
\]
\end{document}

Output with the redefinitions

enter image description here

Output without the redefinitions

enter image description here

2
  • Thanks so much for that! Really useful. Do you reckon there's any way to get a 'global' change on this? Or is it only really possible with individual characters (I might want to change the inequality signs as well, for example, as well as some other things)?
    – user89635
    Oct 11, 2015 at 11:04
  • @user89635 No global method, sorry.
    – egreg
    Oct 11, 2015 at 11:09

You must log in to answer this question.

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