Reduce the size of a tikz quiver diagram

The following tikz quiver code appears too large when compiled in latex. Is there a way to reduce it?

Thank you

\documentclass{article}
\usepackage{tikz-cd}
\begin{document}

$\begin{tikzcd}[cramped] &&&&&&&&&&& {v_7} \\ \\ &&&&&&&&&&& {v_1} \\ \\ &&&&&&&&&&& {v_4} \\ \\ &&&&&&&&&&& {v_{10}} \\ \\ &&&&&&&&& {v_{11}} &&&& {v_{12}} \\ &&&&&& {v_5} &&&&&&&&&& {v_6} \\ &&& {v_2} &&&&&&&&&&&&&&&& {v_3} \\ {v_8} &&&&&&&&&&&&&&&&&&&&&& {v_9} \arrow[no head, from=7-12, to=9-10] \arrow[no head, from=7-12, to=9-14] \arrow[no head, from=9-10, to=9-14] \arrow[no head, from=5-12, to=10-7] \arrow[no head, from=5-12, to=10-17] \arrow[no head, from=10-7, to=10-17] \arrow[no head, from=3-12, to=11-4] \arrow[no head, from=3-12, to=11-20] \arrow[no head, from=11-4, to=11-20] \arrow[no head, from=1-12, to=12-23] \arrow[no head, from=1-12, to=12-1] \arrow[no head, from=12-1, to=12-23] \end{tikzcd}$

\end{document}


• Can you please complete your code? These steps may help you: tex.meta.stackexchange.com/questions/228/… . A screenshot may also help. Thank you Commented Jan 17 at 19:42
• There are a lot of empty matrix entries in your diagram. Do you need to separate your nodes with all of those &'s?
– bonk
Commented Jan 17 at 19:55
• I seems like you want to draw a lot of "concentric" triangles. How about using tikz to draw equilateral triangles instead of isosceles ones? Commented Jan 17 at 21:03

\documentclass[tikz, border=1cm]{standalone}
\usepackage{tikz-cd}
\begin{document}
\begin{tikzcd}[cramped, sep=tiny]
&&&&&&&&&&& {v_7} \\
\\
&&&&&&&&&&& {v_1} \\
\\
&&&&&&&&&&& {v_4} \\
\\
&&&&&&&&&&& {v_{10}} \\
\\
&&&&&&&&& {v_{11}} &&&& {v_{12}} \\
&&&&&& {v_5} &&&&&&&&&& {v_6} \\
&&& {v_2} &&&&&&&&&&&&&&&& {v_3} \\
{v_8} &&&&&&&&&&&&&&&&&&&&&& {v_9}
\end{tikzcd}
\end{document}


Here's another way to do it.

The code at the end shows just one triangle, which would work, if you'd use it in a tikzpicture environment:

% ~~~ just one triangle ~~~~~~~~~~~~~~~~~~~~~~~
\draw ( 90:1) node[txt]{$v_1$} --
(200:2) node[txt]{$v_2$} --
(340:2) node[txt]{$v_3$} -- cycle;

• use polar coordinates
• draw from (90:1) to (200:2) to (340:2) and close and end (;) this path
• put a node each time you are at the next position (watch the missing \)
• use a style for this node, which just fills some white color
• place some text, here in math mode $..$

Drawing a second one AND thinking in terms of refactoring, using a TeX-macro seems reasonable:

• Tikz tends to favor \def over \newcommand, certainly for a reason
• to keep things simple enough, I just pass the vertical length and 3 indices (this could certainly be refined further)
• which abstracts the same triangle into:
\def\triag#1#2#3#4{% y-length, 3 indices
\draw ( 90:#1  ) node[txt]{$v_{#2}$} -- %
(200:2*#1) node[txt]{$v_{#3}$} -- %
(340:2*#1) node[txt]{$v_{#4}$} -- cycle;}%


Finally, just make as many calls to these triangles as you like inside a tikzpicture environment, which expands into a series of said \draw ... ; paths:

\documentclass[10pt,border=3mm,tikz]{standalone}

\def\triag#1#2#3#4{% y-length, 3 indices
\draw ( 90:#1  ) node[txt]{$v_{#2}$} -- %
(200:2*#1) node[txt]{$v_{#3}$} -- %
(340:2*#1) node[txt]{$v_{#4}$} -- cycle;}%

\begin{document}
\begin{tikzpicture}[
txt/.style={fill=white},
]
\triag{.5}{10}{11}{12}
\triag{1  }{4}{5}{6}
\triag{1.5}{1}{2}{3}
\triag{2  }{7}{8}{9}
\end{tikzpicture}
\end{document}

% ~~~ just one triangle ~~~~~~~~~~~~~~~~~~~~~~~
%   \draw ( 90:1) node[txt]{$v_1$} --
%         (200:2) node[txt]{$v_2$} --
%         (340:2) node[txt]{$v_3$} -- cycle;

% ~~~ later refactored using a TeX macro \triag ~~~