parsed.org

About parsed.org

Parsed.org is a place where people can post computing tips: commands, techniques, tutorials; anything you would like to record so you don't have to look it up again.

Post Formatting

Content on parsed.org is formatted according to markup rules called reStructuredText. In fact, even this page is written in ReST. ReST allows HTML, but we prefer to stick to particular markup conventions in the ReST to ensure consistent appearance of content on the site. Here are the major markup conventions that we emphasize:

  • Code (C, Perl, Java, Shell, commands, etc.) goes in preformatted blocks. In ReST, end the line before your code with two colons (::) and indent all code lines beneath. After the code segment is over, resume indentation at previous levels. Here's an example:

    This is regular text, but check out this code::
    
      $a->b();
      [item for item in list if item is not None]
      char *foo;
    
    This is normal text again.
    
  • Commands and one-word code symbols that appear in your posts in a conversational manner should be fixed-width. Generally, anything that you expect the reader to reproduce character-for-character at a command prompt or in a file (that doesn't qualify as "code" above) should be in this format. In ST you can mark this up by wrapping the text with double back-ticks:

    ``$this_is_code()`` and this is not.
    
  • Package names and other generally emphasized text should be bold. Use double-asterisks around the text for this effect:

    **This is emphasized.**
    
  • Link to resources in your post when it's appropriate to refer users to documentation, articles, etc. To do this, enclose the link text with backticks and end it with an underscore:

    `My home page`_ is great.
    

    Then, to make "My home page" link to http://www.example.com, add this at the bottom of your post (where "My home page" and "http://www.example.com" have been changed):

    .. _My home page: http://www.example.com
    
  • Posts that include shell commands should precede the commands with a '$' or '#' where appropriate. This helps the reader know that the command should be run in a shell environment and, if so, whether it should be run as root.

RSS