Specify and control how Mathematica formats its output, including rich text, equations and graphics.

learn more… | top users | synonyms

9
votes
2answers
202 views

How can I make Which format its output?

Functions like Piecewise have cool, easy-to-read formatting. In the same vein, I think it would be wonderful if the Which ...
9
votes
2answers
291 views

Is there a way to programmatically set global preferences?

Can I set global preferences that are accessible via "Edit"->"Preferences" programmatically from within a notebook? As learned from this question, turning off anti-aliasing can make a huge difference ...
9
votes
4answers
224 views

Leave expression tree formatting the same when a replacement rule is applied

If I type e1 := 3 x + 2 (1 + y) z // TreeForm, I get an expression tree. If I then type e1 /. x -> 3, I get another ...
9
votes
3answers
466 views

How to format numbers with at least one figure after the decimal point

I'm searching for a way to get Reals formatted with at least one figure after the decimal point. So e.g. 3. should be printed as 3.0 and ...
9
votes
4answers
280 views

Why do quote marks appear in output when saved with Save Selection As?

Update #2: This behavior has been confirm across platforms and in multiple versions. Therefore: Is this a bug or a feature? Can I disable this "feature" so that copying a selection of Cell contents ...
9
votes
1answer
288 views

How can I add row and column header images to my TableForm output?

I am experimenting with the Eigenfaces algorithm and have my notes and experimental data collected in a Mathematica notebook. The result of an experimental run is a table of scores, where the smallest ...
9
votes
3answers
504 views

How do I get a two-term polynomial with a leading negative sign to display in the correct (i.e. textbook) order?

The first three expressions evaluate as expected and the polynomial is displayed in what I would call "textbook" form. The last expression, however, switches the order of terms. Mathematica employs ...
9
votes
2answers
204 views

Automatically add appropriate prefix to Quantity

Is there a function that automatically adds the appropriate prefix to a Quantity object? For example, I would like a function ...
9
votes
1answer
179 views

How can I make CurrentValue for font characteristics pick up the font of the output not the input cell?

The command CurrentValue (documentation) allows you to access various properties of fonts, such as x-height, line height, and various measures of width such as ...
8
votes
5answers
544 views

How to display equations without Mathematica simplifying them?

Say I'm trying to make a simple multiplication table and used Table[i"x"j"="i*j,{i,1,9},{j,1,9}] I'm trying to make it so that I can get a table of equations, ...
8
votes
3answers
219 views

Quickly display a color graphically

When manipulating colors, the output is shown as a textual expression like Hue[1/5], RGBColor[2/3, 1, 1/3], ...
8
votes
5answers
324 views

How to resize the text content of a grid with it?

I am in a resizing mood these days. This code works quite well, up to a point. ...
8
votes
3answers
255 views

Grid without lines, but with dots

I want to build a grid to look like the top-left table shown below, but without an outside frame. Here is what I've tried to do: ...
8
votes
2answers
426 views

TeX and TraditionalForm

I have a little problem, and hope, with your help, I'll be able to solve it. As you got from the title, I have some trouble with TeX in Mathematica. Imagine, I want to output a nice DisplayFormula, ...
8
votes
2answers
138 views

Changing BarLegend border style

I want all the lines in my plot to be a consistent style, let's say thick and black for the purpose of this question. ...
8
votes
1answer
390 views

How to align two overlayed plots, one being rotated?

I have two plots which I want to present on a single figure. The bottom left corner is a point of origin of the first plot. The top right corner is a point of origin of the second plot. Also, the ...
8
votes
2answers
352 views

Telling mathematica to output * instead of space for multiplication, so I can copy as plain text

I am trying to get some symbolic expressions in Mathematica which I would like to paste into my C/MATLAB codes. This can be accomplished nicely by selecting the expression and right-clicking to ...
8
votes
1answer
204 views

How do I indent C code generated by SymbolicC?

I'm continuing to experiment with the SymbolicC` package, and it's crucial to be able to inspect the generated code in order to do, well, anything useful with it. ...
8
votes
2answers
530 views

A femme is a wife is a Frau

As can be seen from LanguageData["Properties"] // Multicolumn Mathematica's translation capabilities seem to be very limited. It can translate month names, ...
8
votes
3answers
564 views

Expression of uncertainty in measurement.

I have a problem with writing a Mathematica function. I have been requested to show the results of my experiments with the measurement uncertainty (mu) like below: ...
8
votes
1answer
873 views

How do I get Mathematica to show a number in non-exponential form? [duplicate]

Sometimes I make a calculation in Mathematica that produces a big number, which Mathematica shows like so: -1.52522*10^7 This is annoying to me, because I want ...
7
votes
4answers
1k views

Bold face formatting for vectors instead of overarrows like latex \mathbf{}?

OverVector can be used to make a symbol look like a vector in text sections of documents. I happen to like bold symbols for vectors better, as in latex ...
7
votes
3answers
202 views

Wrapper for inexact numeric complex numbers that maintains polar form

Related question: How can I convert a complex number a+b I to the exponent form A Exp(I phi)? Mathematica insists on displaying complex number in form a+I b when ...
7
votes
3answers
256 views

Wrapping EventHandler by Table

I am making a grid on the screen. The grid is composed of different expressions. I want all of them to have a Gray background, which turns into a ...
7
votes
2answers
751 views

How to change an expression to Fortran90 form?

I have a large expression produced by Mathematica. To use this expression in my Fortran program I need to change it to a Fortran90 form. I am not satisfied with the ...
7
votes
1answer
255 views

