Specify and control how Mathematica formats its output, including rich text, equations and graphics.
2
votes
1answer
194 views
Substituting Symbol font for Mathematica's custom font in exported plots and other graphics
Mathematica includes some custom fonts that allow you to use a wide range of mathematical symbols in output. For example, one can write:
...
7
votes
1answer
117 views
Formatting Framed - some FrameStyle graphic directives don't work?
The FrameStyle option in Framed seems to work for some graphics directives but not others, eg:
Framed["yo", FrameStyle -> Blue]
But
...
8
votes
4answers
554 views
Formatting a number with fixed number of significant digits
I need a formatting function (say format[x_, n_]) which outputs numbers with fixed n significant digits without unnecessary dot. ...
-2
votes
2answers
319 views
How to write output in TraditionalForm into external text files?
I'd like to write output in TraditionalForm into external text files ofile.txt. I tried to use
...
0
votes
2answers
280 views
How to generate table without comma and bracket or get rid of those?
I want just data without comma and brackets. Even TableForm is not working for me.
For example, the general pattern of my table is
...
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:
...
7
votes
5answers
236 views
TableAlignments->Left not working
For a very simple dataset TableAlignments->Left does not work:
...
9
votes
2answers
309 views
Mathematica Sec and Csc
How can I prevent Mathematica from using the "old fashioned" functions "Sec" and "Csc"?
In Germany these functions are "old fashioned" as they are not taught anymore at school.
5
votes
1answer
162 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
3answers
940 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?
2
votes
1answer
111 views
How to write output to an external text file in addition to the standard output stream?
How to write output to an external text file in addition to the standard output stream, i.e. a notebook for a session with FE and stdout for command-line session?
1
vote
3answers
426 views
How to write values of function to file?
For example, say I wanted to plot Sin(x) like this:
Plot[Sin[x],{x,0,2 Pi}]
But instead of plotting to a graph, I want to now tabulate the values of Sin[x] to a ...
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
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 ...
3
votes
3answers
154 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? ...
8
votes
5answers
184 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.
...
9
votes
4answers
169 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 ...
2
votes
2answers
589 views
Mathematica output doesn't work as input
Sometimes when I do, for example, a series expansion Mathematica gives me output that it won't take as input. For example if I do a series expansion:
...
2
votes
2answers
202 views
How to display a different number of significant digits in each column of TableForm output?
Say I create a table with three columns of numbers. Is there a way to control the number of significant digits displayed in each column. To make this concrete, take the following command:
...
1
vote
4answers
129 views
Applying a for loop on Out[]
I have a number of expressions, each one is an output: Out[135], Out[136], etc.
I wish to print all of these outputs in a C++ form using the function: CForm. I can apply it on each Out[] separately ...
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 ...
10
votes
7answers
252 views
Question about evaluation control
I want to make a function that takes a function as a parameter and prints an integral with the function inside. I've tried this:
...
13
votes
4answers
309 views
How can I turn off SingleLetterItalics in PlotLabels, etc, when the Options Inspector won't do it?
One of the requirements set for the graphing project I am working on is that plot and axis unit labels sometimes need to include superscripts. Here is an approximately minimal example (I have some ...
11
votes
2answers
399 views
Why doesn't PlotMarker option None return no PlotMarkers?
After reading the PlotMarkers documentation it seems to be all or nothing. For example if you wanted markers on some of you lines the code below seems ...
9
votes
2answers
751 views
About the number format in ticks
I want to LogPlot a function, but I have the trouble in the number format in the ticks.
For example,
...
19
votes
5answers
639 views
Rationalize the Denominator by Default
In Mathematica 7, if I input Sqrt[2/7], Mathematica outputs $\sqrt{\frac{2}{7}}$, but I want it to output $\frac{\sqrt{14}}{7}$ instead. How do I make Mathematica output values without radicals in the ...
9
votes
1answer
214 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 ...
10
votes
2answers
141 views
Unsatisfactory view of Panel, when transformed to pdf
I like very much to wrap Mathematica images by Panel, which gives many of them a much better view. To be precise, if image is some illustration, plot etc. I would ...
10
votes
3answers
274 views
Vertical alignment of FrameTicks Text
The text box of a FrameTick/Tick is, by default, vertically centered on the tick mark.
Is there a way to adjust the vertical alignment of FrameTick text? Specifically, along the lines of Baseline, ...
13
votes
1answer
149 views
Width-dependent MatrixForm
When writing fractions, Mathematica has a quite intelligent behaviour: If the fraction gets too long to fit on the width of the notebook, it is automatically replaced by ...
7
votes
2answers
131 views
GridBox/packed array behaviour
I have never used low-level formating functions, so this problem might have a simple solution. I'm currently pulling my hair out trying to solve it, however. Consider the following example:
...
9
votes
3answers
283 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 ...
8
votes
2answers
323 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, ...
4
votes
2answers
560 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:
...
10
votes
6answers
435 views
Annoying display truncation of numerical results
I have a lot of data to inspect. An example of a number in my program is
123.189094
This gets displayed as
123.189
...
11
votes
1answer
219 views
How one can programmatically transform a text into Gothic, DoubleStruck, or something similar?
In the pieces of text created programmatically I would like to be able to fix that the text is done in one of the styles available in the special characters palette, such as Gothic. It may be useful ...
16
votes
5answers
487 views
Formatting a fraction as a mixed number
Is there a command that will take a rational number and rewrite it in a mixed-number-like form? That is, I'd like to apply a command to something like 10/7 and get ...
12
votes
4answers
315 views
Constructing a list that includes a leading zero (01,02,03 … 55, 56, etc.)
I am constructing a list for use in file operations. Say I want to create list which contains values from 01 to 87. The kicker is that the first nine integers need ...
17
votes
1answer
180 views
hat not big enough
I like to use Mathematica text cells for creating draft technical documents. When entering equations in a text cell, the ^ (hat accent) does not dynamically adjust its size to fit. It looks good if ...
11
votes
1answer
291 views
Rearranging a Polynomial
In Mathematica 8.04 on Windows, I want to display a formula in standard textbook format. The formula is the variance of an $N$-security portfolio. For two securities it is:
...
2
votes
1answer
151 views
How to draw a pane with rounded corners?
Pane[
Style["text is here", Bold, FontColor -> Darker[Gray, .6],
Background -> Red
],
Alignment -> {Center, Center}
]
How to let the pane have ...
2
votes
2answers
84 views
Getting the complete Cell expression some input would generate as output
I can think of calling Print and then SelectionMove to copy the expression and then delete it. Is there any more transparent ...
6
votes
2answers
182 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 ...
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 ...
7
votes
4answers
567 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 ...
11
votes
4answers
1k views
Remove tick labels, but retain tick marks in RegionPlot (and related functions)
I would like to remove the numbering on the axes of the following RegionPlot. I would like to keep the tick marks but drop the numbering, I haven't figured out how ...
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 ...
3
votes
2answers
103 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 ...
2
votes
1answer
155 views
List of different values which have to be formatted differently
I have a large list of values which – for presentation in my LaTeX document – I need to format. For instance: I have calculated growth rates which I now would like to have formatted in the form of:
...
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 ...
