Questions on typesetting and making your expressions, matrices, operators, equations or formulae look how you want them to.

learn more… | top users | synonyms (1)

72
votes
1answer
2k views

Programmatic formatting for Mathematica code - possible?

It seems to be both an interesting programming challenge and a very useful practical application to have a Mathematica program which would allow one to pretty-print Mathematica code, so that it is ...
41
votes
5answers
1k views

What is the most convenient way to read definitions of in-memory symbols when we don't have the source files? (Spelunking tools)

Note: I put Simon's implementation on GitHub. Contributions welcome! When trying to read the definition of already defined (package or built-in) symbols using ...
33
votes
3answers
3k views

Best way to give presentations with Mathematica

I have typically used PowerPoint or plain PDFs of slides to give presentations, but with heavy mathematical content, it can be tedious to create these presentations and make them look good. How can I ...
26
votes
3answers
608 views

Is there a convenient way to copy/paste text-interspersed SE code snippets into Mathematica?

Is there a way to copy and paste code snippets from SE to Mathematica if these snippets are interspersed with text? Like e.g. in Morphing Graphics, color and location in both the question and answer, ...
21
votes
6answers
2k views

Fixing quirky typesetting in plot labels

Consider this example plot. Plot[ 1-Exp[-x], {x,0,3}, AxesLabel->{"thickness (μm)","power density (W/m^2)"} ] Let us hold the typographical quality of ...
19
votes
6answers
873 views

Understanding Pie Chart Annulus generation and alternate style using Disk[]

Background I have been working with a set of data for some time now and I recently decided to change the format. The data is a tree-styled listing of hierarchical names and positions. (* Names ...
19
votes
2answers
339 views

How to write beveled fractions?

How to write beveled fractions like ${}^a/_b$? In contrast to $\frac{a}{b}$ and $a/b$ (see this question).
18
votes
5answers
582 views

How do I reassign canonical ordering of symbols?

I have a big polynomial that evaluates to: $$A^2 e^2 \phi ^- \phi ^++A e \phi ^- \phi ^+ c_{2 w} g_Z+\frac{1}{2} A e g h W^- \phi ^+ +\ll13\gg,$$ which is supposed to represent some terms in the ...
17
votes
3answers
670 views

Removing In/Out Labels before printing

I know that I can close a notebook and open it again in order to remove the In/Out labels. What I would like to know is if there is another easy way of removing these labels without having to close ...
17
votes
1answer
194 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 ...
16
votes
1answer
172 views

Exclude Sections/Subsections/… from evaluation

I'm working on a large notebook and I want to exclude some sections and subsections from being evaluated when I evaluate the whole notebook. Is there a way to exclude specific sections or ...
15
votes
6answers
926 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 ...
15
votes
1answer
226 views

How to strip all formatting from a string and convert it to plain text?

The documentation on String states: But if I try to perform some manipulations on this string, for example, take 2 words from the left, I get some shards of ...
14
votes
2answers
324 views

Why use Column with Rows instead of Grid?

In general, what are the advantages of using Grid versus a combination of Column and Row? Is Grid better in some situations but not others? For example, is there any reason why one would do this: ...
14
votes
4answers
784 views

Managing formatted usage messages in Wolfram Workbench

We have numerous packages (defined in .m files) that we maintain and develop in WolframWorkbench (2.0), and in those packages, we use the traditional method of ...
13
votes
3answers
501 views

Best Practice to write ::usage for own package functions

I'm writing an own package with Mathematica, that I would like to make available for others. In order to do that (and for my own usage of the package), I would like to write ...
13
votes
2answers
441 views

How to replace the style of the inline cell in a StyleSheet

I would like to change a StyleSheet in such a way that any text that is typed into the inline cell (the one created by Ctrl+9) is shown in a different font (e.g. the font of my choice). At present I ...
13
votes
1answer
229 views

Usage displays properly only after second call

If I have a usage message containig two-dimensional stuff (subscripts or formulas) and I call the usage, then sometimes I get an improperly formatted output enclosed in "...". Linebreaks are gone, but ...
12
votes
5answers
597 views

How stretch curly brace on multi-line text?

What's the cell option (or other technique) to use to stretch the curly brace that one typically uses in traditional math to group several displayed equations? Like this: And is there any better ...
12
votes
2answers
642 views

Representing second derivatives with a double overdot

I would like to express a second derivative with two dots above the variable. You can do this with a first derivative by saying: ...
12
votes
5answers
2k 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. ...
12
votes
2answers
206 views

Strange behavior when using Row with packed arrays

Today I lost a lot of time with a strange behavior and I narrowed it down to this small piece of code: ...
12
votes
1answer
269 views

Automatic formatting of isotope symbols in a text cell

InputAutoReplacements is an obvious choice for formatting isotope names in text cells. I'd like to be able to type "1H", for ...
12
votes
3answers
272 views

Notebook vs. DocumentNotebook; display a Notebook inline, like a DocumentNotebook

If you evaluate a DocumentNotebook[] expression in the front-end, it nicely displays inline, inside of an output cell in the current notebook: For my purposes, ...
11
votes
3answers
642 views

Can mathematica show me a fraction with a repeating decimal notation?

The value of 3/817 when expressed using the N[3/817, 100] shows me data without helping me see the repeating patterns: After I ...
11
votes
4answers
850 views

Is there a way to hide or toggle the visibility of code?

Many of my notebooks have a similar repeating structure, which is very convenient and reliable for my workflow: a chunk of code defining a Manipulate for exploring ...
11
votes
3answers
822 views

WYSIWYG table creating and editing

In Microsoft Office OneNote 2010, creating and editing tables is easy. There are simple toolbar controls for creating tables: , and editing them once they exist: . My question is, what's an easy ...
11
votes
2answers
249 views

Convert operator to string

How to programmatically convert an operator such as Equilibrium into its displayed form as a string? The conversion should work like this: ...
11
votes
3answers
542 views

Formula Formatting is Small and Chunky?

I'm sure I'm about to embarrass myself... but, here goes... I can't read any (but the most basic) typeset formulas in Mathematica. The fonts are simply way too small on my 2560x1440 monitor. If I ...
10
votes
2answers
936 views

How to improve the typesetting of mathematical contents

Until I started diving into Mathematica, I was not using much computer software for symbolic computation. I did my analysis by hand on blank sheets, the calculations using Python or MATLAB, and the ...
10
votes
1answer
2k views

How to use $\LaTeX$ for typesetting labels and titles in Mathematica

I need to typeset large number of equations to be used for PlotLabel and Titles and such. These have to look nice. Hence I use ...
9
votes
6answers
363 views

How to make text flash for a short period

How could I display text that flashed red for a half second or so and then reverted to black? (Or was put in bold and reverted to normal, etc.)
9
votes
3answers
568 views

How can I type left (sub)superscript?

I want to type in my variable next to its plot and I'm typing the text in using Inset. However my variable has superscripts to the left. Say it looks like this: $ ...
9
votes
2answers
399 views

Text in columns

So far I've only seen the front end work in a one-cell-below-the-other manner, so I am probably not expecting much of this question, but here it goes. Is there any way to create a document with text ...
9
votes
2answers
167 views

Pasting monospaced text into Mathematica notebook destroys aligment

I drew the little ASCII-art electronics schema below in vim. When i try to paste it into a Mathematica notebook, with: A) A code cell B) A monospaced font (Courier New) Mathematica insists on ...
9
votes
1answer
112 views

