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

learn more… | top users | synonyms

1
vote
1answer
47 views

Grouping Nested Lists Based on Differing Values of Single Element

I've a list of lists representing k-rows of truth table having n elements each in a nested list consider ...
12
votes
3answers
300 views

TeXForm and large brackets (\Biggl[ etc)

Goal I am trying to export a very long expression like expr = c1*bracket1[a+b+c2*bracket2[d+e+f...]]+... to LaTeX using ...
12
votes
3answers
320 views

Format and TeXForm does not work as expected

Recently, we had a nice question which brought up an issue that I believe is a bug. In the tutorial Defining Output Formats is an example at the end which doesn't make sense This specifies the ...
0
votes
1answer
67 views

How to format output when using Manipulate

As in the title, I want to output the image of a 3D body with its volume and surface area shown nicely beside it. (Maybe in a table?) But how can I do it? Is it possible to calculate the surface area ...
4
votes
2answers
136 views

Plots using TextAlignment with SwatchLegend to left align multi-line items

I have Legends that stretch over multi-lines and the only way I can get them left aligned is by adding white space to the end of the legend item. Does anyone know if there is a way to use ...
2
votes
1answer
94 views

Display negative exponents always as fraction

I want Mathematica to display negative exponents always as fractions. I already tried: ...
4
votes
2answers
100 views

Fractions formatting in Column / Grid

Fractions are squished in GridBox: ...
0
votes
0answers
66 views

How to hide brackets and create bars over variables

I have two problems figuring out how to format my formulas properly so that when I print out the notebook the formulas look like the ones in my textbook. So far I've got this: $\sum\limits_{i=1}^5 ...
0
votes
0answers
36 views

Visible (or selectively visible) multiplication operator in output

I don't like the way that Mathematica hides the multiplication symbol when two variables appear adjacent in the multiplication, because the space between them isn't always sufficient to clearly see ...
4
votes
1answer
79 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 ...
3
votes
1answer
85 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: ...
11
votes
3answers
488 views

Labeling plots without evaluation

This is my first question here so please excuse my mistakes. Let us consider a rather contrived example: ...
6
votes
3answers
321 views

Transforming a mutiplication into an addition

How can I force Mathematica to transform 5a into a+a+a+a+a
3
votes
2answers
126 views

Real and/or improved CForm of expressions

I'd quite like to be able to automatically generate C++ versions of certain mathematical expressions that I've manipulated in Mathematica. The resultant C++ code fragment is then going to be used ...
1
vote
1answer
93 views

How do I type boxtimes?

How do I type boxtimes in Mathematica, for example $a\boxtimes b$? This symbol is used a lot in mathematics, but I found no corresponding part in Mathematica. In TeX form, I can type \boxtimes. Can ...
2
votes
1answer
101 views

Notebook output behaving erratically

Normally, when reevaluating a cell, the following output cell is overwritten with the new result. I have a lengthy notebook in which at some point for unknown reasons each reevaluation generates a new ...
2
votes
2answers
157 views

Lossless TIFF or PNG export

I'd like to export an output from MatrixPlot[], however, the output file size seems to depend on my specification of the ImageSize -> {..., ...}. How might I export a TIFF with all of the data in the ...
0
votes
1answer
51 views

Substituting a function in the output

I have to calculate the derivatives of the function K defined in the code: ...
14
votes
4answers
881 views

Converting a large floating-point number to a single-line string

When I feed a large (or small) enough floating-point number to ToString, it produces a two-line string, with the first line containing only the exponent of 10: ...
1
vote
1answer
46 views

Formatting All Appropriate Output as Desired Automatically

I want to output in MatrixForm whenever I have a list/vector/matrix, but I do not want to have to type out the command each time. How can I write one command at ...
1
vote
0answers
24 views

Ordering the Terms in an Expression [duplicate]

Why does Mathematica almost always put subtractions as the first term in a summation (as a negative summed with the rest)? How do I circumvent this feature so that every occurrence of "-" follows ...
2
votes
3answers
151 views

Wrapping a data selection in Mathematica

I was wondering what would be the most efficient way to add brackets to given elements in my data set in order to change it's form from {{a,b},{c,d}} to {{{a},b},{{c},d}}. I took a look through a few ...
9
votes
3answers
464 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 ...
13
votes
3answers
577 views

How to keep Collect[] result in order?

For example, Collect[(1 + x + Cos[s] x^2)^3, x] gives the result ...
2
votes
0answers
28 views

How to simplify a polynomial and get the results in the order that I want? [duplicate]

How to simplify a polynomial in a order that I want? Assume that I have a polynomial here, for example, $a^3 b^4 c^2$, the order of symbels is the dictionary order, $a>b>c$. But what if I want ...
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. ...
2
votes
3answers
110 views

String formatting

I have the following string: "174,861.00 ( 4,053.52) 206,850.48 118.29 ( 31,989.48)" Parentheses stand for negative numbers. I will like to get ...
2
votes
1answer
81 views

Make FactorInteger print its result with CenterDot and Superscript?

I know that if I use CenterDot @@ (Superscript @@@ FactorInteger[x]) Mathematica will pretty print the output. However, is it possible to tell Mathematica to ...
0
votes
3answers
57 views

Printing the base 'b' value of an integer as a string (without the subscript base indication)

Is there a simple one-liner to convert a given base 10 integer to a string representation of this integer in some desired base 'b'? Is there a way to do this avoiding the subscript indicating the ...
2
votes
1answer
44 views

Problem with parentheses and ScriptBaselineShifts

Style[ DisplayForm@RowBox[{"(", SubsuperscriptBox[2, 6, 7], ")"}], 18, Bold, ScriptSizeMultipliers -> 1, ScriptBaselineShifts -> {1, 3}] or for ...
0
votes
1answer
65 views

Customize TableForm behavior for a single function

I have a function of this form Garch[a,b,c....] that gives me a list as an output,where the first column collects names of output variables. Is it possible ...
1
vote
1answer
79 views

How to operate with function body without evaluation

I have several functions (let a[x] and b[x]), defined as expressions with integrals and differentiations. I want to perform some ...
2
votes
1answer
108 views

How to preserve the order of terms in the output

Is there a way in which mathematica can preserve the order of operations while it evaluates an expression?, for instance: In my short example ...
0
votes
0answers
20 views

How to prevent expressions like b-a from being transformed to -a+b? [duplicate]

When I enter some expression like a-b, it is shown as I want, i.e. as I entered it. But in some cases the variables aren't sorted alphabetically, and entering e.g. ...
4
votes
1answer
106 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 ...
0
votes
0answers
37 views

Panel size undesired behaviour

This is next question from the series: better avoid Panel if you care about details. previous about FrameMargins In the ...
1
vote
1answer
372 views

Solving Heat equation [closed]

I want to compute the exact solution of the heat equation but I got an error. u(x,t) (equation of transmition of heat) is the solution of this differential equation: $$du/dt - \alpha d^2u/dx^2 = 0$$ ...
0
votes
0answers
36 views

Output of the comand Put

I have a do loop in which I "Put" a ListPlot of a list in every iteration by doing Put[ListPlot[list],"file"] While the process is running and is still not ...
0
votes
0answers
91 views

HypergeometricPFQ

I am trying to get a simple but relatively ugly result out of the following summation, however, mathematica gives me an expression which includes HypergeometricPFQ. Obviously, I am doing something ...
-7
votes
1answer
106 views

Simplify looks ugly [closed]

I use Simplify mostly to make expressions look neat. However, Mathematica often does not produce expression in, what I consider, the optimal way. Look at this: ...
2
votes
1answer
88 views

Set Page Width of PDF

I have a very simple question. I am using the student version of Mathematica 9, and I often do my homework in it. I type up a notebook, and then save it as a PDF using the "save as" option. However, ...
0
votes
1answer
47 views

How to change the order of the variables in an output? [duplicate]

I have this output: a(b + c)d + 3 But I want it to become like this: ad(b + c) + 3 How can I do that? Is there a way ...
3
votes
2answers
101 views

How do I NOT change the input/output number when editing?

I tried to search for a topic on this, but didn't seem to find anything, so here goes. I'm pretty new to Mathematica, so there are a lot of things I don't know yet, but one thing is pretty annoying ...
3
votes
3answers
168 views

Generating a list of questions (simultaneous equations)

I am trying to create a list of simultaneous equations showing steps, where I only need to change a, b and the question number, and maybe a couple of minor things about q (where q is the factored ...
2
votes
2answers
153 views

Converting from TableForm to Grid

I wonder if there is an easy way to convert from TableForm to Grid. I have an existing data format that uses the Table function that I’d like to prettify…. Let’s setup a nested table as follows: ...
6
votes
2answers
113 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 ...
4
votes
2answers
459 views

specify field width in Print

I would like to format the output. For example, the following code gives ...
3
votes
1answer
113 views

Is it possible to show Tooltips in a ListPicker menu?

Is it possible to show Tooltips in a ListPicker menu? This effect is possible using TabView, but I would much prefer using ListPicker. Below is a simplified version of my code. ...
0
votes
0answers
41 views

Explicit multiplication * sign in Mathematica [duplicate]

I need to turn my Mathematica output (in string form) to a form that I then need to feed to Maple, and specifically I'd need all multiplications to be marked by * (as opposed to x or, as it happens ...
0
votes
1answer
58 views

Combine multiple outputs into a pane [closed]

Probably unnecessary detail: So here's what I'm envisioning. I have several outputs from different calculations (perhaps several ListAnimated tables of GraphicsGrids of plots). In one, I did all the ...