I am trying to draw a commutative diagram using tikz-cd, where one of the arrow is an inequality. I know equality arrows are \ar[equal], does anyone know how to draw inequality arrows? Many thanks in advance.
1 Answer
Are you looking for something like this? (Orientation changed, thanks to @Sigur!)
\documentclass{article}
\usepackage{tikz-cd}
\usetikzlibrary{decorations.markings}
\tikzset{
inequality/.style={postaction={decorate,decoration={markings,
mark=at position 0.5 with {\draw (1.5pt,4pt) -- (-1.5pt,-4pt);}}}}}
\begin{document}
Equality:
\[
\begin{tikzcd}
X \ar[equal]{r} & Y
\end{tikzcd}
\]
Inequality:
\[
\begin{tikzcd}
X \ar[equal,inequality]{r} & Y
\end{tikzcd}
\]
\end{document}
-
1I don't know why, but what came first to my mind was something related with
\leq
not with\neq
... lol :-)– SigurCommented Dec 24, 2018 at 19:28 -
@Sigur We will find out, I hope. I agree that your interpretation makes at least as much sense as mine, and as you may know my crystal ball got stolen, so I had to guess.– user121799Commented Dec 24, 2018 at 19:30
-
I'm mathematician and so inequality to me first means
\leq
... a lot of inequalities in analysis.– SigurCommented Dec 24, 2018 at 19:32 -
@Sigur I am a marmot, and use Wikipedia if it supports my claims. Otherwise I ignore it.;-) Anyway, according to Wikipedia, either of us could be right. Or someone who would argue that one should use
\geq
.– user121799Commented Dec 24, 2018 at 19:38 -
1