[Tex/LaTex] Integral symbol with high and low dashes

symbols

How do I make the following integral symbols in Latex?

Enter image description here
Enter image description here

I know how to make an integral and the limit. I don't know how to make it with the lines through it.

Best Answer

Using the code from the entry The Principal Value Integral symbol (which defines the macro \dashint) in the UK List of TeX FAQs as a starting point, it is reasonably straightforward to define two new macros, \lowdashint and \highdashint, that place a "dash" symbol -- actually, a "minus" symbol -- a bit lower and a bit higher, respectively, than \dashint does.

In the code below, the macros \lowdashint and \highdashint are set up only for display-style and text-style math modes. (I can't imagine they'll occur in expressions in first-level, let alone second-level, subscripts and superscripts. However, please tell me if this assumption is invalid.)

You should, of course, feel free to change the vertical positions of the dashes -- cf the arguments of the \lower and \raise commands -- to suit your stylistic preferences.

enter image description here

\documentclass{article}
\usepackage{booktabs,amsmath}
\def\Xint#1{\mathchoice
    {\XXint\displaystyle\textstyle{#1}}%
    {\XXint\textstyle\scriptstyle{#1}}%
    {\XXint\scriptstyle\scriptscriptstyle{#1}}%
    {\XXint\scriptscriptstyle\scriptscriptstyle{#1}}%
      \!\int}
\def\XXint#1#2#3{{\setbox0=\hbox{$#1{#2#3}{\int}$}
    \vcenter{\hbox{$#2#3$}}\kern-.5\wd0}}
\def\dashint{\Xint-}

\def\Yint#1{\mathchoice
    {\YYint\displaystyle\textstyle{#1}}%
    {\YYYint\textstyle\scriptscriptstyle{#1}}%
    {}{}%
    \!\int}
\def\YYint#1#2#3{{\setbox0=\hbox{$#1{#2#3}{\int}$}
    \lower1ex\hbox{$#2#3$}\kern-.46\wd0}}
\def\YYYint#1#2#3{{\setbox0=\hbox{$#1{#2#3}{\int}$}
    \lower0.35ex\hbox{$#2#3$}\kern-.48\wd0}}
\def\lowdashint{\Yint-}

\def\Zint#1{\mathchoice
    {\ZZint\displaystyle\textstyle{#1}}%
    {\ZZZint\textstyle\scriptscriptstyle{#1}}%
    {}{}%
    \!\int}
\def\ZZint#1#2#3{{\setbox0=\hbox{$#1{#2#3}{\int}$}
    \raise1.15ex\hbox{$#2#3$}\kern-.57\wd0}}
\def\ZZZint#1#2#3{{\setbox0=\hbox{$#1{#2#3}{\int}$}
    \raise0.85ex\hbox{$#2#3$}\kern-.53\wd0}}
\def\highdashint{\Zint-}

\begin{document}
$\begin{array}{@{}lccc@{}}
\toprule
\text{Math mode} & \multicolumn{3}{c@{}}{\text{Integral symbol}}\\
\cmidrule(l){2-4}
& \texttt{\string\lowdashint} 
& \texttt{\string\highdashint}
& \texttt{\string\dashint} \\
\midrule
\texttt{\string\displaystyle} 
& \displaystyle \lowdashint_M f
& \displaystyle \highdashint_M f
& \displaystyle \dashint_M f \\[4ex]
\texttt{\string\textstyle} 
& \lowdashint_M f
& \highdashint_M f
& \dashint_M f \\
\bottomrule
\end{array}$
\end{document}