2
\documentclass{beamer}

\usepackage{tikz-cd}
\usetikzlibrary{matrix}

\begin{document}
\begin{frame}[fragile]

\begin{center}
\begin{tikzcd}[row sep=2.3cm, column sep = 
2.3cm]
A\arrow{r}{e}\arrow{d}[swap]{f} & B\arrow{r} 
{e1} \arrow{d}{g} &B1 \arrow{d}{g1}\\
C\arrow{r}[swap]{h} & D \arrow{r}[swap] 
{h}&D1\\
\end{tikzcd}
\end{center}

\end{frame}


\end{document}

Here I would like to change every arrow into double/parallel arrow. I am using Leftrightarrow option, for example, \arrow{r, Leftrightarrow}, but I am getting errors.

Any help in resolving the issue would be appreciated.

3
  • @Sebastiano I need the single sided arrow to be double sided. Perhaps, I couldn't write clearly. Mar 11, 2019 at 13:08
  • I'm sorry I didn't understand your question.
    – Sebastiano
    Mar 11, 2019 at 13:13
  • @Sebastiano I want to change the arrow styles selectively and there I am getting error. Mar 11, 2019 at 13:14

1 Answer 1

2

You can use the option arrows=Leftrightarrow

\documentclass{beamer}

\usepackage{tikz-cd}
\usetikzlibrary{matrix}

\begin{document}
\begin{frame}[fragile]

\begin{center}
\begin{tikzcd}[
  row sep=2.3cm,
  column sep=2.3cm,
  arrows=Leftrightarrow,
]
A\arrow{r}{e}\arrow{d}[swap]{f} & B\arrow{r}
{e1} \arrow{d}{g} &B1 \arrow{d}{g1}\\
C\arrow{r}[swap]{h} & D \arrow{r}[swap]
{h}&D1\\
\end{tikzcd}
\end{center}

\end{frame}

\end{document}

The “modern” syntax is easier:

\begin{tikzcd}[
  row sep=2.3cm,
  column sep=2.3cm,
  arrows=Leftrightarrow,
]
A \arrow[r,"e"] \arrow[d,swap,"f"] &
B \arrow[r,"e1"] \arrow[d,"g"] &
B1 \arrow[d,"g1"]
\\
C \arrow[r,swap,"h"] & D \arrow[r,swap,"h"] &
D1
\end{tikzcd}

enter image description here

Say that only the top left arrow should be Leftrightarrow; then it can be input as

\arrow[r,Leftrightarrow,"e"]

For instance, with

\begin{tikzcd}[
  row sep=2.3cm,
  column sep=2.3cm,
]
A \arrow[r,Leftrightarrow,"e"] \arrow[d,swap,"f"] &
B \arrow[r,"e1"] \arrow[d,"g"] &
B1 \arrow[d,"g1"]
\\
C \arrow[r,swap,"h"] & D \arrow[r,swap,"h"] &
D1
\end{tikzcd}

you'd get

enter image description here

3
  • Thanks for the alternate code. However, If I just want to change the top left arrow using the code provided by you, I get error. Mar 11, 2019 at 13:13
  • 1
    @MarkRobinson then please add that you your question, what exactly is your changed code and which error?
    – daleif
    Mar 11, 2019 at 13:19
  • @MarkRobinson I added the code.
    – egreg
    Mar 11, 2019 at 13:29

You must log in to answer this question.

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