I couldn't find following symbol on web and in this site also:
have we any TeX code for that?. Thanks.
\not
prints the slash for the following relational symbol. "Relational", because then TeX will not add additional horizontal space. Also, the "not minus" symbol looks more than a relational symbol than a binary or unary symbol.
Example:
\documentclass{article}
\begin{document}
\[ 1 \not\mathrel{-} 1 \]
\end{document}
A red slash below the minus sign can be achieved with:
\documentclass{article}
\usepackage{color}
\begin{document}
\[ 1 \begingroup\color{red}\not\endgroup\mathrel{-} 1 \]
\end{document}
(However, this will not work in cases, where \not
is redefined to take an argument.)
The case, where the slash is on top of the minus, is more complicate, because it needs the measurement of the symbol width that also depends on the current math style.
\documentclass{article}
\usepackage{color}
\makeatletter
\newcommand*{\rednotminus}{%
\mathrel{%
\mathpalette\@rednotminus{}%
}%
}
\newcommand*{\@rednotminus}[2]{%
% #1: math style
% #2: unused
\sbox\z@{$#1\not-\m@th$}%
\hbox to\wd\z@{$#1-\m@th$\hss}%
\kern-\wd\z@
\hbox to\wd\z@{\begingroup\color{red}$#1\not\m@th$\endgroup\hss}%
}
\makeatother
\begin{document}
\[ 1 \rednotminus 1 \]
\end{document}
\mathbin, like the
–` symbol?
\mathbin
: \mathbin{\not\mathrel{-}}
Commented
Mar 26, 2017 at 12:03
MnSymbol.sty
offers the relational symbol \nleftrightline
.
\documentclass{article}
\usepackage{MnSymbol}
\begin{document}
$x\nleftrightline y$
\end{document}
You probably do not want to import all the symbols from MnSymbol
, but want to pick just this single symbol.
\documentclass{article}
% http://tex.stackexchange.com/a/36088
\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}{}
\DeclareSymbolFont{MnSyB}{U}{MnSymbolB}{m}{n}
\DeclareMathSymbol{\nleftrightline}{\mathrel}{MnSyB}{208}
\begin{document}
$x\nleftrightline y$
\end{document}
+
. That is the closest I can come for "not minus".