[Tex/LaTex] Wish to design new integral symbol with infinity symbol through it

symbols

Would you guys help me design an integral symbol with the \infty symbol inscribed through it and aligned correctly with the slant of the integral symbol? I tried using

\DeclareMathOperator*{\loopint}{\begingroup \displaystyle \unitlength 1pt
 \int\mkern-8.9mu\begin{picture}(0,3)\put(-4.7,3){$\circ$}\end{picture}
 \hspace{-5.3pt}\raisebox{-1pt}{\displaystyle$\circ$}\mkern2mu\endgroup}

as you can see, rather than the infinity symbol, it just uses two circles which don't look professional in my opinion and also my latex editor give me an error that I have a missing $ in it which I cannot determine where.

Best Answer

You can use \Xint defined below to build your own integral signs. Using \Xint{\infty} will place \infty on the integral sign. If you want a rotated symbol you can use \rotatebox from the graphicx package which is what the \Rinfty does. So using \Xint{\Rinfty} generates the second symbol:

enter image description here

\documentclass{standalone}
\usepackage{amsmath}
\usepackage{graphicx}

\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}}%

\newcommand{\Rinfty}{\rotatebox{77}{$\infty$}\hspace{0.6em}}%

\begin{document}
\[ \Xint{\infty} f(x) \qquad \Xint{\Rinfty} f(x)\]
\end{document}

As pointed out by AlanMunn, the original code is due to Donald Aresneau (posted in comp.text.tex in 1991) and appears in the UK TeX FAQ and also in Scott Pakin's Comprehensive LaTeX Symbols Guide (which credits the FAQ), and in Herbert Voss's comprehensive review of mathematics in (La)TeX.