markdownindentation

How to indent a few lines in Markdown markup?


I want to write a few lines of text. They should be formatted normally except each line should start at the 6th column. I.e. I don't want the code block formatting rule to make this chunk of text look like code as I'll use other formatting like bold face, etc. How to do that in Markdown?


Solution

  • Please use hard (non-breaking) spaces

    Why use another markup language? (I Agree with @c z above).
    One goal of Markdown is to make the documents readable even in a plain text editor.

    Same result two approaches

    The code

    Sample code
        5th position in an really ugly code  
        5th position in a clear an readable code  
        Again using non-breaking spaces :)
    

    The result

    Sample code
        5th position in an really ugly code
        5th position in a clear an readable code
        Again using non-breaking spaces :)

    The visual representation of a non-breaking space (or hard space) is usually a normal space " ", however, its Unicode representation is U+00A0.
    The Unicode representation of the ordinary space is U+0020 (32 in the ASCII Table).
    Thus, text processors may behave differently while the visual representation remains the same.

    Insert a hard space

    | OS        | Input method                      |
    |-----------| ----------------------------------|
    | macOS     | OPTION+SPACE (ALT+SPACE)          |
    | Linux     | Compose Space Space or AltGr+Space|
    | Windows   | Alt+0+1+6+0                       |
    
    Some text editor use Ctrl+Shift+Space.
    

    Issue

    Some text editors can convert hard spaces to common spaces in copying and pasting operations, so be careful.