On the main site we still have no explicitly written rules how Mathematica's output should be presented when published in a question/answer. But the most of people (as far as I can see) already accepted at least the following:

  1. When Mathematica's output is published using the code style (either by wrapping with ` or by adding four spaces on the start of the line, or by wrapping with <code>/</code>), we publish explicit form of the output (approximately equivalent to InputForm): strings are always wrapped by quotes, numbers usually have ` at the end, etc.

  2. When Mathematica's output is published using the citation style (usually by adding > at the start of the line) and without using the code style, we publish it in the OutputForm: strings aren't wrapped by quotes, numbers have no ` at the end, etc.

Some of us (including myself) also prefer always wrap code style with citation style when publishing output. When doing so I always follow the the rule #1 (outer citation style indicates that it's an output generated by Mathematica which I cite, but the output itself has code style).

What do you think about these rules? Should the community formulate at least recommendations on presenting Mathematica's input & output in the questions/answers?

  • Some previous discussions on this topic: (2), (338), (1027), (1416), (1508)
    – WReach
    Jul 2, 2017 at 20:58
  • 4
    I think we should push for Markdown for output. So much of what we write takes the form of input-output, so we really should have a Markdown way of formatting that.
    – C. E.
    Jul 2, 2017 at 22:43
  • 4
    What I desire is that it be easily copied, pasted, and executed. So output should be commented. It's much easier to copy several input lines, paste them, and either divide the cell or execute en masse as desired. Having to make multiple copy/paste or edit heavily is less convenient. Otherwise, I don't really care, although there are issues in not using the code style (e.g. dollar signs being interpreted as TeX).
    – Michael E2
    Jul 3, 2017 at 5:32
  • 2
    I take issue with @MichaelE2. It is a matter of priorities. I value the readability of the post more than the ease of copy-and-paste. Therefore, I prefer the output as quoted code style to the output as comment style.
    – m_goldberg
    Jul 3, 2017 at 18:09


You must log in to answer this question.

Browse other questions tagged .