I have two problems figuring out how to format my formulas properly so that when I print out the notebook the formulas look like the ones in my textbook.

So far I've got this:

$\sum\limits_{i=1}^5 x[[i]]-x$

but ideally I would want the i to be without the double square brackets, and also I would want a bar over the $2$nd $x$, and to make it the mean of the list $x$.

  • 6
    $\begingroup$ In my opinion you should keep input code separate from output formatting; attempting to write your Notebooks such that input looks like standard notation but evaluates as the Mathematica code you want will usually lead to frustration. Is this what you are attempting? $\endgroup$
    – Mr.Wizard
    Commented May 5, 2014 at 12:03
  • $\begingroup$ Yes, it was 8) What would be the best way for creating a document that can be printed out that contains standard notation, but also has calculations that I can execute? $\endgroup$
    – Tim H UK
    Commented May 5, 2014 at 15:16
  • $\begingroup$ There are ways do to this, but they should be considered special-case-tools rather than standard practice. I don't have time for a proper answer now but look at Interpretation as a start. You could use my AutoCollapse code or even AutoDestruct with input cells which CellPrint other input cells containing InterpretationBox expressions. If that doesn't scare you off I can try to provide an example later. $\endgroup$
    – Mr.Wizard
    Commented May 5, 2014 at 15:36
  • $\begingroup$ I agree with @Mr.Wizard, but you could look at these examples: Representation of product with exclusions, Can I enter the traditional form for Binomial as input in an expression?. There are many others. Also, you can allow Mathematica to evaluate TraditionalForm input. $\endgroup$
    – Jens
    Commented May 5, 2014 at 16:05


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.