10

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.

2
  • ... which you are not happy with? Mar 7, 2011 at 16:53
  • 1
    @HendrikVogt, I believe "which I am happy with" modifies "the rest of the document," not "it upsets."
    – Vectornaut
    May 3, 2018 at 22:39

3 Answers 3

12

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}
2
4

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.

4

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}
5
  • This doesn't work for me. Latex complains that \nuparrow is undefined?
    – Alex
    Mar 7, 2011 at 13:03
  • And you used BOTH packages in this example, and have a fully updated LaTeX installation
    – daleif
    Mar 7, 2011 at 13:07
  • yes. I have texlive installed on Fedora. I copied your code verbatim; both packages are installed.
    – Alex
    Mar 7, 2011 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 7, 2011 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 7, 2011 at 13:36

You must log in to answer this question.

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