Take the 2-minute tour ×
Mathematica Stack Exchange is a question and answer site for users of Mathematica. It's 100% free, no registration required.

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} $

share|improve this question
1  
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. –  rm -rf May 28 '12 at 22:29
    
@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) –  rm -rf May 28 '12 at 22:32
    
@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. –  Steve May 28 '12 at 22:33
    
see, that's why I don't have a 2560x1440 monitor :) –  acl May 28 '12 at 22:34
    
@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. –  Jens May 28 '12 at 22:34
add comment

3 Answers 3

up vote 16 down vote accepted

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\)]\((\((
\*FractionBox[
SubscriptBox[\(x\), \(i\)], 
SubscriptBox[\(y\), \(i\)]])\) p)\)\)/n

Magnify[%] // TraditionalForm

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:

HoldForm

TradForm

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:

Screencapture

  • 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
share|improve this answer
    
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. –  Steve May 28 '12 at 22:44
    
@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... –  Jens May 28 '12 at 22:53
    
Nice work. How did you make the GIF animation? –  Mr.Wizard May 29 '12 at 0:54
7  
@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... –  Jens May 29 '12 at 1:02
1  
@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. –  Jens Dec 6 '12 at 2:07
show 1 more comment

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

share|improve this answer
add comment

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

share|improve this answer
1  
+1 but please consider including your stylesheet code. –  Mr.Wizard May 29 '12 at 0:54
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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