summaryrefslogtreecommitdiffstats
path: root/content/personal/mis-design-test
diff options
context:
space:
mode:
Diffstat (limited to 'content/personal/mis-design-test')
-rw-r--r--content/personal/mis-design-test/index.md306
1 files changed, 306 insertions, 0 deletions
diff --git a/content/personal/mis-design-test/index.md b/content/personal/mis-design-test/index.md
new file mode 100644
index 0000000..c31e42d
--- /dev/null
+++ b/content/personal/mis-design-test/index.md
@@ -0,0 +1,306 @@
1---
2title: "Design Test: Markdown Syntax"
3category: mis
4---
5
6- [Overview](#overview)
7 - [Philosophy](#philosophy)
8- [Block Elements](#block-elements)
9 - [Paragraphs and Line Breaks](#paragraphs-and-line-breaks)
10 - [Headers](#headers)
11 - [Blockquotes](#blockquotes)
12 - [Lists](#lists)
13 - [Code Blocks](#code-blocks)
14- [Span Elements](#span-elements)
15 - [Links](#links)
16 - [Emphasis](#emphasis)
17 - [Code](#code)
18
19
20**Note:** This document is itself written using Markdown; you
21can [see the source for it by adding '.text' to the URL](/projects/markdown/syntax.text).
22
23----
24
25## Overview
26
27### Philosophy
28
29Markdown is intended to be as easy-to-read and easy-to-write as is feasible.
30
31Readability, however, is emphasized above all else. A Markdown-formatted
32document should be publishable as-is, as plain text, without looking
33like it's been marked up with tags or formatting instructions. While
34Markdown's syntax has been influenced by several existing text-to-HTML
35filters -- including [Setext](http://docutils.sourceforge.net/mirror/setext.html), [atx](http://www.aaronsw.com/2002/atx/), [Textile](http://textism.com/tools/textile/), [reStructuredText](http://docutils.sourceforge.net/rst.html),
36[Grutatext](http://www.triptico.com/software/grutatxt.html), and [EtText](http://ettext.taint.org/doc/) -- the single biggest source of
37inspiration for Markdown's syntax is the format of plain text email.
38
39## Block Elements
40
41### Paragraphs and Line Breaks
42
43A paragraph is simply one or more consecutive lines of text, separated
44by one or more blank lines. (A blank line is any line that looks like a
45blank line -- a line containing nothing but spaces or tabs is considered
46blank.) Normal paragraphs should not be indented with spaces or tabs.
47
48The implication of the "one or more consecutive lines of text" rule is
49that Markdown supports "hard-wrapped" text paragraphs. This differs
50significantly from most other text-to-HTML formatters (including Movable
51Type's "Convert Line Breaks" option) which translate every line break
52character in a paragraph into a `<br />` tag.
53
54When you *do* want to insert a `<br />` break tag using Markdown, you
55end a line with two or more spaces, then type return.
56
57### Headers
58
59Markdown supports two styles of headers, [Setext] [1] and [atx] [2].
60
61Optionally, you may "close" atx-style headers. This is purely
62cosmetic -- you can use this if you think it looks better. The
63closing hashes don't even need to match the number of hashes
64used to open the header. (The number of opening hashes
65determines the header level.)
66
67
68### Blockquotes
69
70Markdown uses email-style `>` characters for blockquoting. If you're
71familiar with quoting passages of text in an email message, then you
72know how to create a blockquote in Markdown. It looks best if you hard
73wrap the text and put a `>` before every line:
74
75> This is a blockquote with two paragraphs. Lorem ipsum dolor sit amet,
76> consectetuer adipiscing elit. Aliquam hendrerit mi posuere lectus.
77> Vestibulum enim wisi, viverra nec, fringilla in, laoreet vitae, risus.
78>
79> Donec sit amet nisl. Aliquam semper ipsum sit amet velit. Suspendisse
80> id sem consectetuer libero luctus adipiscing.
81
82Markdown allows you to be lazy and only put the `>` before the first
83line of a hard-wrapped paragraph:
84
85> This is a blockquote with two paragraphs. Lorem ipsum dolor sit amet,
86consectetuer adipiscing elit. Aliquam hendrerit mi posuere lectus.
87Vestibulum enim wisi, viverra nec, fringilla in, laoreet vitae, risus.
88
89> Donec sit amet nisl. Aliquam semper ipsum sit amet velit. Suspendisse
90id sem consectetuer libero luctus adipiscing.
91
92Blockquotes can be nested (i.e. a blockquote-in-a-blockquote) by
93adding additional levels of `>`:
94
95> This is the first level of quoting.
96>
97> > This is nested blockquote.
98>
99> Back to the first level.
100
101Blockquotes can contain other Markdown elements, including headers, lists,
102and code blocks:
103
104> ## This is a header.
105>
106> 1. This is the first list item.
107> 2. This is the second list item.
108>
109> Here's some example code:
110>
111> return shell_exec("echo $input | $markdown_script");
112
113Any decent text editor should make email-style quoting easy. For
114example, with BBEdit, you can make a selection and choose Increase
115Quote Level from the Text menu.
116
117
118### Lists
119
120Markdown supports ordered (numbered) and unordered (bulleted) lists.
121
122Unordered lists use asterisks, pluses, and hyphens -- interchangably
123-- as list markers:
124
125* Red
126* Green
127* Blue
128
129is equivalent to:
130
131+ Red
132+ Green
133+ Blue
134
135and:
136
137- Red
138- Green
139- Blue
140
141Ordered lists use numbers followed by periods:
142
1431. Bird
1442. McHale
1453. Parish
146
147It's important to note that the actual numbers you use to mark the
148list have no effect on the HTML output Markdown produces. The HTML
149Markdown produces from the above list is:
150
151If you instead wrote the list in Markdown like this:
152
1531. Bird
1541. McHale
1551. Parish
156
157or even:
158
1593. Bird
1601. McHale
1618. Parish
162
163you'd get the exact same HTML output. The point is, if you want to,
164you can use ordinal numbers in your ordered Markdown lists, so that
165the numbers in your source match the numbers in your published HTML.
166But if you want to be lazy, you don't have to.
167
168To make lists look nice, you can wrap items with hanging indents:
169
170* Lorem ipsum dolor sit amet, consectetuer adipiscing elit.
171 Aliquam hendrerit mi posuere lectus. Vestibulum enim wisi,
172 viverra nec, fringilla in, laoreet vitae, risus.
173* Donec sit amet nisl. Aliquam semper ipsum sit amet velit.
174 Suspendisse id sem consectetuer libero luctus adipiscing.
175
176But if you want to be lazy, you don't have to:
177
178* Lorem ipsum dolor sit amet, consectetuer adipiscing elit.
179Aliquam hendrerit mi posuere lectus. Vestibulum enim wisi,
180viverra nec, fringilla in, laoreet vitae, risus.
181* Donec sit amet nisl. Aliquam semper ipsum sit amet velit.
182Suspendisse id sem consectetuer libero luctus adipiscing.
183
184List items may consist of multiple paragraphs. Each subsequent
185paragraph in a list item must be indented by either 4 spaces
186or one tab:
187
1881. This is a list item with two paragraphs. Lorem ipsum dolor
189 sit amet, consectetuer adipiscing elit. Aliquam hendrerit
190 mi posuere lectus.
191
192 Vestibulum enim wisi, viverra nec, fringilla in, laoreet
193 vitae, risus. Donec sit amet nisl. Aliquam semper ipsum
194 sit amet velit.
195
1962. Suspendisse id sem consectetuer libero luctus adipiscing.
197
198It looks nice if you indent every line of the subsequent
199paragraphs, but here again, Markdown will allow you to be
200lazy:
201
202* This is a list item with two paragraphs.
203
204 This is the second paragraph in the list item. You're
205only required to indent the first line. Lorem ipsum dolor
206sit amet, consectetuer adipiscing elit.
207
208* Another item in the same list.
209
210To put a blockquote within a list item, the blockquote's `>`
211delimiters need to be indented:
212
213* A list item with a blockquote:
214
215 > This is a blockquote
216 > inside a list item.
217
218To put a code block within a list item, the code block needs
219to be indented *twice* -- 8 spaces or two tabs:
220
221* A list item with a code block:
222
223 <code goes here>
224
225### Code Blocks
226
227Pre-formatted code blocks are used for writing about programming or
228markup source code. Rather than forming normal paragraphs, the lines
229of a code block are interpreted literally. Markdown wraps a code block
230in both `<pre>` and `<code>` tags.
231
232To produce a code block in Markdown, simply indent every line of the
233block by at least 4 spaces or 1 tab.
234
235This is a normal paragraph:
236
237 This is a code block.
238
239Here is an example of AppleScript:
240
241 tell application "Foo"
242 beep
243 end tell
244
245A code block continues until it reaches a line that is not indented
246(or the end of the article).
247
248Within a code block, ampersands (`&`) and angle brackets (`<` and `>`)
249are automatically converted into HTML entities. This makes it very
250easy to include example HTML source code using Markdown -- just paste
251it and indent it, and Markdown will handle the hassle of encoding the
252ampersands and angle brackets. For example, this:
253
254 <div class="footer">
255 &copy; 2004 Foo Corporation
256 </div>
257
258Regular Markdown syntax is not processed within code blocks. E.g.,
259asterisks are just literal asterisks within a code block. This means
260it's also easy to use Markdown to write about Markdown's own syntax.
261
262```
263tell application "Foo"
264 beep
265end tell
266```
267
268## Span Elements
269
270### Links
271
272Markdown supports two style of links: *inline* and *reference*.
273
274In both styles, the link text is delimited by [square brackets].
275
276To create an inline link, use a set of regular parentheses immediately
277after the link text's closing square bracket. Inside the parentheses,
278put the URL where you want the link to point, along with an *optional*
279title for the link, surrounded in quotes. For example:
280
281This is [an example](http://example.com/) inline link.
282
283[This link](http://example.net/) has no title attribute.
284
285### Emphasis
286
287Markdown treats asterisks (`*`) and underscores (`_`) as indicators of
288emphasis. Text wrapped with one `*` or `_` will be wrapped with an
289HTML `<em>` tag; double `*`'s or `_`'s will be wrapped with an HTML
290`<strong>` tag. E.g., this input:
291
292*single asterisks*
293
294_single underscores_
295
296**double asterisks**
297
298__double underscores__
299
300### Code
301
302To indicate a span of code, wrap it with backtick quotes (`` ` ``).
303Unlike a pre-formatted code block, a code span indicates code within a
304normal paragraph. For example:
305
306Use the `printf()` function.