0

I would like to use a big mathcal R for the Ramanujan summation. From a previous question (Math operator resizing in autosized brackets), I got

\documentclass{article}

\def\xRsum#1#2{\hbox{#1$#2\mathcal R$}} \newcommand\Rsum{\mathop{% \mathchoice {\xRsum\huge\displaystyle}% {\xRsum{}\displaystyle}% {\xRsum{}\scriptstyle}% {\xRsum{}\scriptscriptstyle}% }}

\begin{document} $$\sum_{k=1}^{+\infty}k\neq-\frac1{12}\qquad\Rsum_{k=1}^{+\infty}k=-\frac1{12}$$ $$\frac1{\Rsum_{k=1}^{+\infty}\frac1{k^2}}=\frac1{\sum_{k=1}^{+\infty}\frac1{k^2}}$$ \end{document}

but it does not correct produce output.

output

You can see everything is aligned very badly.

  • Unfortunately, closing this as a dupe doesn’t let me post this as an answer, but: upscaling this way makes the script R come out too heavy. Therefore, your \displaystyle variation should actually upscale a lighter-weight math font, such as KPMath-Light, while your\textstylrvariation should use something like KPMath-Regular. If you have to use a math font that doesn’t come in light weight (and most don’t), you can at least use\mathbfscrversus\mathscr` for consistency. – Davislor Nov 24 '22 at 14:01
  • For example, the solution at the bottom of this answer, but wrapped in \mathop for series-like spacing and limits. – Davislor Nov 24 '22 at 14:02
  • @Davislor Thank you for your answer, my biggest issue is size/alignment but indeed it come out too heavy. I will take a look at this answer –  Nov 24 '22 at 14:15

0 Answers0