Markdown 參考指南

Fuchsia.dev 支援本指南所述的 Markdown 元素。

引用文字

Markdown 使用大於字元的字元 (>),將文字顯示為引用文字 (也就是加上引號的文字)。

Markdown

This is a Markdown paragraph.

> This is a blockquote with two paragraphs. The first line of a blockquote
> paragraph has to have a greater-than character (`>`), but for readability
> in the source file, add a greater-than character to every subsequent line
> of the paragraph like this example. Though this isn't a requirement as
> shown in the second blockquote paragraph below.
>
> This is a second blockquote paragraph that only has a greater-than
character (`>`) for the first line. Donec sit amet nisl. Aliquam semper
ipsum sit amet velit. Suspendisse id sem consectetuer libero luctus
adipiscing. Lorem ipsum dolor sit amet, consectetuer adipiscing elit.
Aliquam hendrerit mi posuere lectus. Vestibulum enim wisi, viverra nec,
fringilla in, laoreet vitae, risus.

已轉譯

這是 Markdown 段落。

這是包含兩個段落的引用文字。引用段落的第一行必須含有大於 > 的字元,但為了在來源檔案中方便閱讀,請按照以下範例中,在段落後續每一行中加入大於字元的字元。但這並非硬性規定,如下方第二個引用文字段落所示。

這是第二個引用文字段落,其中第一行的字元 (>) 大於字元。Donec sit amet nisl. Aliquam semperipsum sit amet velit。Suspendisse id sem consectetuer libero luctus adipiscing. Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aliquam hendrerit mi posuere lectus. Vestibulum enim wisi、viverra nec、fringilla in、laoreet vitae、risus。

程式碼區塊

程式碼區塊可用來提供程式輔助範例或標記原始碼。程式碼區塊中的內容不會像一般 Markdown 段落進行剖析,而是在寫入時進行轉譯。

您可以使用程式碼區塊,指定要以哪種程式設計語言轉譯要醒目顯示的程式碼。

