5

I want to use this symbol for the product integral:

product integral

Perhaps with a bigger loop, too. What's the best way of building this notation?


I got it to work for just the integral sign itself.

\usepackage{adjustbox}

\def\Prodint
{\adjustbox{trim = 0pt 0pt 0pt 0.15\height, clip} {$\displaystyle\int$} 
{\hspace{-0.45em} \mathrel{\raisebox{0.9em}{$\rho$}}}}

$$|\psi(t)\rangle=\Prodint U_t(dt)|\psi(0)\rangle$$

Time evolution of quantum state

But its behaviour with (especially lower) limits is really bad.

$$|\psi(t)\rangle=\Prodint_0^T U_t(dt)|\psi(0)\rangle\ne\int_0^T U_t(dt)|\psi(0)\rangle$$

enter image description here

How can I get the lower limit to be placed like in the standard \int (see above for reference)?

1 Answers1

4

If you're happy with the symbol, set the lower limit together with the integral, then add the upper limit to the whole block.

\documentclass{article}
\usepackage{amsmath}
\usepackage{adjustbox,xparse}

\NewDocumentCommand{\Prodint}{e{^_}}{%
  \mathop{}\!%
  {%
   \adjustbox{trim = 0pt -0.5pt 0pt 0.15\height, clip}{$\displaystyle\int\IfValueT{#2}{_{#2}}$}%
   \hspace{-0.45em}%
   \raisebox{0.9em}{$\rho$}%
  }%
  \IfValueT{#1}{^#1}%
  \!\mathop{}%
}

\begin{document}

\[
\int_0^T f(t)\,dt \ne
\Prodint_0^T f(t)\,dt
\]

\end{document}

enter image description here

egreg
  • 1,121,712
  • Thanks. Question: did the addition of the -0.5pt to the trim actually change anything? It didn't change anything for me. Also, how do the e notation work -- do the ^ and _ just represent #1 and #2 but with fancier notation than using square brackets? Is there some documentation for this, where it can be used? – Abhimanyu Pallavi Sudhir Aug 19 '19 at 08:47
  • @AbhimanyuPallaviSudhir Without it the lower limit could be cut because characters may overshoot a bit. Try with 0pt and you'll see. – egreg Aug 19 '19 at 09:41
  • @egreg Thank you very very much to have help the user Abhimanyu Pallavi Sudhir. Always thank you and I write it with all my heart. – Sebastiano Aug 19 '19 at 12:21