3

In France, we write d_1 // d_2 to indicate that the lines d_1 and d_2 are parallel.

I would like to have a "not parallel" symbol. What is the best way to do that ?

Advices alone are welcome.

\documentclass[12pt]{article}

\let\stdparallel\parallel
\renewcommand\parallel{\mathbin{/\!/}}

\begin{document}

$d_1 \parallel d_2$

\end{document}
2
  • Alternative to other answers, \usepackage{amssymb} for \nparallel.
    – kapple
    Apr 3, 2021 at 3:00
  • 1
    @kapple No this is not my need. I want to strike // instead of || .
    – projetmbc
    Apr 3, 2021 at 11:28

1 Answer 1

6

I would keep the slashes tighter; for the negation, the specular image of \smallsetminus seems good.

\documentclass{article}
\usepackage{amsmath,amssymb,graphicx}

\renewcommand{\parallel}{\mathrel{/\mkern-5mu/}}
\makeatletter
\newcommand{\notparallel}{%
  \mathrel{\mathpalette\not@parallel\relax}%
}
\newcommand{\not@parallel}[2]{%
  \ooalign{\reflectbox{$\m@th#1\smallsetminus$}\cr\hfil$\m@th#1\parallel$\cr}%
}
\makeatother

\begin{document}

$a \parallel b \notparallel c$

\end{document}

enter image description here

2
  • Very good design and code. Thanks !
    – projetmbc
    Oct 9, 2019 at 11:07
  • @projetmbc Try also with \mkern-6mu.
    – egreg
    Oct 9, 2019 at 12:40

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.