3

Because a professor who reads one of the lectures I attend this term writes so slowly, I typeset a lecture script for that lecture in TeX. For the use of some symbols and for better underbrace rendering I use MnSymbol. As those of you who are familiar with MnSymbol may know, it offers a different sum operator than the amsmath-package. It also offers a different integral operator, but I already fixed that by loading "esint" as last math font package, as I like those amsmath math operators better. Is there a way of easily "fixing" the sum operators to be the standard ones without having to stop using MnSymbol? Any help would be appreciated.

5
  • If you have a small set of symbols from MnSymbols to use, it is relatively easy to do. Is that the case?
    – Bernard
    Dec 14, 2014 at 23:37
  • Yes thats the case, its mainly (big)cup dot and the braces from MnSymbol. What does the trick then in this case? Thank you in advance :)
    – Friedrich
    Dec 15, 2014 at 12:45
  • this question may help if you want to use just a few symbols from "another" font: Importing a Single Symbol From a Different Font Dec 15, 2014 at 13:49
  • Ok, so I'll have to find out how the syntax is for importing the sum operator from amsmath. I'll try this by myself, if I don't succeed I'd be glad if one of you could help me.
    – Friedrich
    Dec 15, 2014 at 14:38
  • I did not find sny table whatsoever which showed me the name of the \sum operator in amsmath, I do not know how to achieve this by myself. Please help me.
    – Friedrich
    Dec 16, 2014 at 7:55

1 Answer 1

3

See FOLLOW UP below for importing CM symbols into MnSymbol. But first...

Import MnSymbols:

If you only use a few MnSymbols, it is easiest to import just those, rather than loading MnSymbol package. Here is how it is done (I used, for MnSymbol specific reference, Dashed left arrow over symbol, though other questions on this site about importing symbols are also useful).

It helps to look through the MnSymbol package document (or better still, mnsymbol.sty) to find from which font family the symbol derives, and then it helps to use \fonttable (package fonttable) to display the font family in a table, from which you can determine the slot number corresponding to the desired glyph.

First, to determine font families, I look through mnsymbol.sty for the glyph name, and use it to determine the font family:

enter image description here

enter image description here

From the above pictures, I see that the \bigcupdot glyphs (\displaystyle and\textstyle) are \mathops and come from the symbols font. The name symbols is associated with MnSymbolF font family. These are needed in my MWE. The \cupdot glyph comes from a different font family (MnSymbolC).

In the MWE below, I show the importation of 3 glyphs from two different font families: \cupdot, \tbigcupdot (textstyle \bigcupdot) and \dbigcupdot (displaystyle \bigcupdot). I then use \mathchoice, to tell LaTeX to use the proper bigcupdot style in the appropriate math style.

If you uncomment my commented lines concerning fonttable, you can see the font tables from which I determined the glyph's slot numbers.

\documentclass{article}
% =============================================
%Import symbols from font MnSymbol without importing the whole package
% =============================================
\DeclareFontFamily{U} {MnSymbolC}{}

\DeclareFontShape{U}{MnSymbolC}{m}{n}{
  <-6> MnSymbolC5
  <6-7> MnSymbolC6
  <7-8> MnSymbolC7
  <8-9> MnSymbolC8
  <9-10> MnSymbolC9
  <10-12> MnSymbolC10
  <12-> MnSymbolC12}{}
\DeclareFontShape{U}{MnSymbolC}{b}{n}{
  <-6> MnSymbolC-Bold5
  <6-7> MnSymbolC-Bold6
  <7-8> MnSymbolC-Bold7
  <8-9> MnSymbolC-Bold8
  <9-10> MnSymbolC-Bold9
  <10-12> MnSymbolC-Bold10
  <12-> MnSymbolC-Bold12}{}

\DeclareSymbolFont{MnSyC} {U} {MnSymbolC}{m}{n}

\DeclareMathSymbol{\cupdot}{\mathbin}{MnSyC}{60}
% =============================================
\DeclareFontFamily{U} {MnSymbolF}{}

\DeclareFontShape{U}{MnSymbolF}{m}{n}{
  <-6> MnSymbolF5
  <6-7> MnSymbolF6
  <7-8> MnSymbolF7
  <8-9> MnSymbolF8
  <9-10> MnSymbolF9
  <10-12> MnSymbolF10
  <12-> MnSymbolF12}{}