Is there a way to base one style on another?

I'm setting up a stylesheet and and finding the process of defining related styles tedious and error prone. In particular, I have several related styles that need to have synchronized settings (e.g., ...
9
votes
1answer
242 views

Syntax Highlighting for Mathematica on a Blog

Every once in a while I want to paste Mathematica code on my blog. When I do, I would like it to be somewhat readable, and it would be nice to have syntax highlighting. So far all my searches have ...
9
votes
2answers
156 views

How can I set a fixed cell height?

I did this often in previous versions of the Mathematica notebook front end. I would have a cell with lots of raw data, e.g. a very long list. The list might go on for pages. I would set the cell ...
9
votes
2answers
140 views

A notebook created on demand from a main document showing executable input along with output cells

I would like to make Mathematica documents with hidden calculations, such that they can be visualized on demand. In general it can be done in several forms and I actually use some. I would like to ask ...
9
votes
2answers
162 views

How to force neat linewrapping in Print?

I am regularly annoyed by the fact, that a neatly arranged Print statement gets ruined by a large piece of data, which - instead of linewrapping "in place" - is ...
9
votes
3answers
279 views

Typeset unbalanced brackets

In LaTeX, you can typeset expressions containing unbalanced brackets, by balancing them with an invisible delimiter \left. or ...
8
votes
3answers
334 views

How can I prevent kets to from growing too large?

In TraditionalForm, Mathematica formats kets incorrectly in certain expressions. For example, if used in a summation with indices indicated, a ket becomes too ...
8
votes
6answers
922 views

Producing cleaner Mathematica output

I asked this in chat and it turns out it would make for a good question make a posting for. I am writing up a handout type notebook and I'd like to have some clean output for presentation's sake. ...
8
votes
2answers
183 views

Change base font for all graphics objects

How can I change the base font style for all graphics objects, including the ones generated using plotting functions? I would like to change this a single time and have it affect all graphics ...
8
votes
2answers
164 views

Difference in integral character heights

Above is an example of what happens. It seems that the first integral is longer than the second because the y-character is longer than the x-character as this doesn't happen with other ...
8
votes
3answers
341 views

How to typeset a system of equations

Is it possible to typeset systems of equations in Mathematica, and if so, how can I do it using a big left bracket as one could in LaTeX with \left\{ ... \.? I ...
8
votes
1answer
125 views

How does AutoStyleWords work?

The title says it all. I assume it provides some way of automatically applying a certain style, or a list of options, to certain words written, just like other options of the sort like ...
8
votes
1answer
99 views

How to always display current section identifier (number, name) in notebook?

Because I find myself relocating frequently within a long notebook divided into sections, subsections, & subsubsections, I would like to display the identifying information for the section, etc. ...
8
votes
2answers
582 views

Light syntax parser for Mathematica?

My netbook is too slow to install Mathematica. I'm not set against working in a text editor, but I like having an automated highlighting/formatting environment; can anyone recommend a good gedit ...
8
votes
1answer
250 views

How to suppress undesirable kerning rules in math inline cells?

Update: (11/29/2012) Looks like Mathematica 9 has the same behavior. The following graphic shows how Mathematica kerns italic characters in an inline math formula cell (first row) where an ...