Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.
\documentclass[convert = false, tikz]{standalone}

\usepackage{float}

\begin{document}

\begin{tikzpicture}[every node/.style={midway}]
  \matrix[column sep={4em,between origins}, row sep={2em}] at (0,0) {

    \node(A) {$A$}  ; & \node(B) {$B$}; \\

    \node(C) {$C$}  ; & \node (D) {$D$};\\
  };
  \draw[<-] (C) -- (D) node[anchor=east]{};

  \draw[->] (A) -- (B) node[anchor=south] {};

  \draw[->] (B) -- (D) node[anchor=west] {};

  \draw[->] (C) -- (D) node[anchor=north] {};

\end{tikzpicture}

\end{document}

Here, I am trying to use an inclusion arrow between $A$ to $C$. Could you please suggest any idea for me? Thanks

share|improve this question
    
Why latex3? and why beamerposter? –  Manuel Feb 27 at 0:22

2 Answers 2

up vote 6 down vote accepted

Use left hook-> or right hook-> from the library arrows:

\documentclass{standalone}
\usepackage{tikz}
\usetikzlibrary{arrows}

\begin{document}

    \begin{tikzpicture}[every node/.style={midway}]
        \matrix[column sep={4em,between origins}, row sep={2em}] at (0,0) {
            \node(A) {$A$}; & \node(B) {$B$}; \\
            \node(C) {$C$}; & \node(D) {$D$}; \\
        };

        \draw[<->] (C) -- (D) node[anchor=east]{};
        \draw[->] (A) -- (B) node[anchor=south]{};
        \draw[->] (B) -- (D) node[anchor=west]{};
        \draw[right hook->] (A) -- (C) node[anchor=north]{};

    \end{tikzpicture}

\end{document}
share|improve this answer

Much more compact with tikz-cd

\documentclass{standalone}
\usepackage{tikz-cd}

\begin{document}
\begin{tikzcd}
A \arrow{r} \arrow[hookrightarrow]{d} & B \arrow{d}
\\
C \arrow[leftrightarrow]{r} & D
\end{tikzcd}
\end{document}

enter image description here

share|improve this answer
    
Thank you all. I got it. –  Rajesh Feb 27 at 2:11

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.