Graphics, Figures & Tables ⇒ Diagram with two Elements and four Arrows
Diagram with two Elements and four Arrows
I need to learn how to make a diagram with several arrows as in the attached figure.
I could not figure it out from http://en.wikibooks.org/wiki/LaTeX/Crea ... ics#XY-pic.
It would be very appreciated if you show me how to do it.
Thanks.
bkarpuz
- Attachments
-
- diag1.JPG (4.73 KiB) Viewed 1891 times
Learn LaTeX easily with newest books:
The LaTeX Beginner's Guide: 2nd edition and perfect for students writing a thesis
The LaTeX Cookbook: 2nd edition full of practical examples for mathematics, physics, chemistry, and more
LaTeX Graphics with TikZ: the first book about TikZ for perfect drawings in your LaTeX thesis
- localghost
- Site Moderator
- Posts: 9202
- Joined: Fri Feb 02, 2007 12:06 pm
Diagram with two Elements and four Arrows
Code: Select all
\documentclass{minimal}
\usepackage{tikz}
\usetikzlibrary{positioning}
\begin{document}
\begin{tikzpicture}[>=stealth]
\node (A) {A};
\node[below right=3cm of A] (B) {B};
\draw[->] (A) |- (B) node[right,pos=0.25] {L};
\draw[->] (B) |- (A) node[below,pos=0.75] {D};
\draw[->] (A.325) -- (B.125) node[midway,above right] {M};
\draw[->] (B.145) -- (A.305) node[midway,below left] {C};
\end{tikzpicture}
\end{document}
Thorsten
Board Rules
Avoidable Mistakes
¹ System: TeX Live 2025 (vanilla), TeXworks 0.6.10
Diagram with two Elements and four Arrows
Many thanks localghost!localghost wrote:I would prefer the pgf/tikZ package. It allows to draw such commutative diagrams very easy.
Study the package manual to draw more complex diagrams of this kind.
Thorsten