![TeX.SE 中的图表错误](https://linux22.com/image/453341/TeX.SE%20%E4%B8%AD%E7%9A%84%E5%9B%BE%E8%A1%A8%E9%94%99%E8%AF%AF.png)
该代码不起作用的原因是什么?
\documentclass[a4paper,12pt]{article}
\usepackage{tikz}
\begin{document}
\[
A \arrow[rr, bend left] & C \arrow[rd] & E \\
B \arrow[rr, bend right] \arrow[u] \arrow[ru] & D \arrow[u] \arrow[lu] \arrow[ru] & F \arrow[u]
\]
\end{document}
/main.tex :5 Undefined control sequence. [A \arrow]
/main.tex :5 Misplaced alignment tab character &. [A \arrow[rr, bend left] &]
/main.tex :5 Undefined control sequence. [A \arrow[rr, bend left] & C \arrow]
/main.tex :5 Misplaced alignment tab character &. [A \arrow[rr, bend left] & C \arrow[rd] &]
/main.tex :6 Undefined control sequence. [B \arrow]
/main.tex :6 Undefined control sequence. [B \arrow[rr, bend right] \arrow]
/main.tex :6 Undefined control sequence. [B \arrow[rr, bend right] \arrow[u] \arrow]
/main.tex :6 Misplaced alignment tab character &. [...rrow[rr, bend right] \arrow[u] \arrow[ru] &]
/main.tex :6 Undefined control sequence. [...bend right] \arrow[u] \arrow[ru] & D \arrow]
/main.tex :6 Undefined control sequence. [...] \arrow[u] \arrow[ru] & D \arrow[u] \arrow]
/main.tex :6 Undefined control sequence. [... \arrow[ru] & D \arrow[u] \arrow[lu] \arrow]
/main.tex :6 Misplaced alignment tab character &. [...w[ru] & D \arrow[u] \arrow[lu] \arrow[ru] &]
/main.tex :6 Undefined control sequence. [... \arrow[u] \arrow[lu] \arrow[ru] & F \arrow]
答案1
看起来像tikz-cd
符号
\documentclass[a4paper,12pt]{article}
\usepackage{tikz-cd}
\begin{document}
\begin{tikzcd}
A \arrow[rr, bend left] & C \arrow[rd] & E \\
B \arrow[rr, bend right] \arrow[u] \arrow[ru] & D \arrow[u] \arrow[lu] \arrow[ru] & F \arrow[u]
\end{tikzcd}
\end{document}
编辑:我现在看到你甚至tikz-cd
在帖子上有一个标签