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
There's no way to do that in markdown's native features. However markdown allows inline HTML, so writing
This will appear with six space characters in front of it
will produce:
This will appear with six space characters in front of it
If you have control over CSS on the page, you could also use a tag and style it, either inline or with CSS rules.
Either way, markdown is not meant as a tool for layout, it is meant to simplify the process of writing for the web, so if you find yourself stretching its feature set to do what you need, you might look at whether or not you're using the right tool here. Check out Gruber's docs:
http://daringfireball.net/projects/markdown/syntax#html
On gitlab.com a single en space (U+2002) followed by a single em space (U+2003) works decently.
Presumably other repetitions or combinations of not-exactly-accounted-for space characters would also suffice.
If you're working with bullet points, try this:
<ul>
<li>Coffee</li>
<li>Tea
<ul>
<li>Black tea</li>
<li>Green tea</li>
</ul>
</li>
<li>Milk</li>
</ul>
This is the method I use when styling markdown.
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.
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.
| 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.
Some text editors can convert hard spaces to common spaces in copying and pasting operations, so be careful.
Check if you can use HTML with your markdown. Maybe this works out for you:
<br/>
<br/>
<br/>
<br/>
This is an old thread, but I would have thought markdown's blockquotes ('> ') would be best for this: