Dirac 슬래시 파생물의 이 변형을 작성하는 방법은 무엇입니까?

Dirac 슬래시 파생물의 이 변형을 작성하는 방법은 무엇입니까?

나는 쓰고 싶다:여기에 이미지 설명을 입력하세요

누군가 나를 도와줄 수 있나요?

답변1

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

\documentclass{article}

\newcommand{\varDirac}{\mathord{\mathchoice
    {\ooalign{\hfil\raisebox{.4ex}{/}\hfil\cr$\bar\mathcal{D}$\cr}}
    {\ooalign{\hfil\raisebox{.4ex}{/}\hfil\cr$\bar\mathcal{D}$\cr}}
    {\ooalign{\hfil\raisebox{.25ex}{$\scriptstyle/$}\hfil\cr$\scriptstyle\bar\mathcal{D}$\cr}}
    {\ooalign{\hfil\raisebox{.2ex}{$\scriptscriptstyle/$}\hfil\cr$\scriptscriptstyle\bar\mathcal{D}$\cr}}
}}

\begin{document}

$\varDirac$

\end{document}

답변2

이는 Computer Modern 글꼴에 적용됩니다. 다른 글꼴은 \mathcal{D}슬래시와 상대적인 크기에 따라 조정이 필요할 수 있습니다 .

\documentclass{article}

\makeatletter
\NewDocumentCommand{\vardirac}{}{{\mathpalette\vardirac@\relax}}
\newcommand{\vardirac@}[2]{%
  \begingroup
  \sbox\z@{$\m@th#1\bar{\mathcal{D}}$}%
  \sbox\tw@{\raisebox{\dimeval{(\depth-\height+\ht\z@)/2}}{$\m@th#1/$}}%
  \vphantom{\usebox\tw@}%
  \ooalign{%
    \hidewidth\box\tw@\hidewidth\cr
    \box\z@\cr
  }%
  \endgroup
}
\makeatother

\begin{document}

$\vardirac$ $\scriptstyle\vardirac$

%to show the bounding box
\fboxsep=0pt\fboxrule=0.1pt
\fbox{$\vardirac$}

\end{document}

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

답변3

\usepackage{slashed}

$\slashed{\bar D}$
$\slashed{\overline D}$
$\slashed{\mathcal D}$

bar와 mathcal을 모두 가지려면장난필요합니다.

\usepackage{slashed}% provides \slashed
\usepackage{mathtools}% provides \mathllap
\newcommand\slashedbar[1]{\slashed{#1}\mathllap{\bar{#1}}}
\newcommand\slashedoverline[1]{\slashed{#1}\mathllap{\overline{#1}}}

$\slashedbar{\mathcal D}$
$\slashedoverline{\mathcal D}$

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

\documentclass{article}
% See also https://tex.stackexchange.com/q/226181
\usepackage{slashed}% provides \slashed
\usepackage{mathtools}% provides \mathllap
\newcommand\slashedbar[1]{\slashed{#1}\mathllap{\bar{#1}}}
\newcommand\slashedoverline[1]{\slashed{#1}\mathllap{\overline{#1}}}
\begin{document}
$\slashed{\bar D}$
$\slashed{\overline D}$
$\slashed{\mathcal D}$

\verb"\slashed" doesn't work well with \verb"\bar"/\verb"\overline" in conjunction with \verb"\mathcal", so we need the trick with \verb"\mathllap".

$\slashedbar{\mathcal D}$
$\slashedoverline{\mathcal D}$
\end{document}

답변4

\documentclass{article}
\usepackage{stackengine,scalerel}
\newcommand\varDirac{\mathord{\ThisStyle{\ensurestackMath{
  \stackinset{c}{}{c}{}{\SavedStyle/}{\SavedStyle\bar\mathcal{D}}}}}}
\begin{document}
$\varDirac\scriptstyle\varDirac\scriptscriptstyle\varDirac$
\end{document}

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

관련 정보