分享到plurk 分享到twitter 分享到facebook

版本 51e28156cf95c6f8f41d8af3ecb1e4012a993f70

sandbox

Changes from 51e28156cf95c6f8f41d8af3ecb1e4012a993f70 to current

---
title: 測試頁面 (沙箱, sandbox)
toc: yes
categories: 系統頁面
...

說明
===
基本語法
====================

這是一個測試頁面,你可在這邊測試各種**語法**
文字格式
--------------------------------

**粗體**

*斜體*

`站內連結 <help>`_

`外部連結 <http://www.google.com>`_
~~刪除線~~

.. raw:: html
上^標^

    <font color="#FF0000">這裡是紅色</font>
下~標~

~~~
**粗體**
*斜體*
~~刪除線~~
上^標^
下~標~
~~~
標題
----
---------------------------------

等等你想要測試的*東西*
```
# Heading 1
## Heading2
### Heading 3
#### Heading 4
##### Heading 5
###### Heading 6
```

像是程式碼
Heading 1, 2也可用以下方式替代
```
Heading 1
==================

.. code-block:: prettyprint linenums
Heading 2
----------------------------
```

    #include <stdio.h>
水平線
----------------------------
****

    int main()
    {
        printf("Hello World!\n");
        return 0;
    }
~~~
****
~~~

--------------------------------
可用-或_替代

單行程式碼 ``typewriter``
清單
------------------------------

1. 列舉1
    1. 子項目
2. 列舉2
    * 無序項目
    * 無序項目
**符號清單**

- a
- b
- c 

- 項目1
    - 子項目
    - 子項目
    - 子項目
    - 子項目
- 項目2
    #. 子項目可用數字 (這裡會自動編號)
    #. 子項目可用數字 (這裡會自動編號)
    #. 子項目可用數字 (這裡會自動編號)
- 項目3
  - 空格比較少
  - 也可以
  - 做子項目
~~~~~~
- a
- b
- c
~~~~~~
也可使用 * 或 +

**編號清單**

1. a
2. b
3. c

~~~~~~
1. a
2. b
3. c
~~~~~~
也可使用 #. 或 1)

**巢狀清單**

* a
    1. c
        + d

~~~~~
* a
    1. b
        * c
~~~~~
需為 tab 或 4 spaces

表格
----
----------------------

+------------------------+------------+----------+----------+
| Header row, column 1   | Header 2   | Header 3 | Header 4 |
| (header rows optional) |            |          |          |
+========================+============+==========+==========+
| body row 1, column 1   | column 2   | column 3 | column 4 |
+------------------------+------------+----------+----------+
| body row 2             | ...        | ...      |          |
+------------------------+------------+----------+----------+
表格有四種方式

以下提供其中兩種的範例

=====  =====  =======
A      B      A and B
=====  =====  =======
False  False  False
True   False  False
False  True   False
True   True   True
=====  =====  =======
**範例一:**

更多階層的標題
^^^^^^^^^^^^
| Right | Left | Default | Center |
|--------:|:-------|-----------|:------:|
|   12  |  12  |    12   |    12  |
|  123  |  123 |   123   |   ```123```  |
|    1  |    1 |     1   |     1  |

```
| Right | Left | Default | Center |
|--------:|:-------|-----------|:------:|
|   12  |  12  |    12   |    12  |
|  123  |  123 |   123   |   ```123```  |
|    1  |    1 |     1   |     1  |
```

此方式優點在於可以選擇左右對齊或置中,且表格不需對齊,但是表格無法多行


**範例二:**

+---------------+---------------+--------------------+
| Fruit         | Price         | Advantages         |
+===============+===============+====================+
| Bananas       | $1.34         | - built-in wrapper |
|               |               | - bright color     |
+---------------+---------------+--------------------+
| Oranges       | $2.10         | - cures scurvy     |
|               |               | - tasty            |
+---------------+---------------+--------------------+

```
+---------------+---------------+--------------------+
| Fruit         | Price         | Advantages         |
+===============+===============+====================+
| Bananas       | $1.34         | - built-in wrapper |
|               |               | - bright color     |
+---------------+---------------+--------------------+
| Oranges       | $2.10         | - cures scurvy     |
|               |               | - tasty            |
+---------------+---------------+--------------------+
```

此方式優點為表格可以多行,缺點為無法選擇左右對齊,且**表格需排列整齊**,建議使用**等寬字體**編輯


其他表格用法請參考<http://pandoc.org/demo/example9/pandocs-markdown.html>

連結與圖片
------------------------

這個是[成大資訊系](http://www.csie.ncku.edu.tw/)的網站

<http://web.ncku.edu.tw>

[Hashtag to 清單](#清單)

![image](/embedded/logo-2012-small.png "Jserv like a boss")\


~~~~~
這個是[成大資訊系](http://www.csie.ncku.edu.tw/)的網站
<http://web.ncku.edu.tw>
[Hashtag to 清單](#清單)
![image](/embedded/logo-2012-small.png "Jserv like a boss")\
~~~~~


程式碼區塊
------------------------

~~~ {.c }
int add (int a, int b) {
    return a + b;
}
~~~

~~~~
~~~ {.c }
int add (int a, int b) {
    return a + b;
}
~~~
~~~~

"~"長度需大於三,也可用```替代

可於{}內加入 .numberLines 以及 .startFrom="20"來顯示行號 

Math
-----------------------

可使用LaTeX,在LaTeX語法左右各加一個$ (不可空格)


$\pi = 4\int_0^1 \frac{1}{1 + x^2} \, \mathrm{d}x.$

~~~~~
$\pi = 4\int_0^1 \frac{1}{1 + x^2} \, \mathrm{d}x.$
~~~~~


Reference
===================

<http://pandoc.org/demo/example9/pandocs-markdown.html>