Questions tagged [code-formatting]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
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 ...
Brownian_Motion's user avatar
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 ...
Anthony's user avatar
  • 155
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\)]\(...
rhermans's user avatar
  • 36.2k
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 ...
elscan's user avatar
  • 57
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.
Arbuja's user avatar
  • 39
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 ...
Mee Seong Im's user avatar
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 ...
Janosh's user avatar
  • 1,281
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,...
Szabolcs's user avatar
  • 233k
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?
yode's user avatar
  • 26.3k
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 ...
William's user avatar
  • 7,565
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 ...
bbgodfrey's user avatar
  • 60.7k
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 ...
Jack LaVigne's user avatar
  • 14.4k
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 ...
cormullion's user avatar
  • 24.2k
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 ...
István Zachar's user avatar
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 ...
David's user avatar
  • 14.9k
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?
rcollyer's user avatar
  • 33.8k
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, ...
Scott Morrison's user avatar
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 ...
Verbeia's user avatar
  • 34.1k