@ -197,18 +197,28 @@ all the necessary escaping for you. If you use an ampersand as part of
an HTML entity, it remains unchanged; otherwise it will be translated
an HTML entity, it remains unchanged; otherwise it will be translated
into < code > & amp;< / code > .< / p >
into < code > & amp;< / code > .< / p >
< p > Markdown 允許你直接使用這些符號,但是你要小心跳脫字元的使用,如果你是在
HTML 實體中使用 < code > & < / code > 符號的話,它不會被轉換,而在其它情形下,它則會被轉換
成 < code > & amp;< / code > < / p >
< p > So, if you want to include a copyright symbol in your article, you can write:< / p >
< p > So, if you want to include a copyright symbol in your article, you can write:< / p >
< p > 所以你如果要在文件中插入一個著作權的符號,你可以這樣寫:< / p >
< pre > < code > & copy;
< pre > < code > & copy;
< / code > < / pre >
< / code > < / pre >
< p > and Markdown will leave it alone. But if you write:< / p >
< p > and Markdown will leave it alone. But if you write:< / p >
< p > Markdown 將不會對這段文字做修改,但是如果你這樣寫:< / p >
< pre > < code > AT& T
< pre > < code > AT& T
< / code > < / pre >
< / code > < / pre >
< p > Markdown will translate it to:< / p >
< p > Markdown will translate it to:< / p >
< p > Markdown 就會將它轉為:< / p >
< pre > < code > AT& amp;T
< pre > < code > AT& amp;T
< / code > < / pre >
< / code > < / pre >
@ -216,11 +226,17 @@ into <code>&amp;</code>.</p>
angle brackets as delimiters for HTML tags, Markdown will treat them as
angle brackets as delimiters for HTML tags, Markdown will treat them as
such. But if you write:< / p >
such. But if you write:< / p >
< p > 類似的狀況也會發生在 < code > < < / code > 符號上,因為 Markdown 支援 < a href = "#html" > inline HTML< / a > ,
如果你是使用 < code > < < / code > 符號作為 HTML 標籤使用,那 Markdown 也不會對它做任何轉換,
但是如果你是寫:< / p >
< pre > < code > 4 < 5
< pre > < code > 4 < 5
< / code > < / pre >
< / code > < / pre >
< p > Markdown will translate it to:< / p >
< p > Markdown will translate it to:< / p >
< p > Markdown 將會把它轉換為:< / p >
< pre > < code > 4 & lt; 5
< pre > < code > 4 & lt; 5
< / code > < / pre >
< / code > < / pre >
@ -230,6 +246,11 @@ Markdown to write about HTML code. (As opposed to raw HTML, which is a
terrible format for writing about HTML syntax, because every single < code > < < / code >
terrible format for writing about HTML syntax, because every single < code > < < / code >
and < code > & < / code > in your example code needs to be escaped.)< / p >
and < code > & < / code > in your example code needs to be escaped.)< / p >
< p > 不過要注意的是,code 範圍內,不論是行內還是區塊, < code > < < / code > 和 < code > & < / code > 兩個符號都 < em > 一定< / em >
會被轉換成 HTML 實體,這項特性讓你可以很容易的用 Markdown 寫 HTML code
(和 HTML 相對而言, HTML 語法中,你要把所有的 < code > < < / code > 和 < code > & < / code > 都轉換為 HTML 實體,
你才能再 HTML 文件裡面寫出 HTML code)< / p >
< hr / >
< hr / >
< h2 id = "block" > Block Elements< / h2 >
< h2 id = "block" > Block Elements< / h2 >
@ -241,20 +262,34 @@ by one or more blank lines. (A blank line is any line that looks like a
blank line -- a line containing nothing but spaces or tabs is considered
blank line -- a line containing nothing but spaces or tabs is considered
blank.) Normal paragraphs should not be indented with spaces or tabs.< / p >
blank.) Normal paragraphs should not be indented with spaces or tabs.< / p >
< p > 一個段落是由一個或以上的連接的行句組成,而兩個以上的空行則會切分出不同的段落
(空行的定義是顯示上看起來像是空行,就被視為空行,例如有一行只有空白和 tab,
那該行也會被視為空行),一般的段落不需要用空白或斷行縮排。< / p >
< p > The implication of the "one or more consecutive lines of text" rule is
< p > The implication of the "one or more consecutive lines of text" rule is
that Markdown supports "hard-wrapped" text paragraphs. This differs
that Markdown supports "hard-wrapped" text paragraphs. This differs
significantly from most other text-to-HTML formatters (including Movable
significantly from most other text-to-HTML formatters (including Movable
Type's "Convert Line Breaks" option) which translate every line break
Type's "Convert Line Breaks" option) which translate every line break
character in a paragraph into a < code > < br /> < / code > tag.< / p >
character in a paragraph into a < code > < br /> < / code > tag.< / p >
< p > 「一個或以上的連接的行句組成」這句其實暗示了 Markdow 允許段落內的強迫斷行,
這個特性和其他大部分的 text-to-HTML 格式不一樣(包括 MovableType 的
"Convert Line Breaks" 選項),其它的格式會把每個斷行都轉成 < code > < br /> < / code > 標籤。< / p >
< p > When you < em > do< / em > want to insert a < code > < br /> < / code > break tag using Markdown, you
< p > When you < em > do< / em > want to insert a < code > < br /> < / code > break tag using Markdown, you
end a line with two or more spaces, then type return.< / p >
end a line with two or more spaces, then type return.< / p >
< p > 如果你 < em > 真的< / em > 是想要插入 < code > < br /> < / code > 標籤的話,在行尾加上兩個以上的空白,然後按 enter。< / p >
< p > Yes, this takes a tad more effort to create a < code > < br /> < / code > , but a simplistic
< p > Yes, this takes a tad more effort to create a < code > < br /> < / code > , but a simplistic
"every line break is a < code > < br /> < / code > " rule wouldn't work for Markdown.
"every line break is a < code > < br /> < / code > " rule wouldn't work for Markdown.
Markdown's email-style < a href = "#blockquote" > blockquoting< / a > and multi-paragraph < a href = "#list" > list items< / a >
Markdown's email-style < a href = "#blockquote" > blockquoting< / a > and multi-paragraph < a href = "#list" > list items< / a >
work best -- and look better -- when you format them with hard breaks.< / p >
work best -- and look better -- when you format them with hard breaks.< / p >
< p > 是的,這確實讓你要花比較多功夫插入 < code > < br /> < / code > ,但是「每個換行都轉換為 < code > < br /> < / code > 」
的方法在 Markdown 中並不適合, Markdown 的 email 式的 < a href = "#blockquote" > 區塊引言< / a > 和多段落的
< a href = "#list" > 清單< / a > 在使用換行來排版的時候,不但更好用,還更好看!< / p >
< h3 id = "header" > Headers< / h3 >
< h3 id = "header" > Headers< / h3 >
< p > Markdown supports two styles of headers, < a href = "http://docutils.sourceforge.net/mirror/setext.html" > Setext< / a > and < a href = "http://www.aaronsw.com/2002/atx/" > atx< / a > .< / p >
< p > Markdown supports two styles of headers, < a href = "http://docutils.sourceforge.net/mirror/setext.html" > Setext< / a > and < a href = "http://www.aaronsw.com/2002/atx/" > atx< / a > .< / p >