3

I have the following picture. I want to make the arrows a little bigger, so that there is enough space for F and G to be written, and the diagram look a little more beautiful. Can anybody help?

\documentclass[12pt]{article}
\usepackage{tikz, pgfplots}
\pgfplotsset{compat=1.10}
\usepgfplotslibrary{groupplots}
\begin{document}
\begin{center}
\begin{tikzcd}    


    \widehat{w}_{i}  \arrow[maps to]{r}\arrow[maps to]{dr}[swap]{F }   &       x \widehat{w}_{i} \arrow[maps to]{r}\arrow[maps to]{dr}[swap]{F} &    x^{2}   \widehat{w}_{i}     \arrow[maps to]{r}          \arrow[maps to]{dr}[swap]{F} &     x^{3}  \widehat{w}_{i}   \arrow[maps to]{r}                               &     \ldots     \arrow[maps to]{r}        \arrow[maps to]{dr}          &                      x^{d_{i}}   \widehat{w}_{i}      \\ 
&     v_{i}     \arrow[maps to]{u}[]{G}\arrow[maps to]{r}[]{}&     x v_{i}  \arrow   [maps to] {r} \arrow[maps to]{u}{G}&   xv_{2} \, \,  \arrow[maps to]{u}{G}                \arrow[maps to]{r}    &  \, \,  \ldots                 \arrow[maps to]{r}       &                 x ^ { d_{i} - 1}       v_{i}                                           \arrow[maps to]{u}{G}    
\end{tikzcd}
\end{center}     
\end{document}    
Chern
  • 131

2 Answers2

7

You can use sep key.

enter image description here

It takes the following values:

enter image description here

But one can use other values (like 6cm say) too.

Please note that you can change only row and/or column seps too.

Your code with this key as large:

\documentclass[12pt]{article}
\usepackage{tikz-cd, pgfplots}
\pgfplotsset{compat=1.10}
\usepgfplotslibrary{groupplots}
\begin{document}
\begin{center}
\begin{tikzcd}[sep=large]   %%<<--- here
\widehat{w}_{i}  \arrow[maps to]{r}\arrow[maps to]{dr}[swap]{F }   &       x \widehat{w}_{i} \arrow[maps to]{r}\arrow[maps to]{dr}[swap]{F} &    x^{2}   \widehat{w}_{i}     \arrow[maps to]{r}          \arrow[maps to]{dr}[swap]{F} &     x^{3}  \widehat{w}_{i}   \arrow[maps to]{r}                               &     \ldots     \arrow[maps to]{r}        \arrow[maps to]{dr}          &                      x^{d_{i}}   \widehat{w}_{i}      \\
&     v_{i}     \arrow[maps to]{u}[]{G}\arrow[maps to]{r}[]{}&     x v_{i}  \arrow   [maps to] {r} \arrow[maps to]{u}{G}&   xv_{2} \, \,  \arrow[maps to]{u}{G}                \arrow[maps to]{r}    &  \, \,  \ldots                 \arrow[maps to]{r}       &                 x ^ { d_{i} - 1}       v_{i}                                           \arrow[maps to]{u}{G}
\end{tikzcd}
\end{center}
\end{document}

enter image description here

  • Thanks! And how can I make the $ F $ and $ G $ look bigger, in font? – Chern Sep 30 '15 at 03:47
  • @swaqar Do you really want it like that? If you insist, use \displaystyle in front of F andGlike{\displaystyle F}and{\displaystyle G} `. –  Sep 30 '15 at 06:16
  • It seems that arXiv doesn't recognize pgfplots and the sep=large key. What should I do then? – Chern Oct 02 '15 at 02:50
  • @swaqar You won't need pgfplots for this job. Pl. remove it. –  Oct 02 '15 at 03:27
  • I removed pdfplots, \pgfplotset and \usepgfplotslibrary commands, but it still gives me errors. It seems that arXiv doesn't recognize the sep command. – Chern Oct 02 '15 at 04:02
2

In addition to Mr. Kumar's perfect answer, you could use some other syntax if you want to change just single cases. In my example, I have added 1 cm between the two rows and 1 cm extra before the \ldots. If you are having bigger diagrams, this can be quite handy.

I also added some possibility to get all your labels bigger.

% arara: pdflatex

\documentclass[12pt]{article}
\usepackage{tikz-cd}

\begin{document}
\[
    \begin{tikzcd}[%
        ,every arrow/.append style={maps to}
        ,every label/.append style={font=\normalsize}
        ]
        \widehat{w}_{i} \arrow{r}\arrow{dr}[swap]{F} & x\widehat{w}_{i} \arrow{r}\arrow{dr}[swap]{F} & x^{2}\widehat{w}_{i} \arrow{r}\arrow{dr}[swap]{F} & x^{3}\widehat{w}_{i} \arrow{r} &[1cm] \ldots \arrow{r}\arrow{dr} & x^{d_{i}}\widehat{w}_{i} \\[1cm]
        & v_{i} \arrow{u}{G}\arrow{r} & xv_{i} \arrow{r}\arrow{u}{G} & xv_{2} \arrow{u}{G}\arrow{r} & \ldots \arrow{r} & x^{d_{i}-1}v_{i} \arrow{u}{G}
    \end{tikzcd}
\]      
\end{document}

enter image description here

LaRiFaRi
  • 43,807