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}    

2 Answers 2

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

5
  • Thanks! And how can I make the $ F $ and $ G $ look bigger, in font?
    – Chern
    Commented Sep 30, 2015 at 3:47
  • @swaqar Do you really want it like that? If you insist, use \displaystyle in front of F and G` like {\displaystyle F} and {\displaystyle G} .
    – user11232
    Commented Sep 30, 2015 at 6:16
  • It seems that arXiv doesn't recognize pgfplots and the sep=large key. What should I do then?
    – Chern
    Commented Oct 2, 2015 at 2:50
  • @swaqar You won't need pgfplots for this job. Pl. remove it.
    – user11232
    Commented Oct 2, 2015 at 3: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
    Commented Oct 2, 2015 at 4: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

4
  • Wouldn't \cdots look better?
    – daleif
    Commented Sep 30, 2015 at 7:41
  • 1
    @daleif in my eyes, yes. But this is a design choice for the OP.
    – LaRiFaRi
    Commented Sep 30, 2015 at 8:33
  • How can I add 1cm to all row distances?
    – Chern
    Commented Oct 2, 2015 at 4:13
  • @swaqar Please see Mr. Kumar's answer! \begin{tikzcd}[row sep=...cm]
    – LaRiFaRi
    Commented Oct 2, 2015 at 7:23

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .