[Tex/LaTex] Average integral symbol

math-modemath-operatorssymbols

Is there in LaTeX a symbol or a macro for the average integral with a horizontal slash? I know about \strokedint, but I'd prefer the dash to be horizontal.

Best Answer

I found a solution here. You can use the following instructions, which must be included on the preamble.

\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-.6\wd0}}
\def\ddashint{\Xint=}
\def\dashint{\Xint-}

The commands to execute those macros are \dashint and \ddashint for single dash and double dash, respectively.

EDIT: I tested the code given in the page, and the dash was a bit to the left of the integral, so I changed it slightly, substituting the .5 from the line \vcenter{\hbox{$#2#3$ }}\kern-.5\wd0}} with a .6 . It worked for me, if it doesn't exactly do it for you, experiment with the .5 to find exactly where you want the dash to be, adding (subtracting) from the number to place it more to the right (left).