Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Coding new integral sign in mathjax for html file

  1. Aug 8, 2016 #1
    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 (Text):
    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}}
     
  2. jcsd
  3. Aug 8, 2016 #2

    Mark44

    Staff: Mentor

    Will this work?

    ##\int_0^{\infty}##
    The above renders here at PF (also using MathJax) as ##\int_0^{\infty}##
     
  4. Aug 8, 2016 #3
    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.
     
  5. Aug 8, 2016 #4

    Mark44

    Staff: Mentor

    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.
     
  6. Aug 8, 2016 #5
    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.
     

    Attached Files:

    Last edited: Aug 8, 2016
  7. Aug 9, 2016 #6
    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
    $$
     
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook

Have something to add?
Draft saved Draft deleted



Similar Discussions: Coding new integral sign in mathjax for html file
  1. Html code for Firefox (Replies: 5)

Loading...