Questions tagged [formatting]

Questions on typesetting and making your expressions, matrices, operators, equations or formulae look how you want them to.

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

Create by hand a formatted form of quantities

If I evaluate the following cell: Quantity["PlanckConstant"] I get as an output a very concise format of this quantity: Also, compare the legibility of ...
tush's user avatar
  • 375
1 vote
1 answer
68 views

How do I use \mathbf in an inline TeX cell?

I’m pretty new to Mathematica and I’m not sure how to get \mathbf working in inline TeX. I am using a ‘Text’ cell and clicking the ‘Insert TeX’ button (or doing ...
cherryblossom's user avatar
1 vote
1 answer
81 views

Extracting pattern from an equation

I have for example the following eqn $ j(\text{tl},0,1,1,0,0,0,1)'(s)+\frac{(d-4) j(\text{tl},0,1,1,0,0,0,1)}{2 s} $ I want to find out the pattern with the prime or the derivative, in this case ...
Tanmoy Pati's user avatar
5 votes
4 answers
329 views

How to display Latin Modern Math font correctly in Mathematica?

I just used Latin Modern Math font to display $\LaTeX$-like formulas in Mathematica. My expected effect is shown as follows: Using the following code: ...
lapcal's user avatar
  • 531
0 votes
0 answers
37 views

Turn string with () as function brackets into expression

I have a text file with an equation where all the brackets are formatted as (). For example I read in the equation 2*(Re(a)+Im(b)) as a string. Now I am wondering if I can make this into an expression ...
PhPanda's user avatar
1 vote
0 answers
36 views

Message converts argument to string before formatting it

How to pass automatically, context-dependently formatted arguments to Message? Interestingly, StringForm correctly interprets ...
István Zachar's user avatar
0 votes
1 answer
219 views

How to set the default screen style environment to elegant code?

I want to set the default screen style environment to elegant code. How can I do this?
Peter Burbery's user avatar
2 votes
2 answers
113 views

Problem with LaTeX format

I am trying to write the following function via latex \begin{equation} u(x,t)=\begin{cases} \frac{x^2}{2}+(t-x) ,\quad 0<x<t \\ xt-\frac{t^2}{2}+sin(x-t),\quad x>t>0 \end{cases} \end{...
Athanasios Paraskevopoulos's user avatar
0 votes
0 answers
34 views

Formatting and Indentation of Comments

Is there a way to force/control indentation in a multiline comment within an INPUT CELL? I often end up with some random indentation like the following. I know if I move the comment to a different ...
OpticsMan's user avatar
  • 560
1 vote
1 answer
49 views

How to tell Mathematica to collapse all of its sections/subsections in one command?

Is there any command allowing one to collapse all the heading sections in Mathematica (each title content, each chapter, and so on)? I am interested not in the buttons combination, but rather in the ...
John Taylor's user avatar
  • 5,380
1 vote
2 answers
147 views

Associating a string variable with a numeric variable

There is a translation operation from a numeric variable to a string variable: a[i_, j_] := Symbol["a" <> ToString[i] <> ToString[j]] How ...
Mam Mam's user avatar
  • 1,731
2 votes
1 answer
75 views

Sequence of lists

Let's say I have the following table, y=40; b=Flatten[Table[{i, j}, {i, 1, 2.25, 1.25}, {j, y - 5, y - 8, -3}], 1] then c is equal to, ...
a019's user avatar
  • 811
2 votes
2 answers
44 views

Creating ChartLabels in scientific format over a range

I would like to shorten this repetitious code. Personally, I would save the labels in a separate variable and then just refer to the variable, like for example "ChartLabels -> mylabels". ...
Elias.Liu's user avatar
1 vote
0 answers
56 views

Trying to use SetOptions on Style to set some default plotting options

I want to set some default options for Style. I tried this: ...
Camillo's user avatar
  • 11
0 votes
1 answer
31 views

How to "unwrap" Panel from a list of strings?

I'm working with existing code that wraps a list in Panels. When I'm done with the portion needing Panel, how do I get just the list of strings back? Thank you! ...
user2933940's user avatar
1 vote
0 answers
37 views

How to make Mathematica treat Subscript[x, j] as a standalone variable? [duplicate]

When i use Replace[] or /., I find that Mathematica does not treat $x_{j}$(Subscript[x, j]) ...
Aerterliusi's user avatar
1 vote
0 answers
80 views

How get this kind of group opener?

Some notebooks of mine have Section (and Subsection) cells formatted like the following, so that clicking on the icon to the right of the Section's title opens the entire group of cells in that ...
murray's user avatar
  • 11.7k
4 votes
1 answer
109 views

Purple color text related with RowBox

Type the first line of following code and press enter key. ...
imida k's user avatar
  • 4,037
1 vote
1 answer
61 views

Format[] and Power[]

Suppose I have a simple dot product function DP that I want to display nicely, I might use e.g. Format[DP[x,y],StandardForm]:= (x\[CenterDot]y) If x == y, then I'll ...
Akoben's user avatar
  • 727
0 votes
1 answer
60 views

The shortcuts for typing subscript is valid

I installed the Mathematica 13.2 in my new computer, everything worked well excepted that the shortcuts for typing the subscripts "ctrl+ _" doesn't work. I tested that the "ctrl" ...
Knife Lee's user avatar
  • 149
0 votes
0 answers
23 views

Set TeXForm for user-defined functions [duplicate]

I defined a function gamma in short for a long function. Now I have an expression (just an example here) ...
Po1ynomial's user avatar
1 vote
1 answer
42 views

How to avoid spaces before parenthesis in DisplayFormula cells?

When I write a formula in a DisplayFormula or DisplayFormulaNumbered cell, I like to use "traditional notation", i.e. function-parenthesis-argument instead of function-squarebracket-argument....
JEM_Mosig's user avatar
  • 2,943
0 votes
0 answers
30 views

How can I make UnIconize produce formatted Strings? (or, how can I get UnIconize Wrap RawBoxes around Boxes?)

UnIconize from the menu turns RawBoxes into Box forms: If I Iconize the right-hand side of this: And then Uniconize it, the formatted strings are appear as Box forms: ...
Craig Carter's user avatar
  • 3,916
3 votes
2 answers
161 views

Precise control of fraction expression

It seems that expression for fraction differs when the number of terms in the numerator is more than 2. ...
imida k's user avatar
  • 4,037
0 votes
0 answers
36 views

How does cell style work with cell form?

I am writing some text in Mathematica that includes equations. I have an option for equation box by entering ctrl+( but it seems that is designed for inline math ...
atapaka's user avatar
  • 3,703
0 votes
1 answer
68 views

How do we make HoldForm reads from external list?

In[716]:= Block[{d = 10^6}, HoldForm[ # A] & /@ d] Out[716]= 1000000 I would like to get this ...
valar morghulis's user avatar
0 votes
0 answers
37 views

Bug? Version 13.2.0 GridBoxAlignment->{"Columns" -> {{"\[AlignmentMarker]"}}...} "Tabs" the first column after upgrade from 12.0

After upgrading to 13.2.0 for Microsoft Windows (64-bit) I have found that Grid boxes with columns aligned on AlignmentMarker are acting as if there is a Tab in front of the column. For example, the ...
Steven Thomas Hatton's user avatar
1 vote
1 answer
46 views

Combination of RowBox and SuperscriptBox create a new line "\n"?

Given the following code: ...
infinitezero's user avatar
  • 1,325
0 votes
1 answer
75 views

How to arrange the obtained results according to the descending power of x?

The function of the code is to obtain a univariate quadratic equation about x by simultaneous equation the code is this: ...
csn899's user avatar
  • 2,673
4 votes
2 answers
117 views

How to discard the repeating elements of a list [closed]

Lets say there is a random list of expressions : a={Sin[x], Sin[3 x], Sin[4 x], Sin[x], Sin[4 x], Sin[x], Sin [5 x], Sin[3 x], Sin[5 x]} Plot[{a}, {x, 0, 2 Pi}] ...
a019's user avatar
  • 811
1 vote
1 answer
69 views

Remove background colors within cells

I've gotten in the habit of changing the background color of modified chunks of code using the Format - Background Color menu on the selected code. E.g. Now I'd ...
Chris K's user avatar
  • 19.3k
0 votes
0 answers
49 views

Cannot generate an array of results for my numerical method

I want to apply the following scheme: $$ \begin{aligned} \psi_{i, j+1} &=-\psi_{i, j-1}+\left(\frac{\Delta t}{\Delta r_*}\right)^2\left(\psi_{i+1, j}+\psi_{i-1, j}\right) \\ &+\left(2-2\left(\...
Skj's user avatar
  • 19
0 votes
0 answers
15 views

How can I prevent spelling out the path to my user-specific Default.nb in references to private stylesheets of newly created notebooks?

This question came up with Mathematica 12.3.0.0. It probably also applies to other versions with slight variations, e.g. the initialization cells in Mma 13.0 are said to be shaded pink instead of gray....
Adalbert Hanßen's user avatar
0 votes
1 answer
70 views

More than 14 decimal places in settings

In the default settings of Mathematica, it is possible to work with 14 decimal places: Edit - Preferences - Appearance - Numbers - Formatting, in Samples hear it's 14-digit decimal only. Can I ...
Mam Mam's user avatar
  • 1,731
0 votes
0 answers
36 views

Plotting a list with variable(chemical formula, number)

I have a list like this List=((co2-Teo2,12),(Al2o3,15),(Ta2O5,16)); I want to plot the list so that the x axis I have the right format of chemical formula and have chemical formula in my plot legends. ...
parisa esmaili's user avatar
3 votes
1 answer
151 views

How to get output in MatrixForm in this context?

The following code implements matrix arithmetic: ...
Anixx's user avatar
  • 3,473
3 votes
2 answers
78 views

Why `MatrixForm` formatting does not work in this context?

...
Anixx's user avatar
  • 3,473
0 votes
1 answer
62 views

How to produce a graphic-algabric figure in Mathematica with proper alignment?

Given a symmetry $S$, we can block-diagonalize a Hamiltonian, i.e, $S^\dagger H S = H_{\text{block}}$. The following image demonstrates that. I wonder how one can combine equations and plots with ...
Galilean's user avatar
  • 549
3 votes
1 answer
121 views

Aligning equal signs in the numerator and denominator of a fraction?

I am trying to make a fairly complicated plot that involves LineLegend. As part of the LineLegend's label, I am using ...
MathIsHard's user avatar
0 votes
2 answers
110 views

Parentheses control

I have an equation with random integer coefficients. The structure is to demonstrate the distributive property. ...
JEM's user avatar
  • 1,147
2 votes
0 answers
56 views

Classification of Forms and understanding what goes into \$PrintForms, \$OutputForms, Out[x]//XXXForm=, and what does not

Mathematica has lots of Forms. Some of those appear in $PrintForms, like InputForm, ...
rocky's user avatar
  • 245
3 votes
1 answer
128 views

Traditional form of product

How to convert the following formula into the traditional form of product? ...
lotus2019's user avatar
  • 1,921
2 votes
1 answer
150 views

Mathematical typography for input of derivative

I prefer to enter mathematical expressions using typography that closely mirrors traditional mathematical typography... as for instance is found in a scientific paper or textbook. Thus if I see the ...
David G. Stork's user avatar
0 votes
0 answers
39 views

How can we Rasterize only 3dplots profile without box, axes or labels?

I would like to export a 3dplot where box, axes, and labels are in a vector format, but the 3d plot profile can be an image, similar to this. ...
valar morghulis's user avatar
3 votes
4 answers
154 views

Showing the keystrokes to enter mathematical symbols without converting to the symbol itself

In a Text cell I'd like to show readers the keystrokes to enter mathematical symbols, for instance $\backslash$[Integral]. However, whenever I type those keystrokes, the interpreter converts the ...
David G. Stork's user avatar
6 votes
1 answer
164 views

Python compatible fortran form for complex numbers

I am trying to use the Mathematica output of a complicated expression as input for python. As suggested in this answer, the FortranForm of an expression already ...
sqrt6's user avatar
  • 63
0 votes
1 answer
72 views

InputField - change text alignment to center

Is it possible to align text in InputField Right/Centered? (Seems Left is default) Seems there is no alignment option for InputField. What I want is center - More specifically, Real-time centered : I ...
imida k's user avatar
  • 4,037
7 votes
4 answers
371 views

Fit text within a button

Column[Table[ Button["ABCDEFGHIJKLMNOPQRS", Null, ImageSize -> i], {i, {50, 100, 150, 200}}]] will output As in the above example, Mathematica ...
imida k's user avatar
  • 4,037
11 votes
4 answers
212 views

How to detect errors that happen in the FrontEnd? [duplicate]

Some errors only seem to be produced at the point of typesetting, making it very difficult to detect them early. For example: ...
Sjoerd Smit's user avatar
  • 21.6k
2 votes
0 answers
44 views

Automatically iconize all Associations in output cells

I work with expressions containing large associations (<|…|>) as subexpressions, and I want to automatically iconize all such subexpressions in all output ...
Vladimir Reshetnikov's user avatar

1
2 3 4 5
17