三個倒引號 (```) 前後都必須加上空白行。最終輸出內容不會顯示倒引號。不過,程式碼區塊中的空白行會在最終輸出結果中算繪。

Markdown

Example 1: Uses Java syntax highlighting

```java
public class Hello {

  public static void main(String arg[]) {

    System.out.println("Hello.");
  }
}
```

Example 2: Prevents syntax highlighting

```none {:.devsite-disable-click-to-copy}
Some pseudo-code doesn't need syntax highlighting.
```

Example 3: Includes a replacement variable

```none {:.devsite-disable-click-to-copy}
Hello, my name is {{ '<var>' }}your-name{{ '</var>' }}.
```

產生的 HTML

<p>Example 1: Uses Java syntax highlighting</p>
<pre class="prettyprint lang-java"><code>public class Hello {<br/>public
static void main(String arg[]) {<br/>System.out.println("Hello.");<br/>}
<br/>}<br/></code></pre>
<p>Example 2: Prevents syntax highlighting</p>
<pre class="click-to-copy"><code><br/><p>Some pseudo-code doesn't need
syntax highlighting.</p><br/>
</code></pre>
<p>Example 3: Includes a replacement variable</p>
<pre class="no-prettyprint"><code><br/><p>Hello, my name is <var>your-name</var>.
</p><br/></code></pre>

已轉譯

範例 1:使用 Java 語法醒目顯示功能

public class Hello {

  public static void main(String arg[]) {

    System.out.println("Hello.");
  }
}

示例 2:禁止語法醒目顯示

Some pseudo-code doesn't need syntax highlighting.

範例 3:加入替代變數

Hello, my name is your-name.

在程式碼區塊內使用可替換變數

如要在程式碼區塊中使用 <var> 標記,請使用 Jinja 運算式括號,如下所示:

{{ '<var>' }}PORT{{ '</var>' }}

上例會顯示以下內容:

PORT

留言

Fuchsia.dev 支援 Markdown 和 HTML 中的單行和多行註解。這類留言不會顯示在已發布的頁面上。如果您的文件包含 includecodeMathJax,這些註解就非常實用。

單行註解



多行註解

如何在 fuchsia.dev 上使用多行註解:

請用 {# ... #} 納入每一行。這種做法適用於 HTML 和 Markdown:

{% verbatim %}
{# I wonder how drivers are doing? #}
{# I hear they are awesome! #}

自訂屬性

Fuchsia.dev 可讓您在 Markdown 檔案中設定自訂 HTML 屬性 (例如 classidattribute='value')。

支援的 Markdown 元素

下列元素支援自訂屬性:

  • 程式碼時距
  • 程式碼區塊
  • 標題
  • 連結
  • 清單
  • 段落
  • 資料表和多行表格

格式

語法 說明
{} 自訂屬性的開頭和結尾。
: 針對 fuchsia.dev 中的 Markdown 自訂屬性,此為必填屬性。
. 句點之後的字詞 (.) 會設定元素的 class
# 雜湊後的字詞 (#) 會設定元素的 id
attribute='value' 設定元素的屬性名稱和值組合;請用空格分隔。

Markdown

This is a Markdown paragraph.
{:.customClass #custom_id attribute='value'}

產生的 HTML

<p class="customClass" id="custom_id" attribute="value">This is a Markdown paragraph.</p>

定義清單

如要在 Markdown 中建立定義清單,請在同一行列出字詞,然後在定義下方的新行中用半形冒號 (:) 在每個定義前方。

Markdown

Apple
: A fruit
: A tech company

Orange
: A citrus fruit

    A definition can also contain other block or inline elements. This is a
    paragraph within the same definition as "A citrus fruit". Elements
    within must be indented four spaces to be recognized as part of the
    preceding definition.

: A color

產生的 HTML

<dl>
  <dt>Apple</dt>
  <dd>A fruit</dd>
  <dd>A tech company</dd>

  <dt>Orange</dt>
  <dd>
    <p>A citrus fruit</p>
    <p>
      A definition can also contain other block or inline elements. This is
      a paragraph within the same definition as "A citrus fruit". Elements
      within must be indented four spaces to be recognized as part of the
      preceding definition.
    </p>
  </dd>
  <dd>
    <p>A color</p>
  </dd>
</dl>

已轉譯

Apple
水果
科技公司
Orange

柑橘水果

定義也可以包含其他區塊或內嵌元素。這一段與「柑橘果」定義相同。當中的元素必須縮排四個空格,才能視為上一個定義的一部分。

顏色

強調效果

Markdown 使用星號 (*) 和底線 (_) 來強調和加強格式。

強調效果

以一個星號 (*) 或底線 (_) 顯示的文字可為特定文字提供斜體樣式。

Markdown

*single asterisks*

_single underscores_

supercali*fragilistic*expialidocious

supercali_fragilistic_expialidocious                 // won't format

產生的 HTML

<em>single asterisks</em>

<em>single underscores</em>

supercali<em>fragilistic</em>expialidocious

supercali_fragilistic_expialidocious

已轉譯

一個星號

一個底線

超棒脆弱

supercali_fragilistic_expialidocious

以雙星號 (**) 或底線 (__) 顯示的文字可以針對特定文字採用粗體樣式。

Markdown

**double asterisks**

__double underscores__

supercali**fragilistic**expialidocious

supercali__fragilistic__expialidocious

產生的 HTML

<strong>double asterisks</strong>

<strong>double underscores</strong>

supercali<strong>fragilistic</strong>expialidocious

supercali<strong>fragilistic</strong>expialidocious

已轉譯

雙星號

雙底線

超棒脆弱

超棒脆弱

逸出

某些字元為 Markdown 中的保留語法。如要使用特殊字元,請使用反斜線逸出 (\) 顯示下列常值字元:

\   backslash
`   backtick
*   asterisk
_   underscore
{}  curly braces
[]  square brackets
()  parentheses
#   hash mark
+   plus sign
-   minus sign (hyphen)
.   dot
!   exclamation mark

註腳

註腳可用來在不影響網頁流程的情況下加入額外或補充內容。語法與參照連結類似:

In the main text, include a label[^1] that starts with a caret.

[^1]: The footnote content goes here.

[^2]: Longer footnote content can be span multiple lines
    by indenting the continuation 4 spaces.

註腳標籤可以是任何任意字串,只要以插入點 ^ 開頭即可。

標題

Markdown 支援在行開頭使用 1 到 6 個雜湊字元 (#) 時使用 1 到 6 個雜湊字元,這些字元會對應至一到六個標頭層級。

Markdown

# This is an H1

## This is an H2

###### This is an H6

已轉譯

這是 H1

這是 H2

這是 H6

標頭 ID

Fuchsia.dev 支援每個標頭的自訂 HTML id 屬性。如要覆寫預設的 id,請在 Markdown 標頭結尾加上自訂屬性 {#user_defined_name}

Markdown

# Working with contacts {#working-with-contacts}
## Contact Entry
### Contacts are working

產生的 HTML

<h1 id="working-with-contacts">Working with contacts</h1>
<h2 id="contact-entry">Contact Entry</h2>
<h3 id="contacts-are-working">Contacts are working</h3>

目錄

fuchsia.dev 會針對每個第二層和第三層標題,自動產生頁面目錄 (TOC)。如要從 TOC 隱藏標頭,請在標頭結尾加上自訂屬性 {:.hide-from-toc}

Markdown

## Hidden in TOC {:.hide-from-toc}             // try to find it!

已轉譯

在 TOC 中隱藏

水平規則

Markdown 支援水平規則標記 (<hr>),只要在一行中加入三個以上的連字號、星號或底線即可。

下列每個項目都會產生水平規則:

* * *

***

*****

- - -

---------------------------------------

圖片

Markdown 使用的圖片語法旨在類似連結語法,可分為內嵌和參照兩種樣式。

每張圖片都具有以下屬性:

  • 開頭的驚嘆號:!
  • 一組方括號,包含 alt 屬性文字。
  • 一組括號,內含圖片的網址或路徑,以及以雙引號或單引號括住的 title 屬性。
  • 使用自訂屬性語法 {: .my-custom-css-class} 的一組選用類別

內嵌語法

以下是有效的內嵌圖片語法:

![Alt text](/docs/images/benchmarking/test_suite_example.png)

![Alt text](/docs/images/benchmarking/test_suite_example.png "Optional title")

![Alt text](/docs/images/benchmarking/test_suite_example.png "Optional title"){: .my-custom-css-class} 

參照語法

以下是參照樣式圖片語法:

![Alt text][{{ '' }}ID{{ '' }}]

其中 {{ '' }}ID{{ '' }} 是已定義圖片參照的名稱。圖片參照是以與連結參照相同的語法來定義:

{% verbatim %}[ID]: docs/images/benchmarking/test_suite_example.png  "Optional title attribute"

自訂語法

你可以使用下列語法指定 Markdown 圖片的寬度:

![Alt text](/docs/images/benchmarking/test_suite_example.png){: width="123"} 

包含程式碼

includecode 標記包含其他檔案的文字區域,尤其是原始碼的區域。這個標記也能在文字中產生可下載的檔案,而不是在文件中加入文字。

您可以使用此標記在文件中插入一部分原始碼,然後將該原始碼維護為可執行的檔案。

gerrit_repo+path 參數是指在 Gerrit 或 Git 上代管的存放區和路徑。repo 的格式為 instance or repository,而 path 的格式為 path/to/file

{% includecode gerrit_repo="fuchsia/fuchsia" gerrit_path="examples/fidl/fuchsia.examples/types.test.fidl" %}

包含一部分檔案

有三種方法可以指定檔案區域:地區標記、規則運算式和縮排區塊。

區域標記

地區標記可讓您在來源檔案中加入一行,指出區域的第一行和最後一行,以及標記名稱。

{% includecode gerrit_repo="fuchsia/fuchsia" gerrit_path="examples/fidl/fuchsia.examples/types.test.fidl" region_tag="consts" %}

轉譯時間:

const BOARD_SIZE uint8 = 9;
const NAME string = "Tic-Tac-Toe";

規則運算式

您也可以使用 regexp 參數,使用規則運算式來定義要擷取的區域。 例如:

{% includecode gerrit_repo="fuchsia/fuchsia" gerrit_path="examples/fidl/fuchsia.examples/types.test.fidl" regexp="WRITE = 0b010;" %}

轉譯時間:

WRITE = 0b010;

模式使用 Python 規則運算式語法。詳情請參閱官方的 Python 說明文件

縮排方塊

您可以直接加入函式或類別定義中的程式碼,不必定義區域標記。使用 indented_block 參數:

{% includecode gerrit_repo="fuchsia/fuchsia" gerrit_path="examples/fidl/fuchsia.examples/types.test.fidl" indented_block="type User" %}

轉譯時間:

type User = table {
    1: reserved;
    2: age uint8;
    3: name string:MAX_STRING_LENGTH;
};

模式使用 Python 規則運算式語法。如需更多資訊,請參閱官方 Python 說明文件

參數

以下是 includecode 的選用參數:

Markdown

參數
highlight 選用
您可以使用 highlight 參數強調程式碼的特定部分。請使用逗號分隔值表示您想要醒目顯示的行。行號與您選取的區域相關,而非整個檔案。

範例
{% includecode gerrit_repo="fuchsia/fuchsia" gerrit_path="examples/fidl/fuchsia.examples/types.test.fidl" region_tag="bits" highlight="2,3,4" %}
adjust_indentation 選用
根據預設,includecode 會傳回原始碼的指定區段,包括空白字元。您可以使用 adjust_indentation 選項調整程式碼的縮排。

adjust_indentation 採用兩種可能的值:
  • number - 整數。這表示每一行的空格不會縮排。舉例來說,值 4 會將線條減少 4 個空格,-2 則會以 2 個空格縮排。
  • 「auto」- 自動使用該字串。發布工具會根據區域中的主要空格數量下限,取消所選程式碼的縮排。換句話說,系統會移除程式碼片段中所有行的常見空白字元。
範例
{% includecode gerrit_repo="fuchsia/fuchsia" gerrit_path="examples/fidl/fuchsia.examples/types.test.fidl" region_tag="bits" adjust_indentation="-2" %}
html_escape 選用
根據預設,includecode 會使用 HTML 逸出所有程式碼。 您可以將 html_escape 設為 False,藉此取消逸出 HTML。

範例
{% includecode gerrit_repo="fuchsia/fuchsia" gerrit_path="examples/fidl/fuchsia.examples/echo.test.fidl" region_tag="launcher" html_escape="False" %}
exclude_regexp 選用
您可以根據規則運算式移除特定行。如要移除留言或其他不相關的內容,這項功能就能派上用場。無法使用多行規則運算式。

範例
{% includecode gerrit_repo="fuchsia/fuchsia" gerrit_path="examples/fidl/fuchsia.examples/types.test.fidl" region_tag="bits" exclude_regexp="READ" %}

已轉譯

參數
highlight highlight="2,3,4"前:
        bits FileMode : uint16 {
          READ = 0b001;
          WRITE = 0b010;
          EXECUTE = 0b100;
        };
highlight="2,3,4"後:
        bits FileMode : uint16 {
          READ = 0b001;
          WRITE = 0b010;
          EXECUTE = 0b100;
        };
adjust_indentation adjust_indentation="-2"前:
        bits FileMode : uint16 {
          READ = 0b001;
          WRITE = 0b010;
          EXECUTE = 0b100;
        };
adjust_indentation="-2"後:
            bits FileMode : uint16 {
              READ = 0b001;
              WRITE = 0b010;
              EXECUTE = 0b100;
            };
html_escape html_escape="False"前:
MAX_STRING_LENGTH echo_prefix, request<Echo> request);
html_escape="True"之後:
MAX_STRING_LENGTH echo_prefix, request request);
exclude_regexp exclude_regexp="READ"前:
      bits FileMode : uint16 {
        READ = 0b001;
        WRITE = 0b010;
        EXECUTE = 0b100;
      };
exclude_regexp="READ"後:
      bits FileMode : uint16 {
        WRITE = 0b010;
        EXECUTE = 0b100;
      };

包含 Markdown 片段

您可以在目前的 Markdown 檔案中加入 Markdown 檔案,使用包含所需檔案路徑的 << >> 指令進行一般處理。路徑必須與目前的 .md 來源檔案相關,不應使用絕對路徑。<< >> 指令是區塊指令,因此必須單獨顯示在一行中。

舉例來說,如果目前檔案 en/time-travel/example.md 想要納入 en/time-travel/_samples/_sample.md 檔案,則會指定:

<<_samples/_sample.md>>

內嵌程式碼

您可以在 Markdown 段落內以反引號 (`) 換行文字,藉此表示程式碼。

Markdown

Use the `printf()` function. Code for the `printf()` function is located in the `system\ ` directory.

This sentence has inline `  {code}    ` with a lot of spaces but none are rendered.

產生的 HTML

<p>Use the <code>printf()</code> function. Code for the <code>printf()</code>
function is located in the <code>system\</code> directory.</p>
<p>This sentence has inline <code>{code}</code>with a lot of spaces but none
are rendered.</p>

已轉譯

使用 printf() 函式。printf() 函式的程式碼位於 system\ 目錄中。

這個句子的 {code} 內嵌有許多空格,但系統並未顯示這個句子。

內嵌 HTML

Markdown 語法並未提供 HTML 的完整功能,但 Markdown 支援內嵌 HTML。您可以將文字納入 HTML 元素標記,例如:

Markdown

This sentence is in Markdown with a <b>bold inline HTML tag</b>.

已轉譯

這個句子是以粗體內嵌 HTML 標記在 Markdown 中。

Fuchsia.dev 支援三種連結樣式:內嵌、參考資料和外部連結。在所有樣式中,連結文字都會以 [] (方括號) 分隔。

如要建立內嵌連結,請在連結文字結尾方括號後方緊接使用一組一般括號。在括號內加入你希望連結指向的網址,以及連結標題的選填名稱,並以引號括住。例如:

Markdown

This is [an example](https://fuchsia.dev/ "Title") inline link.

[This link](https://fuchsia.dev/) has no title attribute.

產生的 HTML

<p>This is <a href="https://fuchsia.dev/" title="Title">
an example</a> inline link.</p>

<p><a href="fuchsia.dev">This link</a> has no
title attribute.</p>

已轉譯

這是內嵌連結 範例

這個連結沒有標題屬性。

如要參照本機資源 (例如來源樹狀結構中的檔案),可以使用相對路徑。如需範例,請參閱 文件 README

參照樣式連結會使用第二組方括號,您可以在其中提供標籤來識別連結:

This is [an example][id] reference-style link.

您可以視需要使用空格分隔括號組合:

This is [an example] [id] reference-style link.

接著,您可以在文件底部的單行中定義連結:

[id]: https://{{example_url}}/  "Optional Title Here"

您可以在語法中加入 {: .external},讓讀者知道連結導向外部網站。例如:

See the [official documentation](https://my_external_website){: .external} for details.

Fuchsia 原始碼或 Fuchsia 變更的連結不是外部連結。

無論您以何種方式在內容中建立 Markdown 連結,都可以從 Fuchsia.dev 連結至各種類型的內容:

  • 由 Fuchsia 來源樹狀結構 //docs 目錄中的協作者建立的內容。

    範例:這是 //docs/get-started/learn-fuchsia.md 的連結:

    [Learn Fuchsia](/docs/get-started/learn-fuchsia.md)
    
  • 自動產生的內容,例如 Fuchsia 來源樹狀結構中沒有的 fuchsia.dev/reference

    範例:以下是 fuchsia.bluetooth 產生的 API 參考說明文件的連結:

    [`fuchsia.bluetooth`](https://fuchsia.dev/reference/fidl/fuchsia.bluetooth)
    

    Fuchsia 也有非產生的參考內容,存在於 //docs/reference/ 目錄。您可以使用 Fuchsia 來源樹狀結構內容語法來連結這類內容。

  • 網址連結。這些類型的連結必須標示為「外部」

    範例:以下是 google.com 的連結:

    [`google.com`](https://google.com){: .external} 
    

清單

您可以使用 Markdown 語法輕鬆建立項目符號或編號清單。 它們通常稱為未排序 (項目符號) 或已排序 (編號) 的清單,因為它們代表所產生的 (<ul>) 和 (<ol>) HTML 標記。

未排序的清單

未排序的清單可以使用星號 (*)、加號 (+) 或破折號 (-) 做為清單標記。無論您使用何種標記,清單都會以相同方式顯示。

Markdown

This is a Markdown paragraph:
                                             // required blank line
* Red
* Green
* Blue

This is another Markdown paragraph:
                                            // required blank line
+ Red
+ Green
+ Blue

This is yet another Markdown paragraph:
                                            // required blank line
- Red
- Green
- Blue

產生的 HTML

<p>This is a Markdown paragraph:</p>
<ul>
  <li>Red</li>
  <li>Green</li>
  <li>Blue</li>
</ul>
<p>This is another Markdown paragraph:</p>
<ul>
  <li>Red</li>
  <li>Green</li>
  <li>Blue</li>
</ul>
<p>This is yet another Markdown paragraph:</p>
<ul>
  <li>Red</li>
  <li>Green</li>
  <li>Blue</li>
</ul>

已轉譯

以下是 Markdown 段落:

  • 紅色
  • Green
  • Blue

以下是另一個 Markdown 段落:

  • 紅色
  • Green
  • Blue

此為另一個 Markdown 段落:

  • 紅色
  • Green
  • Blue

多層級未排序的清單

您可以在多層級未排序清單中的清單標記使用星號 (*)、加號 (+) 或破折號 (-)。第二層標記必須在至少四個空格之前,並在每個層級保持一致。請參考以下範例:

Markdown

This is a Markdown paragraph:
                              // required blank line before parent list
 * Bird
     * Celtics
     * Retired
       * Larry                // extra space; not consistent w/ "Celtics"
 * Magic
     * Lakers

產生的 HTML

<p>This is a Markdown paragraph:</p>
<ul>
  <li>Bird
    <ul>
      <li>Celtics</li>
      <li>Retired</li>
      <ul>
        <li>Larry</li>
      </ul>
    </ul>
  </li>
  <li>Magic
    <ul>
      <li>Lakers</li>
    </ul>
  </li>
</ul>

已轉譯

以下是 Markdown 段落:

    • 塞爾蒂克
    • 退休
      • Larry
  • 魔術
    • 湖人

已排序的清單

已排序的清單使用數字和半形句號,用於清單項目。您可以在排序清單中自行定義序數,或使用 1. 自動編號。請參考以下範例:

Markdown

This is a Markdown paragraph:
                                   // required blank line
1. Bird                            // recommended numbering
1. McHale
1. Parish

This is another Markdown paragraph:
                                   // required blank line
1. Bird                            // sequential numbering is allowed,
2. McHale                          // but not recommended
3. Parish

This is yet another Markdown paragraph:
                                   // required blank line
3. Bird                            // non-sequential numbering is allowed,
1. McHale                          // but not recommended
8. Parish

產生的 HTML

<p>This is a Markdown paragraph:</p>
<ol>
  <li>Bird</li>
  <li>McHale</li>
  <li>Parish</li>
</ol>
<p>This is another Markdown paragraph:</p>
<ol>
  <li>Bird</li>
  <li>McHale</li>
  <li>Parish</li>
</ol>
<p>This is yet another Markdown paragraph:</p>
<ol>
  <li>Bird</li>
  <li>McHale</li>
  <li>Parish</li>
</ol>

已轉譯

以下是 Markdown 段落:

  1. McHale
  2. 轄區

以下是另一個 Markdown 段落:

  1. McHale
  2. 轄區

此為另一個 Markdown 段落:

  1. McHale
  2. 轄區

多層級排序清單

您可以建立多層排序的清單;第二層標記必須在至少四個空格之前。

Markdown

 1. Bird
     1. Lakers
 1. McHale
     1. Celtics

產生的 HTML

<ol>
  <li>Bird
    <ol>
      <li>Lakers</li>
    </ol>
  </li>
  <li>McHale
    <ol>
      <li>Celtics</li>
    </ol>
  </li>
</ol>

已轉譯

    1. 湖人
  1. 阿海
    1. 塞爾蒂克

MathJax

<devsite-mathjax> 自訂元素可讓您使用 MathJax 2.7 在 fuchsia.dev 內容中顯示數學標記法。MathJax 利用 LaTeX 語法建立數學圖語。詳情請參閱 LaTeX 語法指南

用量

如要在文件中使用 MathJax,您必須在文件中加入自訂元素一次:

  {# To see the fully rendered MathJax equations on this page,
  see the published page at https://fuchsia.dev/<PATH_TO_YOUR_DOCUMENT>#}
  <devsite-mathjax config="TeX-AMS-MML_SVG"></devsite-mathjax>

加入自訂元素後,您就可以在 $$ block or $ inline.

Standalone block

Markdown

<!-- <devsite-mathjax config="TeX-AMS-MML_SVG"></devsite-mathjax> -->

<div>
  $$
  R_{\mu\nu}-\frac{1}{2}Rg_{\mu\nu}+\Lambda{g_{\mu\nu}} = \frac{8\pi{G}}{c^4}{T_{\mu\nu}}
 $$
</div>

Rendered

$$ R_{\mu\nu}-\frac{1}{2}Rg_{\mu\nu}+\Lambda{g_{\mu\nu}} = \frac{8\pi{G}}{c^4}{T_{\mu\nu}} $$ 中撰寫數學符號

Inline

Markdown

<!--Included only one time previously-->
<devsite-mathjax config="TeX-AMS-MML_SVG"></devsite-mathjax>

The area of a circle can be computed using the equation $ A = \pi{r^2} $,
where $ r $ is the radius of the circle, and $ \pi $ is the mathematical
constant that is approximately equal to 3.14159.

Rendered

The area of a circle can be computed using the equation $ A = \pi{r^2} $, where $ r $ is the radius of the circle, and $ \pi $ is the mathematical constant that is approximately equal to 3.14159.

Paragraphs

A paragraph is simply one or more consecutive lines of text, separated 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.) You do not need to indent normal paragraphs with spaces or tabs.

Tables

Markdown makes it easy to format tables with pipes (|) and hyphens (-). Deliminate text with pipes to create columns; a header row is defined when the following row has at least three hyphens for each column header.

Markdown

Lesson                     | Description
------------------------   | ---------------------------------------
What is Fuchsia?           | An open source effort to create a production-grade operating system
What is FIDL?              | Fuchsia Interface Definition Language
Getting Started            | Download the Fuchsia source code

Generated HTML

<table>
  <thead>
    <tr>
      <th>Lesson</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td>What is Fuchsia?</td>
      <td>An open source effort to create a production-grade operating system</td>
    </tr>
    <tr>
      <td>What is FIDL?</td>
      <td>Fuchsia Interface Definition Language</td>
    </tr>
    <tr>
      <td>Getting Started</td>
      <td>Download the Fuchsia source code</td>
    </tr>
  </tbody>
</table>

Rendered

Lesson Description
What is Fuchsia? An open source effort to create a production-grade operating system
What is FIDL? Fuchsia Interface Definition Language
Getting Started Download the Fuchsia source code

Formatting text in a table

You can use Markdown syntax to format text within a table (that is, *emphasis*, **strong**, `code`). To align text within a column, add a colon : in the dash --- row to indicate direction (that is, left, center, right) as in the example below:

Markdown

Left-aligned     | Center-aligned | Right-aligned
:---             |     :---:      |          ---:
info             | info           | info
more info        | more info      | more info
even *more* info | some `code`    | **not** code

Rendered

Left-aligned Center-aligned Right-aligned
info info info
more info more info more info
even more info some code not code