Questions tagged [output-formatting]

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

Filter by
Sorted by
Tagged with
0
votes
1answer
35 views

Why Mathematica does not interpret this LaTeX code correctly

ToExpression["$ \\frac{\\partial ^{n} f}{\\partial x^{n}} $ ", TeXForm] It outputs 0 instead of the partial derivative: $$ \frac{\partial ^{n} f}{\partial x^{n}} ...
2
votes
0answers
45 views

Refer to future output

in my notebook I would like to present output that follows from some code later on in the notebook. E.g. on page 10, in the appendix, I have a code producing a graphic, which I name graphic1. On page ...
2
votes
1answer
46 views

GraphicsRow can't display the result that I want [closed]

Here is the code for my GraphicsRow: ...
7
votes
3answers
447 views

Scientific notation for exact numbers?

Some of my symbolic computations involve many large numbers, e.g.: 37894580188800000000000000000000000000000000000000 As the computation is symbolic, I'd like to leave the numbers in exact form, ...
1
vote
2answers
60 views

Placing plot legends inside a plot

I'm trying to overlay legends inside of a plot, so that if you were to right-click on the graphic and save it the legends would be included, but I can't seem to do it in a good way. I tried ...
2
votes
1answer
127 views

How can I use a unit vector notation found in physic texts?

In physics (I'm thinking of Taylor's Classical Mechanics or Griffith's Classical Electrodynamics) it is common to use "hat" vectors to denote unit vectors like $\hat{x}$ or $\hat{r}$. If I wanted to ...
1
vote
0answers
49 views

The order of partial derivatives on a symbolic function

I was wondering if it is possible to get the partial derivative of a symbolic function while maintaining the same order of derivation. Here is what I get when I plug the following command: ...
0
votes
1answer
32 views

Misbehaving `Table`

(To be fair, it's not Mathematica that is 'misbehaving'; this is actually down to my limited coding skills.) I have the following Table: ...
2
votes
2answers
99 views

Exporting the data points from two plotted curves

I am using Wolfram Mathematica 11. Given these quantities: ...
2
votes
1answer
31 views

how to display Sin[Subscript[\alpha,i]/2] as $s_{\bar{\alpha}_i}$ using e.g., Makeboxes?

Update: the following code proposed by Lukas works perfectly. I have tested both fraction or $a/b$ form, both work. I have revised the code a little bit, to make it more flexible: ...
1
vote
0answers
45 views

Copy and paste in original form

In Mathematica 10, after I copy an expression that contains subscripts and fractions the pasted result is always reverted into input form such as Subscript[a,1]. How do I change this default setting ...
2
votes
0answers
59 views

NDSolve Error “message text not found” [closed]

I am trying to solve a nonlinear PDE - 1D diffusive heat equation. I'm not sure what is wrong (am new to Mathematica). I'm trying to use https://reference.wolfram.com/language/FEMDocumentation/...
0
votes
0answers
27 views

How to display partial derivatives correctly after making a change of variables

I am currently looking into a way of being able to easily non-dimensionalise differential equations (such as the Navier-Stokes equation) in Mathematica, so that I can then seek an asymptotic expansion ...
0
votes
0answers
19 views

How to disable autosimplification of boolean function? Or How to get Perfect Disjunctive Form?

In my university I have a task to get a perfect disjunctive form of a function in Mathematica, so I found necessary minterms and I want to get disjunction of them. I need to get 5 minterms, but I have ...
2
votes
0answers
56 views

How can I force all rational number output to be displayed as reals?

Mathematica is automatically changing the format of all numerical output evaluations to rationals; e.g., FullSimplify[x * y/. x -> 1 /.y -> 1/2] yields 1/...
6
votes
1answer
62 views

Nice GeoPath junctions in GeoGraphics

The two lines: coords = {{10, 10}, {10, 20}, {20, 20}, {20, 10}}; GeoGraphics[{Thickness[0.05], GeoPath[coords]}] return You can see that the junctions (top ...
3
votes
2answers
154 views

Represent list of lists as formatted grid

I have tried to figure out how to make these changes, but it mostly just ends up with me making it ten times worse. ...
0
votes
2answers
65 views

Suppress arguments in output for pretty print

I would like to define a rule that suppress any arguments of a function for visibility. I tried: rule = f_[x__] -> f While this works well with individual ...
1
vote
3answers
58 views

How to add suffix to numbers in CForm?

I want to create C-Code from some expressions which have many explicit floating point numbers in them. I need real numbers to be in quadruple and not double precision. Is there a way to add a 'q' ...
0
votes
1answer
65 views

How to output results in a specific format?

i get some results using Table,codes are as this ...
1
vote
1answer
44 views

Formatting output for use in forums etc [duplicate]

If we take the (simple) example x = 1; y = 2; z = 3; x + y + z we get the (complete screen) result when copying into a more basic interface, such as a web forum ...
0
votes
0answers
39 views

Formatting of exporting

I am writing notes via Mathematica, but when I want to share it with others, there exists two problems. First, if I export it as pdf, there is no word wrapping of math expression: and input code: ...
1
vote
1answer
90 views

Correct use of Reap/Sow to optimize the code

I am trying to compare two functions on the end points of an interval. For instance, $f_1(t)=t^3$ and $f_2(t)=t^4$. From my code below I check whether $f_1(t)\leq f_2(t)$ when $t=50$ on $[50, 51]$ ...
3
votes
1answer
67 views

How to update values in a Summary Box? [closed]

Update The code below works fine. Failed update of summary box was from a typo in the actual code. Admins can delete this question if needed. For a summary box that includes a calculated value ...
4
votes
2answers
119 views

Changing tick labels to percent

Suppose I have a graph with y values between 0 and 1 (say). How would I go about changing the tick labels to percentage (so that 0.1 would go to 10%, and so on)? Documentation seems silent on this ...
0
votes
0answers
32 views

Mmma connectivity . parquet. python

Is there any way to exchange data in binary format with python ? Example. a) I have data in Mmma and want to export them to make use in python ... b) Want to use Parquet format
2
votes
3answers
79 views

How to save expression with its name

I want to save expressions as well as their names in a file. func[i_] := i; Do[func[i] >>> out.m,{i,1,3}]; The output is ...
1
vote
1answer
52 views

Expand without variable in denominator

Given: originalFormat = 2/3*y + 3/4*y^2 + 1/2*y^3/(1 - y); simplified = Simplify[originalFormat]; I would like a function that, given "simplified", will return ...
0
votes
0answers
60 views

How to print highest power of a polynomial first [duplicate]

Is there any built-in way to print the highest power of polynomial first and followed by the rest? ...
2
votes
1answer
51 views

Is there a way to set the ItemNumbered to increment i instead of numbers?

I am trying to get a cell style like the following: i) ii) iii) instead of(if I can have both at the same time better): ...
0
votes
0answers
68 views

