It will be helpful if someone writes for me the code in latex for the following diagram and explain the code.
The inverse limit is taken over s
Asked
Active
Viewed 561 times
1 Answers
6
This is a code that demonstrates two solutions: the psmatrix environment from pst-node (based on pstricks) and the tikz-cd environment from the homonymous package (based on tikz-pgf):
\documentclass[pdf]{article}
\usepackage{mathtools}
\usepackage{pst-node}
\usepackage{tikz-cd}
\begin{document}
\texttt{psmatrix solution: }
\[ \psset{arrows=->, arrowinset=0.25, linewidth=0.6pt, nodesep=3pt, rowsep=0.6cm, colsep = 1cm}
\everypsbox{\scriptstyle}
\begin{psmatrix}
%%% nodes
0 & \varprojlim_{s} M/p^s & \varprojlim_{s} N/p^s & \varprojlim_{s} P/p^s& 0\\%
0 & M & N & P& 0
%%% horizontal arrows
\ncline{1,1}{1,2} \ncline{1,2}{1,3} \ncline{1,3}{1,4} \ncline{1,4}{1,5}
\ncline{2,1}{2,2} \ncline{2,2}{2,3} \ncline{2,3}{2,4} \ncline{2,4}{2,5}
%%% vertical arrows
\psset{nodesepA = -5pt}
\ncline{1,2}{2,2} \ncline{1,3}{2,3} \ncline{1,4}{2,4}
% \ncline[offset=0.8pt]{2,2}{3,2} \ncline[offset=-0.6pt]{2,3}{3,3} \ncline[offset=0.6pt]{2,4}{3,4}
\end{psmatrix}
\]
\vskip 1cm
\texttt{tikz-cd solution: }
\[ \begin{tikzcd}\everymath{\displaystyle}
0 \arrow{r}& \smash{\varprojlim\limits_{s}} M/p^s \arrow{r}\arrow{d}& \smash{\varprojlim\limits_{s} }N/p^s \arrow{r}\arrow{d} & \smash{\varprojlim\limits_{s}} P/p^s\arrow{r}\arrow{d}& 0\\%
0 \arrow{r}& M \arrow{r}& N\arrow{r} & P\arrow{r}& 0
\end{tikzcd}
\]
\end{document}

-
Why the useless
\everymath{\displaystyle}? I'd define\newcommand{\dvarprojlim}[1]{\mathop{\mathstrut\varprojlim\limits_{#1}}}so the spacing after\dvarprojlim{s}would be good. – egreg Apr 14 '15 at 21:00 -
@egreg; it's a residue of an attempt to avoid writing
\limitsrepeatedly. I don't know why ythis happens (only intikzcd). Thank you for the suggestion, I'll add it. – Bernard Apr 14 '15 at 21:10
tikz-cd. If you have problems, post a minimal document showing what you have tried and then we can help you when you get stuck. – Alan Munn Apr 14 '15 at 18:26