Reducir el tamaño de un diagrama de carcaj tikz

Reducir el tamaño de un diagrama de carcaj tikz

El siguiente código de tikz quiver parece demasiado grande cuando se compila en látex. ¿Hay alguna manera de reducirlo?

Gracias

\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}

ingrese la descripción de la imagen aquí

Respuesta1

\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}
\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}

Diagrama acumulativo triangular

Respuesta2

Aquí hay otra manera de hacerlo.

resultado

El código al final muestra solo un triángulo, que funcionaría si lo usaras en un tikzpictureentorno:

% ~~~ just one triangle ~~~~~~~~~~~~~~~~~~~~~~~
    \draw ( 90:1) node[txt]{$v_1$} -- 
          (200:2) node[txt]{$v_2$} -- 
          (340:2) node[txt]{$v_3$} -- cycle;
  • usar coordenadas polares
  • dibuja de (90:1) a (200:2) a (340:2) y cierra y finaliza (; ) este camino
  • pon un nodecada vez que estés en la siguiente posición (mira los que faltan)\ )
  • use un estilo para este nodo, que simplemente rellene un poco de color blanco
  • coloque algo de texto, aquí en modo matemático$ .. $

Dibujar un segundo Y pensar en términos de refactorización, usar una macro TeX parece razonable:

  • Tikztiende a favorecer \defsobre\newcommand , ciertamente por una razón
  • Para simplificar las cosas, simplemente paso la longitud vertical y 3 índices (esto ciertamente podría perfeccionarse más)
  • que abstrae el mismo triángulo en:
\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;}%

Finalmente, simplemente haga tantas llamadas a estos triángulos como desee dentro de un tikzpictureentorno, que se expande en una serie de dichas \draw ... ;rutas:

\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 ~~~

información relacionada