You can use a modified version of Importing a single symbol from a different font
\usepackage[T3,T1]{fontenc}
\makeatletter
\newcommand\ipamathsymbol[2][\mathord]{%
#1{\@ipamathsymbol{#2}}}
\def\@ipamathsymbol#1{\mathchoice
{\@ipam@thsymbol{#1}\tf@size}
{\@ipam@thsymbol{#1}\tf@size}
{\@ipam@thsymbol{#1}\sf@size}
{\@ipam@thsymbol{#1}\ssf@size}}
\def\@ipam@thsymbol#1#2{%
\mbox{\fontsize{#2}{#2}\usefont{T3}{cmr}{m}{sl}\symbol{#1}}}
\makeatother
\renewcommand{\gamma}{\ipamathsymbol{71}}
Loading the T3 encoding is necessary, since the tipa fonts are available only in that encoding. Change T1
in OT1
if the latter is your default encoding. I've left the entire infrastructure rather than defining a one shot command, so one can play with other symbols as well; \ipamathsymbol
has an optional argument (the math kind of the symbol, default \mathord
) and the mandatory argument is the slot number of the chosen glyph.
Similar questions
It is, my apologies, very difficult to get a symbol from MnSymbol
. In the old questions,
Discard symbols from package (MnSymbol
)
The standard \cup vs. the mathabx \cup (mathabx
)
Importing a Single Symbol From a Different Font (mathabx
)
some similar technique is used to get a symbol from a package — In fact we just redefine the symbol like the font package do.
About MnSymbol
However, in MnSymbol
we must define a more things than other packages, as Ulrike Fischer do in her answer. I'll provide another very similar example from another site:
Before reading the explanations below, you'd better have a look at fntguide
document.
Assuming you want \rightlsquigarrow
from MnSymbol
, you must check the source code MnSymbol.sty
, then we have
\Decl@Mn@Char\rightlsquigarrow {MnSyA}{\mathrel}
It's awful! We still do not know which the symbol is. In fact \Decl@Mn@Char
is just \DeclareMathSymbol
which increase the character number automatically. \rightlsquigarrow
is the 160th symbol, thus char code is 160. Or you can use fonttable
package to find the code of the glyph. That's to say, \rightlsquigarrow
is
\DeclareMathSymbol{\rightlsquigarrow}{\mathrel}{MnSyA}{160}
\mathrel
here means that the symbol is a math binary relation symbol. Other symbols may be \mathord
(odinary symbol), \mathop
(operator), \mathbin
(binary operation), \mathopen
(open delimiter), \mathclose
(close delimiter), etc. You can read fntguide
for more details of these commands.
But before that, you must define MnSyA
math family first. Then copy this from MnSymbol.sty
:
\DeclareSymbolFont{MnSyA} {U} {MnSymbolA}{m}{n}
For most math font packages, that's enough. But for MnSymbol
, the font family MnSymbolA
is also defined in MnSymbol.sty
, we must copy it to the documents.
\DeclareFontFamily{U} {MnSymbolA}{}
\DeclareFontShape{U}{MnSymbolA}{m}{n}{
<-6> MnSymbolA5
<6-7> MnSymbolA6
<7-8> MnSymbolA7
<8-9> MnSymbolA8
<9-10> MnSymbolA9
<10-12> MnSymbolA10
<12-> MnSymbolA12}{}
\DeclareFontShape{U}{MnSymbolA}{b}{n}{
<-6> MnSymbolA-Bold5
<6-7> MnSymbolA-Bold6
<7-8> MnSymbolA-Bold7
<8-9> MnSymbolA-Bold8
<9-10> MnSymbolA-Bold9
<10-12> MnSymbolA-Bold10
<12-> MnSymbolA-Bold12}{}
Now, if we don't know \rightlsquigarrow
is actually the 160th symbol, we can use a small test file to check the glyph table:
\documentclass{article}
\usepackage{fonttable}
\begin{document}
\fonttable{MnSymbolA10}
\end{document}
After all of this, you know exactly what \rightlsquigarrow
is, and you can use it as this:
\documentclass{article}
\DeclareFontFamily{U} {MnSymbolA}{}
\DeclareFontShape{U}{MnSymbolA}{m}{n}{
<-6> MnSymbolA5
<6-7> MnSymbolA6
<7-8> MnSymbolA7
<8-9> MnSymbolA8
<9-10> MnSymbolA9
<10-12> MnSymbolA10
<12-> MnSymbolA12}{}
\DeclareFontShape{U}{MnSymbolA}{b}{n}{
<-6> MnSymbolA-Bold5
<6-7> MnSymbolA-Bold6
<7-8> MnSymbolA-Bold7
<8-9> MnSymbolA-Bold8
<9-10> MnSymbolA-Bold9
<10-12> MnSymbolA-Bold10
<12-> MnSymbolA-Bold12}{}
\DeclareSymbolFont{MnSyA} {U} {MnSymbolA}{m}{n}
\DeclareMathSymbol{\rightlsquigarrow}{\mathrel}{MnSyA}{160}
\begin{document}
$\rightlsquigarrow$
\end{document}
Best Answer
There's sort of a general way, but it involves knowing your way around the various bits of the other font packages. You can then take just the bits you need. So for your particular example, you could do the following:
This code is copied from the
mathabx
package.