所以我在论文中遇到了一个 tikzcd 图形的小问题。它看起来非常“挤压”——如果你明白的话。有人能帮忙吗?我就是无法让它看起来正确
\[
\begin{tikzcd}[row sep=huge, column sep=small]
& Finanspolitisk\,disciplin \arrow[dash]{dr}{[Den\,liberale\,model]} \\
Indkomstlighed \arrow[dash]{ur}{[Den\,konservative\,model]}
\arrow[dash]{rr}{[Den\,skandinaviske\,model]} &&
Besk\text{æ}ftigelsesv\text{æ}kst
\end{tikzcd}
\]}
答案1
您需要文本单元格和标签,因此您可以先设置math mode=false
;您还可以将所有箭头设置为破折号,并使标签更小。
\documentclass[a4paper, 12pt]{article}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{amsmath}
\usepackage{tikz-cd}
\begin{document}
\[
\begin{tikzcd}[
math mode=false,
labels={font=\scriptsize},
row sep=huge,
column sep=small,
arrows=dash,
]
& Finanspolitisk disciplin \arrow[dr,"{[Den liberale model]}"]
\\
Indkomstlighed
\arrow[ur,"{[Den konservative model]}"]
\arrow[rr,"{[Den skandinaviske model]}"]
&&
Beskæftigelsesvækst
\end{tikzcd}
\]
\end{document}
为了不使解析器混淆,括号是必需的。
只要多花点功夫,你就可以让它变得“对称”。
\documentclass[a4paper, 12pt]{article}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{amsmath}
\usepackage{tikz-cd}
\begin{document}
\[
\begin{tikzcd}[
math mode=false,
labels={font=\scriptsize},
row sep=huge,
column sep={0em,between borders},
arrows=dash,
]
& Finanspolitisk disciplin \arrow[dr,"{[Den liberale model]}"]
\\
Indkomstlighed
\arrow[ur,"{[Den konservative model]}"]
\arrow[rr,"{[Den skandinaviske model]}"]
&&
Beskæftigelsesvækst
\end{tikzcd}
\]
\end{document}
答案2
像这样?
\documentclass[a4paper, 12pt]{article}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{amsmath}
\usepackage{tikz-cd}
\begin{document}
\[
\begin{tikzcd}[row sep=huge, column sep=small]
& \text{Finanspolitisk\,disciplin} \arrow[dash]{dr}{[\text{Den liberale model}]} \\
\text{Indkomstlighed} \arrow[dash]{ur}{[\text{Den konservative model}]} \arrow[dash]{rr}{[\text{Den\,skandinaviske\,model}]} && \text{Beskæftigelsesvækst}
\end{tikzcd}
\]
\end{document}