Episode #125 of the Stack Overflow podcast is here. We talk Tilde Club and mechanical keyboards. Listen now

Questions tagged [output-formatting]

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

Filter by
Sorted by
Tagged with
2
votes
1answer
50 views

Delete Part of Deferred Expression

Szabolcs provided an elegant answer to my previous question about printing executable code that uses Defer: ...
7
votes
1answer
270 views

MaTeX and \phantom

My understanding of the \phantom directive is that it should preserve the sizes of all elements in the expression. But when I try this: ...
4
votes
2answers
2k views

How to avoid the scientific notation in output?

I was trying with DecimalForm, but I read that the suitable one is NumberForm[0.5^20, 12] from version 11. But when I evaluate ...
2
votes
1answer
71 views

Forcing particular notation for derivatives

I was wondering if it is possible to force particular style of displaying derivatives in Mathematica. For example if I type: $$AB\partial_\mu C[\mu]$$ After execution it automatically be displayed ...
2
votes
1answer
52 views

How to get all horizontal Frame lines in Grid, including topmost and bottom-most?

How can I get the option Frame in TextGrid to do all horizontal lines, including top and bottom? I want: ---- a b ---- c d ----...
1
vote
2answers
61 views

How to represent $set1=\{a b, a c\}$ as $set2=\{\{a, b\}, \{a, c\}\}$?

I need representation $set1=\{a b, a c\}$ as $set2=\{\{a, b\}, \{a, c\}\}$ set1={a b, a c} Note I have seen some questions and found the opposite direction <...
6
votes
4answers
358 views

Make a custom object look like MatrixForm of a matrix?

Let's say I have a custom object that I denote Obj[a,b,c,...] There are always n^2 entries in the object for some integer <...
1
vote
1answer
302 views

display Conjugate[…] as superscript star

For some complex expressions, I want to display the Conjugate[x] as $x^*$ (keyboard input as esc-conj-esc) to make the expression cleaner. I can get the desired ...
2
votes
1answer
56 views

How to make an integer displayed separated by “,”?

I would like an integer to be displayed in output like this, with "," separating the integer. eg. 256,856,669,999,887,878,452 eg. 23,242,456 However, I can't find any option. Is it ...
12
votes
1answer
409 views

Easy printing of executable code

I'm working on a package that has functions that call other existing and packaged functions. I'd like a way to output what some of those key calls are, so users can see what's happening under the ...
0
votes
0answers
141 views

Remove decimal point from N function [duplicate]

For aesthetic reasons I want to remove the decimal point when I use the function N. For example when put in N[30] I get out <...
2
votes
0answers
47 views

Unexpected behavior with output formatting for numbers

In documentation for EngineeringForm states: prints with all real numbers in expr given in engineering notation. However, if one evaluates the following ...
2
votes
3answers
54 views

Which function should I use to replace variables in an expression?

I tried to search around but could not find a good solution. What I want to do is simple, for example, if at the beginning I define the three variables as: ...
0
votes
1answer
75 views

Why my code for format change doesn't work? (Format Rules)

I want to write the following in mathematica $$ (\sum_{k=1}^n a^2_k)$$ Now I've written this as an indexed variable Sum[(a^2)[k], {k, 1, n}] which in ...
1
vote
0answers
182 views

Printing Precision of Machine Numbers

Is Mathematica making the print precision rounding judgment more stringent based on whether or not the number is above or below the rounding target? If so, why? In my real case, I have many numbers ...
6
votes
1answer
77 views

How to display fractional expression like this?

For example: The default output is I want to the output display like I noticed that FractionBoxOptions, but couldn't find a appropriate options.
2
votes
0answers
68 views

What do these parentheses inserted after “Pretty Print” with StandardForm?

Background: I have a list containing individual elements and sublists. tab = {1, 2, 3, a, {4, 1}, {5, 2}} The individual elements are also to be converted into ...
1
vote
1answer
74 views

Replace variable in Series expression

I am trying to generate a series expansion in terms of the variable t then substitute a value in for it. However it seems that something about the SeriesData ...
1
vote
1answer
155 views

Insert data into a file at specific position

I have searched all over and can't figure out how to export data into an existing preformated file (quantum espresso input file) at a specific position. Here is what I am trying to achieve. If the ...
-1
votes
3answers
201 views

How do I convert the E^[…] notation back to Exp[…] notation?

How do I convert the E^[...] notation back to Exp[...] notation? Is there a simple command for this? It appears that ...
1
vote
1answer
288 views

VectorPlot3D of the Electric Field E as Determined from the Potential V

I am new to Mathematica and I am trying to create the electric field $F$ from the electric potential $V$ (using arbitrary distances) and then plot the subsequent vector graph to show that the electric ...
3
votes
3answers
834 views

Can I format units using engineering prefixes?

I'm in the early stages of learning about units. It seems easy enough to express numerics and symbolics in units, but what I would really like to do is append engineering prefixes (km, mA, MW, etc). ...
0
votes
1answer
104 views

How do I control italicization of text in axes and frame labels?

How do I prevent my text from being italicized when I annotate it with additional glyphs? For example if I add a "hat" to a variable, z as in $\widehat z$, but ...
2
votes
4answers
108 views

How can I strip the time from the result of applying DatePlus?

DatePlus["12 May 2017",2] gives "Sun 14 May 2017 00:00:00" How can I get just the ...
0
votes
1answer
52 views

How to use million separator on my output?

