如何在边上添加符号以表示它们的长度相同?

时间:2016-01-29 03:49:10

标签: latex tikz

有些边缘长度相同。我想在图片上添加一些小符号:

enter image description here

我该怎么办?谢谢。

 \begin{tikzpicture}      
  \coordinate (Base1) at (0,0);
  \coordinate (Base2) at (4,0);
  \coordinate (Base3) at (5,2);
  \coordinate (TopPt) at (2,5);

  \draw [draw=black, every edge/.append style={draw=black, dashed}]
  (Base1) -- (Base2) --(Base3) 
  (Base3) edge (Base1);

  \draw [draw=black, every edge/.append style={draw=black, dashed}]
  (TopPt) -- (Base1) 
  (TopPt) -- (Base2) 
  (TopPt) -- (Base3);
  \end{tikzpicture}

1 个答案:

答案 0 :(得分:1)

您需要tikz 装饰库(decorationsdecorations.markings):

\begin{tikzpicture}      
  \coordinate (Base1) at (0,0);
  \coordinate (Base2) at (4,0);
  \coordinate (Base3) at (5,2);
  \coordinate (TopPt) at (2,5);

  \draw [draw, every edge/.append style={draw, dashed}]
  (Base1) -- (Base2) -- (Base3) 
  (Base3) edge (Base1);

  \draw [draw]
  (TopPt) -- (Base1) 
  (TopPt) -- (Base2)
  (TopPt) -- (Base3);
  \draw [draw,decoration={markings, mark=at position .5  with {\node[transform shape] {$\parallel$};}}]
  (TopPt) edge[decorate] (Base1) 
  (TopPt) edge[decorate] (Base2)
  (TopPt) edge[decorate] (Base3);
\end{tikzpicture}

enter image description here