Autor Tema: Package pgfkeys Error: I do not know the key '/tikz/curve'

0 Usuarios y 1 Visitante están viendo este tema.

07 Diciembre, 2022, 03:12 am
Leído 426 veces

malboro

  • $$\Large \color{#5b61b3}\pi\,\pi\,\pi\,\pi\,\pi$$
  • Mensajes: 1,043
  • País: pe
  • Karma: +0/-0
  • Sexo: Masculino
Hola a todos, al colocar lo siguiente creado en tikz quiver

Código: [Seleccionar]
% https://q.uiver.app/?q=WzAsNyxbMSwwLCJBIl0sWzIsMCwiQyJdLFszLDAsIlxcdGlsZGUgQyJdLFs0LDAsIkMiXSxbNSwwLCJCIl0sWzYsMCwiXFx0aWxkZSBCIl0sWzAsMCwiXFx0aWxkZSBBIl0sWzAsMSwiXFx2YXJwaGkiLDJdLFsxLDIsImgiLDJdLFszLDIsImgiXSxbNCwzLCJcXHBzaSJdLFs1LDQsImciXSxbNiwwLCJmIiwyXSxbNiwyLCJoXFxjaXJjIFxcdmFycGhpXFxjaXJjIGYiLDAseyJjdXJ2ZSI6LTJ9XSxbNSwyLCJoXFxjaXJjIFxccHNpIFxcY2lyYyBnIiwyLHsiY3VydmUiOjJ9XV0=
\[\begin{tikzcd}
{\tilde A} & A & C & {\tilde C} & C & B & {\tilde B}
\arrow["\varphi"', from=1-2, to=1-3]
\arrow["h"', from=1-3, to=1-4]
\arrow["h", from=1-5, to=1-4]
\arrow["\psi", from=1-6, to=1-5]
\arrow["g", from=1-7, to=1-6]
\arrow["f"', from=1-1, to=1-2]
\arrow["{h\circ \varphi\circ f}", curve={height=-12pt}, from=1-1, to=1-4]
\arrow["{h\circ \psi \circ g}"', curve={height=12pt}, from=1-7, to=1-4]
\end{tikzcd}\]
(Enlace a lo que debería producir el código anterior)

Y me sale que:! Package pgfkeys Error: I do not know the key '/tikz/curve', to which you pass
ed 'height=12pt', and I am going to ignore it. Perhaps you misspelled it.
See the pgfkeys package documentation for explanation.
Type H <return> for immediate help
...

Mensaje de la moderación: se ha corregido el formato del mensaje por uno mucho más entendible y legible.
Es verdad que un matemático que no tenga algo de poeta nunca será un matemático perfecto.

07 Diciembre, 2022, 07:15 am
Respuesta #1

manooooh

  • $$\Large \color{#9c57a6}\pi\,\pi\,\pi\,\pi\,\pi\,\pi$$
  • Mensajes: 4,394
  • País: ar
  • Karma: +1/-0
  • Sexo: Masculino
Hola

y me sale que:! Package pgfkeys Error: I do not know the key '/tikz/curve', to which you pass
ed 'height=12pt', and I am going to ignore it. Perhaps you misspelled it.
See the pgfkeys package documentation for explanation.
Type H <return> for immediate help
...

Varias cosas. Si te fijas en la página de quiver, cuando copias el código del diagrama debes tener cuidado de agregar el paquete "quiver":


Te lo puedes instalar (no pesa mucho porque son pocas líneas), o bien traer algunas líneas de su definición a tu .tex, las indispensables que necesita tu diagrama son:

1) Incluir el paquete tikz-cd
2) Usar la librería de tikz "calc"
3) Definir "curve" porque es un agregado del creador (no existe como tal en tikz-cd)

Todo eso lo puedes ver (como sugiere la imagen) en: https://raw.githubusercontent.com/varkor/quiver/master/src/quiver.sty

En síntesis, el código que me funciona en Overleaf (no sé si en tu computadora tienes instalado el paquete tikz-cd, sino debes instalarlo) es:

Código: [Seleccionar]
\documentclass{article}
\usepackage{tikz-cd}
\usetikzlibrary{calc}

% A TikZ style for curved arrows of a fixed height, due to AndréC.
\tikzset{curve/.style={settings={#1},to path={(\tikztostart)
    .. controls ($(\tikztostart)!\pv{pos}!(\tikztotarget)!\pv{height}!270:(\tikztotarget)$)
    and ($(\tikztostart)!1-\pv{pos}!(\tikztotarget)!\pv{height}!270:(\tikztotarget)$)
    .. (\tikztotarget)\tikztonodes}},
    settings/.code={\tikzset{quiver/.cd,#1}
        \def\pv##1{\pgfkeysvalueof{/tikz/quiver/##1}}},
    quiver/.cd,pos/.initial=0.35,height/.initial=0}

\begin{document}

\begin{tikzcd}
{\tilde A} & A & C & {\tilde C} & C & B & {\tilde B}
\arrow["\varphi"', from=1-2, to=1-3]
\arrow["h"', from=1-3, to=1-4]
\arrow["h", from=1-5, to=1-4]
\arrow["\psi", from=1-6, to=1-5]
\arrow["g", from=1-7, to=1-6]
\arrow["f"', from=1-1, to=1-2]
\arrow["{h\circ \varphi\circ f}", curve={height=-12pt}, from=1-1, to=1-4]
\arrow["{h\circ \psi \circ g}"', curve={height=12pt}, from=1-7, to=1-4]
\end{tikzcd}

\end{document}


Saludos

07 Diciembre, 2022, 03:50 pm
Respuesta #2

malboro

  • $$\Large \color{#5b61b3}\pi\,\pi\,\pi\,\pi\,\pi$$
  • Mensajes: 1,043
  • País: pe
  • Karma: +0/-0
  • Sexo: Masculino
MUCHAS GRACIAS, CONSEGUÍ  ;D  ;D.

Saludos cordiales.
Es verdad que un matemático que no tenga algo de poeta nunca será un matemático perfecto.