There are some diagrams which are little bit complicated, I use array package to draw basic ones I mean square ones. but is it possible to draw any diagram by [array] package?
for example
can you help me in this, thin i can mimic the same way
Thanks a lot
-
Could you post minimal working example (MWE)– karathanApr 2, 2013 at 21:25
-
1I am sorry to bother you, but I just noticed that although your questions have received several answers and you have up-voted them, you still haven't accepted any (up-voting and accepting are two different actions). Please revisit your questions and, for each one, consider accepting the answer that best solved your problems; in case of doubt, please see How do you accept an answer?.– Gonzalo MedinaApr 3, 2013 at 0:56
-
bec i accept all of them :)– RahmanApr 3, 2013 at 12:28
3 Answers
A rather nice diagram is obtained with tikz-cd
:
\documentclass{article}
\usepackage{tikz,tikz-cd}
\begin{document}
\[
\begin{tikzcd}[column sep=2.5pc,row sep=2pc]
{} & B \arrow{d} \arrow[bend left]{dddrr} \\
A \arrow{r} \arrow{rrd} \arrow[bend right]{rrrdd} & G \\
{} & {} & P \arrow{ul}[swap]{\tilde{\varphi}} \\
{} & {} & {} & B*C \arrow{ul}[swap]{\nu}
\end{tikzcd}
\]
\end{document}
-
-
1@Rahman That was a guess. It's a tilde, by the way. If you want a hat, use
\hat{\varphi}
(always in math mode).– egregApr 2, 2013 at 22:00
Or else using the tikz
positioning
library
Here's the code:
% arara: pdflatex
\documentclass{standalone}
\usepackage{tikz}
\usetikzlibrary{positioning}
% arrows set as stealth fighters
\tikzset{>=stealth}
\begin{document}
\begin{tikzpicture}
% setup the nodes
\node (B){$B$};
\node[below=of B](G){$G$};
\node[left=of G](A){$A$};
\node[below right=of G](P){$P$};
\node[below right=of P](BstarC){$B*C$};
% connect them
\foreach \start/\finish/\mylabel in {B/G/, A/G/, A/P/, P/G/$\tilde{\varphi}$, BstarC/P/$\nu$}
{
\draw[->](\start)--(\finish) node[midway,above]{\mylabel};
}
% bended arrows
\draw[->](A) to[bend right=30] (BstarC);
\draw[->](BstarC) to[bend right=20] (B);
\end{tikzpicture}
\end{document}