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?
To produce a code block in Markdown, simply indent every line of the block by at least 4 spaces or 1 tab. For example, given this input: This is a normal paragraph: This is a code block.
To create a line break or new line ( <br> ), end a line with two or more spaces, and then type return. This is the first line.
The indent command fits as many words (separated by blanks, tabs, or new-lines) on a line as possible. Blank lines break paragraphs. A block comment is a comment that is not to the right of the code, and extends for more than one line.
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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With