请问箭头出了什么问题?我该如何修复它?
\documentclass {article}
\usepackage {tikz}
\usetikzlibrary {positioning}
\definecolor {processblue}{cmyk}{0.96,0,0,0}
\begin {document}
\begin {center}
\begin {tikzpicture}[-latex ,auto ,node distance =1cm and 2cm ,on grid ,
semithick ,
state/.style ={ rectangle ,top color =white , bottom color = white ,
draw,black, text=black , minimum width =1 cm}]
\node(C);
\node[state] (A) [above left =of C] {$\mathrm{CaO}$};
\node[state] (B) [above right =of C] {$\mathrm{Ca(OH)_2}$};
\node[state] (D) [below left =of C] {$\mathrm{Ca}$};
\node[state] (E) [below right =of C] {$\mathrm{CaCl_2}$};
\node[state] (F) [above right =of A] {$\mathrm{CaCO_3}$};
\path (A) edge [state] node[above] {$3$} (B);
\path (D) edge [state] node[left] {$2$} (A);
\path (D.5) edge [state] node[above] {$5$} (E.5);
\path (E.-5) edge [state] node[below] {$1$} (D.-5);
\path (B) edge [state] node[right] {$4$} (E);
\path (F) edge [state] node[left] {$7$} (A);
\path (B) edge [state] node[right] {$6$} (F);
\end{tikzpicture}
\end{center}
\end{document}
答案1
请尝试以下操作:
\documentclass {article}
\usepackage {tikz}
\usetikzlibrary {positioning}
\definecolor {processblue}{cmyk}{0.96,0,0,0}
\begin {document}
\begin {center}
\begin {tikzpicture}[-latex ,auto ,node distance =1cm and 2cm ,on grid ,
semithick ,
state/.style ={ rectangle ,top color =white , bottom color = white ,
draw,black, text=black , minimum width =1 cm}]
\node(C);
\node[state] (A) [above left =of C] {$\mathrm{CaO}$};
\node[state] (B) [above right =of C] {$\mathrm{Ca(OH)_2}$};
\node[state] (D) [below left =of C] {$\mathrm{Ca}$};
\node[state] (E) [below right =of C] {$\mathrm{CaCl_2}$};
\node[state] (F) [above right =of A] {$\mathrm{CaCO_3}$};
\path (A) edge [state] node[above] {$3$} (B);
\path (D) edge [state] node[left] {$2$} (A);
\path (D.5) edge [state] node[above] {$5$} (E.175);
\path (E.185) edge [state] node[below] {$1$} (D.355);
\path (B) edge [state] node[right] {$4$} (E);
\path (F) edge [state] node[left] {$7$} (A);
\path (B) edge [state] node[right] {$6$} (F);
\end{tikzpicture}
\end{center}
\end{document}