%EB%A5%BC%20%EB%A7%8C%EB%93%9C%EB%8A%94%20%EB%B0%A9%EB%B2%95%EC%9D%B4%20%EC%9E%88%EB%82%98%EC%9A%94%3F.png)
노드와 함께 사용하면 잘 작동하는 화살표가 있습니다.
\node[draw, single arrow,
minimum height=9mm, minimum width=1mm,
single arrow head extend=0mm,
anchor=west]
\draw
하지만 와 같은 "각진" 버전에서 동일한 화살표를 어떻게 얻을 수 있습니까 (a) |- (b)
?
답변1
OP를 올바르게 이해했다면 이것이 나의 시도입니다.
\documentclass[border=3mm]{standalone}
\usepackage{tikz}
\newcommand{\angledArrowDown}[3]{
\coordinate (A) at #2;
\coordinate (B) at #3;
\node[anchor=south west,inner sep=#1/4] (StPoint-1)at (A){};
\node[anchor=north west,inner sep=#1/4] (StPoint-2) at (A){};
\node[anchor=south west,inner sep=#1/2] (EndPoint-1)at (B){};
\node[anchor=south east,inner sep=#1/2] (EndPoint-2) at (B){};
\draw (StPoint-1.north west) -| (EndPoint-1.north) -- (EndPoint-1.north east) -- (B)
-- (EndPoint-2.north west) -- (EndPoint-2.north) |- (StPoint-2.south west) -- cycle;}
\newcommand{\angledArrowUp}[3]{
\coordinate (A) at #2;
\coordinate (B) at #3;
\node[anchor=south west,inner sep=#1/4] (StPoint-1)at (A){};
\node[anchor=north west,inner sep=#1/4] (StPoint-2) at (A){};
\node[anchor=north east,inner sep=#1/2] (EndPoint-1)at (B){};
\node[anchor=north west,inner sep=#1/2] (EndPoint-2) at (B){};
\draw (StPoint-1.north west) -| (EndPoint-1.south) -- (EndPoint-1.south west) -- (B)
-- (EndPoint-2.south east) -- (EndPoint-2.south) |- (StPoint-2.south west) -- cycle;}
\begin{document}
\begin{tikzpicture}
%\angledArrowDown{thick}{star point}{end point below start point}
\angledArrowDown{5mm}{(0,1)}{(1,-1)}
%\angledArrowUp{thick}{star point}{end point above start point}
\angledArrowUp{5mm}{(0,-3)}{(1,-1)}
\end{tikzpicture}
\end{document}
답변2
단지 재미를 위해서입니다. 그런 종류의 화살표 스타일입니다. 장점은 다음과 같은 간단한 명령으로 화살표를 그릴 수 있다는 것입니다.
\draw[outlined arrow] (-1,3) -| (0,0);
단점은 이와는 다르게vi pa의 좋은 답변또는이 답변, 내부를 흰색으로 과도하게 칠합니다. 모양은 다양한 pgf 키로 제어됩니다(이동된 범위의 예 참조).
\documentclass[tikz,border=3mm]{standalone}
\usetikzlibrary{arrows.meta}
\begin{document}
\begin{tikzpicture}[outlined arrow/.code={\tikzset{oarrow/.cd,#1},
\def\pv##1{\pgfkeysvalueof{/tikz/oarrow/##1}}%
\edef\locallw{\the\pgflinewidth}%
\tikzset{-{Triangle[open,fill=white,line width=\locallw,
length=\pv{head length},width=\pv{head width}]},
line width=\pv{line width},
postaction={-,draw=white,line width=\pv{line width}-2*\locallw,
shorten <=\locallw,shorten >=\pv{head length}-1.5*\locallw}%
}},oarrow/.cd,line width/.initial=0.6cm,head width/.initial=1.2cm,
head length/.initial=1cm]
\draw[outlined arrow] (-1,3) -| (0,0);
\draw[outlined arrow] (-1,-3) -| (0,0);
\begin{scope}[xshift=5cm]
\draw[blue,thick,outlined arrow={line width=0.7cm,head width=1.4cm}] (-1,3) -| (0,0);
\draw[red,outlined arrow={line width=0.5cm,head length=0.8cm}] (-1,-3) -| (0,0);
\end{scope}
\end{tikzpicture}
\end{document}
곡선 화살표는 이 스타일에서 작동하지 않습니다. 예를 들어 볼 수 있습니다.여기곡선 화살표를 만드는 가능한 방법에 대해 알아보세요.