Specify and control how Mathematica formats its output, including rich text, equations and graphics.
6
votes
2answers
153 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 ...
6
votes
2answers
249 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 ...
6
votes
3answers
154 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
87 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 ...
6
votes
1answer
223 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 ...
6
votes
2answers
183 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 ...
6
votes
1answer
129 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 ...
5
votes
4answers
378 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
3answers
943 views
Expressing a decimal as a fraction in lowest terms
How can I express a decimal such as 0.1845095405274387 as a fraction in its lowest terms?
5
votes
2answers
417 views
3- dimensional plot of 2-dimensional systems of differential equations
Let's take this first example of a 2D output:
...
5
votes
3answers
172 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 ...
5
votes
2answers
329 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
3answers
307 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
1answer
243 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 ...
5
votes
1answer
666 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 ...
5
votes
1answer
163 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:
...
5
votes
1answer
125 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 ...
5
votes
2answers
168 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
1answer
109 views
New display format needed: “drag box”
I want to create a new display type, especially for numbers or text, but potentially for arbitrary objects as well. I want a "drag box" where not all of the number (object) is visible, but dragging ...
5
votes
1answer
98 views
How can I fix Mathematica's text line-breaking algorithm not to line-break so soon?
I have some custom plotting functions that simplify the placement of footnotes and source notes under the plot. It is important that the line length of the footnotes fills up the available space and ...
5
votes
1answer
56 views
Using CellPrint with a TraditionalForm string
I am trying to use CellPrint to print a cell that asks a user to solve an equation. This equation is randomly generated right beforehand, and I would like to have it print in Blue. The whole Cell ...
5
votes
1answer
76 views
How to apply tags to expression terms?
I often see on this site and at the mathgroup the repeated questions on how to rearrange expression that Mathematica "likes" to keep in one form, but the user prefers in another. Consider this trivial ...
4
votes
2answers
561 views
ArcTan expressed as a radian fraction?
This type of answer is what I'm looking for:
In[58]:= ArcTan @ 1
Out[58]= π/4
This is what mathematica gives me:
...
4
votes
3answers
154 views
Replace very small numbers by zero in the output of a list
I have a long nested list, but many elements are numbers of order 10^-18 or less, eg
...
4
votes
1answer
463 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 ...
4
votes
1answer
444 views
Reduce an equation by putting a new variable
I have the following equation given:
$$ (26-x)\cdot\sqrt{5x-1} -(13x+14)\cdot\sqrt{5-2x} + 12\sqrt{(5x-1)\cdot(5-2x) }= 18x+32. $$
In order to solve it, I want to substitute $t = \sqrt{5x - ...
4
votes
1answer
77 views
How to substitute $x$ in a expression $f(x)$ but not calculate the value of the $f(x)$ at the point $x$?
I want to subtitute $x = 1$ into the expression $$f(x)=x^2 + 3 (x^2 - m^2) + \sqrt{x^2 + 1}$$ but I don't calculate the value $f(1)$, that is mean, I want $$1^2 + 3(1^2-m^2)+\sqrt{1^2 + 1}.$$ If I ...
4
votes
1answer
102 views
Why this code is considerably slower in version 9?
I have a Mathematica code for computing and plotting the density which corresponds to a given potential. The following code was written few years ago using version ...
4
votes
3answers
291 views
Simplify function notation
I have some calculations with arbitrary functions. In the output, Mathematica always shows the functions with its arguments. I would like to tidy the notation a bit, by hiding the arguments in the ...
4
votes
2answers
194 views
DisplayFormula not working as expected
How do I use the styles "DisplayFormula" and "DisplayFormulaNumbered"?
Why is there no margin (or empty space) around the ...
4
votes
1answer
124 views
Printing Block Matrices
I have a 2D matrix, such as:
d=2;
M=Array[a, {d^2,d^2}];
and I would like to print it in a way which emphasizes its dxd block matrix structure. If ...
4
votes
1answer
137 views
Command to Show Full Output
I have some rather long output from a notebook I run on a remote server. There is a time limit on processes so I typically do NotebookSave[] after any important ...
4
votes
1answer
80 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 ...
4
votes
1answer
180 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 ...
3
votes
2answers
110 views
Why don't these styling rules work when viewed in TableForm?
m = RandomInteger[{-5, 5}, {10, 10}];
m /. {x__, y_ /; y > 0} -> Style[{x, y}, Red]
% // TableForm
When m without style ...
3
votes
4answers
91 views
3
votes
2answers
104 views
ScientificForm is not being applied
I am looking to compute the value of $\sum^{3249}_{n=58} 2^{n \choose 2}$, but when I try to execute ScientificForm[Sum[2^Binomial[n, 2], {n, 58, 3249}]], I get a ...
3
votes
3answers
155 views
Subscripts in programatically generated section headers
Consider the following command:
TextCell["\!\(\*SubscriptBox[\(H\), \(2\)]\)", "Section"]
How can I display the string as section header and get the DisplayForm? ...
3
votes
1answer
159 views
Formatting data tables with Grid + Dividers vs. SplitBy --> GridBy?
A quick method to format human-readable data tables with headers, is to use Grid, eg:
...
3
votes
3answers
104 views
How to output an expression to an external file in “plain text” format without breaking lines?
Given a pretty long expression, such as
...
3
votes
1answer
39 views
PaddedForm adds an additional padding character
I would like to get a sequence from "01" to "10". I tried
...
3
votes
1answer
61 views
How do I edit the background of Axis labels in my plot?
I'm using the standard report stylesheet in Mathematica and when I output a plot, I've set it up so that I get a white background, however the axis labels still have a gray background. How do I change ...
3
votes
2answers
124 views
How to remove border points from InputForm?
I have this code, and it generates the below ListStreamPlot. The second graph is the ListStreamPlot overlaid with the points ...
3
votes
1answer
79 views
Force ellipsis to print an end of an expression
For pedantic reasons I want to display an infinite sum of fractions in fractional form (i.e. as 1/x not as x^(-1)) with an ellipsis at the end of the expression. I have tried a number of ways and ...
3
votes
1answer
722 views
Embed CDF into an Apple iBook?
Edit
From the comments I received and verifying the information about CDF at wolfram.com, it appears that it is presently impossible to embed CDF into iBooks.
WRI does not appear to be happy with this ...
3
votes
1answer
122 views
How can I efficiently write formatted data to a Gaussian Cube file?
I am working with data files that contain information about electronic wave functions. The data format is specified by the quantum chemistry program Gaussian. I need to import the data, manipulate ...
3
votes
2answers
152 views
Representation of negative exponents [duplicate]
Possible Duplicate:
Way to improve “show me this decimal number to M places, don't use scientific notation”?
How can I expand e.g. number 1.*10^-8 so that there would be no ...
3
votes
1answer
192 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 ...
3
votes
1answer
28 views
Combination of CellPrint and PrintTemporary, or DisplayForm for Cells
I'm programmatically generating some formatted output that generates a cell in the form of a Cell[] expression. For instance, the output might be
...
3
votes
2answers
160 views
Context Sensitive Formatting for a Table
Suppose I am calculating the correlation of a a set of vectors.
Correlation[RandomReal[1, {5,5}]]
I would like to display the output using TableForm or Grid ...





