I am creating a kind of commutative diagram with different types of arrows. So far, I have defined different line styles for my different types of map, like this:
\tikzstyle{map}=[->,>=stealth',semithick]
\tikzstyle{incmap}=[semithick, right hook-latex]
\tikzstyle{typemap}=[->,>=latex',thin, dashed]
This way, I declare all my nodes in the layout that I want, and then I can declare maps between them easily using \draw[<style>]
. In addition, I can easily switch the style of a map (e.g. from a inclusion map to a normal one) if I decide that it is not the correct one.
Now, I want to create an arrow style for partial maps that looks like a normal arrow with a circle in the midpoint (no matter the length of the arrow). I know that I can do this in a one-by-one fashion, but I would like to be able to define that in a style, in a similar way to the others. To clarify, the arrows should look like this:
-o->
--o-->
---o--->
Any suggestions?
I am not using TikZ's cd
library, but I have checked it and there is nothing that solves the problem.
Thanks in advance!
EDIT: As suggested, I add here the MWE with my initial status.
\documentclass{standalone}
\usepackage{tikz}
\usetikzlibrary{arrows,positioning,shapes}
\begin{document}
\begin{tikzpicture}[on grid,node distance=20mm]
\tikzstyle{element}=[inner sep=2pt,minimum height=1.3em,font=\itshape]
\tikzstyle{label}=[auto,midway,font=\itshape,inner sep=2pt]
\tikzstyle{map}=[->,>=stealth',semithick]
\tikzstyle{incmap}=[semithick, left hook-latex]
\tikzstyle{typemap}=[->,>=latex',thin, dashed]
\node[element] (l) [] {L};
\node[element] (i) [right of=l] {I};
\node[element] (r) [right of=i] {R};
\draw[map] (l) to node [label,above] (lm) {l} (i);
\draw[incmap] (r) to node [label,above] (rm) {r} (i);
\end{tikzpicture}
\end{document}
\documentclass
, showing what you have done so far and ending with\end{document}
. Furthermore, do not use\tikzstyle
as it's deprecated (use\tikzset{key/.style={stuff}}
instead). Check themarkings
decoration to do what you wish: tex.stackexchange.com/q/4986/114143, it's possible to place circles instead of arrows as well.tikzset
with obsoletetikzstyle
?