I want to use a single symbol from the MnSymbol package, \nuparrow (I can't find that symbol anywhere else). But if I use it, then it upsets the symbols in the rest of the document, which I am happy with.
- 22,025
- 2,685
-
... which you are not happy with? – Hendrik Vogt Mar 07 '11 at 16:53
-
1@HendrikVogt, I believe "which I am happy with" modifies "the rest of the document," not "it upsets." – Vectornaut May 03 '18 at 22:39
3 Answers
You can setup a single symbol like this (the code is extracted from mnsymbol. It will not clash if you load the package too):
\documentclass{article}
\DeclareFontFamily{U} {MnSymbolB}{}
\DeclareFontShape{U}{MnSymbolB}{m}{n}{
<-6> MnSymbolB5
<6-7> MnSymbolB6
<7-8> MnSymbolB7
<8-9> MnSymbolB8
<9-10> MnSymbolB9
<10-12> MnSymbolB10
<12-> MnSymbolB12}{}
\DeclareFontShape{U}{MnSymbolB}{b}{n}{
<-6> MnSymbolB-Bold5
<6-7> MnSymbolB-Bold6
<7-8> MnSymbolB-Bold7
<8-9> MnSymbolB-Bold8
<9-10> MnSymbolB-Bold9
<10-12> MnSymbolB-Bold10
<12-> MnSymbolB-Bold12}{}
\DeclareSymbolFont{MnSyB} {U} {MnSymbolB}{m}{n}
\SetSymbolFont{MnSyB} {bold}{U} {MnSymbolB}{b}{n}
\DeclareMathSymbol{\nuparrow}{\mathrel}{MnSyB}{1}
\begin{document}
$\nuparrow$
\mathversion{bold}
$\nuparrow$
\end{document}
- 327,261
-
1excellent! Thanks. What exactly am I looking at, and where can I learn more about this code? – Alex Mar 07 '11 at 13:35
-
(there's also an explanation in https://tex.stackexchange.com/a/36088/250119 .) – user202729 Dec 31 '21 at 08:32
The mathtools package also defines it by rotating and mirroring an existing symbol. Note that MnSymbol symbols often does not mix well with others.
\documentclass[a4paper]{memoir}
\usepackage{mathtools,amssymb}
\begin{document}
\[
A \nuparrow B
\]
\end{document}
- 6,577
- 54,450
-
-
And you used BOTH packages in this example, and have a fully updated LaTeX installation – daleif Mar 07 '11 at 13:07
-
yes. I have texlive installed on Fedora. I copied your code verbatim; both packages are installed. – Alex Mar 07 '11 at 13:13
-
I have found a sort of hack using the xy package. I don't know any metafont but I can't imagine it's that hard to define an upward arrow with a line through it? – Alex Mar 07 '11 at 13:21
-
Which mathtools version? Note that several Linux dists. are very slow at updating their LaTeX. This is why I always use the one from TUG, an update it manually with the build in manager. That was I KNOW I have the latest versions, I don't have to wait for some lazy dist. manager. – daleif Mar 07 '11 at 13:36
Just to explain Ulrike's Meta Font code a bit and where I think it comes from.
The Declare{Font,Symbol}* commands load the MetaFont files used to define the mathematical symbol. So, for example, MnSymbolB corresponds to the file located at /usr/share/texmf/fonts/source/public/MnSymbol/MnSymbolB.mf on my Fedora box. It includes the file Sym-Arrows.mf, in the same folder. And defines the boolean value negated to be true. Looking at the Sym-Arrows.mf file, we see that boolean used to determine whether the arrow is crossed out or not. The final argument (call it n) is 1 in
\DeclareMathSymbol{\nuparrow}{\mathrel}{MnSyB}{1}
is the first symbol defined in Sym-Arrows.mf. It is a single arrow with angle alpha = 0 (pointing upward) which is crossed out (because negated = true). If n=2 then the angle would be 90, since that's the second element in the for list. This list continues between successive fors. So if I take n=9 then I get a double negated arrow pointing upward.
- 2,685