Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

Is there a way to put $\nLeftarrow$ instead of some arrows in TikZ? Specifically, how do I change it to "B does not imply A" in the following code.

\documentclass{article}
\usepackage{tikz-cd}
\begin{document}
\begin{tikzcd}[arrows=Rightarrow]
   A \arrow[out=30,in=150]{r}{}\arrow{d} & B \arrow[out=210,in=330]{l}{}\arrow{d}  \\
   E  \arrow{r}{} & F
\end{tikzcd}
\end{document}

One very primite way is to do something similar to the following, where at the description part in the middle of the arrow, use \Big\backslash.

\documentclass{article}
\usepackage{tikz-cd}
\begin{document}
\begin{tikzpicture}
\matrix (m) [matrix of math nodes, row sep=3em, column sep=3em]
             { A & B \\
          & C \\ }; \path[->,font=\scriptsize] (m-1-1) edge node
   {$\Big\backslash$} (m-1-2) edge node {$\Big\backslash$} (m-2-2);
    \end{tikzpicture}
 \end{document}

But then, how do I put a description in the middle of an arrow in the first code?

share|improve this question

1 Answer 1

up vote 7 down vote accepted

This is probably the same mechanism for description key in the manual of tikz-cd but more explicit.

\documentclass{article}
\usepackage{tikz-cd}
\usetikzlibrary{decorations.markings}
\tikzset{degil/.style={
            decoration={markings,
            mark= at position 0.5 with {
                  \node[transform shape] (tempnode) {$\backslash$};
                  %\draw[thick] (tempnode.north east) -- (tempnode.south west);
                  }
              },
              postaction={decorate}
}
}
\begin{document}
\begin{tikzcd}[arrows=Rightarrow]
   A \arrow[out=30,in=150,degil]{r}{}\arrow[degil]{d} & B \arrow[out=210,in=330]{l}{}\arrow{d}  \\
   E  \arrow{r}{} & F
\end{tikzcd}
\end{document}

enter image description here

If you want to keep the backslashes upright(unrotated) regardless of the arrow direction, you can remove the transform shape option and give it a try.

share|improve this answer
    
Description works as well,but leaves some space in between. Your way was better,thank you. –  Derya Apr 6 '12 at 21:51
1  
@Derya Try also [description,inner sep=0mm,fill=none] and adjust if it works as you wish. –  percusse Apr 6 '12 at 22:10
    
Both [description,inner sep=0mm,fill=none] and [description,inner sep=-3mm] works. –  Derya Apr 6 '12 at 22:19
    
@Derya Sorry for the follow-up but inner sep=-3mm is not a good idea since you would be defining a node which has a -3mm long padding and that might cause trouble. Only fill=none would remove the space effect since right now it's painting white to act as if there is actually a space there. Change it to fill=yellow and you would see what I mean. –  percusse Apr 6 '12 at 22:32
    
Opps, you are right, thanks again. –  Derya Apr 6 '12 at 22:55

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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