Graphics, Figures & TablestikZ | Nodes midway on connecting Arrows

Information and discussion about graphics, figures & tables in LaTeX documents.
Post Reply
gheorghebg
Posts: 3
Joined: Sat Apr 21, 2012 5:22 pm

tikZ | Nodes midway on connecting Arrows

Post by gheorghebg »

Hello.

I am using tikz to draw commutative diagrams in mathematics. I would like to draw a diagram as in the .png attached. I almost reproduced it with the following code

Code: Select all

\begin{center}
\begin{tikzpicture}
\matrix (m) [matrix of math nodes, row sep=7em, column sep=10em, text height=1.5ex, text depth=0.5ex]
{ \catC & \UC    & \UC / S\\
        & \catM.      \\ };
\path[right hook->]
(m-1-1) edge node[above] {$r$} (m-1-2);
\path[->]
(m-1-1) edge node[below=3pt, left = 3pt] {$\gamma$} (m-2-2)
(m-1-2.20) edge node[above] {$\id$} (m-1-3.166)
(m-1-3.184) edge node[below] {$\id$} (m-1-2.354)

(m-1-2.248) edge node[left] {$Re$} (m-2-2.112)
(m-2-2.68) edge node[right] {$Sing$} (m-1-2.292);
\path[->, dotted] 
(m-2-2.0) edge node[above =10pt, left = 3pt] {$ Sing $} (m-1-3.275)
(m-1-3.217) edge node[below = 9pt, right = 4pt] {$ Re $} (m-2-2.34);
\end{tikzpicture}
\end{center}
I am just missing the red symbols. How could I add them to the picture ?
Thanks for your help. Bogdan
Attachments
diagram.png
diagram.png (15.74 KiB) Viewed 4739 times

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

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

User avatar
Stefan Kottwitz
Site Admin
Posts: 10350
Joined: Mon Mar 10, 2008 9:44 pm

tikZ | Nodes midway on connecting Arrows

Post by Stefan Kottwitz »

Hi Bogdan,

welcome to the board!

You could add a node to the edge, such as

Code: Select all

(m-2-2.68) edge node[right] {$Sing$} node [left] {$\dashv$} (m-1-2.292);
Furthermore, I would not write $Sing$, as this would be italic just like a product of 4 variables, with a math symbol spacing. I would use a roman font.

Btw. when you post code to the forum, which is very good, please also include the required macro definitions, otherwise we cannot really test. The best in any way is a Infominimal working example.

Stefan
LaTeX.org admin
gheorghebg
Posts: 3
Joined: Sat Apr 21, 2012 5:22 pm

Re: tikZ | Nodes midway on connecting Arrows

Post by gheorghebg »

Hi Stefan, Thanks. I'm embarrassed I didn't thought of it :oops:. For the $Sing$, it is indeed the result I want in math mode.

Thank you for you fast answer :D !
Bogdan
Post Reply