Not parallel symbols using slashes

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 ?

\documentclass[12pt]{article}

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

\begin{document}

$d_1 \parallel d_2$

\end{document}

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

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}


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