diff --git a/syntax.md b/syntax.md index a518274..f62c632 100644 --- a/syntax.md +++ b/syntax.md @@ -298,9 +298,14 @@ work best -- and look better -- when you format them with hard breaks. Markdown supports two styles of headers, [Setext] [1] and [atx] [2]. +Markdown 支援兩種標題的語法,[Setext] [1] 和 [atx] [2] 形式。 + Setext-style headers are "underlined" using equal signs (for first-level headers) and dashes (for second-level headers). For example: +Setext 形式是用底線的形式,利用 `=` (最高階標題)和 `-` (第二階標題), +例如: + This is an H1 ============= @@ -309,9 +314,13 @@ headers) and dashes (for second-level headers). For example: Any number of underlining `=`'s or `-`'s will work. +任何數量的 `=` 和 `-` 都可以有效果。 + Atx-style headers use 1-6 hash characters at the start of the line, corresponding to header levels 1-6. For example: +Atx 形式在行首插入 1 到 6 個 `#` ,對應到標題 1 到 6 階,例如: + # This is an H1 ## This is an H2 @@ -324,6 +333,10 @@ closing hashes don't even need to match the number of hashes used to open the header. (The number of opening hashes determines the header level.) : +你可以選擇性的 "關閉" atx 樣式的標題,這純粹只是美觀用的,你如果覺得這樣 +看起來比較好,就可以加上 `#` 在行尾,而行尾的 `#` 數量也不用和開頭一樣 +(行首的數量決定標題的階數): + # This is an H1 # ## This is an H2 ## @@ -338,6 +351,10 @@ familiar with quoting passages of text in an email message, then you know how to create a blockquote in Markdown. It looks best if you hard wrap the text and put a `>` before every line: +Markdown 使用 email 形式的區塊引言,如果你很清楚在 email 信件中如何引言, +你就知道如何在 Markdown 文件中建立一個區塊引言,那會看起來像是你強迫斷行, +然後在每行的最前面加上 `>` : + > This is a blockquote with two paragraphs. Lorem ipsum dolor sit amet, > consectetuer adipiscing elit. Aliquam hendrerit mi posuere lectus. > Vestibulum enim wisi, viverra nec, fringilla in, laoreet vitae, risus. @@ -348,6 +365,8 @@ wrap the text and put a `>` before every line: Markdown allows you to be lazy and only put the `>` before the first line of a hard-wrapped paragraph: +Markdown 也允許你只在整個段落的第一行最前面加上 `>` : + > This is a blockquote with two paragraphs. Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aliquam hendrerit mi posuere lectus. Vestibulum enim wisi, viverra nec, fringilla in, laoreet vitae, risus. @@ -358,6 +377,8 @@ line of a hard-wrapped paragraph: Blockquotes can be nested (i.e. a blockquote-in-a-blockquote) by adding additional levels of `>`: +區塊引言可以有階層(例如:引言內的引言),只要根據層數加上不同數量的 `>` : + > This is the first level of quoting. > > > This is nested blockquote. @@ -367,6 +388,9 @@ adding additional levels of `>`: Blockquotes can contain other Markdown elements, including headers, lists, and code blocks: +引言的區塊內也可以使用其他的 Markdown 語法,包括標題、清單、程式碼區塊等: + + > ## This is a header. > > 1. This is the first list item. @@ -380,32 +404,44 @@ Any decent text editor should make email-style quoting easy. For example, with BBEdit, you can make a selection and choose Increase Quote Level from the Text menu. +任何標準的文字編輯器都可以簡單的建立 email 樣式的引言,例如 BBEdit ,你可以 +選取文字後然後從選單中選擇 *增加引言階層* 。

Lists

Markdown supports ordered (numbered) and unordered (bulleted) lists. +Markdown 支援有序清單和無序清單。 + Unordered lists use asterisks, pluses, and hyphens -- interchangably -- as list markers: +無序清單使用星號、加號或是減號作為清單標記: + * Red * Green * Blue is equivalent to: +等同於: + + Red + Green + Blue and: +和: + - Red - Green - Blue Ordered lists use numbers followed by periods: +有序清單則使用數字接著一個英文句點: + 1. Bird 2. McHale 3. Parish @@ -414,6 +450,9 @@ It's important to note that the actual numbers you use to mark the list have no effect on the HTML output Markdown produces. The HTML Markdown produces from the above list is: +很重要的一點是:你的清單標記上的數字並不會影響輸出的 HTML 結果,上面 +的清單所產生的 HTML 標記為: +
  1. Bird
  2. McHale
  3. @@ -422,12 +461,16 @@ Markdown produces from the above list is: If you instead wrote the list in Markdown like this: +如果你的清單標記寫成: + 1. Bird 1. McHale 1. Parish or even: +或甚至是: + 3. Bird 1. McHale 8. Parish @@ -437,16 +480,27 @@ you can use ordinal numbers in your ordered Markdown lists, so that the numbers in your source match the numbers in your published HTML. But if you want to be lazy, you don't have to. +你都會得到完全一樣的 HTML 輸出,重點在於,你可以讓你的 Markdown 文件的清單 +數字和輸出的結果一樣,或是你懶一點,你可以完全不用在意數字的正確性。 + If you do use lazy list numbering, however, you should still start the list with the number 1. At some point in the future, Markdown may support starting ordered lists at an arbitrary number. +如果你使用懶惰的寫法,建議第一個項目最好還是從 1. 開始,因為 Markdown 未來 +可能會支援有序清單的 start 屬性。 + List markers typically start at the left margin, but may be indented by up to three spaces. List markers must be followed by one or more spaces or a tab. +清單項目標記通常是放在最左邊,但是其實也可以縮排,最多三個空白,項目標記後面 +則一定要接著至少一個空白或 tab。 + To make lists look nice, you can wrap items with hanging indents: +要讓清單看起來更漂亮,你可以把內容用固定的縮排整理好: + * Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aliquam hendrerit mi posuere lectus. Vestibulum enim wisi, viverra nec, fringilla in, laoreet vitae, risus. @@ -455,6 +509,8 @@ To make lists look nice, you can wrap items with hanging indents: But if you want to be lazy, you don't have to: +但是如果你很懶,那也不一定需要: + * Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aliquam hendrerit mi posuere lectus. Vestibulum enim wisi, viverra nec, fringilla in, laoreet vitae, risus. @@ -464,11 +520,16 @@ But if you want to be lazy, you don't have to: If list items are separated by blank lines, Markdown will wrap the items in `

    ` tags in the HTML output. For example, this input: +如果清單項目間用空行分開, Markdown 會把項目的內容在輸出時用 `

    ` +標籤包起來,舉例來說: + * Bird * Magic will turn into: +會被轉換為: +