3

I'm trying to create a negation symbol with two upper lines, like this example I found in a paper (regular negation for comparison):

both negation symbols

Detexify didn't know the symbol and I even looked through the comprehensive symbol list, but wasn't able to find anything. Any help on how to find/create this symbol would be greatly appreciated!

  • By the way, make sure you have the cm-super fonts installed. It looks as if your example is falling back to pixelated METAFONT. – Davislor Mar 28 '21 at 04:29

3 Answers3

4

You can superimpose \neg to a clipped (and lowered) version thereof.

\documentclass{article}
\usepackage{trimclip}

\makeatletter \newcommand{\dneg}{\mathord{\vphantom{\neg}\mathpalette\dneg@\relax}} \newcommand{\dneg@}[2]{% \ooalign{% $\m@th#1\neg$\cr \raisebox{0.8\height}{\clipbox{0pt {0.6\height} 0pt 0pt}{$\m@th#1\neg$}}\cr }% } \makeatother

\begin{document}

$\neg\varphi$ $\dneg\varphi$

$\dneg\varphi\scriptstyle\dneg\varphi\scriptscriptstyle\dneg\varphi$

\Large $\dneg\varphi\scriptstyle\dneg\varphi\scriptscriptstyle\dneg\varphi$

\end{document}

enter image description here

egreg
  • 1,121,712
3
\documentclass{article}
\usepackage{amsmath}
\makeatletter
% based on https://tex.stackexchange.com/a/110981
\providecommand*{\dneg}{%
  \mathord{%
    \mathpalette\@dneg{}%
  }%
}
\newcommand*{\@dneg}[2]{%
  \ooalign{%
    $\m@th#1\neg$\cr
    \sbox0{$#1\neg$}%
    \dimen@=0.4\ht0%
    \hidewidth\raise\dimen@\box0\hidewidth
  }%
}
\makeatother
\begin{document}
\parindent0pt
$\neg$ $\dneg$\par
\bigskip
{\large $\neg$ $\dneg$}\par
\bigskip
{\Huge $\neg$ $\dneg$}\par
\end{document}

enter image description here

Edit: changed to \mathord, see comment by Bernard.

  • Isn't \neg a mathord? – Bernard Mar 27 '21 at 20:55
  • According to the comprehensive list of symbols \invneg is a binary relation, so it would be odd if \neg was different, wouldn't it? –  Mar 27 '21 at 20:58
  • That's strange. In the list of mathabx glyphs,`\neg is mathord (it is a unary operator, as far as I know). – Bernard Mar 27 '21 at 21:01
  • Please have look at p. 51 of symbols-a4.pdf. (I am not saying that you are wrong but if you are right then symbols-a4.pdf has an issue. Anyway, this is a simple change in the above code.) –  Mar 27 '21 at 21:16
  • By curiosity, I also checked with MnSymbol, which has a different author, and \neg is also mathord. This being said, I have have no idea whatt \invneg is used for. – Bernard Mar 27 '21 at 21:31
2

Just I add my proposal.

enter image description here

\documentclass[a4paper,12pt]{article}
\usepackage{amsmath,amssymb,stmaryrd}
\usepackage{graphicx}

\newcommand{\rrc}{\mathrel{\rotatebox{90}{$\rrfloor$}}} \newcommand{\rfl}{\mathrel{\rotatebox{90}{$\rfloor$}}} \begin{document} $\rrc\varphi$; $\rfl \varphi$. \end{document}

Sebastiano
  • 54,118