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

learn more… | top users | synonyms

7
votes
1answer
704 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
211 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
2answers
378 views

Display Log with desired notation in output

I wish to display logarithms with different bases in the single-term rather than numerator/denominator form during output: ...
7
votes
3answers
382 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: ...
7
votes
1answer
61 views

How to ask Mathematica to display all the logarithms (in output) in base 2?

Instead it always displays in base $e$. Very often I need to do a lots of things with mixed expressions having some $\log_2$ terms. But Mathematica always convert every $\log_2$ into $\ln$. So I was ...
7
votes
1answer
81 views

Separate integer fractions from variables?

Whenever I write a rational number times a variable, i.e.: (2/3)a the result Mathematica displays looks very cringeworthy: $$\frac{2a}{3}$$ I would prefer ...
7
votes
3answers
401 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
2answers
697 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 ...
7
votes
1answer
402 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
151 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
1answer
254 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
1answer
77 views

Multiple PlotLegends ignore NumberForm

Imagine a set of curves data = Transpose@Table[{Exp[t], Exp[1.1 t], Exp[1.2 t], Exp[1.3 t]}, {t, 0, 5, 0.1}]; which should be labelled with numbers ...
7
votes
1answer
143 views

Converting string representation of boxes into explicit boxes

It is very easy and convenient to write textual labels as Strings in the WYSIWYG mode. For example, I define a short form describing a linear model: ...
7
votes
1answer
346 views

Creating formulas for the Moodle CMS question bank

Edit I have made some progress on this problem, which is given below the question. I use the Moodle course management system for much of my teaching, and the CMS comes with a tool for creating ...
6
votes
5answers
2k views

Is it possible to “pretty print” my input integral in Mathematica like Wolfram|Alpha does?

With Wolfram|Alpha, if I enter: Integrate[r^3, {t, 0, 2Pi}, {r, 0, 2}, {z, r^2, 4}] Wolfram|Alpha will pretty print my input like so: Which is very readable, ...
6
votes
5answers
542 views
6
votes
6answers
250 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
2answers
1k views

3- dimensional plot of 2-dimensional systems of differential equations

Let's take this first example of a 2D output: ...
6
votes
3answers
191 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
117 views

How to horizontally center a button in manipulate?

I just need to center a button in the MWE code below. Currently, all I try doesn't work. I would like to horizontally center the button relative to the sliders over it, for aesthetical reasons only. ...
6
votes
2answers
100 views

How to recover “pretty” format after split?

I'm doing this: And get this: But what I wanted is: How can I get the desired output? Is there a way to recover the format from the cryptic output? Note: my "real" list is way longer than ...
6
votes
2answers
182 views

PaddedForm adds an additional padding character

I would like to get a sequence from "01" to "10". I tried ...
6
votes
1answer
162 views

Using Padding with Text and Style

Suppose that I use: Text[Style["(1, 0, 0)", 12, Background -> White], {1, 1, 0}] How can I put a few points of padding around the text? Thanks to Jens: ...
6
votes
2answers
324 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
600 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
2k views

How do I set the fonts for Input and Output in my stylesheet?

I'd like to change the font that Mathematica uses for output by setting the font of the corresponding style in my stylesheet; bit simply overriding the default ...
6
votes
1answer
87 views

How to set default PageWidth for InputForm?

We can control the page width used by InputForm by applying SetOptions to "stdout": ...
6
votes
1answer
2k 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
2answers
155 views

Fractions formatting in Column / Grid

Fractions are squished in GridBox: ...
6
votes
1answer
169 views

CellEvaluationFunction or $PreRead stripping inline cells from text cells

I want to create a textual style that has some CellEvaluationFunction that processes the contents of the cell a certain way. Particularly, it has to do something ...
6
votes
1answer
65 views

Exported graphics have issues with word wrapping

I am trying to export a plot as an image. My actual plot uses Show to combine a ListPlot and several Plots, with a common legend. The code below is a dummy version that produces the same problem: ...
6
votes
1answer
848 views

how can I convert a Grid object to a Graphics object?

