화살표 xdashmapsto를 작성하는 방법은 무엇입니까?

화살표 xdashmapsto를 작성하는 방법은 무엇입니까?

이는 다음의 연속이다.이 질문과 동일한 기본 전제를 ​​가지고 쌍합리 기하학에 필요한 화살표에 대해이 질문xdashrightarrow등에 대해

xmapsto화살표가 점선 으로 표시된 화살표가 필요합니다 mapsto. 나는 현재

\def\dashmapsto{\mapstochar\dashrightarrow}

화살을 주는 것입니다 dashmapsto. 나는 xdashmapsto그것을 가지고 갈 수 있다면 그것을 좋아할 것입니다.

당신이 제공할 수 있는 도움에 감사드립니다.

답변1

방금 Heiko의 코드에 적용된 David의 기술을 사용하여 귀하가 인용한 두 가지 답변을 결합했습니다. 신용은 그들에게 돌아갑니다. Heiko의 코드에 내가 추가한 내용은 다음과 같습니다.

\newcommand\xdashmapsto[2][]{\mathrel{\mapstochar\xdashrightarrow[#1]{#2}}}

유일한 반전은 에서 사용하는 것과 동일한 방식으로 인수를 사용하는 것을 기억하는 것입니다 \xdashrightarrow.

\documentclass{article}
\usepackage{amsfonts}
\usepackage{amsmath}
\newcommand\xdashmapsto[2][]{\mathrel{\mapstochar\xdashrightarrow[#1]{#2}}}

\makeatletter
\newcommand*{\da@rightarrow}{\mathchar"0\hexnumber@\symAMSa 4B }
\newcommand*{\da@leftarrow}{\mathchar"0\hexnumber@\symAMSa 4C }
\newcommand*{\xdashrightarrow}[2][]{%
  \mathrel{%
    \mathpalette{\da@xarrow{#1}{#2}{}\da@rightarrow{\,}{}}{}%
  }%
}
\newcommand{\xdashleftarrow}[2][]{%
  \mathrel{%
    \mathpalette{\da@xarrow{#1}{#2}\da@leftarrow{}{}{\,}}{}%
  }%
}
\newcommand*{\da@xarrow}[7]{%
  % #1: below
  % #2: above
  % #3: arrow left
  % #4: arrow right
  % #5: space left 
  % #6: space right
  % #7: math style 
  \sbox0{$\ifx#7\scriptstyle\scriptscriptstyle\else\scriptstyle\fi#5#1#6\m@th$}%
  \sbox2{$\ifx#7\scriptstyle\scriptscriptstyle\else\scriptstyle\fi#5#2#6\m@th$}%
  \sbox4{$#7\dabar@\m@th$}%
  \dimen@=\wd0 %
  \ifdim\wd2 >\dimen@
    \dimen@=\wd2 %   
  \fi
  \count@=2 %
  \def\da@bars{\dabar@\dabar@}%
  \@whiledim\count@\wd4<\dimen@\do{%
    \advance\count@\@ne
    \expandafter\def\expandafter\da@bars\expandafter{%
      \da@bars
      \dabar@ 
    }%
  }%  
  \mathrel{#3}%
  \mathrel{%   
    \mathop{\da@bars}\limits
    \ifx\\#1\\%
    \else
      _{\copy0}%
    \fi
    \ifx\\#2\\%
    \else
      ^{\copy2}%
    \fi
  }%   
  \mathrel{#4}%
}
\makeatother

\begin{document}

\[ X \xdashmapsto{x} Y \xdashmapsto{\mathrm{longer}} Z 
\xdashmapsto[\mathrm{underset}]{\mathrm{longer}} W 
\]

\end{document}

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

화살표 뒤의 간격이 너무 크다면 다음과 같이 작은 음수 공간으로 재정의할 수 있습니다.

\newcommand\xdashmapsto[2][]{\mathrel{\mapstochar\xdashrightarrow[#1]{#2}\!}}

관련 정보