Coding new integral sign in mathjax for html file

Click For Summary

Discussion Overview

The discussion revolves around creating a custom integral sign in MathJax for use in an HTML file, specifically one that features an infinity symbol aligned with the tilt of the integral sign. Participants explore various coding techniques and share their experiences with rendering mathematical expressions.

Discussion Character

  • Technical explanation
  • Exploratory
  • Debate/contested

Main Points Raised

  • One participant describes a method to create a new integral sign with an infinity symbol using LaTeX, mentioning the need for the graphicx library and the rotatebox function.
  • Another participant questions whether a specific LaTeX expression will work in the forum's MathJax setup.
  • A participant expresses a desire for the infinity sign to appear as part of the integral sign and offers to provide a visual example if guidance on image uploading is given.
  • Instructions on how to upload images are provided by another participant, facilitating the sharing of visual examples.
  • A participant shares a PDF generated from their LaTeX code, noting issues with aligning additional characters (like an "8") with the integral sign's tilt.
  • One participant reports achieving a satisfactory result with MathJax, although they note that the appearance of the "8" is slightly tilted and not perfectly aligned.

Areas of Agreement / Disagreement

Participants do not reach a consensus on the best method to achieve the desired integral sign, and multiple approaches and opinions are presented throughout the discussion.

Contextual Notes

Participants express limitations in their current methods, particularly regarding the alignment of additional characters with the integral sign and the need for specific libraries in LaTeX.

Who May Find This Useful

This discussion may be useful for web developers, mathematicians, or educators interested in customizing mathematical notation in web environments using MathJax.

aheight
Messages
318
Reaction score
108
I am creating a website and wish to include a new integral sign that has an infinity sign over it but aligned with the same tilt angle as the integral. I'm using Mathjax to render the math code. I can code this in Latex outside an HTML file and it works perfectly but does require the graphicx library and rotatebox function:

Is there a way I can implement this in my HTML file?+
Code:
latex
\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.05em}}

I then just write \mathop{\Xint{\Rinfty}}
 
Technology news on Phys.org
Will this work?

##\int_0^{\infty}##
The above renders here at PF (also using MathJax) as ##\int_0^{\infty}##
 
I want the infinity sign to look like part of the integral sign. I can code it up in TexnicCenter and save it as a PDF file or bmp file and post it here to show what i want if you could explain to me how to save it here.
 
You can upload an image by using the UPLOAD button that appears at the lower right corner of the text entry pane. You can specify that the image should be a thumbnail (small image) or a full-size image inline with whatever text you write.
 
Ok. Here's a pdf file that was generated with the latex code above. Note also if I try and back-space an "8" into the integral using latex commands, the 8 won't be tilted at the same angle as the slant of the integral sign and will look funny.
 

Attachments

Last edited:
Got it close enough for now Mark and it works with mathjax (the 8 in the mathit font is slightly tilted):

$$
\newcommand{\bint}{\large\mathit{8}\hspace{-10.5pt}\int}
$$

$$\bint f(z) dz
$$