2셀 스타일을 어떻게 바꿀 수 있나요?

2셀 스타일을 어떻게 바꿀 수 있나요?

2셀 스타일을 어떻게 바꿀 수 있나요? 다음과 같은 최소한의 예를 들어보세요.

\documentclass{article}
\usepackage[all,cmtip,2cell]{xy}
\UseTwocells

\begin{document}

$\xymatrix@C+1pc{C \rtwocell<4>  & D}$

\end{document}

다이어그램 중앙에 아래쪽 이중 화살표가 있습니다. 스타일을 어떻게 바꿀 수 있나요? 지그재그 화살이 되라고 말해보세요. 내 말은, xypic의 일반 화살표라면 다음과 같이 스타일을 변경한다는 것입니다 \ar@{~}[d].

답변1

화살표는 를 통해 변경됩니다 \arrowobject. 기본적으로 이것은 다음과 같이 정의된 \dir{=>}위치 입니다.=>xy2cell.tex

\newdir{=>}{!/5pt/\dir{=}!/2.5pt/\dir{=}*!/-5pt/\dir2{>}}

다음과 같이 구불구불한 화살표를 만들 수 있습니다.

\newdir{~>}{!/2.5pt/\dir{~}*!/-5pt/\dir2{>}}

이것을 다음과 같이 사용하십시오.

$\arrowobject{\dir{~>}}\xymatrix@C+1pc{C \rtwocell<4>  & D}$

샘플 출력

\documentclass{article}
\usepackage[all,cmtip,2cell]{xy}
\UseTwocells

\newdir{~>}{!/2.5pt/\dir{~}*!/-5pt/\dir2{>}}

\begin{document}

$\arrowobject{\dir{~>}}\xymatrix@C+1pc{C \rtwocell<4>  & D}$

\end{document}

자세한 내용은 참조 매뉴얼에 xyrefer.pdf나와 있습니다.texdoc xyrefer

화살촉이 없는 연결의 경우 다음 중 하나를 사용할 수 있습니다.

두 번째 샘플

$\arrowobject{\dir{~}}\xymatrix@C+1pc{C \rtwocell<4>  & D}$

\newdir{l~}{!/3.5pt/\dir{~}*!/-3.5pt/\dir{~}}
$\arrowobject{\dir{l~}}\xymatrix@C+1pc{C \rtwocell<4>  & D}$

\newdir로 구분된 단위로 구성된 복합 개체입니다 *. 유닛은 !/3.5t/\dir{~}팁을 잡고 경로를 따라 (뒤로) ~밀어냅니다 .3.5pt

답변2

나는 질문이 에 대해 구체적으로 묻는 것을 알고 있지만 2cell이것이 더 현대적인 방법을 사용하여 수행하는 방법입니다.tikz-cd패키지; 구불구불한 선은 도서관 snake의 장식을 사용하여 제작되었습니다 decorations.pathmorphing.

\documentclass{article}
\usepackage{tikz-cd}
\usetikzlibrary{decorations.pathmorphing}

\tikzset{no tip/.style={arrows=-}}

\begin{document}

\begin{tikzcd}
C \ar[r, bend left=50, ""{name=U, below}]
\ar[r, bend right=50, ""{name=D}]
& D
\ar[decorate, decoration={snake},from=U, to=D,no tip]
\end{tikzcd}

\end{document}

여기에 이미지 설명을 입력하세요

관련 정보