Guest User

Untitled

a guest
Mar 19th, 2018
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.60 KB | None | 0 0
  1. documentclass[12pt]{article}
  2. usepackage[utf8]{inputenc}
  3. usepackage{amsmath,amssymb}
  4. usepackage{graphicx,tikz,tikz-cd}
  5. usepackage[margin=2.25cm]{geometry}
  6. usepackage{fancyhdr}
  7. pagestyle{fancy}
  8. lhead{Tikz vs. Tikz-cd}
  9. cfoot{}
  10. begin{document}
  11. I have done this using just Tikz in the past.
  12. [begin{tikzpicture}[node distance=2cm]
  13. node (Q1){$0$};
  14. node[right of=Q1] (Q2){$L$};
  15. node[right of=Q2] (Q3){$M$};
  16. node[right of=Q3] (Q4){$N$};
  17. node[right of=Q4] (Q5){$0$};
  18. draw[->,thick] (Q1) -- (Q2);
  19. draw[->,thick] (Q2) -- node[pos=.5,above]{$psi$}(Q3);
  20. draw[->,thick] (Q3) -- node[pos=.5,above]{$varphi$}(Q4);
  21. draw[->,thick] (Q4) --(Q5);
  22. draw [bend left,->,dashed] (Q4) to node[pos=.5,below]{$alpha$}(Q3);
  23. draw [bend left,->,dashed] (Q3) to node[pos=.5,below left]{$beta$}(Q2);
  24. end{tikzpicture}]
  25.  
  26. Now I am trying to switch to using Tikz-cd, and I would like to add a curved under arrow from the zero on one end to the other. I have been able to solve the rest of it but I am not very fluent with the tikz-cd syntax yet.
  27.  
  28. [begin{tikzcd}[node distance=2cm]
  29. 0 arrow[mapsto]{r}{varphi^{(1)}_{1}}
  30. & 24 arrow[mapsto]{r}{varphi^{(1)}_{1}}
  31. & 17 arrow[mapsto]{r}{varphi^{(1)}_{1}}
  32. & 18 arrow[mapsto]{r}{varphi^{(1)}_{1}}
  33. & 0
  34. end{tikzcd}]
  35.  
  36. & 0 arrow[mapsto, bend left]{l}
  37.  
  38. documentclass[a4paper,12pt]{article}
  39.  
  40. usepackage{tikz-cd,amsmath,amssymb}
  41.  
  42. begin{document}
  43. begin{tikzcd}
  44. 0 arrow[r, "varphi^{(1)}_{1}", maps to] & 24 arrow[r, "varphi^{(1)}_{1}", maps to] & 17 arrow[r, "varphi^{(1)}_{1}", maps to] & 18 arrow[r, "varphi^{(1)}_{1}", maps to] & 0 arrow[llll, maps to, bend left]
  45. end{tikzcd}
  46. end{document}
Add Comment
Please, Sign In to add comment