\DeclareFontShape{U}{MnSymbolF}{b}{n}{
  <-6> MnSymbolF-Bold5
  <6-7> MnSymbolF-Bold6
  <7-8> MnSymbolF-Bold7
  <8-9> MnSymbolF-Bold8
  <9-10> MnSymbolF-Bold9
  <10-12> MnSymbolF-Bold10
  <12-> MnSymbolF-Bold12}{}

\DeclareSymbolFont{SymbolF} {U} {MnSymbolF}{m}{n}

\DeclareMathSymbol{\dbigcupdot}{\mathop}{SymbolF}{35}
\DeclareMathSymbol{\tbigcupdot}{\mathop}{SymbolF}{34}
\def\bigcupdot{\mathchoice{\dbigcupdot}{\tbigcupdot}{\tbigcupdot}{\tbigcupdot}}
% =============================================
%\usepackage{fonttable}
\begin{document}
\centering
$ x \cupdot y$\par
$ x \bigcupdot y \quad \scriptstyle x \bigcupdot y
 \quad \scriptscriptstyle x \bigcupdot y$
\[ x \bigcupdot y\]
%\clearpage\fonttable{MnSymbolF8}
%\clearpage\fonttable{MnSymbolC10}
\end{document}

enter image description here


FOLLOW UP:

The OP asked if MnSymbol can be the default, with (for example), \sum being imported from default LaTeX. As barbara points out in the comment, the default \sum comes from the cmex font set. Here, I import it as \Xsum (I am not sure if my \DeclareFontShape invocation is appropriate for cm fonts, but I mimicked what had been done for MnSymbol):

\documentclass{article}
\usepackage{mnsymbol}
% =============================================
%Import symbols from font cmex without importing the whole package
% =============================================
\DeclareFontFamily{U} {cmex}{}

\DeclareFontShape{U}{cmex}{m}{n}{
  <-6> cmex5
  <6-7> cmex6
  <7-8> cmex7
  <8-9> cmex8
  <9-10> cmex9
  <10-12> cmex10
  <12-> cmex12}{}

\DeclareSymbolFont{Xcmex} {U} {cmex}{m}{n}

\DeclareMathSymbol{\Xdsum}{\mathop}{Xcmex}{88}
\DeclareMathSymbol{\Xtsum}{\mathop}{Xcmex}{80}
\DeclareMathOperator*{\Xsum}{\mathchoice{\Xdsum}{\Xtsum}{\Xtsum}{\Xtsum}}
% =============================================
\usepackage{fonttable}
\begin{document}
\centering
sum under MnSymbol:\par
$\sum_{i=1}^2 x_i $
\[\sum_{i=1}^2 x_i \]
Defined Xsum from cmex:\par
$\Xsum_{i=1}^2 x_i $
\[\Xsum_{i=1}^2 x_i \]
\tiny\fonttable{cmex8}
\end{document}

enter image description here

6
  • Hi, the disjunct union symbol is not quite the deal, its the bracket rendering, still its a very kind answer; I'll just try this with the sum operator out of the ams math package.
    – Friedrich
    Dec 24, 2014 at 17:03
  • @Friedrich I wasn't sure what you had in mind when you mentioned "brackets" (the \{\} brace glyphs actually looked very similar to computer modern defaults), so I did not try to do anything with that. But the framework is here for importing glyphs from MnSymbol. Dec 24, 2014 at 17:18
  • Could you help me with importing from amsmath anyways or does this method not work with this?
    – Friedrich
    Dec 25, 2014 at 19:15
  • @Friedrich In general, each font has a similar, though unique, method. But in this case, I believe the \sum operator you make mention of does not actually originate from the amsmath font set, as the loading (or not) of amsmath does not change the look of the \sum. Thus, I'm guessing you are actually seeking the \sum glyphs from the LaTeX-default Computer-Modern font set (which are discarded with the loading of MnSymbol). Is this the case? Dec 25, 2014 at 22:39
  • @Friedrich -- \sum is "basic tex". the definition for these symbols (in the font cmex) is found in the file fontmath.ltx. Dec 26, 2014 at 0:23

You must log in to answer this question.

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