I'm sure I'm about to embarrass myself... but, here goes...

I can't read any (but the most basic) typeset formulas in Mathematica. The fonts are simply way too small on my 2560x1440 monitor.

If I make the font sizes bigger, Mathematica seems to simply scale-up the existing formula - making it large enough to be read, but it's ugly-as-sin.

Too small (Mathematica):

enter image description here

Too ugly (Mathematica):

enter image description here

What I'm looking for:

$\displaystyle \frac{\sum_{i = 1}^{n} x_i }{\sum_{i = 1}^{n} y_i} = \frac{\sum_{i = 1}^{n} ( (\frac{x_i}{y_i}) p ) }{n} $

  • 1
    $\begingroup$ Well... Mathematica is not a typesetting engine, so it's probably not going to be as good at kerning as $\LaTeX$ is. You can probably work entirely in TraditionalForm, but that's probably not for everyone... You might want to try getting rid of Courier though. That's one ugly font. $\endgroup$ – rm -rf May 28 '12 at 22:29
  • $\begingroup$ @Jens One must necessarily write the fraction out with Ctrl / (unless you copy the cell expression) pasting this into mma converts it to $a/b$ when you actually want $\displaystyle\frac{a}{b}$ (there was an old question by Sjoerd on SO about something related to this) $\endgroup$ – rm -rf May 28 '12 at 22:32
  • $\begingroup$ @R.M Yeah, I just realized that Courier is the default font (at least on Mac.) Changing it to a font with serifs helped, but had the kind of issues you suggest it might. $\endgroup$ – Steve May 28 '12 at 22:33
  • $\begingroup$ see, that's why I don't have a 2560x1440 monitor :) $\endgroup$ – acl May 28 '12 at 22:34
  • $\begingroup$ @R.M. If you paste the code and evaluate it, it will look pretty close to what he had, though. I'll edit it back into my own answer then. $\endgroup$ – Jens May 28 '12 at 22:34

The simplest way to get a slightly more acceptable typeset result is to use TraditionalForm as follows, after you enter the expression as in the question:

\*UnderoverscriptBox[\(\[Sum]\), \(i = 1\), \(n\)]
\*SubscriptBox[\(x\), \(i\)]\)/\!\(
\*UnderoverscriptBox[\(\[Sum]\), \(i = 1\), \(n\)]
\*SubscriptBox[\(y\), \(i\)]\) == \!\(
\*UnderoverscriptBox[\(\[Sum]\), \(i = 1\), \(n\)]\((\((
SubscriptBox[\(x\), \(i\)], 
SubscriptBox[\(y\), \(i\)]])\) p)\)\)/n

Magnify[%] // TraditionalForm


The reason this doesn't look exactly like what you want is that it wasn't wrapped in HoldForm. For more discussion of how to conveniently enter math expressions especially in the context of graphics labeling, see this answer.

Here is a better way to enter things, but I better show just the image:



Edit 2

In the other answer I linked above, I mentioned another way to input formulas that actually belongs into the context of this more general question as well. Therefore, I've made a screen capture to illustrate the steps for getting what I think is the closest to a typesetting interface with Mathematica.

The screen movie has to be short because it's a GIF animation:


  • I'm starting with the expression typeset in an input cell.
  • In the next cell I add TraditionalForm content with a dummy string
  • The content of the string (aaa inside the quotation marks) is converted to TraditionalForm via the menu
  • The original expression is pasted into the invisible FormBox that was now created around the aaa
  • The resulting string can be edited further (e.g., I replace the == by =, but you can do arbitrary edits here)
  • With an optional Magnify appended, I evaluate the cell and get the desired result
  • $\begingroup$ Thanks! Through some experimentation it looks like Mathematica will automatically reformat using Times and with proper italics/non-italics if I do this. That definitely helps. $\endgroup$ – Steve May 28 '12 at 22:44
  • $\begingroup$ @Steve The combination of HoldForm and TraditionalForm works reasonably well for typesetting. HoldForm helps keep things like integrals from being auto-evaluated, and prevents at least some of the rearrangements of the summation signs above... $\endgroup$ – Jens May 28 '12 at 22:53
  • $\begingroup$ Nice work. How did you make the GIF animation? $\endgroup$ – Mr.Wizard May 29 '12 at 0:54
  • 7
    $\begingroup$ @Mr.Wizard Exported from a Quicktime screen capture to MOV, then used ffmpeg to create frames, selected every 75-th frame, resized them with convert and then used MMA to make the GIF with variable "DisplayDurations" to create pauses at the right moments... $\endgroup$ – Jens May 29 '12 at 1:02
  • 1
    $\begingroup$ @cartonn Maybe - but the screenshot part is an external process, so it may be a bit off-topic. Anyway, this other question could be worth mentioning in this context too. $\endgroup$ – Jens Dec 6 '12 at 2:07

I use a stylesheet with a cell style to display formulas. Then it's just a matter of copying and pasting if you want a formula for display, and you have it in a input cell. Otherwise, enter it in the cell.

Some nice options to put on it are DefaultFormatType->TraditionalForm (so your new cells automatically inherit TraditionalForm styles), a bigger FontSize, perhaps FontFamily->"Times", among others

  • 1
    $\begingroup$ +1 but please consider including your stylesheet code. $\endgroup$ – Mr.Wizard May 29 '12 at 0:54

What about changing from the default Format > Screen Environment > Working to Format > Screen Environment > Presentation? And then perhaps decreasing the magnification.


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.