1

Please I need the LaTeX code of the following diagram.

enter image description here

Display Name
  • 46,933
M.A
  • 101
  • 4
    Look at the tikz-cd manual and examples on this site. –  May 12 '19 at 17:11
  • 6
    I'm voting to close this question as off-topic because this is a just-do-it-for-me question. Please read the manual first, and ask only if you are stuck! –  May 12 '19 at 17:39
  • This question has a few subtle points that a beginner would not be able to accomplish. The present answers don't touch all of them. – egreg May 12 '19 at 21:22
  • 2
    @egreg Wouldn't it be better if the OP indicated what is missing instead of a third party? At least this is how I "If this question can be reworded to fit the rules in the help center, please edit the question." interpret. Once the OP indicates what is missing, the question can be reopened. (Note that I did not vote to close the question.) –  May 12 '19 at 22:09
  • 1
    @egreg Yes, there may be something difficult and complicated to beginners. However, at least there should be some efforts shown here. For example, if the OP doesn't know how to draw the curve, he may draw a line and ask us to modify the line. We should never encourage people to ask us to draw figures whenever they need, for free. –  May 13 '19 at 04:18
  • 1
    In the current state, I don't agree with the reopeners. –  May 13 '19 at 04:18

2 Answers2

2

as starting point:

\documentclass[margin=3.1415692mm]{standalone}
\usepackage{tikz-cd}

\begin{document}
%---------------------------------------------------------------%
\begin{tikzcd}
A \ar[r, "label"] 
  \ar[d, "label" ']  
        & B \ar[r, "label"] & C \ar[d,  "label"] \\
D       &                   & E \ar[ll, "label"] \\
\end{tikzcd}
%---------------------------------------------------------------%
\end{document}

enter image description here

for details see documentation for tikz-cd. package. You only need to replace node names and edges' labels with your math expressions.

Zarko
  • 296,517
  • add column sep=... and row sep=... as option to \begin{tikzcd} . see documentation, page 6. – Zarko May 12 '19 at 18:00
2

In this question there is one somewhat nonstandard problem which is to have the text along a bent arrow in tikz-cd. This can be accomplished using decorations.text along with execute at end picture.

\documentclass{article}
\usepackage{tikz-cd}
\usepackage{amsmath}
\usepackage{amsfonts}
\usetikzlibrary{decorations.text}
\begin{document}
\[\begin{tikzcd}[column sep=pi*1cm,row sep=pi*1cm,
execute at end picture={
\draw[<-,postaction={decorate,decoration={text along path,text align=center,
raise=1ex,
text={|\small|change of variable}}}]  (\tikzcdmatrixname-2-1) 
to[bend left=15] (\tikzcdmatrixname-1-1);
  }
  ]
u \ar[r, "g(s)"]  & g(u) \ar[r, "G(s)=\int\limits_0^sg(r)\,\mathrm{d}r"] & 
        G(u) \ar[d,  "\psi(t)=\int\limits_0^r\mathrm{e}^{-G(s)}\,\mathrm{d}s"] \\
v=\varphi(u)       &                   & 
\psi(u) \ar[ll, "\varphi:\mathbb{R}\to\mathbb{R}~\text{w/}~\varphi'(s)>0" ',
"\varphi(s)=\psi^{-1}(s)"] \\
\end{tikzcd}
\]
\end{document}

enter image description here