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
0answers
42 views

Can I specify which terms to show on the left side and which on the right side of an equality in output?

Mathematica unexpectedly moves a part of the result of the calculation to the left side where I want to display only the unknown variable. Can I prevent this?
2
votes
2answers
59 views

Make Mathematica not to evaluate an integral?

I want the output to contain an integral, while everything under the integral sign evaluated. How can I prevent the system from evaluating the integral?
10
votes
3answers
327 views

New display format needed: "drag box"

I want to create a new display type, especially for numbers or text, but potentially for arbitrary objects as well. I want a "drag box" where not all of the number (object) is visible, but dragging ...
1
vote
1answer
87 views

How can I remove the negative sign to make sure the positive-signed term comes first?

I found the default dealing of the terms often display a negative sign at the beginning, including those beneath a square-root sign , which is a little bit annoying since for most cases, there exists ...
1
vote
1answer
66 views
2
votes
1answer
45 views

How can I convert the inverse hyperbolic function I defined and built-in inverse trig functions to TeXForm the way I prefer?

In Mathematica,the inverse hyperbolic functions are displayed with the prefix "Arc" like "ArcSinh[]", which I thought incorrect and misleading. Since the hyperbolic angle is ...
2
votes
1answer
53 views

How to sort arguments in descending order in an orderless function

If I define an operator to be orderless SetAttributes[CirclePlus,Orderless] It puts the arguments into canonical sorting, i.e. ...
2
votes
3answers
3k views

How to generate table without comma and bracket or get rid of those?

I want just data without comma and brackets. Even TableForm is not working for me. For example, the general pattern of my table is ...
5
votes
2answers
828 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 "...
0
votes
0answers
38 views

How to map the outputs to different output lines?

