2
$\begingroup$

I would like to use Mathematica to generate nice-looking equations for my presentation on Google Slides (which as far as I know can only be an image an image). What's the best way? To be more concrete, I want to convert the following two equations to something that I can directly copy from a Mathematica notebook and past to a Google Slide.The first example is an executable expression and the second one is the TraditionalForm of a string equation (typed using handy Mathematica shortcuts).

Example 1:

Integrate[Sqrt[x], {x, 0, 1}]

Example 2:

TraditionalForm["\!\(\*SqrtBox[\(1 + \*FractionBox[\(x\), \
\(2\)]\)]\)"]

I am hoping to avoid using third-party websites, taking screenshots, and exporting image files.

$\endgroup$
  • 2
    $\begingroup$ I'd use TeXForm followed by MaTeX $\endgroup$ – yohbs Jul 26 '17 at 3:38
  • $\begingroup$ @yohbs, I will look into MaTex, but it is a third-party software. $\endgroup$ – Miladiouss Jul 26 '17 at 3:49
  • 1
    $\begingroup$ Since you're planning to copy into a slide program, you'll want transparent background, right? So do you agree that this is a duplicate of Clipboard with transparency, since Rasterize in itself can be found in the docs? If not, pleas explain what makes this question different. $\endgroup$ – Jens Jul 26 '17 at 21:12
  • 1
    $\begingroup$ Sorry, I linked only one of two related threads: Clipboard with transparency and How to export transparent raster plots?. There are probably other related links, too. $\endgroup$ – Jens Jul 26 '17 at 21:37
  • 1
    $\begingroup$ When you copy the output of Rasterize[HoldForm[Integrate[Sqrt[x], {x, 0, 1}]]//TraditionalForm,ImageSize->300,Background->None] and paste it into a graphics program like Gimp on Linux, do you see transparent background? You should... $\endgroup$ – Jens Jul 27 '17 at 1:43
6
$\begingroup$

If you want to copy an image directly using the mouse, you can try Rasterize which generates an image which you can copy/paste directly.

Example 1:

eq1 = HoldForm[Integrate[Sqrt[x], {x, 0, 1}]];

Rasterize[eq1 // TraditionalForm, ImageSize -> 300]

Output 1:

enter image description here

Example 2:

eq2 = TraditionalForm[
   "\!\(\*SqrtBox[\(1 + \*FractionBox[\(x\), \(2\)]\)]\)"];

Rasterize[eq2, ImageSize -> 300]

Output 2:

enter image description here

$\endgroup$
  • $\begingroup$ Is it possible to make the output images transparent? $\endgroup$ – Miladiouss Jul 27 '17 at 0:21
  • $\begingroup$ The image qualities are not good. Is it possible to convert equations to graphics? $\endgroup$ – Miladiouss Jul 27 '17 at 1:24
0
$\begingroup$

Another approach is to use

Style[HoldForm[eq1 = Integrate[Sqrt[x], {x, 0, 1}]], Large]

enter image description here

Then right-click on the right bracket of the output and Save Selection As one of several possible formats. Alternatively, follow the desired expression by, for instance,

Export["C:\\Temp\\test.png", %]

Likewise,

Style[HoldForm[eq2 = TraditionalForm[Sqrt[1 + x/2]]], Large]

enter image description here

Style is quite flexible and can give the desired expression quite a range of appearances.

$\endgroup$
  • $\begingroup$ This cannot be directly copied, hence doesn't satisfy the question requirements. $\endgroup$ – Miladiouss Jul 26 '17 at 20:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.