13

I would like to insert this diagram

enter image description here

Into my LaTeX document. However, I don't know if it is possible at all to rotate symbols, and how they could fit into a diagram (notice that the \cong symbol has been rotated 90 degrees counterclockwise). So, how could this diagram be made?

Thanks in advance for your interest.

  • As for your literal question and not the actual diagram typesetting: there is \rotatebox in graphicx package. – Oleg Lobachev Nov 6 at 11:17
16

Two solutions, one with “standard” tools, one with tikz-cd and code by LaRiFaRi.

\documentclass{article}
\usepackage{amsmath,amssymb} % for both solutions

\usepackage{graphicx} % for the first solution

\usepackage{tikz-cd} % for the second solution

% for the first solution
\newcommand{\overiso}[2]{%
  \overset{\substack{\textstyle #1\\[0.5ex]\rotcong\\[0.5ex]}}{#2}%
}
\newcommand{\rotcong}{\rotatebox[origin=c]{90}{$\cong$}}
% ===

% for the second solution, see https://tex.stackexchange.com/a/216042/4427
\tikzset{
  symbol/.style={
    draw=none,
    every to/.append style={
      edge node={node [sloped, allow upside down, auto=false]{$#1$}}}
  }
}
% ===

% general commands
\newcommand{\numberset}[1]{\mathbb{#1}}
\newcommand{\Z}{\numberset{Z}}

\begin{document}

\[
\dots
\xrightarrow{\cong}
\overiso{\Z}{C_3(*)}
\xrightarrow{0}
\overiso{\Z}{C_2(*)}
\xrightarrow{\cong}
\overiso{\Z}{C_1(*)}
\xrightarrow{0}
\overiso{\Z}{C_0(*)}
\rightarrow
0
\]

\[
\begin{tikzcd}[row sep=1em]
& \Z & \Z & \Z & \Z \\
\dotsb \arrow[r,"\cong"] &
C_3(*) \arrow[r,"0"] \arrow[u,symbol=\cong] &
C_2(*) \arrow[r,"\cong"] \arrow[u,symbol=\cong] &
C_1(*) \arrow[r,"0"] \arrow[u,symbol=\cong] &
C_0(*) \arrow[r] \arrow[u,symbol=\cong] &
0
\end{tikzcd}
\]

\end{document}

enter image description here

  • Thanks for your answer. I know it's a bit late for this, but now I would like to change the direction of the arrows of your second solution, so their tips are pointing to the left. How should I proceed? – Akerbeltz Nov 12 at 0:25
  • @Akerbeltz Change \arrow[r into \arrow[l; the first one, however, should be moved next to the final 0. – egreg Nov 12 at 7:15
11

A solution with stackengine:

\documentclass{article}

\usepackage{amsmath, amssymb, graphicx}
\usepackage[usestackEOL]{stackengine}

\begin{document}

\[ \stackMath
\dotsm
\xrightarrow{\enspace\cong\enspace}
\Shortstack{\mathbb{Z} \\ \rotatebox[origin=c]{90}{$\cong$} \\ C_3(*)}
\xrightarrow{\enspace 0\enspace}
\Shortstack{\mathbb{Z} \\ \rotatebox[origin=c]{90}{$\cong$} \\ C_2(*)}
\xrightarrow{\enspace\cong\enspace}
\Shortstack{\mathbb{Z} \\ \rotatebox[origin=c]{90}{$\cong$} \\ C_1(*)}
\xrightarrow{\enspace 0\enspace}
\Shortstack{\mathbb{Z} \\ \rotatebox[origin=c]{90}{$\cong$} \\ C_0(*)}
\xrightarrow{\hspace{1.25em}}0
\]

\end{document} 

enter image description here

9

I'm not sure I've interpreted all symbols correctly but I believe this comes more or less close to the intended output

\documentclass{article}

\usepackage{amsmath,amssymb,graphicx}

\begin{document}

\[
\ldots
\xrightarrow[\quad]{\cong}
\begin{array}[b]{c}\mathbb{Z} \\ \rotatebox[origin=c]{90}{$\cong$} \\ C_3(*) \end{array}
\xrightarrow[\quad]{0}
\begin{array}[b]{c}\mathbb{Z} \\ \rotatebox[origin=c]{90}{$\cong$} \\ C_2(*) \end{array}
\xrightarrow[\quad]{\cong}
\begin{array}[b]{c}\mathbb{Z} \\ \rotatebox[origin=c]{90}{$\cong$} \\ C_1(*) \end{array}
\xrightarrow[\quad]{0}
\begin{array}[b]{c}\mathbb{Z} \\ \rotatebox[origin=c]{90}{$\cong$} \\ C_0(*) \end{array}
\longrightarrow 0
\]

\end{document}

enter image description here

9

A solution using TikZ (with manual placements):

\documentclass[border=3.14,tikz]{standalone}

\usetikzlibrary{positioning}
\usepackage{amssymb}

\begin{document}
\begin{tikzpicture}
  \node at (0,0) (d) {\ldots};
  \node[right=of d]  (c3) {$C_3(*)$};
  \node[right=of c3] (c2) {$C_2(*)$};
  \node[right=of c2] (c1) {$C_1(*)$};
  \node[right=of c1] (c0) {$C_0(*)$};
  \node[right=of c0] (0)  {$0$};
  \draw[->] (d) --node[above]{$\cong$} (c3);
  \draw[->] (c3) --node[above]{$0$} (c2);
  \draw[->] (c2) --node[above]{$\cong$} (c1);
  \draw[->] (c1) --node[above]{$0$} (c0);
  \draw[->] (c0) -- (0);
  \foreach\x in {0,...,3}
    {
      \node[node distance=0.5cm,above=of c\x] (z\x) {$\mathbb{Z}$};
      \path (c\x) --node[rotate=90]{$\cong$} (z\x);
    }
\end{tikzpicture}
\end{document}

TikZ using the graphs and quotes syntax:

\documentclass[border=3.14,tikz]{standalone}

\usetikzlibrary{graphs,quotes,positioning}
\usepackage{amssymb}

\begin{document}
\begin{tikzpicture}
  \graph[grow right=2cm]
    {
      d [as=\ldots] ->["$\cong$"]
      c3 [as=$C_3(*)$] ->["$0$"]
      c2 [as=$C_2(*)$] ->["$\cong$"]
      c1 [as=$C_1(*)$] ->["$0$"]
      c0 [as=$C_0(*)$] ->
      0 [as=$0$]
    };
  \foreach\x in {3,...,0}
    {
      \node[node distance=0.5cm,above=of c\x] (z\x) {$\mathbb{Z}$};
      \path (c\x) --node[rotate=90]{$\cong$} (z\x);
    }
\end{tikzpicture}
\end{document}

enter image description here

4

If you use tikz-cd, you do not have to introduce an artificial row. tikz-cd is based on tikz, after all, which has labels for that purpose. So if you want to have a Z and a \cong above, you only need to add |[la]| to that cell, where la is just a shorthand for that label.

\documentclass{article}
\usepackage{amsmath,amsfonts}
\usepackage{tikz-cd}
\begin{document}
\[
\begin{tikzcd}[row sep=1em,/tikz/la/.style={label={[rotate=90,anchor=west,inner
sep=1pt,label={right:\mathbb{Z}}]:\cong}}]
\dotsb \arrow[r,"\cong"] &
|[la]| C_3(*) \arrow[r,"0"]  &
|[la]| C_2(*) \arrow[r,"\cong"] &
|[la]| C_1(*) \arrow[r,"0"] &
|[la]| C_0(*) \arrow[r]  &
0
\end{tikzcd}
\]
\end{document}

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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