# Questions tagged [output-formatting]

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

1,440 questions
Filter by
Sorted by
Tagged with
1 vote
75 views

### With both 14.0 and 14.1 Save as PDF (print preview) has become completely mangled

For over a decade, I have been using the same method of creating and saving notebooks as PDF. For some reason saving to PDF started to produce complete gibberish for most of the styles I use. It ...
• 1,577
1 vote
56 views

• 1,014
114 views

### Converting laborious Mathematica expressions into Python source code automatically

I have worked out a (regrettably rather laborious and seemingly irreducible) expression in Mathematica. I'd like to use this expression in a ...
38 views

### Add a new column based on the complement of column data in a table

I have this code to replace the data of each row in a specific function and display a new column showing the values ​​of the function ...
• 1,014
31 views

### How do I display my output as a complex number with decimals for the real and imaginary components? [closed]

This is my code: c=Integrate[t/(E^t-1),{t,-Pi,Pi}]/(2Pi) a[j_]:=Integrate[t*Cos[j*t]/(E^t-1),{t,-Pi,Pi}]...
• 101
64 views

### How to form a discrete function using table data

I have table with three column given as $a$, $\alpha_\min$ and $\chi^2$ value respectively. Now a need a function such that we define a function $\alpha_\min$[a_ ], which will order the data table ...
• 57
109 views

### Combinations of two table

I would like to find all the possible combinations between TSet1 and TSet2 to create a table of 18 rows. ...
• 1,014
66 views

### Using PutAppend to create data file for 2D plot

I need to append 2 real numbers x,y (a point coordinates) to the bottom of a file, so that these numbers form 2 columns, the x column and the y column. I need to plot the points later. Doing this: <...
• 131
43 views

### How to export the given data to be imported by python? [duplicate]

Consider the following data: ...
• 5,923
44 views

### Using NumberForm in TableForm

new to Mathematica, but managed to use NumberForm and TableForm, but not at the same time. When I add NumberForm the data is no longer presented in a table. Any suggestions what I should do instead? <...
88 views

### How to suppress Sign[...] in output

I get the following expression in an output: Sign[a^2 - 2] How to suppress or avoid it from the input? I tried 'Assumptions', ComplexExapnd, etc. But it does not ...
• 575
66 views

### Identifying the order of the output [closed]

How to identify which eigenvalue corresponds to which diagonal entry of the matrix. Here is an example: ...
• 575
747 views

### Is it possible for Mathematica to output the name of a matrix as opposed to its matrix form?

I am interested in working with the names of matrices as opposed to the actual matrices themselves. I would like Mathematica to recognise the content of a matrix and output its name rather than its ...
• 673
46 views

### How can I input data of list as a number in option declare function of \begin{tikzpicture}?

I have a list list = {{2, 2, 2}, {8/3, 9/2, 7/2}}; I want to input elements of list into ...
• 1,118
302 views

### How can I get exactly solutions of this trigonometric equation?

I am trying to solve this solution Sin[2 x + Pi/12] == Cos[3 x - Pi/5], -2 Pi <= x <= Pi I tried ...
• 4,317
1 vote
42 views

### Format the output of an association such that each key-value pair has its own line, and a few other conditions

I want to format the output of an association such that each key-value pair gets has its own line, and the keys are aligned together on the left, and the values are aligned together on the right. ...
53 views

### How can I keep form of scalar product of two vectors?

Let a = {-6, 1, -12}; b = {x - 2, y - 1, z - 5} be two vectors. I want to keep form of scalar product of a and ...
• 1,265
124 views

### Expression -(a*b) and other superfluous parentheses in OutputForm

Mathematica sometimes places parentheses where technically none are needed, especially siding an unary minus sign. Some I would condone: a^(-b). Some look silly: <...
• 1,163
36 views

### How to prevent factorization of polynomials in output

The output of my program is a matrix with polynomial entries. Most often Mathematica rearranges the polynomials with some partial or full factorization, as in $p^2q+q^2(p+q)$ or $p(p+q)$. I would like ...
• 807
92 views

### How can I convert Sin[2 x] to \sin 2x and put result of Mathematica in a list in LaTeX like this?

I tried ReplaceAll[ Table[{Sin[2 x] == Sqrt[i]/2, Expand[Reduce[Sin[2 x] == Sqrt[i]/2, x, Reals]]}, {i, 0, 4}], C[1] -> k] and got I copy the result ...
• 1,118
1 vote
91 views

### How to determine the n th number of Pi?

I use N[Pi, 10^3] 3.14159265358979323846264338327950288419716939937510582097494459230781 6406286208998628034825342117067982148086513282306647093844609550582231 ...
• 1,265
97 views

### Defining an output format that doesn't break Ctrl+Shift+I

I'm used to pressing Ctrl+Shift+I (or N if I want a shorter form) to reformat my input cells in a nicer way after editing them, e.g., to remove unnecessary parentheses, add or remove spaces as needed, ...
1 vote
82 views

### How to replace C[1] in solutions of trigonometric equations into k?

This is my code Table[{HoldForm[Cos[3 x + 2 Pi/5]] == Sqrt[i]/2, Reduce[Sin[2 x] == Sqrt[i]/2, x, Reals]}, {i, 0, 4}] How can I replace C1 to ...
• 1,680
110 views

