Load a single symbol from a LaTeX package

latex, package, symbols

Solution

Here's how I solved this:

Download the perl script "makefakeMnSymbol" from the comprehensive latex symbol document source: http://mirror.ctan.org/info/symbols/comprehensive/source/makefakeMnSymbol

Next, at command line do `chmod +x makefakeMnSymbol` to make it executable. Then, run

./makefakeMnSymbol `kpsewhich MnSymbol.sty` > fakeMnSymbol.sty

Put fakeMnSymbol.sty in a texmf directory of choice (global or local), and run `texhash`

If you now put

\usepackage{fakeMnSymbol}

in your preamble, you can now use any MnSymbol, like `\powerset` by prefixing it like `\MNSpowerset`

Big thanks to Scott Pakin for this hack... and for his comprehensive symbol guide...

This hack has problems with symbols in subscripts/superscripts. A work-around is to use look at the `fakeMnSymbol.sty` source to find which font the symbol you want was loaded from, along with its number. Here's an example from one of my preambles where I override the built-in `\boxminus` with an MnSymbol:

\usepackage[]{fakeMnSymbol}
\DeclareSymbolFont{mnsymbolc}{U}{MnSymbolC}{m}{n}
\let\boxminus=\undefined
\DeclareMathSymbol{\boxminus}{2}{mnsymbolc}{112}

Problem

When using the MnSymbol package, pdflatex gives two font warnings: ``` LaTeX Font Warning: Encoding 'OMS' has changed to 'U' for symbol font (Font) 'symbols' in the math version 'normal' on input line 120. LaTeX Font Info: Overwriting symbol font 'symbols' in version 'normal' (Font) OMS/cmsy/m/n --> U/MnSymbolF/m/n on input line 120. ``` It turns out that this is probably due to a clash with the AMSSymb package. Since I need just a few symbols from the package: is there a way to load one symbol from a package, in stead of all?

Original source