0

for the commutative diagrams I use tikz-cd but now I saw this commutative diagram on Kosniowski and I have no idea. Can someone send me a code? Thanks before.

diagram

diagram on google drive

  • 1
    Hi and welcome. The only difficult thing is to draw diagrams of any shape imitating a freehand drawing. If you use geometric shapes like ellipses or even clouds, it's much easier with TikZ. What's your problem here? – AndréC Aug 18 '20 at 18:43
  • I don't know how to drow the figures... – user782709 Aug 18 '20 at 18:44
  • 1
    If you have difficulty drawing these figures with TikZ, it's normal, it's difficult. I advise you to draw them online on the web with a specialized software such as Mathcha, which @Sebastiano here very often praises the possibilities. – AndréC Aug 18 '20 at 18:51
4

I thank you very much for the my nomination of the very nice user @AndréC. In the meantime I have read your question:

"for the commutative diagrams I use tikz-cd". Ok, it is a good start point. If you read the manual of tikz-cd (to the pag. 13), you can see that there is the use of \begin{tikzpicture}, that is very important to give you almost an answer.

tikz-cd, hence, use TikZ like great support, and it is important to know of this last package: I add, very well of the knowledge of this package. To build this MWE I have dedicated, for example, near one hour...(I remember I'm a snail)...

Starting point: approximate drawing

\documentclass[a4paper,12pt]{article}
\usepackage{tikz-cd}
\usepackage{tikz}
\usetikzlibrary{shapes.geometric}
\usepackage{yhmath}

\begin{document}

\begin{tikzcd}
& & D \arrow[d] \\
A \arrow[r] \arrow[rru, bend left] &  \begin{tikzpicture}\node[circle,draw] at (0,0) {$\wideparen{\varphi(0)=y_0,\,\varphi(1)=y_1}$};
\end{tikzpicture} \arrow[r,"f"] & \begin{tikzpicture}\node[ellipse,draw,label={[xshift=3.3cm, yshift=-1.2cm]$X$}] at (1,0) {$f_{\varphi}(0)=x_0,\, f_{\varphi}(1)=f_{y}$};
\end{tikzpicture}
\end{tikzcd}
\end{document}

So inside each element of the matrix you can add a contour (for simplicity I have built a circumference and an ellipse) accompanied by a label but always using TikZ, because tikz-cd has no predefined shapes, like clouds, stars inside of which you could put a formula. The solution for me is unique, you have to learn at least the basics of TikZ, because everyone acquires the skills by reading and studying the packages. None of us have the magic stick.

enter image description here

I had a trial run with Mathcha that is absolutely not elegant. The drawing is very approximate. You could to have this:

\documentclass[a4paper,12pt]{article}
\usepackage{tikz}
\usepackage{graphicx}


\begin{document}
\begin{figure}[h]
\centering
\resizebox{\columnwidth}{!}{
\tikzset{every picture/.style={line width=0.75pt}}
\begin{tikzpicture}[x=0.75pt,y=0.75pt,yscale=-1,xscale=1]
\draw [line width=1.5]    (43,287.33) -- (144.5,287.33) ;
\draw    (169.5,287.33) -- (231,287.33) ;
\draw [shift={(233,287.33)}, rotate = 180] [color={rgb, 255:red, 0; green, 0; blue, 0 }  ][line width=0.75]    (10.93,-3.29) .. controls (6.95,-1.4) and (3.31,-0.3) .. (0,0) .. controls (3.31,0.3) and (6.95,1.4) .. (10.93,3.29)   ;
\draw    (115,275.33) .. controls (137.28,157.52) and (283.53,120.08) .. (333.03,118.37) ;
\draw [shift={(334.5,118.33)}, rotate = 538.81] [color={rgb, 255:red, 0; green, 0; blue, 0 }  ][line width=0.75]    (10.93,-3.29) .. controls (6.95,-1.4) and (3.31,-0.3) .. (0,0) .. controls (3.31,0.3) and (6.95,1.4) .. (10.93,3.29)   ;
\draw  [line width=1.5]  (274,257.33) .. controls (284,252.33) and (373.17,228.33) .. (403.17,247.33) .. controls (433.17,266.33) and (412,321.33) .. (393.17,322.33) .. controls (374.33,323.33) and (340.33,322.33) .. (306.17,322.33) .. controls (272,322.33) and (243.4,304.08) .. (245.17,290.33) .. controls (246.94,276.58) and (250.76,276.46) .. (256.5,270.55) .. controls (262.23,264.65) and (269,259.83) .. (274,257.33) -- cycle ;
\draw    (285,277.33) .. controls (323.17,264.33) and (315.17,280.33) .. (332.17,274.33) .. controls (349.17,268.33) and (346.17,283.33) .. (372.17,274.33) ;
\draw    (426.5,288.33) -- (473,288.33) ;
\draw [shift={(475,288.33)}, rotate = 180] [color={rgb, 255:red, 0; green, 0; blue, 0 }  ][line width=0.75]    (10.93,-3.29) .. controls (6.95,-1.4) and (3.31,-0.3) .. (0,0) .. controls (3.31,0.3) and (6.95,1.4) .. (10.93,3.29)   ;
\draw  [line width=1.5]  (517,254.33) .. controls (525.5,256.2) and (607.5,225.2) .. (637.5,244.2) .. controls (667.5,263.2) and (660.5,317.2) .. (636.17,319.33) .. controls (611.83,321.47) and (583.33,319.33) .. (549.17,319.33) .. controls (515,319.33) and (480.83,323.07) .. (480.5,289.2) .. controls (480.17,255.33) and (486.76,263.11) .. (492.5,257.2) .. controls (498.24,251.29) and (508.5,252.47) .. (517,254.33) -- cycle ;
\draw    (517.5,284.2) .. controls (557.5,254.2) and (586.5,254.2) .. (625,273.2) ;
\draw  [line width=1.5]  (412.5,51.2) .. controls (421,53.07) and (486.5,32.2) .. (562.5,58.2) .. controls (638.5,84.2) and (581.5,145.2) .. (567.5,157.2) .. controls (553.5,169.2) and (433.5,151.2) .. (399.5,161.2) .. controls (365.5,171.2) and (344.33,149.2) .. (344,115.33) .. controls (343.67,81.47) and (346.76,90.11) .. (352.5,84.2) .. controls (358.24,78.29) and (404,49.33) .. (412.5,51.2) -- cycle ;
\draw    (382.5,132.2) .. controls (397.5,112.2) and (418.31,94.7) .. (445.5,93.2) .. controls (472.69,91.7) and (516.25,100.7) .. (535.5,110.2) ;
\draw    (522.5,171.2) -- (522.98,235.33) ;
\draw [shift={(523,237.33)}, rotate = 269.57] [color={rgb, 255:red, 0; green, 0; blue, 0 }  ][line width=0.75]    (10.93,-3.29) .. controls (6.95,-1.4) and (3.31,-0.3) .. (0,0) .. controls (3.31,0.3) and (6.95,1.4) .. (10.93,3.29)   ;
% Text Node
\draw (45,290.73) node [anchor=north west][inner sep=0.75pt]    {$0$};
% Text Node
\draw (135.5,290.73) node [anchor=north west][inner sep=0.75pt]    {$1$};
% Text Node
\draw (91,266.73) node [anchor=north west][inner sep=0.75pt]    {$I$};
% Text Node
\draw (198,265.73) node [anchor=north west][inner sep=0.75pt]    {$\varphi $};
% Text Node
\draw (250.17,280.73) node [anchor=north west][inner sep=0.75pt]    {$\varphi ( 0) =y_{0}$};
% Text Node
\draw (344.17,279.73) node [anchor=north west][inner sep=0.75pt]    {$\varphi ( 1) =y_{1}$};
% Text Node
\draw (443,266.73) node [anchor=north west][inner sep=0.75pt]    {$f$};
% Text Node
\draw (487.17,288.73) node [anchor=north west][inner sep=0.75pt]    {$f_{\varphi }( 0) =0$};
% Text Node
\draw (562.17,271.73) node [anchor=north west][inner sep=0.75pt]    {$f_{\varphi}(1) =f(y)$};
% Text Node
\draw (401.17,325.73) node [anchor=north west][inner sep=0.75pt]    {$Y$};
% Text Node
\draw (639.17,322.73) node [anchor=north west][inner sep=0.75pt]    {$X$};
% Text Node
\draw (365.17,130) node [anchor=north west][inner sep=0.75pt]    {$\tilde{f}_{\varphi}( 0) =\tilde{x}_{0}$};
% Text Node
\draw (534.17,96.73) node [anchor=north west][inner sep=0.75pt]    {$\tilde{f}_{\varphi }( 1)$};
% Text Node
\draw (530,192.73) node [anchor=north west][inner sep=0.75pt]    {$P$};
% Text Node
\draw (592,133.73) node [anchor=north west][inner sep=0.75pt]    {$\tilde{X}$};
% Text Node
\draw (159,141.6) node [anchor=north west][inner sep=0.75pt]    {$\widetilde{f_{\varphi}}$};
\end{tikzpicture}}
\caption{Diagram on Kosniowski}
\end{figure}
\end{document}

enter image description here

If you created a spline that wrapped a formula you would have to find the right coordinates and this is a big problem because Mathcha uses a lot of code and you would lose a lot of time. So the advice I give you so sincerely to approach TikZ very slowly...

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.