I have the following code GraphIt[n, n2, IR, #] &/@ vanishpts where the function GraphIt print something, and returns a graph. I don't want my outputs to be ...
5
votes
1answer
143 views

Strings are constants? (Kind of output hack to circumvent that needed)

I have an "internal" notation (since some stuff is equivalent and can be manipulated via patterned expressions in the function F), say ...
1
vote
1answer
70 views

How to force Mathematica throwing an error box intentionally?

When building a Module function, I try to throw an error box when this function facing some cases. But I don't know how to output this error box with ground methods. This picture is the Mma error bar ...
0
votes
0answers
25 views

Output expressions with numerical coefficients and text separated

I have a Mathematica expression, t1 = (-10*wr20)/(7*Sqrt[3]) + (8*Sqrt[15]*wr40)/77 - (7*Sqrt[5/39]*wr60)/11; where some w terms are in the numerator, some are not....
0
votes
0answers
51 views

Change the default output form in mathematica 12

Is there a simple way I can change the default output form in Mathematica 12? In Mathematica 11, this option was simply in the "preference", but I can't find it anywhere in Mathematica 12.
2
votes
0answers
37 views

Print a string in TraditionalForm

I'd like to print all in TraditionalForm "f(z)=(z+1)/(z-1)" where f is a function defined in the usual way. What I obtain in Output for f(z) and (z+1)/(z-1) is not the TraditionalForm. What ...
4
votes
4answers
200 views

Is there an easy way to copy a TableForm column and convert it into a vector?

Is there an easy way to take a column output from a TableForm command, like this: ...
0
votes
0answers
28 views

Placement of `PlotLabels` in `ComplexListPlot[]`

In this example, would like the label $\gamma_a$ to appear below the line segment. ...
11
votes
2answers
1k views

Formatting and printing lists with Mathematica scripts

I'm just starting out with Mathematica and I'm using MathematicaScript rather than the GUI. However, I'm having trouble formatting a list when printing it. Suppose ...
1
vote
1answer
80 views

How to change the form of fraction

One of my output result is (2 Sqrt[2/5])/3 Is there any method to let it become Sqrt[8/45] Thank you very much!
4
votes
2answers
231 views

How to export expression in mathematica to python [closed]

I have an expression in Mathematica; I want to convert this expression into python readable format. how to do this? ...
3
votes
1answer
75 views

Graph layout and VertexStyle difficulties

I have several large two-layer directed graphs with vertex labels of unequal length, and I'd like to lay them out and color vertices in an automatic way, as I'll describe. Here is a minimum example ...
28
votes
6answers
7k views

sprintf() or close equivalent, or re-implementation?

Is there a sprintf() command (some command that takes a printf-style format string and a list of values to insert into the ...
1
vote
1answer
84 views

Creating a table and exporting to LATEX

I have two functions as numeric[x, t] and exact[x, t]. I want to create a table including 5 columns as follows (table formatting doesn't matter) and to export it to LATEX: I use ...
0
votes
1answer
35 views

\ell with argument in legend

I want to have as a Legend in a figure. But don't get further than
2
votes
1answer
64 views
0
votes
2answers
54 views

Extract subscript of variable in product

My input is a product of the variable x with index: x[1]^2 x[5] x[7] How do I extract the indices of the above product to get ...
0
votes
0answers
44 views

Replacing the print display in a for loop

I am running a For loop as follows: table = {}; For[n = 0, n < 10, n++, {table = Append[table, n], Print[table]}] I was wondering if there was a convenient way ...
3
votes
1answer
132 views

Doing calculations on values input in USD currency format (e.g., $1,234.56)

I'd like to be able to copy and paste, into MMA, numbers that have a standard USD currency format, i.e., that include dollar signs and comma separators, and get the output in the same format. I'd ...
0
votes
0answers
29 views

Missing toggle button when hide a subsection of codes

I created two subsections and hide the code in both of them. However, the hide toggle button ('the double arrow') only appears at one of the subsections. I noticed some differences between these two ...
0
votes
0answers
24 views

Mathematica doesn't evaluate LinearSolve Function properly [duplicate]

Maybe this could be a stupid question, but I can't solve this problem. I'm trying to evaluate an expression with LinearSolve Function but it doesn't work. I have pre-evaluated the matrix ...
2
votes
1answer
55 views

Can I change how certain expressions are displayed/printed upon evaluation?

I'm writing some operations for Young tableaus and I would like the evaluation of an expression of type young[a_] to be printed the same as ...
1
vote
1answer
45 views

PlotRange values changed by AspectRatio and PlotLabels

I'm running into a strange issue with ListPlot. I'm trying to plot some data with particular values for PlotRange, PlotLabels, and AspectRatio. However, if I enforce the desired values for PlotLabels ...
0
votes
0answers
43 views

Checking Membership of Conic Hull for Multiple Inputs

Suppose I have a given $10 \times 12$ matrix T, a $12 \times 1$ vector Subscript[\[Xi], 0], a $4 \times 12$ matrix ...
8
votes
2answers
172 views

How to prevent Mathematica from inserting random line breaks in usage messages?

I am writing a Mathematica package, and documenting its functions with ::usage messages. However, when I type ?FunctionName to ...
4
votes
2answers
145 views

Organising and examining a complicated CSV file

I am being sent data in CSV files. The sender is providing helpful comments and lots of headings so that it is fine to look at in a spreadsheet environment. However, when I import it into Mathematica ...
0
votes
0answers
60 views

On the precision of `Table` calculation [duplicate]

I want to add two arrays length and Apice, It's accuracy to six decimal places. When I use ...
1
vote
2answers
103 views

How to create a table tracking successively changing values of controls in Manipulate[...]

Consider the following code that generates the desired output for a single vector of parameters (i.e., values of the controls). My purpose is to generate a set of ...
0
votes
0answers
33 views

can not replace when use ctrl+f

I have a very long output, therefore, I want to find and replace some repeated expressions with abbreviations using crtl +f in Mathematica. when I enter expressions, the mathematical can find it and ...
4
votes
2answers
247 views

How can I remove constants from a reduced result?

I am trying to reduce some equations and get the final simplified answer. But there are two issues. This is just an example to show what my problem is. There are lots of similar samples with the same ...
0
votes
0answers
38 views

How to get rid of the white margins in picture export?

I made a manipulate box to show some spherical harmonics decomposition, and everything is working great (but it's very slow, when I add more harmonics!). Then I need to export the picture, without ...
2
votes
1answer
184 views

What's the difference between the following two codes?

I have two codes to find the integer numbers $m$, $x$, $y$, $z$ in the system of equations. First code ...
2
votes
2answers
114 views
1
vote
2answers
118 views

Manually specifying frame ticks

...
1
vote
0answers
42 views

Position of symbol of currency

When I use Quantity[45.51,"Euros"] the output is €45.51 I would wish to control if symbol € is on the right like 45.51 € And also when I use ...
8
votes
3answers
676 views

How to show the fraction line as a slash instead of horizontal bar in plot tick labels?

Is there any option to show the fraction numbers in the tick labels of a plot in the format of 2/3 instead of using a horizontal bar as the fraction line?
1
vote
1answer
56 views

write output to stream and also print it

I tried to save the Print[] output to a file using this code: ...
5
votes
1answer
129 views

Reduce from two pure functions to one

Liking the headings and spacing allowed by Row[] and TableForm[] I set up the below with 3 TableForm[]'s to use as a model from which to generalize, using a pure function, to display a list of 3-ples, ...
1
vote
1answer
34 views

Export table of mixed data without shortened decimal notation?

My question is similar to this one, except the solution presented there does not work in my case since my table contains strings as well as numbers. I would like to export data such as ...
0
votes
1answer
74 views

How should I export data with desired precision to output file

I want to control the number of decimal points in the output file. ...

1
2 3 4 5
24