我想在边缘上放置一个十字路口。我按照以下方式进行操作:
\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage[english,russian]{babel}
\usepackage{tikz}
\usepackage{color}
\usetikzlibrary{shapes.misc}
\begin{document}
\begin{tikzpicture}
[-latex,auto,
bkeg/.style={draw=red!30}]
\draw[bkeg] (0,0) to [bend left] node [black, pos=0.3, auto=false, cross out, draw]{} (4,4);
\end{tikzpicture}
\end{document}
在这里我得到了交叉点:
如何去掉第二行交叉处的箭头和?是否可以在从属节点中重置此“-latex”选项?
答案1
是的,您可以将-
(如一条没有箭头的线)设置为node
选项:
\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage{tikz}
\usepackage{color}
\usetikzlibrary{shapes.misc}
\begin{document}
\begin{tikzpicture}
[-latex,auto,
bkeg/.style={draw=red!30}]
\draw[bkeg] (0,0) to [bend left] node [black, pos=0.3, auto=false, cross out, -, draw]{} (4,4);
\end{tikzpicture}
\end{document}