Questions tagged [code-formatting]
The code-formatting tag has no usage guidance.
18
questions
2
votes
0
answers
34
views
Unable to post a question due to formatting issues
Why am I getting an error as follows for the post content (after the dashed line)
"Your post appears to contain code that is not properly formatted as code. Please indent all code by 4 spaces ...
2
votes
0
answers
78
views
First time poster, struggling to post code
I have been struggling for a half hour to post my question but always getting the same error:
Your post appears to contain code that is not properly formatted as code. Please indent all code by 4 ...
13
votes
1
answer
204
views
Is it acceptable to post code in unreadable form? (i.e Notebook boxes not Raw Input Form)
The offence
There seem to be a significant amount of new people posting code that looks like this
a = (E^(-2 Abs[\[Gamma] - z Cos[\[Theta]]]^2) \!\(
\*UnderoverscriptBox[\(\[Sum]\), \(j = 0\), \(m\)]\(...
1
vote
1
answer
94
views
Matematica StackExchange seems to not allow Latex typesetting
I try to post the following question on Mahtematica Stack Exchange (see below the triple lines). It shows up perfectly in the preview, but when I try to post I get the error "Your post appears to ...
1
vote
0
answers
63
views
How do I upload my question to this website?
I'm unable to upload this question to mathematica stack exchange. I get a message below the edit box which states, "Code is not formatted correctly." Please help if possible.
8
votes
0
answers
192
views
Post contains a code that is not properly formatted
I am trying to post this question on Mathematica StackExchange but I am getting an error that my code is not properly formatted. I double-checked every line for some time now, but I cannot find an ...
4
votes
1
answer
194
views
Post without code supposed to "contain code that is not properly formatted"
I'm trying to post a question but keep getting the error
Your post appears to contain code that is not properly formatted as
code. Please indent all code by 4 spaces using the code toolbar button
...
15
votes
1
answer
234
views
First-time posts with unformatted code should be automatically caught
tl;dr This is a feature request to enable automatically detecting unformatted code in first-time posts, and show a helpful message to the poster on how to fix it.
According to the following meta post,...
3
votes
1
answer
109
views
How to input ` in StackExchange [duplicate]
The ` is used to close the code-inline,But how can I input following code?
1
vote
0
answers
42
views
Markdown broken [duplicate]
What is wrong with the markdown prettifier here?
opts = {
"$dollar$" :> "$",
"$percent$" :> "%",
};
Just to clarify the issue only appears on mathematica.stackexchange like it does ...
7
votes
0
answers
170
views
\[DifferentialD] not displayed correctly in Mathematica StackExchange
\[DifferentialD] apparently does not have a Unicode representation, so I had to enter it directly in a reformatting of question 83672. However, I noticed that it is displayed in blue, as if it were ...
4
votes
2
answers
109
views
How to place nicely parsed code into an answer
I have seen many answers where there is nicely parsed Mathematica code in the answer.
When I attempted to answer a question and pasted in the code, all the spaces and line breaks were removed so it ...
10
votes
2
answers
168
views
Backquotes in titles
I'm not sure whether backquotes in titles are supposed to work, or whether they don't currently work, or whether they shouldn't be used. See this question for an example. I know that the math stuff ...
5
votes
1
answer
217
views
What to do with brackets in function[]-style references?
Recently I encountered more and more situations where the poster/editor explicitly used function[] instead of function when referencing built-in functions (i.e. Dot[] instead of Dot). What is the ...
10
votes
3
answers
712
views
Representation of special symbols in posted code blocks
Since we have decided that pasted code is favorable to pasted images of code, I think there's another issue to resolve: How should the code be pasted? A good examle are Greek letters. A code sprinkled ...
13
votes
2
answers
144
views
Should we encourage all users to post code in code-blocks instead of pictures?
On occasion, on SO and here, posters will post there code as pictures and not in code-blocks. As a group, should we encourage or discourage this practice?
21
votes
4
answers
1k
views
How should I include code samples in posts?
What are best practices for including sections of Mathematica code in posts?
Mathematica differs from many programming languages because many of us use it in "REPL" (read-evaluate-print-line) mode, ...
12
votes
2
answers
185
views
Can we have code auto-formatting and do we need to tweak what we had on the StackExchange tag?
This question is captured pretty well by its title, but for more background, on the mathematica on StackExchange we have pretty-printing on the code blocks (see here for some more explanation). I ...