Readable formula output on command line

I was trying to solve some differential equations. Mathematica is a little expensive to me, so I went for the free Wolfram Engine for Developers. It is said that the engine offers the full power of ...
0
votes
2answers
96 views

How can reduce the code to get coordinates of vertices of tetrahedron so that O(0,0,0) is center of circumsphere?

Let be given tetrahedron $SABC$, $SA=14/3$, $SB=7*\sqrt{13}/3$, $SC=2*\sqrt{193}/3$, $AB=7$, $BC=3$, $AC=8$. I want to find the coordinates of $A, B, C, S$ so that $O(0,0,0)$ is center of circumsphere ...
3
votes
1answer
50 views

Conditional formatting of `Table` with `Join` and `Transpose`

A simple example of what I'm trying to do (but I want to be able to apply the same principle to much larger data sets and with more complicated functions for low ...
0
votes
0answers
15 views

Output format for one point of 2D surface per line

A very simple formatting, did it before but cannot get it now..Thanks for helping. Each point of $(x,y,z)$ coordinates requires on a single line ...
6
votes
1answer
76 views

Expandable summary view for a large expression

I need a convenient interface to interactively explore very large expressions. I am aware of Short and Shallow, and appreciate ...
1
vote
1answer
33 views

Difficulty in generating an input text file

I am preparing the Ansys input file in Mathematica, It works completely fine with text, but the moment when I input some numbers I am getting some error. How to overcome this? ...
1
vote
0answers
28 views

MatrixForm a product of matrices [closed]

I was hoping that MatrixForm[SingularValueDecomposition[{{1, 2}, {3, 4}}] ] would neatly display the singular value decomposition of a matrix in the form of a ...
3
votes
2answers
43 views

Format table output

I'm trying to make a quick code to give me coordinates of some circles to be read in AUTOCAD. When I use the format "Table" or ...
0
votes
1answer
36 views

remove one of the column in the output of Solve command

I would like to remove one variable in the output of the "Solve" command without changing the rest. For instance, in the following code ...
4
votes
1answer
43 views

StringTemplate with Irrational number

How to keep irrational number as their original form rather than approximation when using StringTemplate? StringTemplate["`1`"][Sqrt[3]] This will output ...
3
votes
2answers
96 views

Extract outputs from a WHILE loop in a table format

How can I convert my multiple outputs of a while loop in a table form and save it for later use. Here is a sample code: ...
3
votes
0answers
91 views

Why does Factor[] not factor -1?

Consider the two expressions -2a-2b and -a-b. The TreeForm[] looks identical However, ...
2
votes
0answers
53 views

What do indices in brackets mean? [closed]

Solving the Schrodinger equation for a free particle gives me this output: What does the $\psi^{(2,0)}$ mean here?
0
votes
1answer
21 views

Alignment when not dealing with (just) text [duplicate]

In designing interfaces for dynamic operation, I am finding that I cannot figure out how to get alignment to work. For example: ...
2
votes
1answer
85 views

Changing the format string for numeric floating point values in the Put function

In my current macro, I have: Put[Chop[someList], "someFile"]; where "someList" is a mixed bag of "strings", "integers", "exact complex values" (e.g. ...
6
votes
2answers
1k views

How to get Planck length in meters to 6 decimal places

I want Mathematica to format quantities to more decimal places than the default. For example I have tried ...
0
votes
1answer
49 views

PageWidth not inserting line breaks into long strings

I am having some trouble setting the width of my output. I have some very long expressions, and I would like to output them as strings of maximum length 80 characters. For example, I have a very long ...
2
votes
1answer
57 views

Alignment on character that has an overscript

We can align to a character: ...
0
votes
1answer
41 views

WriteLine[] not working once put into a function

I wrote a function that takes two strings, an integer, and an OutputStream, it's supposed to write to. The function is: ...
0
votes
1answer
65 views

Displaying the repeating decimal expansion of a rational number [duplicate]

How do I write a decimal expansion of a rational number $a/b$ with only periodic part, e.g., given $1/7=0.14285714285714285714 \ldots$, I want just $0.142857$, the periodic part of $1/7$, to be ...