diff --git a/Makefile b/Makefile index d41d932..a599b85 100644 --- a/Makefile +++ b/Makefile @@ -3,6 +3,6 @@ all: index.html index.html: header.html footer.html content.html cat header.html content.html footer.html > index.html -content.html: README.markdown - perl Markdown_1.0.1/Markdown.pl README.markdown > content.html +content.html: syntax.md + perl Markdown_1.0.1/Markdown.pl syntax.md > content.html diff --git a/content.html b/content.html index 4ccce0d..82e81b7 100644 --- a/content.html +++ b/content.html @@ -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 into &.

+

Markdown 允許你直接使用這些符號,但是你要小心跳脫字元的使用,如果你是在 +HTML 實體中使用 & 符號的話,它不會被轉換,而在其它情形下,它則會被轉換 +成 &

+

So, if you want to include a copyright symbol in your article, you can write:

+

所以你如果要在文件中插入一個著作權的符號,你可以這樣寫:

+
©
 

and Markdown will leave it alone. But if you write:

+

Markdown 將不會對這段文字做修改,但是如果你這樣寫:

+
AT&T
 

Markdown will translate it to:

+

Markdown 就會將它轉為:

+
AT&T
 
@@ -216,11 +226,17 @@ into &.

angle brackets as delimiters for HTML tags, Markdown will treat them as such. But if you write:

+

類似的狀況也會發生在 < 符號上,因為 Markdown 支援 inline HTML , +如果你是使用 < 符號作為 HTML 標籤使用,那 Markdown 也不會對它做任何轉換, +但是如果你是寫:

+
4 < 5
 

Markdown will translate it to:

+

Markdown 將會把它轉換為:

+
4 &lt; 5
 
@@ -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 < and & in your example code needs to be escaped.)

+

不過要注意的是,code 範圍內,不論是行內還是區塊, <& 兩個符號都 一定 +會被轉換成 HTML 實體,這項特性讓你可以很容易的用 Markdown 寫 HTML code +(和 HTML 相對而言, HTML 語法中,你要把所有的 <& 都轉換為 HTML 實體, +你才能再 HTML 文件裡面寫出 HTML code)

+

Block Elements

@@ -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.) Normal paragraphs should not be indented with spaces or tabs.

+

一個段落是由一個或以上的連接的行句組成,而兩個以上的空行則會切分出不同的段落 +(空行的定義是顯示上看起來像是空行,就被視為空行,例如有一行只有空白和 tab, +那該行也會被視為空行),一般的段落不需要用空白或斷行縮排。

+

The implication of the "one or more consecutive lines of text" rule is that Markdown supports "hard-wrapped" text paragraphs. This differs significantly from most other text-to-HTML formatters (including Movable Type's "Convert Line Breaks" option) which translate every line break character in a paragraph into a <br /> tag.

+

「一個或以上的連接的行句組成」這句其實暗示了 Markdow 允許段落內的強迫斷行, +這個特性和其他大部分的 text-to-HTML 格式不一樣(包括 MovableType 的 +"Convert Line Breaks" 選項),其它的格式會把每個斷行都轉成 <br /> 標籤。

+

When you do want to insert a <br /> break tag using Markdown, you end a line with two or more spaces, then type return.

+

如果你 真的 是想要插入 <br /> 標籤的話,在行尾加上兩個以上的空白,然後按 enter。

+

Yes, this takes a tad more effort to create a <br />, but a simplistic "every line break is a <br />" rule wouldn't work for Markdown. Markdown's email-style blockquoting and multi-paragraph list items work best -- and look better -- when you format them with hard breaks.

+

是的,這確實讓你要花比較多功夫插入 <br /> ,但是「每個換行都轉換為 <br />」 +的方法在 Markdown 中並不適合, Markdown 的 email 式的 區塊引言 和多段落的 +清單 在使用換行來排版的時候,不但更好用,還更好看!

+

Markdown supports two styles of headers, Setext and atx.

diff --git a/index.html b/index.html index 9205fbf..f6df006 100644 --- a/index.html +++ b/index.html @@ -208,18 +208,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 into &amp;.

+

Markdown 允許你直接使用這些符號,但是你要小心跳脫字元的使用,如果你是在 +HTML 實體中使用 & 符號的話,它不會被轉換,而在其它情形下,它則會被轉換 +成 &amp;

+

So, if you want to include a copyright symbol in your article, you can write:

+

所以你如果要在文件中插入一個著作權的符號,你可以這樣寫:

+
&copy;
 

and Markdown will leave it alone. But if you write:

+

Markdown 將不會對這段文字做修改,但是如果你這樣寫:

+
AT&T
 

Markdown will translate it to:

+

Markdown 就會將它轉為:

+
AT&amp;T
 
@@ -227,11 +237,17 @@ into &amp;.

angle brackets as delimiters for HTML tags, Markdown will treat them as such. But if you write:

+

類似的狀況也會發生在 < 符號上,因為 Markdown 支援 inline HTML , +如果你是使用 < 符號作為 HTML 標籤使用,那 Markdown 也不會對它做任何轉換, +但是如果你是寫:

+
4 < 5
 

Markdown will translate it to:

+

Markdown 將會把它轉換為:

+
4 &lt; 5
 
@@ -241,6 +257,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 < and & in your example code needs to be escaped.)

+

不過要注意的是,code 範圍內,不論是行內還是區塊, <& 兩個符號都 一定 +會被轉換成 HTML 實體,這項特性讓你可以很容易的用 Markdown 寫 HTML code +(和 HTML 相對而言, HTML 語法中,你要把所有的 <& 都轉換為 HTML 實體, +你才能再 HTML 文件裡面寫出 HTML code)

+

Block Elements

@@ -252,20 +273,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.) Normal paragraphs should not be indented with spaces or tabs.

+

一個段落是由一個或以上的連接的行句組成,而兩個以上的空行則會切分出不同的段落 +(空行的定義是顯示上看起來像是空行,就被視為空行,例如有一行只有空白和 tab, +那該行也會被視為空行),一般的段落不需要用空白或斷行縮排。

+

The implication of the "one or more consecutive lines of text" rule is that Markdown supports "hard-wrapped" text paragraphs. This differs significantly from most other text-to-HTML formatters (including Movable Type's "Convert Line Breaks" option) which translate every line break character in a paragraph into a <br /> tag.

+

「一個或以上的連接的行句組成」這句其實暗示了 Markdow 允許段落內的強迫斷行, +這個特性和其他大部分的 text-to-HTML 格式不一樣(包括 MovableType 的 +"Convert Line Breaks" 選項),其它的格式會把每個斷行都轉成 <br /> 標籤。

+

When you do want to insert a <br /> break tag using Markdown, you end a line with two or more spaces, then type return.

+

如果你 真的 是想要插入 <br /> 標籤的話,在行尾加上兩個以上的空白,然後按 enter。

+

Yes, this takes a tad more effort to create a <br />, but a simplistic "every line break is a <br />" rule wouldn't work for Markdown. Markdown's email-style blockquoting and multi-paragraph list items work best -- and look better -- when you format them with hard breaks.

+

是的,這確實讓你要花比較多功夫插入 <br /> ,但是「每個換行都轉換為 <br />」 +的方法在 Markdown 中並不適合, Markdown 的 email 式的 區塊引言 和多段落的 +清單 在使用換行來排版的時候,不但更好用,還更好看!

+

Markdown supports two styles of headers, Setext and atx.