משתמש:Yoelpiccolo31/Yoelpiccolo31/מתמטיקה/שרטוטים ב- LATEX
Drawing sketches of Commutative Diagrams in LATEX:
\begin{tikzcd}[<options>]
<environment contents>
\end{tikzcd}
Inserting arrows:
Inside the {tikzcd} environment, the following synonymous commands are provided to produce arrows:
\arrow[<options>]
\ar[<options>]
If we want to draw a path with a middle arrow, just use:
\appendarrow{arrow size}{arrow color}{path}
For example,
\appendarrow{6pt}{black}{(-0.5, 0.125) to [out=60, in=120] (0.5, 0.125);}
A down arrow is created by the following command:
\Downarrow
Example 1:
\documentclass{article}
\usepackage{tikz}
\begin{document}
\begin{tikzpicture}
\node (x) at (0,0) {x};
\node (y) at (3,0) {y};
\draw[fill] (0.2,0) circle [radius=0.025];
\draw[fill] (2.8,0) circle [radius=0.025];
\draw [->] (x) -- (y)
\end{tikzpicture}
\end{document}
Example 2:
\documentclass{article}
\usepackage{tikz}
\begin{document}
\begin{tikzpicture}
\draw[fill] (0,0) circle [radius=0.025];
\draw[fill] (3,0) circle [radius=0.025];
\draw [->] (0,0) -- (3,0);
\node [left] at (0,0) {x};
\node [right] at (3,0) {y};
\end{tikzpicture}
\end{document}
The requested picture:
\documentclass{article}
\usepackage{tikz}
\begin{document}
\begin{tikzpicture}
\draw[fill] (0,0) circle [radius=0.025];
\draw[fill] (3,0) circle [radius=0.025];
\draw[fill] (6,0) circle [radius=0.025];
\draw (0,0) -- (6,0);
\node [above] at (0,0) {x};
\node [above] at (3,0) {y};
\node [above] at (6,0) {z};
\node (A) at (1.5,0) {$>$};
\node [above] at (A) {f};
\node (B) at (4.5,0) {$>$};
\node [above] at (B) {g};
\end{tikzpicture}
\end{document}
The requested picture, no. 2:
\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{decorations.markings,positioning,arrows}
\begin{document}
\tikzset{->-/.style={decoration={
markings,
mark=at position 0.5 with {\arrow{>}}},postaction={decorate}}}
\begin{tikzpicture}
\node (A) at (0,0) {};
\node (B) at (3,0) {};
\draw[fill] (A) circle [radius=0.025];
\draw[fill] (B) circle [radius=0.025];
\node [left] at (A) {$x$};
\node [right] at (B) {$y$};
\draw [->-=0.5] (0,0) to [bend left=50] (3,0) ;
\draw [->-=0.5] (0,0) to [bend right=50] (3,0) ;
%\draw (A) --(B) node [midway,above] {f};
\node (F) at (1.5,1) {$f$};
\node (G) at (1.5,-1) {$g$};
\draw[->,double] (1.5,0.4) to node[left] {$\alpha$} (1.5,-0.4);
\end{tikzpicture}
\end{document}
התמונה הרצויה, הראשונה:
התמונה הרצויה, השנייה:
להדביק את הקודים הללו בקומפיילר המקוון שכתובתו: [1], בקובץ הנמצא ב- path הבא:
My Projects -> TikzExamples -> arrows.tex