On the question Way to improve "show me this decimal number to M places, don't use scientific notation"? I learned how to automatically not use scientific notation with: ...
0
votes
0answers
34 views

Abnormal height of fractions after installation of the latest OS Windows

After installation of new Windows 10 Enterprise rel 1703, fractions in notebook have become extra high. For years, I use own external Stylesheet. Before release 1703, all Windows' ans Mathematica ...
10
votes
3answers
505 views

is it possible to change/customize some conversions done by TeXForm?

I use TeXForm to convert output of some computation to Latex. I'd like to ask if there is a way to override/change/customize some of these conversions, related to just the name Mathematica assigns to ...
0
votes
2answers
117 views

Data output in the specific scientific form

If I have data of data = Table[f[x,y],{x,{1,2}},{y,{1,2}}] which gives {{f[1,1],f[1,2]},{f[2,1],f[2,2]}} Then Export["file.txt",data,"Table"] gives ...
1
vote
2answers
396 views

Remove leading zero and trailing decimal from display of number

I would like to remove the leading zero and trailing decimal from the display of numbers in plots. For example, to get the correlation values to fit inside the cells of a correlation matrix, I can ...
4
votes
1answer
119 views

How to make TeXForm use TemplateBox to generate code?

If I define the TraditionalForm formatting of myFunction without TemplateBox, then ...
2
votes
1answer
57 views

How to print a collapsed cell group?

I would like to print a group of cells exactly like what I get from this: ...
4
votes
1answer
130 views

How to format latex-quality math code in Mathematica?

I'm giving a presentation with a notebook as a slide show and would like some of my equations to appear professional. For example I have an integral function with a square root in the denominator but ...
2
votes
2answers
697 views

How to generate images of mathematical equations?

I would like to use Mathematica to generate nice-looking equations for my presentation on Google Slides (which as far as I know can only be an image an image). What's the best way? To be more concrete,...
1
vote
1answer
90 views

File I/O: File is not encoded [closed]

I have a .wl file which should write a number to a .m file (using Put), and another .wl file that will later read that number back (using ...
1
vote
2answers
129 views

StandardForm in Cloud FormFunctions

Cross posted on community.wolfram.com Example ...
1
vote
1answer
35 views

Showing a function symbol inside an expression

Say I have a function with exponential term and I call it v[x_, y_, z_] := 1/(1 + Exp[pone*x + ptwo*y + 1/z]); Now, I perform some operation on it, for example, ...
0
votes
0answers
58 views

Callout label with formatting issue

Here is my code... ListPlot[{{1, 1}}, LabelingFunction->(Callout["cm^-1", Above] &)] Except I write "cm^-1" as "cm ctrl+^ -1" so that it looks like "$cm^{-...
3
votes
1answer
121 views

How to assign the real result of *Form function to a variable?

Of course we know,the TreeForm[a + b^2 + c^3 + d] will give a Graphics object.How to assign to a variable an expression which ...
14
votes
3answers
221 views

How to make the result of InputForm balance the bracket

I always use InputForm to check the result object,such as Dataset or Graphics or other ...
2
votes
1answer
130 views

Hide dependent variable in output

I recently started to work with Mathematica in the field of Robotics. In that type of research there are lot of matrices like this random example $$\begin{bmatrix}\cos{(q_1(t)+q_2(t))}&\sin{(q_1(t)...
4
votes
1answer
131 views

Unstable Dataset Formatting [duplicate]

I have a list of associations data set. If I do a simple Mean[] with GroupBy on two columns, I get a nice tidy table display. <...
2
votes
1answer
249 views

Export list of numbers as one column in a specified number format

I am going to export some random lists as ...
19
votes
6answers
2k views

Display 10^n as power

How can I tell MMA to display input of the form 10^n as $10^n$ and not e.g. as 1000 for $n = 3$ or the rational $\frac{1}{1000}$ for $n = -3$. This would help to ...
3
votes
2answers
161 views

Fourier transform of a bivariate normal distribution

I can define a Multinormal distribution by p = PDF[MultinormalDistribution[ {mu1, mu2}, {{sig11^2, ρ sig11 sig22}, {ρ sig11 sig22, sig22^2}}], {x, y}] I would ...
0
votes
1answer
86 views

How can I get an array of numbers from the user and show the numbers with formatting?

Suppose that I have to print the following lines: Number 1 is 5 Number 2 is 6 Number 3 is 7 Number 4 is 8 Number 5 is 9 Now, if I were programming in C, I would have run the following code : ...
9
votes
2answers
367 views

How to display numbers as multiples of a square root

The extension field $\mathbb{Q}(\sqrt {2} + \sqrt {3})$ can be represented by a $4$ - dimensional vector space over $\mathbb{Q}$ with basis $\{1, \sqrt {2}, \sqrt {3}, \sqrt {6}\} $. I made a matrix ...
0
votes
1answer
40 views

Serializing File Output

Right now my code is something like ...
1
vote
2answers
83 views

Intersperse strings among variables in a table [duplicate]

How can I intersperse strings among variables to create a table with labels for each entry. A simple example of what I tried to do would be a table of the value of a function $f(x)$ and the value of $...
5
votes
2answers
150 views

Inserting a label in the frame

I am trying to make a panel that looks like this: I can do: ...
1
vote
1answer
140 views

How can I plot multiple labels at specified locations in GraphicsGrid?

I used Show to combine two plots A and B so that I have plot1. The same for plots C and D so that I have ...