0

Here is the picture of the diagram:

enter image description here

How can I draw this diagram in Latex?

  • forest package is the way to go – js bibra Feb 21 '20 at 6:21
  • 4
    Welcome to TeX.SX. Questions about how to draw specific graphics that just post an image of the desired result are really not reasonable questions to ask on the site. Please post a minimal compilable document showing that you've tried to produce the image and then people will be happy to help you with any specific problems you may have. See minimal working example (MWE) for what needs to go into such a document. – Stefan Pinnow Feb 21 '20 at 6:28
6

Welcome! tikz-cd allows you to draw such diagrams. I am sure I did not decipher everything (just because some glyphs are hard to read) but you will probably find it easy to edit this code.

\documentclass{article}
\usepackage{amsmath}
\usepackage{dsfont}
\usepackage{tikz-cd}
\begin{document}
\[\begin{tikzcd}[row sep=2em,column sep=2.5em]
 I\times I \arrow[drr,"\text{respect equivalence $\sim$}",bend left] 
  \arrow[dr,"\text{stretch}",bend left] \arrow[d,"q"] & & \\
 M_* \arrow[drr,"\exists!m",bend right]  & {}[0,2\pi]\times[-1,1] \arrow[r,"\bar u"] & \mathds{R}^3\\
 & & M \arrow[u,"\cap_H"']\\
\end{tikzcd}\]
\end{document}

enter image description here

5

Welcome, there are many different ways to write this diagram with TikZ. Here, I use the matrix library that was written to align the nodes of a diagram.

screenshot

\documentclass[border=5mm]{article}
\usepackage{amssymb}
\usepackage{tikz}
\usetikzlibrary {matrix}
\begin{document}
\begin{tikzpicture}
\matrix [matrix of math nodes,column sep=1.2cm,row sep=1cm]
{
|(I2)| I\times I    &                               & \\
|(Me)|M_*           & |(X)| [0,2\pi]\times[-1,1]    & |(R)| \mathbb{R}^3 \\
                    &                               & |(M2)| M \\
};
\begin{scope}[every node/.style={midway,auto,font=\scriptsize}]
\draw [->] (I2) -- node {$q$} (Me);
\draw [->](X) -- node {$\bar u$} (R);
\draw [->](I2) to [bend left] node{stretch}(X);
\draw [->](I2) to [bend left] node{respect equiv. $\sim$}(R);
\draw [->](Me) to [bend right] node{$\exists !m$}(M2);
\draw [->](M2) --node[right]{$\cap_M$}(R);
\end{scope}
\end{tikzpicture}
\end{document}
4

Here's an alternative using xy.

enter image description here

\documentclass[border=5mm]{standalone}
\usepackage[all]{xy}
\usepackage{amssymb} % for the blackboard bold symbol
\usepackage{amsmath} % for \text
\begin{document}
\xymatrix{
    I \times I 
    \ar[d]^{q}
    \ar@/^/[dr]^{\text{stretch}}
    \ar@/^20pt/[drr]^{\strut\text{respect equivalence}\thinspace\sim}
    \\
    M_* 
    \ar@/_12pt/[drr]_{\exists!m} 
    & 
    [0, 2\pi] \times [-1, 1] 
    \ar[r]^-{\bar{u}} 
    & 
    \mathbb{R}^3 
    \\
    &
    & 
    M \ar[u]_{{}\cap_M}
    \\
}
\end{document}
  • I notice from the OP sketch that \bar{u} should have been \bar{\mu}... – Thruston Feb 21 '20 at 10:51
  • I like very much xy package :-) very good your MWE. – Sebastiano Feb 26 '20 at 22:53
4

The dot lanquage from graphviz is a great for drawing commutative diagrams as you can see here : commutative diagram

One can use dot language from graphviz, the Python script dot2tex to convert into LaTeX and the dot2texi.sty package to include the dot code into a LaTeX document.

\documentclass{article}
\usepackage{tikz} 
\usetikzlibrary{shapes,arrows} 
\usepackage{dot2texi}
\usepackage{amsmath,amssymb} 
\begin{document}

 \begin{dot2tex}[dot] 
  digraph T 
  {rankdir=TB;   
   ranksep=.2;  
   nodesep=.1  ;
   node [shape=none];
   1 -> 4 [dir=backward xlabel="q   "];
   1 -> 5 [label="stretch" constraint=false];
   1 -> 6 [label="respect equiv. ~ " texlbl="respect equiv. $\sim$" tailport=e headport=no constraint=false];
   4 -> 9 [constraint=false label="∃!m" texlbl="$\exists!m$"];
   5 -> 6 [constraint=false label="μ " texlbl="$\bar\mu$"] ;
   6 -> 9 [dir=back label="∩_M " texlbl="$\cap_M$"];
   1 [label="I x I" texlbl="$I\times I$"];  
   {rankdir=LR ;   rank=same 
   4 [label="M*"];
   5 [label="[0,2Π]✕[-1,1]" texlbl="$[0,2\pi]\times[-1,1]$"];
   6 [label= "R^3" texlbl="$\mathbb{R}^3$"];   }
   9 [label="M"]; }

   \end{dot2tex}
  \end{document}

my emacs source file

The tikzpicture environment created

screencast

dot2texi is a great package and can be used to produce very quickly a lot of diagrams in a declarative style.

3

Another way with plain TikZ: the firuge is just one \path attaching with four nodes and connecting with arrows. The code is long and easy to read.

enter image description here

\documentclass{article}
\usepackage{tikz,amsmath,amssymb,lipsum}
\begin{document}
\lipsum[1]
Define $\bar\mu\colon [0,2\pi]\times [-1,1]\to \mathbb{R}^3$ with some formular as $\mu$.   
\[
\begin{tikzpicture}
\path
(0,0) node (I) {$I\times I$}
++(-90:1.2) node (M1) {$M_*$}
++(0:3) node (M2) {$[0,2\pi]\times [-1,1]$}
++(0:2.5) node (M3) {$\mathbb{R}^3$}
++(-90:1.2) node (M4) {$M$}
;
\begin{scope}[->,nodes={midway,scale=.8}]
\draw (I)--(M1) node[left]{$q$};
\draw (I) to[out=0,in=120] node[above right]{stretch} (M2);
\draw (I) to[out=20,in=120] node[above right]{respect equivalence $\sim$} (M3);
\draw (M1) to[out=-50,in=-160] node[above]{$\exists ! m$} (M4);
\draw (M2)--(M3) node[above]{$\bar\mu$};
\draw (M4)--(M3) node[right]{\rotatebox[origin=c]{270}{$\subseteq$}$_\mu$};
\end{scope}
\end{tikzpicture}
\]
\lipsum[1]
\end{document}

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.