Group Abstract Group Abstract

Message Boards Message Boards

0
|
3.9K Views
|
5 Replies
|
1 Total Like
View groups...
Share
Share this post:

Self-introduced integral sign being multiplied to the numerator in Latex?

Posted 3 years ago
POSTED BY: Albert Lew
5 Replies
POSTED BY: Gianluca Gorni
Posted 3 years ago

Thanks, Gianluca, for your insight. Your code works since I had defined the latex string for those special self-introduced integral signs in my notebook before I posted the question here. But the thing is: I do not want to rearrange the boxes by hand and by sight each time I need to do this kind of conversion. Because there can be a ton of integrals of this kind in one notebook of mine. What I need is a way to automate the process, like a function associated with MakeBoxes[] so that every time I do the conversion, Mathematica can recognize it is an integral sign and can not be multiplied into the numerator automatically.

If you have any idea on the automation of the process, I am all ears.

POSTED BY: Updating Name

No, not out of the box. You have to replace \unicode{222c} with {\int\!\!\int}:

StringReplace[expr // TeXForm // ToString, 
 "\\unicode{222c}" -> "{\\int\\!\\!\\int}"]
POSTED BY: Gianluca Gorni

I tried putting your LATEX in here or here, doesn't work?

POSTED BY: Mariusz Iwaniuk

Gather the whole integrand into a RowBox:

expr = With[{f = Sin[Pi Sqrt[x^2 + y^2]]/Sqrt[x^2 + y^2], 
   reg = (1 <= x^2 + y^2 <= 4)}, 
  DisplayForm@
   InterpretationBox[
    RowBox[{UnderscriptBox[StyleBox["∬", FontSize -> 24], reg], 
      RowBox[{f, RowBox[{"\[DifferentialD]", x}], 
        RowBox[{"\[DifferentialD]", y}]}]}],
    Integrate[f, Element[{x, y}, ImplicitRegion[reg, {x, y}]]]]]
expr // TeXForm
POSTED BY: Gianluca Gorni
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard