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

learn more… | top users | synonyms

4
votes
1answer
107 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
329 views

Frame thickness in Framed[] [duplicate]

I need to change the frame thickness in Framed[] in order to create a legend box. How can I set the frame thickness in Framed[]? ...
4
votes
2answers
499 views

specify field width in Print

I would like to format the output. For example, the following code gives ...
4
votes
1answer
120 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
743 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
1answer
62 views

How to set default PageWidth for InputForm?

We can control the page width used by InputForm by applying SetOptions to "stdout": ...
4
votes
2answers
66 views

numerical precision in output file

I want to write the numerical results of a computation to a file which is to be read in Fortran. The data looks like: ...
4
votes
1answer
427 views

Unexpected behavior: CForm converts rationals to floating numbers

One line question: How to make CForm[1/2] generate 1/2 instead of 0.5? (Thanks Nasser's ...
4
votes
1answer
85 views

Cost of Living comparison for many cities

I have an excel file with about 40 cities listed. I would like to compare the cost of living for each one. I have seen the sample "relocation calculator" given by the input: ...
4
votes
1answer
112 views

Manipulate Demo Full Screen

Is it possible to create a demo using Manipulate and then open it in a document that can be expanded to full screen?
4
votes
1answer
75 views

Why are the edge items in Grid truncated?

The first and last rows and columns of my Grids always seem to be smaller than all the other rows in my Grid, as of they had ...
4
votes
2answers
75 views

Why can't I pass in a product of matrices in my modified matrixform? [duplicate]

In attempt to build a function that would work like MatrixForm but would wrap a matrix with brackets, I tried the following function: ...
4
votes
1answer
108 views

Set number of columns in text-based interface

Is it possible to set the number of columns in Mathematica's text-based interface? Or disable word wrapping in the text-based interface ? Specifically, my concern is output from ...
4
votes
2answers
267 views

How to prevent Grid from breaking the line upon export

I want to create a legend for my plots (a mixture of RegionPlots and ContourPlots). The legend should show the meanins of colors as boxes with text in them and the meaning of contours as framed number ...
4
votes
1answer
72 views

SuperscriptBox question

I am trying to define an object type in Mathematica as follows ...
4
votes
1answer
254 views

Row Alignment in Grid

I've been working on creating tables of differences in MAA similar to the image below, but with a bit more detail: I've written a function that will take an anonymous function, a range of values ...
4
votes
2answers
566 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
2answers
49 views

How to print unevaluated arguments in the form they were originally typed in?

I'm looking for a way to print a function's arguments, not only unevaluated, but also in the way they were originally typed in. By way of experimentation, I tried stuff like this: ...
4
votes
2answers
87 views

TableHeadings align to the right

Is there away to get TableHeadings align to the Right instead of the default to the Left? ...
4
votes
1answer
1k 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 ...
4
votes
1answer
69 views

Continuous background color of adjacent cells

I'm trying to make continuous blocks of cells so that their background colors are the same, but without breaks of white space between them. E.g. After some recent digging, I found the option "Show ...
4
votes
2answers
126 views

How do I display function application with square brackets in traditional form?

If I type C[x, y] // TraditionalForm I get something that looks like C[x, y] But if I type ...
4
votes
1answer
116 views

How to justify this Grid vertically

As titled above, How I can justify and how I can change the space between columns in this Grid specified below: ...
4
votes
1answer
94 views

Is it possible to Print into a collapsable CellGroup?

During rather long computation I have intermediate steps Printed with useful information which should be collected for possible use in future inside of the ...
4
votes
1answer
605 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 ...
4
votes
1answer
290 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
2answers
77 views

How to scale multiple graphics to preserve relative sizes?

I'm looking for a simple way to make the displays of different Graphics expressions accurately reflect their relative sizes. (By "simple" I mean that it does not ...
4
votes
1answer
91 views

How to get this grid normal height?

When I execute this ...
4
votes
1answer
113 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: ...
4
votes
1answer
160 views

displaying Laurent polynomials nicely

I have some 2-variable Laurent polynomials in $q$ and $t$, and I'd like to collect powers of $q$ and display them without using fractions, and to sort the terms by the power of $q$. For example, I'd ...
4
votes
2answers
315 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 ...
4
votes
1answer
85 views

Transforming expressions in terms of Csc and Sec to expressions in terms of Sin and Cos [duplicate]

I am writing a code to compute some matrix quantities. The result involves Sec andCsc functions, and I want a form displayng ...
4
votes
0answers
64 views

Are there any rules about style inheritance in Mathematica?

I can style every part of an UI separately. But it is not handy and it would be nice to have list of Heads which are not inheriting at all or even partly. Are there any rules about inheritance? ...
4
votes
0answers
86 views

Using an external Pattern breaks Format

I noted while writing this answer that using an external Pattern on Format doesn't work: ...
3
votes
2answers
665 views

I get weird <<…>> symbols in my output — what does it mean?

After I input the following: data = Table[{3 + i + RandomReal[{-3, 7}], i + RandomReal[{-2, 5}]}, {i, 1, 20}]; model = LinearModelFit[data, x, x] I got ...
3
votes
2answers
182 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
2answers
522 views

Calculate with units

If I want to calculate with units, for example using Pythagoras theorem, I would do this: c = Sqrt[(3m)^2 + (5m)^2] The result will be ...
3
votes
2answers
304 views

Can I ask Mathematica to replace the arguments of my functions with a replacement rule?

I have an equation that I evaluate at some point (let's say $x=1$) that have terms of the form f[1,y] D[g[1,y],{y,2}] Is there an easy way to replace [1,y] by ...
3
votes
2answers
209 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
1answer
82 views

Show Full Output button broken for all large outputs

I use Mathematica 9.0.1.0 on Mac OS X 10.10.3. As an example of my issue, we can follow along with the example from the documentation page for $OutputSizeLimit. ...
3
votes
3answers
158 views

How do I save a Unicode string?

I am having a problem saving a long complicated string with Unicode characters in it. I have boiled the problem down, I think, to this minimal example: ...
3
votes
3answers
218 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
100 views

Faded output is printed from dynamic object

Update: This behaviour happens only if cell grouping is set to Manual (similar to another problem). When an output cell is generated by e.g. dynamical object, ...
3
votes
2answers
128 views

Display Quantity in full form

Is there a way to display Quantity[] in full form in the output? I know you could use Quantity[valuse, Unit]//InputForm, but ...
3
votes
4answers
233 views

Row and Column Headings for a Grid

It would be useful for me if I could write: Grid[{{a, b}, {c, d}, {e, f}}, GridHeadings -> {{"r1", "r2", "r3"}, {"c1", "c2"}}] just like ...
3
votes
2answers
75 views

Two bit strings represented as lists – how to color differing bits as red while printing?

Assume the following code generatedMsg = {1, 0, 0, 0, 1, 1, 0}; transmittedMsg = {1, 1, 0, 0, 1, 0, 0}; Now, I want to print out something along these lines: $$ ...
3
votes
1answer
164 views

Control over the way matrix is displayed

I am wondering how to change the output format in Mathematica. For example, I have $x=\binom{3}{1}$ and $y=\binom{2}{5}$, and I want to find what linear combination of $x$ and $y$ produces ...
3
votes
1answer
124 views

Add text before TraditionalForm

Using Print[], I know it is possible to print out "helping text" to better understand a solution: Print["The solution is: ", x] if x holds some value. Now, this ...
3
votes
1answer
333 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
1answer
69 views

Engineering notation in mathematica 10 [closed]

It seems there is a bug in Mathematica 10.0.2 which is unable to display EngineeringForm properly: ...