# Questions tagged [output-formatting]

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

977 questions
Filter by
Sorted by
Tagged with
106 views

### Replacements within a mathematica expression?

Say I have many expressions of the form $$\text{expr} = \frac{1}{AB(C+D)^n E^m}$$ where $A,B,C,D$ and $E$ are symbols and $n,m$ arbitrary powers. In order to convert between the mathematica output and ...
84 views

### How to convert the solution of this recurrence like this form?

I am trying to solve the recurrence sequence. I tried RSolve[{a[n] == 1/2 (a[n - 1] + 9/a[n - 1]), a == 1}, a[n], n] // Simplify I got {{a[n] -> 3 Coth[...
63 views

61 views

### Why the parenthesis for the output -CenterDot[x,y]?

Why do 2 CenterDot[x,y] - CenterDot[x,y] produce output that looks like $2 \, x\cdot y$ for the former but $-(x\cdot y)$ with parentheses for the latter? Both ...
82 views

### How do I get more control over table headings when using TableForm? [closed]

I'm creating some multi-column tables with multi-line headings. The following is an example I created the above table using the Table statement as follows ...
95 views

### Padding a number doesn't work when transferring to LaTeX

I have some numbers which I calculate via some previous code. The calculation works fine. However since I want to compare it with experimental data I only need the numbers to a certain number of ...
71 views

### PlotLegends formatting mixing italics and upright letters

If I do: ListPlot[Range ,PlotLegends->Placed[LineLegend[{"Subscript[N, σ] f(m; μ, p)"},LabelStyle->{FontFamily->"Times"}],{0.8,0.35}] ] where ...
127 views

### Suppress trailing 0s in numerical values

For example, this is what I want In:= N[Table[4^(i/4), {i, 1, 4}]] Out= {1.41421, 2., 2.82843, 4.} But if I want a few more digits only from the irrational ...
48 views

### Is it possible to embed the Manipulate into a WordPress post?

I have a manipulate Manipulate[n, {n, 1, 100}], I want to put it in my Wordpress blog post. Should I CloudDeploy it as below ...
250 views

### How to force 2=={} as a Boolean output?

I have a code as below:- x = 2; If[x == {}, 1, 0] I want the output to be 0, but the output I got is the entire ...
29 views

### How to add another sets of data to the BubbleChart3D without impacting the shape of bubbles?

I have some codes as below:- Data points ...
184 views

### Why does my Solve output contain this symbol? [duplicate]

I have a pair of coupled polynomial equations that I need to solve, so I tried using Mathematica's solve tool. This is the code that I wrote: ...
72 views

### Distributing complex conjugate

If you have a statement like: Conjugate[a+b] you get back Conjugate[a+b] but I'm expecting ...
66 views

### How to make the legend with color more compact in a plot?

I have a plot as below:- ...
94 views

### How to get the input string of Entity as output?

I have the following codes:- ...
111 views

### How to make GeoListPlot rectangular?

I have a GeoListPlot as below:- gr = {{20, 70}, {-30, 30}}; GeoListPlot[Entity["City", {"Paris", "IleDeFrance", "France"}], GeoRange -> gr] As you can see, ...
137 views

### Convert floating point numbers to string like sprintf/fprintf?

I am trying to export some floating point numbers into a csv/txt file. I would like to have a efficient way to control the space between numbers as well as the accuracy of the numbers, as we do in C: ...
58 views

### Make exponents line up with their base in terminal

For some reason, the exponents displayed on a terminal (Mac OS X 10.13) Mathematica 11.2 do not line up with their bases: ...
288 views

### How to convert entity to string?

I have an entity city. For example, I run {city} = GeoNearest["City", GeoPosition[{41.8, -87.7}]] and then I got The entity "...
53 views

### Format numerical input as text [closed]

I currently have the following code: ...
96 views

### How to format Print to display in Panel

The following code prints the the value of the solution $x(t)$ to an ODE at a user defined time $t_f$. I want the value (0.350232) to appear within the Panel and not below the Panel as the following ...
47 views

### Decimal representation in Mathematica 10

I am using a slider to assign the value for a dynamic variable x, and want to display the value of y=10^Dynamic@x in decimal ...
582 views

### Neural network illustrations

(Since this post was met with a certain reluctance to be given answers, a version of it is also posted in Community.) Please share neural networks diagrams you have made in Mathematica / WL. Here is ...
58 views

### How can I Reduce the covariance Matrix?

How can I reduce this covariance matrix? And also plot its eigenvalues? and how to compute its eigenvectors? Can we compute its eigenvalues and eigenvectors without reducing in compact form? ...
226 views

### How to force Mathematica to show the plots in one row? [closed]

Consider we have two different plot commands in Mathematica. In the output there are one plot and another one below. But I want the output to be organized in one row: on the left there is one plot, ...
16 views

### Maintain written order in expression (lexicographic sorting rules) [duplicate]

Is there any way I can get output to follow the exact order that I wrote it? For instance (simple example) x = z + a - b + c^2 comes out as ...
329 views

### Recreational Challenge: Best looking output for Rubi integration steps

As some of you might know, I'm working with Albert Rich to improve the accessibility of his Rubi package for rule-based integration. I'm almost done with a first version that contains several ...
65 views

### How to write a power using WriteString function

I have a solution of an equation: aa = N[Rationalize[g6[[3, 2]], 0], 16] (* Out: 2.691607147352649*10^-6 *) I want to save this result in a file using ...
75 views

### When print or save as PDF the font size is too large

When I print or save as pdf the font size is too large I have printed the whole notebook to pdf or saved it to pdf, but the font size was too large, and I have set the ...
59 views

### Space between elements using Write

I have the code: ...
193 views

### How does one specify numerical precision for FortranForm[] and CForm[]

I have a long function composed of polynomials and exponentials that I would like to convert to an appropriate form to cut and paste as an equation into SolidWorks. FortranForm gets me close and with ...
39 views

### Forcing nice positions of summation Σ 's under and overscript in FractionBox

Apologies if this has been asked before. The expression ...
369 views

### How to export a List with the values separated by a simple empty space?

I have this: list=Range[1,4] and I want to Export the values in a text-file. But the values should be separated by a single ...
70 views

### Make Reduce produce nicer output

I am trying to reduce a bunch of inequalities using the Reduce command in Mathematica. But the output is very convoluted and I am wondering if there's a way to systematically organize it so that I can ...
31 views

### Controlling Output Format when Sending Output to different Notebook

I want to use Mathematica to generate reports, containing tables, plots and (a bit of) text. Now plots and text, I've got pretty much figured out, but I'm sort of stuck at tables. For plots, I've read ...
113 views

### Making fractions cancel

I have an equation that Mathematica really wants to display as $$\frac{1}{4\pi G} \bigg( 4\pi G A + 4\pi G B\bigg)$$ where $A$ and $B$ are some terms and $G$ a constant. No amount of ...
53 views

### How to export numbers to txt in ScientificForm

I need to write data in scientific notation in a .dat file. For example Export["1.dat", {123.}]. I want to get 1.23e2 in ...
577 views

### Change the color of a word in text from green to red when the cursor moves over it

This example displays text that changes from green to red when clicked: ...