### Outer function for nested list

I have the following routine where I build a pair of function name lists {Flist, Klist} and 1D argument list {a1,a2,a3,a4,a5}: <...
• 346
139 views

### Syntax error when running file created with Save which contains backslashes

I am doing a nested integration. So far the result was successfully saved with Save["filename.wl", IntOutput] and looked as following: ...
• 346
53 views

### Appending Tabs to an existing TabView output

I would like to do a kind of versioned TabView for several runs of the same code. I would like some help in fixing this prototype code: ...
• 959
37 views

### Plotting a different data set

I am trying to plot the following list in which for each value of x point, we have three different values for the y point list={{1,{1,2,3}},{2,{2,3,4}},{3,{5,6,7}}; ...
• 585
81 views

### Generate variables in multiple integral

I want to do a multiple integrate with n variables. When I change the value of n, I do not want to rewrite the variables in the integral manually like here: ...
• 185
41 views

### Order of the output with simplification

How can I force mathematica to write the output of the following expression in the correct order? Also, how is to multiply the constant pre-factor by the terms inside the bracket? Input ...
• 575
1 vote
30 views

### Changing mouse over grid behavior

How to achieve that mouse over Grid is always an arrow like we see on first image (when mouse is over an item of the grid) and never the the shape we see in the ...
• 21.3k
1 vote
30 views

### Can we find (and understand) the ordering functions used in the various output forms?

Can we use (and perhaps even understand) the sorting functions used in the various output forms (such as OutputForm, TraditionalForm, TeXForm, etc...). This is motivated by the fact that I would like ...
• 4,651
47 views

### How can I get correct dashed line of this Intersection?

This is my code ...
• 4,317
1 vote
44 views

### How to get a single line title in a Manipulate box? [closed]

I'm having a text output issue with the following code: ...
• 4,103
64 views

### How can I find minimum of the expression $y - 5 x$ knowing that $y \log _{3}(3 x+y+9)=\left(x^{2}+3 x+y\right) \log _{3}(x+3)$?

I am trying to find minimum of y - 5 x knowing that y Log[3, 3 x + y + 9] == (x^2 + 3 x + y) Log[3, x + 3], x >= 0, y >= 0...
• 4,317
55 views

### How to obtain the output form as Cos[ω t] instead of Cos[t ω]?

When I type Cos[ω t] MMA gives me the output Cos[t ω] Is it possible to flip the positions of t and ω? Traditionlly, angular ...
• 1,003
36 views

### Modeling with different outputs size

I have lists of input and output. I want to perform the prediction operation but my outputs are different for each input and this causes an error. Can someone help me to write the model in such a way ...
• 155
87 views

### How can I show the expression of "Hypergeometric2F1Regularized[1, 1, 1 + n, 1 - p]"?

My formula is f3 = Integrate[(x*p/(1 - x (1 - p)))^(n - 1), {x, 0, 1}, Assumptions -> 0 < p < 1 && n > 1] and it gave me ...
• 381
75 views

I tried ...
• 243
119 views

### How can I convert $(x - 1)^2 + (y + 2)^2 + (z - 5)^2 - 25 = 0$ to $x^2 + y^2 + z^2 - 2x + 4y - 10z + 5 = 0$?

With Maple, I tried expand((x - 1)^2 + (y + 2)^2 + (z - 5)^2 - 25 = 0); and got With Mathematica, I tried ...
• 1,265
1 vote
72 views

### Unable to get proper Latex format from Mathematica

Based on this answer, I tried this code ...
• 4,317
101 views

### Making a dynamic table

Given the data below: ...
• 6,263
133 views

### How can I keep the form when I use Expand[2a+3b]^5 and apply to all elements of a list?

I want to keep the form of the expression (2a + 3b)^5. I tried ...
• 1,680
386 views

### How can I output rational numbers in properly formatted parentheses?

I want to output this: If I input it like that, the output removes the parentheses, leaving just: What I tried: ...
• 2,100
144 views

### How can I change x -- a into x + a when using Defer?

I have a list Clear["Global`*"]; list = {{7, 1, -5, 1}, {3, 1, -5, 3}, {5, 1, -3, 1}}; and I use Defer in ...
• 4,317
100 views

### How can I reduce the time to select three points on sphere to make an equilateral triangle?

I have this code ...
• 1,680
1 vote
132 views

### What is wrong when I use Length[{a, b, c}] == 3 in this code? [closed]

I want to creat the triples (a,b,c) so that Length[{a, b, c}] == 3, I tried ...
• 1,265
247 views

### How can I create some versions of exercises and get the LaTeX file?

Sometimes, I want to create some versions of exercises with the same content. For example, solve the equations: $x^2 - 5x - 6 =0$; $x^2 + 5x - 6 =0$; $2x^2 + 5x - 7 =0$. Then I solve each ...
• 4,317
98 views

### How to make pdConv not show the independent variables of functions

pdConv is a very good tool. How to modify pdConv (or a better way is to add an option?) to make the independent variables of the ...
• 1,467
I have a function I want to integrate, which is $v(t)$. solv = NDSolve[{v'[t] + (v[t])^2 + f == 0, v[0] == -I*k55}, v[t], {t, 0, 150}] Also, I have a range ...