Quiver 도구를 사용하여 다이어그램을 만들었지만 컴파일할 때 충돌이 발생합니다.

Quiver 도구를 사용하여 다이어그램을 만들었지만 컴파일할 때 충돌이 발생합니다.

Quiver 편집기가 나에게 이것을 보여줍니다.

여기에 이미지 설명을 입력하세요

하지만 빈 뒷면 프로젝트에 복사하고 붙여넣고 컴파일하면 다음과 같은 결과가 나타납니다.

여기에 이미지 설명을 입력하세요

이것은 내가 사용하는 코드입니다.

\documentclass{article}
\usepackage[spanish]{babel}

\usepackage{tikz}
\usetikzlibrary{arrows}
\usepackage{tikz-cd}
\usetikzlibrary{babel}
\usepackage{quiver}  

\begin{document}

\[\begin{tikzcd}
    F &&& F \\
    &&&& {} \\
    {K(s_2,...,s_n)(T)} & {} & {} & {K(s_2,...,s_n)(s_1)} \\
    & {K(T)} \\
    {K(s_2,...,s_n)} &&& {K(s_2,...,s_n)}
    \arrow["{\textrm{alg.} \\ ( \textrm{transit.})}"{description}, hook, from=3-1, to=1-1]
    \arrow[shorten <=2pt, Rightarrow, from=3-2, to=3-3]
    \arrow[hook', from=3-4, to=1-4]
    \arrow["{\textrm{alg.} \\ (T \textrm{ base})}"', hook, from=4-2, to=1-1]
    \arrow[hook', from=4-2, to=3-1]
    \arrow["{\textrm{alg.}}", curve={height=-30pt}, hook', from=5-1, to=1-1]
    \arrow["{\textrm{alg.} \\ \textrm{(si no, abs)}}"', hook', from=5-1, to=3-1]
    \arrow["{\textrm{alg.}}", curve={height=-30pt}, from=5-4, to=1-4]
    \arrow["{\textrm{alg.} \\ (\textrm{transit.})}"', hook', from=5-4, to=3-4]
\end{tikzcd}\]
\end{document}

왜 이런 일이 일어나는지 아는 사람이 있나요?

답변1

코드에 이미 모든 줄 바꿈이 표시되어 있습니다. 다이어그램을 변경하는 대신 간단히 다음을 사용하여 활성화할 수 있습니다.

\tikzcdset{
  arrows={align=center}
}

전체 MWE:

\documentclass{article}
\usepackage[spanish]{babel}

\usepackage{tikz}
\usetikzlibrary{arrows}
\usepackage{tikz-cd}
\usetikzlibrary{babel}
\usepackage{quiver}  

\tikzcdset{
  arrows={align=center}
}

\begin{document}

\[\begin{tikzcd}[sep=large]
    F &&& F \\
    &&&& {} \\
    {K(s_2,...,s_n)(T)} & {} & {} & {K(s_2,...,s_n)(s_1)} \\
    & {K(T)} \\
    {K(s_2,...,s_n)} &&& {K(s_2,...,s_n)}
    \arrow["{\textrm{alg.} \\ (\textrm{transit.})}"{description}, hook, from=3-1, to=1-1]
    \arrow[shorten <=2pt, Rightarrow, from=3-2, to=3-3]
    \arrow[hook', from=3-4, to=1-4]
    \arrow["{\textrm{alg.} \\ (T \textrm{ base})}"', hook, from=4-2, to=1-1]
    \arrow[hook', from=4-2, to=3-1]
    \arrow["{\textrm{alg.}}", curve={height=-60pt}, hook', from=5-1, to=1-1]
    \arrow["{\textrm{alg.} \\ \textrm{(si no, abs)}}"', hook', from=5-1, to=3-1]
    \arrow["{\textrm{alg.}}", curve={height=-60pt}, from=5-4, to=1-4]
    \arrow["{\textrm{alg.} \\ (\textrm{transit.})}"', hook', from=5-4, to=3-4]
\end{tikzcd}\]
\end{document}

여기에 이미지 설명을 입력하세요

답변2

왼쪽 그림만 코드를 일부 편집했습니다. array텍스트를 두 줄로 작성하기 위해 를 추가했습니다 .

\documentclass{article}
\usepackage[spanish]{babel}
\usepackage{tikz}
\usetikzlibrary{arrows}
\usepackage{tikz-cd}
\usetikzlibrary{babel}
\usepackage{quiver}  

\begin{document}

\[\begin{tikzcd}
    F &&& F \\
    &&&& {} \\
    {K(s_2,...,s_n)(T)} & {} & {} & {K(s_2,...,s_n)(s_1)} \\
    & {K(T)} \\
    {K(s_2,...,s_n)} &&& {K(s_2,...,s_n)}
    \arrow["{\arraycolsep=1pt\def\arraystretch{0.8}\begin{array}{c} \textrm{alg.} \\ \textrm{(transit.)}\end{array}}"{description}, hook, from=3-1, to=1-1]
    \arrow[shorten <=2pt, Rightarrow, from=3-2, to=3-3]
    \arrow[hook', from=3-4, to=1-4]
    \arrow["{\arraycolsep=1pt\def\arraystretch{.8}\begin{array}{c} \textrm{alg.} \\ \textrm{($T$ base)}\end{array}}"', hook, from=4-2, to=1-1]
    \arrow[hook', from=4-2, to=3-1]
    \arrow["{\arraycolsep=.5pt\begin{array}{c} \textrm{alg.}\\ \end{array}}", curve={height=-50pt}, hook', from=5-1, to=1-1]
    \arrow["{\arraycolsep=1pt\def\arraystretch{0.8}\begin{array}{c} \textrm{\quad alg.} \\ \quad \textrm{(si no, abs)}\end{array}}"', hook', from=5-1, to=3-1]
    \arrow["{\textrm{alg.}}", curve={height=-30pt}, from=5-4, to=1-4]
    \arrow["{\textrm{alg.} \\ (\textrm{transit.})}"', hook', from=5-4, to=3-4]
\end{tikzcd}\]
\end{document}

여기에 이미지 설명을 입력하세요

답변3

이것은 의 버그였습니다.떨림이전에는 줄 바꿈이 포함된 다이어그램을 내보낼 수 없었던 다이어그램 편집기입니다. 이 문제는 버전 1.5.1에서 수정되었습니다. 편집기에서 다이어그램을 다시 열고(내보낸 다이어그램과 함께 제공된 링크를 열어 수행할 수 있음) 다시 내보내면 올바른 TikZ 출력을 얻게 됩니다.

앞으로도 문제가 발생하면떨림출력해주세요버그 추적기에 보고하세요., 그래야 고칠 수 있습니다.

(그동안 솔루션을 제공해 주신 다른 답변에 감사드립니다.)

관련 정보