Questions tagged [formatting]
Questions on typesetting and making your expressions, matrices, operators, equations or formulae look how you want them to.
2,200 questions
3
votes
2
answers
222
views
How can I append data to a file with tab-separated values?
I'm producing a lot of data which I want to save to a file in tab-separated format:
$\begin{matrix}x_1&&f(x_1)\\x_2&&f(x_2)\\x_3&&f(x_3)\\&\ldots\end{matrix}$
I'd like ...
0
votes
0
answers
44
views
How do I switch off the spell checking in notebook text cells? [duplicate]
When I write my notebooks I usually use English in the text cells. However, in some cases, I need to write in Russian or German. Then the German or Russian text appears underlined. Please find below ...
2
votes
0
answers
92
views
How to prevent line breaks when formatting code in VS Code with Wolfram Language extension?
I'm not sure if this is appropriate to ask here, but I'm using the official Wolfram Language extension from Wolfram Research in VS Code to write code in .m files. I'...
1
vote
2
answers
188
views
Using Print for multiple numbers in a row
Do you know of a direct way to fix the following code in order for it to print every integer $k$ in the interval $[1, 5]$, a blank space, and aftewards its square $k^2$?
...
3
votes
2
answers
250
views
Preserving $x^{-1}$ instead of $1/x$ when importing LaTeX expression
I have a $\LaTeX$ equation that contains coefficients of the form $\delta x_1^{-1}$ and $\delta x_1^1$. I would like to convert them from TeXForm to Mathematica <...
0
votes
0
answers
88
views
How to make MatrixForm ( (1) (2) ) to ( 1 2 ) [duplicate]
My goal is to display 1 by 1 matrix to scalar form in MatrixForm.
MatrixForm[result] below displays ...
3
votes
1
answer
201
views
Prepending line number when outputting
My goal is to input multiple lines in the same cell and prepend line numbers when outputting. I've tried within my knowledge, but as you can see, Row[] and ...
3
votes
1
answer
128
views
How to stack the figures if they share the common ticks in the x axis?
I have a set of differential equations which I have solved, and I am plotting the results. There are three figures in total, and they share the same scale in their x axes. I want to stack these ...
8
votes
1
answer
323
views
Controlling height of Sqrt symbol
In the following example, one can see that the vertical sizes of square roots are unequal, because y has a descender:
...
7
votes
3
answers
379
views
How to Reorder Piecewise Function Compositions
I'm conducting compositions of piecewise functions and Mathematica is producing correct output but I want to reorder the output on the interval [0,1]. For example the code below
...
6
votes
1
answer
234
views
Make text white in ReverseColor format?
I am using Mathematica 14.0
Too much screen time is taking a toll on my eyes. I figured that it would be nice if I could make Mathematica function in "dark mode".
I found this "...
4
votes
1
answer
259
views
Changing font style of MaTeX code?
I am using the MaTeX package so that symbols can have a widehat over them, e.g., $\widehat{X}$. In particular, here is the code I am using:
...
3
votes
0
answers
106
views
How can I preserve code formatting when pasting into a Mathematica input cell?
Is there any trick to copying and pasting code that keeps the formatting in an input cell in Mathematica?
For example, the code below from ChatGPT is nicely formatted. However, when I paste it into an ...
4
votes
1
answer
204
views
Turning numbers written in the form of 5*^7 and 3*^-5 etc. into string without changing the writing?
Is there a safe way to turn numbers written in the form of 5*^7 and 3*^-5 etc. into strings without changing the writing, ideally compatible with other number forms?
...
0
votes
1
answer
86
views
Probability of complements of variables within a vector
I have the following code that takes the complement of each element in a vector of three variables and creates three additional vectors based on the complements of each element.
...