Formatting concepts with markdown
Formatting Concepts in Markdown
Unfortunately, Markdown is not very good at handling code-like text, because it does not support indentation well. There are various options:
- Non-breaking spaces. Perhaps the best solution is simply to use non-breaking spaces for indentation. These can be written as HTML characters (\ ), or by typing option-space (Mac) or control-shift-space (Windows). You will need to end each line with a backslash (\) or two spaces to ensure a linebreak:
concept PasswordAuth
purpose authenticate users
principle a user registers…
state
a set of Users with
a username String
a password String
- Code blocks. A code block can be specified by placing three backticks (''') on a line above and a line below. This is like verbatim mode in LaTeX; it will preserve the layout, but you can’t use any other formatting features (such as bold and italics).
concept PasswordAuth
purpose authenticate users
principle a user registers...
state
a set of Users with
a username String
a password String
- Quotes. You can use nested quotation, prefixing each line with one or more greater-than (>) symbols, and ending each line with a backslash (\) or two spaces to ensure a linebreak:
concept PasswordAuth
purpose authenticate users
principle a user registers…
statea set of Users with
a username String
a password String
-
Bullets. You can use bullets for indentation (one of -, *, +), placing a tab before the bullet symbol for each extra level of indentation:
- concept PasswordAuth
- purpose authenticate users
- principle a user registers…
- state
- a set of Users with
- a username String
- a password String
- a set of Users with