I have a figure (which is by combining different plots) that I generated using Grid[]. The problem is, I want to specify the ...
6
votes
1answer
482 views

Easiest Way to Use ShowGroupOpener in Mathematica

I currently edit manually the cell contents of a notebook (Ctrl+Shift+A or Cmd+Shift+A) to "recycle" cells containing the ShowGroupOpener option. Is there an easier way to create documents hiding ...
5
votes
4answers
415 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 ...
5
votes
3answers
446 views

Writing Mathematica's Root function output in a academic paper form

I need to write the following (which is the result of a Solve command I ran in Mathematica) in an academic journal paper: ...
5
votes
4answers
2k views

How can I format a table to look nice?

I have this code, but I would like to see the results well formatted. How can I obtain a well formatted data with alignment similar to this one? Instead, I obtain the result you see here (click to ...
5
votes
4answers
712 views

How to transform the result of this integral into powers of $\sin\,x$?

I want to calculate the integral $I = \displaystyle\int{\cos ^5 x\, \mathrm dx}$. Using the variable $t = \sin x$, I get $$I = \sin x - \frac{2}{3}\sin^3 x + \frac{1}{5}\sin^5 x + C.$$ With ...
5
votes
4answers
325 views

Concatenating strings, unevaluated expressions and evaluated expressions/values

Maybe this is something very simple to some of you. Anyway, I think this can be useful to many others like me. I would like to build an output that involves strings, unevaluated expressions and ...
5
votes
2answers
228 views

Displaying a list of percentage values according to their classification

I have a list of percentages as follows: percent = {21.15, 42.3, 57.68, 73.06, 84.6, 90.37, 96.14, 99.99, 99.99, 99.99, 99.99} I want to classify these ...
5
votes
3answers
161 views

Why does TraditionalForm[Inactivate[x y]] show x * y ? instead of x y?

Given that both x and y are expressions, in my case x is ...
5
votes
3answers
365 views

How to change the color of specified digits in a number?

I've been playing with numerical approximations for irrational numbers, and would find it convenient to be able to highlight where these approximations deviate from the known correct answers. For ...
5
votes
2answers
130 views

How to transform the output of FactorInteger to a traditional format?

I changed the FactorInteger output to a format which is more suitable to my needs. I used: ...
5
votes
4answers
128 views

How to set the output be generated in a cell different from “Output”

I would have some functions, for instance Plot, to generate their output using a different Cell's style rather than "Output". The reason is that I'm producing some documents with many images and, for ...
5
votes
2answers
794 views

How to receive the result of the integral $ \int\frac{1}{x}dx$ is $\ln|x|$?

When I input \[Integral]1/x \[DifferentialD]x in Mathematica, I get Log[x]. How can I make the result of the integral ...
5
votes
1answer
4k views

How to ask Mathematica to display answer in “$\LaTeX$” form

I am not sure how to explain it, but whenever I compute something in Mathematica, the output always spits back the result in a Mathematica language as opposed to easy-to-read equations. It's ...
5
votes
4answers
110 views

How to add/insert a well aligned graphics on top of another one?

I need to add a small graphics on top of a larger one, and the small graphics should stick very close to the large one, with their axis aligned. Here's a minimal code to work with, using some ...
5
votes
3answers
139 views

How to label only leaves in TreeForm?

I have a Huffman encoding represented as a list in the following manner: encoding = {{{w, d}, {o, s}}, {{{e, q}, a}, {i, j}}}; This means that ...
5
votes
2answers
64 views

Bar chart scale in multi-chart visualisation

This is a rewording of a previous question which probably wasn't very well explained, and so didn't get any responses(!). I'm trying to create a chart which shows the smooth kernel distribution of ...
5
votes
3answers
595 views

Show[] combines my Graphics3D objects in an undesirable way

Thanks to those (Heike, Jens, MrWizard, and R.M.) who helped me yesterday with figuring out how to plot an EM wave. Now I am running into trouble with the Show ...
5
votes
3answers
505 views

Ugly fraction in a label

I'm having difficulties in displaying a proper fraction in a label. Here's the 2D graphics which shows the problem : ...