I have to use tikz-cd package to draw triangular commutative diagram. I have downloaded the tikz-cd package and put the file.sty in the same folder where I have the latex file. Then I wrote \usepackage{tikz-cd} but it returns me "Process crashed". Can someone help me? I'm not so able to install Latex packages. Thanks!
[Tex/LaTex] How to install Tikz-cd on MikTex
packagestikz-cd
Related Solutions
Fleshing out what @Qrrbrbirlbel noticed from your screenshot (which, generally speaking, isn't enough to solve a problem here on TeX.SX), it looks like you don't actually have a full installation of LaTeX. You should download a standard TeX distribution:
MikTeX is a popular choice for Windows, with a very idiomatic installation procedure, and will get the job done. TeX Live has other advantages, which are laid out elsewhere.
Both of these provide mature package managers to let you install LaTeX packages with a click of a button (they'll even present you with a searchable, comprehensive list of all files from CTAN). Search for PGF and TikZ, and download all related packages.
We can place the boxes in the middle as labels “near end”, but a bit lowered and with smashed depth. For the upper boxes, I use \overset
, but making the boxes zero width for safety.
\documentclass{article}
\usepackage{amsmath}
\usepackage{tikz-cd}
\newcommand{\sboxed}[1]{%
\,\raisebox{-1ex}[\height][0pt]{\fbox{$\scriptstyle\mathstrut#1$}}%
}
\newcommand{\uboxed}[1]{%
\makebox[0pt]{\fbox{$\scriptstyle\mathstrut#1$}}%
}
\begin{document}
\begin{tikzcd}[row sep=huge,column sep=large]
0 \arrow[r] &
C_{p+1} \arrow[r,"\phi"] \arrow[d,"\partial_C"',"\sboxed{c_p}" near end] &
\overset{\uboxed{d_{p+1}}}{D_{p+1}}
\arrow[r,"\psi"] \arrow[d,"\partial_D"',"\sboxed{d_p}" near end] &
\overset{\uboxed{e_{p+1}}}{E_{p+1}}
\arrow[r] \arrow[d,"\partial_E"',"\sboxed{e_p}" near end] &
0 \\
0 \arrow[r] &
C_{p} \arrow[r,"\phi"] \arrow[d,"\partial_C"',"\sboxed{c_{p-1}}" near end] &
D_{p} \arrow[r,"\psi"] \arrow[d,"\partial_D"',] &
E_{p} \arrow[r] \arrow[d,"\partial_E"'] &
0 \\
0 \arrow[r] &
C_{p-1} \arrow[r,"\phi"] &
D_{p-1} \arrow[r,"\psi"] &
E_{p-1} \arrow[r] &
0
\end{tikzcd}
\end{document}
Best Answer
Here is how to do it: in Program Files, select
MiKTeX 2.9 > Maintenance (Admin) > MiKTeX Package Manager
. You should obtain a popup window like this:In the small edit window which ends with the icon of a funnel, you can filter the packages to speed up the process. Select the tikz-cd package, right click on it and ask for
install
. That's all.