How to substitute the following conditions into an expression?

I have an expression: $p=a\;b\; x + b^2\; y + a\;c\; z$. I want to substitute $a\;b=1$, $b^2 = 2$ and $a\;c = 4$ to obtain $p = x + 2y + 4z$. How can I tell Mathematica to do that? I dont know how to ...
7
votes
2answers
157 views

Can I Print to a different notebook? (within the context of the same kernel)

Please imagine a simple loop: For[i=1,i<=100,i++, Print[i]; ]; We can ask Print[] to output $(1,2,3,4,...)$ to a ...
7
votes
1answer
326 views

How to change brackets in TraditionalForm output

I'm trying to improve TraditionalForm's output by using different brackets when there are more than one. For instance, instead of $u(v(r(b))))$, I'd like to get ...
7
votes
3answers
303 views

Making large tables easy to read with frozen headings and scrollbars [duplicate]

I would like to represent a table containing a large amount of information in such a way that I can (a) use scrollbars and (b) have table headings that don't scroll off the screen [just like the Free ...
7
votes
1answer
343 views

Guides for programming CDFs

Are there any tutorials for programming high-quality CDFs, like the interactive calculus textbook presented at wolfram.com? Mathematica's Help is extremely impressive but it really does not help much ...
7
votes
1answer
132 views

Problem with exporting nested Rows/Columns to HTML

I will show the problem on the following MWE: Export["test.html", Column[{ Row[{"test", "1"}] }], "HTML", "CSS" -> None] ...
7
votes
2answers
268 views

Creating a TeXForm/TraditionalForm/etcForm - like function

How could we go about creating a function that behaves like those? After a while thinking, my best try is with CellPrint printing an ...
7
votes
1answer
225 views

Can the Notation function support complex structures on its left hand side?

In my investigation of the possibilities offered by the Notation package, I came over a limitation in the complexity of the left hand side symbol. For instance, although I am able to enter ...
7
votes
0answers
76 views

Bug in TreeForm: “Plot” formatted as True

Bug introduced in 7.0.1 or earlier, persists through at least 10.0.2 I believe I have come across a rather curious bug in TreeForm: ...
6
votes
6answers
147 views

Trying to write out the prime factorization of a number with CenterDot and Superscript

I am trying to use CenterDot and Superscript, in conjunction with Apply to write out the prime factorization of any given integer. Everything works well UNLESS the prime factorization of the number ...
6
votes
4answers
507 views

How do I display an expression with negative powers?

How do I display an expression with negative powers? Mathematica seems to always invert a term with a negative rational power. None of the following work: ...
6
votes
2answers
749 views
6
votes
3answers
321 views

Transforming a mutiplication into an addition

How can I force Mathematica to transform 5a into a+a+a+a+a
6
votes
1answer
724 views

How can I get better control over StreamPlot?

I'm having some difficulties with the command StreamPlot in Mathematica 7.0. Here's the basic plots I'm doing : ...
6
votes
2answers
114 views

PaddedForm adds an additional padding character

I would like to get a sequence from "01" to "10". I tried ...
6
votes
3answers
120 views

Multiplication sign in TeXForm?

How do I get Mathematica to produce TeX output that does not omit the multiplication signs ? For example, this expression: ...
6
votes
2answers
264 views

Add arrows over matrix

How can I plot this graph g1 = Table[x[i, j], {i, 5}, {j, 5}] // Grid; Rasterize@g1 I added these arrows by Ctrl+D's graphics tool. This way maybe hard ...
6
votes
1answer
426 views

Multi-column table layout the right way

How do I create book-like multi-column table formatting for a long, narrow tables in a preferably elegant way? Should I be thinking of stylesheets, instead of formatting? I guess this is a solved ...
6
votes
2answers
477 views

Displaying index as subscript on output: e.g. C[i] -> C_i with Notation[…] or Interpretation[..]?

You have all convinced me not to type in formulas with subscripts. However, in order to be able to match the subscripts in my whiteboard math, I figure a 2nd best solution is to want to display ...
6
votes
3answers
283 views

How to make rational expressions formatted using FractionBox

This is what I get using Mathematica 9.0.1. Instead I want this: I know how to use MakeBoxes, Format and I thought this code would work: ...
6
votes
1answer
1k views

Possible to export Excel formulas?

I would like to export an .XLS file complete with data and formulas. Is this possible using Export? For example, here is data and a formula :- I can import ...
6
votes
1answer
2k views

Formatting Ticks and FrameTicks labels with a function

Is there a convenient way to format tick labels? In this example I would like to use the default Mathematica tick intervals, but simply convert the X axis labels to strings with "s" added. As you ...
6
votes
1answer
750 views

Why does Mathematica order polynomial forms in reverse from traditional order?

I could very well be missing something obvious, but this has always bugged me with Mathematica and I don't know why it does it or how to fix it. If I enter any polynomial, say, x^2 + x - 1 for ...
6
votes
2answers
363 views

How to eliminate the zero real part of a purely imaginary number?

In Mathematica 9, a purely imaginary number, e.g. 0.9 I, will display as 0. + 0.9i in the output form. How can I eliminate the ...
5
votes
4answers
352 views

Display a number in Mathematica 9 in periodic form

I want to display a rational number in Mathematica in periodic style. PeriodicForm isn't working anymore. It worked in Mathematica 5 and now I'm using Mathematica ...