
다음은 xypic에서 발생하는 문제의 예입니다.
\documentclass[10pt,a4paper,french,oneside]{amsbook}
\usepackage{babel}
\usepackage[T1]{fontenc}
\usepackage[applemac]{inputenc}
\usepackage[all,cmtip]{xy}
\begin{document}
\[
\xymatrix@!{
P\ar[r]^{p_{2}}\ar[d]_{p_{1}}&Y\ar[d]^g\\
X\ar[r]^f&Z}
\]
\end{document}
아래는 조판할 때 발생한 오류입니다.
./essai.tex:16: Xy-pic error: <addop> or <direction> or one of 1RCMLHW*! expect
ed.
\xyerror@ ...#2}\fi \errmessage {Xy-pic error: #1}
}
l.16 \xymatrix@!
{
나는 그것이 바벨과 프랑스 옵션이 물건을 엉망으로 만든 것에서 비롯된 것이라고 강력히 의심합니다. 인식되지 않는 것 같습니다(예를 들어 @R은 제대로 작동합니다). 이에 대해 어떻게 해야 합니까?
답변1
Xy-pic 구문에서도 사용되는 것처럼 문제를 해결하는 것만으로는 !
충분하지 않습니다 .?;:^="
모든 Xy-pic 구성에서 속기를 비활성화하여 전역적으로 문제를 해결할 수 있습니다.
\documentclass[10pt,a4paper,french,oneside]{amsbook}
\usepackage{babel}
\usepackage[T1]{fontenc}
\usepackage[all,cmtip]{xy}
\usepackage{etoolbox}
\preto\xy{\shorthandoff{!?;:^="}}
\begin{document}
\[
\xymatrix@!{
P\ar[r]^{p_{2}}\ar[d]_{p_{1}}&Y\ar[d]^g\\
X\ar[r]^f&Z}
\]
\end{document}
그것이 없다면 etoolbox
, 대신에 \preto\xy{...}
,
\toks0=\expandafter{\xy}
\edef\xy{\noexpand\shorthandoff{!?;:^="}\the\toks0 }
답변2
!
다음을 사용하여 로컬로 돌아올 수 있습니다 \shorthandoff{!}
.
\documentclass[10pt,a4paper,french,oneside]{amsbook}
\usepackage{babel}
\usepackage[T1]{fontenc}
\usepackage[applemac]{inputenc}
\usepackage[all,cmtip]{xy}
\begin{document}
\[\shorthandoff{!}
\xymatrix@!{
P\ar[r]^{p_{2}}\ar[d]_{p_{1}}&Y\ar[d]^g\\
X\ar[r]^f&Z}
\]
\end{document}