When I posted the piece of code : FourierTransform[u[x,y]+v[x,y],y,q], I got an answer advising me to improve the typeset of the code. How can I type a Mathematica code while I'm posting a question here in StackEcchange?

| |
  • You can type code either between backticks, or by pressing Ctrl+K (or equivalently by pressing the button with braces, or by indenting four spaces in general). The latter will display the code on a new line. For large piece of code, it is advised to use the last approach. – user31159 Sep 10 '16 at 18:47
  • There's a [?] button on the editing toolbar. Click it and formatting help comes up. – Szabolcs Sep 10 '16 at 18:49
  • 1
    My boilerplate advice: "You can format inline code and code blocks by selecting the code and clicking the {} button above the edit window. The edit window help button ? is also useful for learning how to format your questions and answers. You may also find this meta Q&A helpful." The Meta tag site-tools has lots of other helpful stuff. – Michael E2 Sep 10 '16 at 20:27
  • I need to reformat my question? How? Should I repost it again? – Essam Sep 11 '16 at 1:41
  • See the "edit" button at the bottom left corner of your post?: i.stack.imgur.com/QG6Xi.png BTW, what's your first language? – xzczd Sep 11 '16 at 3:37
  • @MichaelE2 are your 'boiler plate' comments in a repository on stackexchange, in a text file that you copy and paste from with or without some script/hot keys to facilitate or something else? I see many users have such well worded commonly used comments. I apologize for this basic question. I have never been organized enough to make my own or collect others (and then what is acceptable and how should attribution be specified succinctly). So, I resort to my own off the cuff (well intentioned but perhaps off the mark sometimes) comments. – ubpdqn Sep 11 '16 at 3:51
  • @ubpdqn Related: meta.mathematica.stackexchange.com/q/138/1871 – xzczd Sep 11 '16 at 4:05
  • @xzczd thank you! The link is very helpful :) – ubpdqn Sep 11 '16 at 4:14
  • @ubpdqn I have a scratch notebook I use when browsing the site. I keep a few text cells at the top of it (and a few utility function definitions). I copy and paste them. I think it's possible to write a Javascript extension for them. Actually thinking about it, I could write a comment["name"] function with CopyToClipboard. I'd just have to remember the comment names. My greeting boilerplate I adapted from belisarius; many users have similar variants. -- See this: meta.mathematica.stackexchange.com/q/1896 – Michael E2 Sep 11 '16 at 13:19

Browse other questions tagged .