1

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.

2
  • 1
    Welcome to TeX.SE and happy Christmas. Please can you add a picture, a code (.tex), anything to understand your question.
    – Sebastiano
    Commented Dec 24, 2018 at 19:20
  • 1
    What is the mathematical meaning of inequality arrow?
    – Sigur
    Commented Dec 24, 2018 at 19:21

1 Answer 1

3

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}

enter image description here

7
  • 1
    I don't know why, but what came first to my mind was something related with \leq not with \neq... lol :-)
    – Sigur
    Commented 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.
    – user121799
    Commented Dec 24, 2018 at 19:30
  • I'm mathematician and so inequality to me first means \leq... a lot of inequalities in analysis.
    – Sigur
    Commented 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.
    – user121799
    Commented Dec 24, 2018 at 19:38
  • 1
    Nice. Now it is more mathematical!
    – Sigur
    Commented Dec 24, 2018 at 19:59

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .