1 {{+bindTo:partials.standard_nacl_article}}
3 <section id=
"examples-of-rest-markup-for-chromesite-document-title">
4 <h1 id=
"examples-of-rest-markup-for-chromesite-document-title">Examples of ReST markup for chromesite (Document title)
</h1>
5 <h2 id=
"document-structure">Document structure
</h2>
6 <p>A document starts with a Sphinx target which serves as the document name
7 throughout the tree. It can serve as a link target in other documents that want
8 to link to this one (see the Links section below).
</p>
9 <h2 id=
"basic-markup">Basic markup
</h2>
10 <p>In general, follow the rules from
<a class=
"reference external" href=
"http://sphinx-doc.org/rest.html">http://sphinx-doc.org/rest.html
</a></p>
11 <p>Some
<strong>bold text
</strong> and
<em>italic text
</em> and
<code>fixed-font text
</code>. Non marked-up text
12 can follow these immediately by using a backslash:
<strong>pexe
</strong>s.
</p>
13 <p>For pleasant collaborative editing, please use the accepted coding guidelines:
14 wrap at
80 columns, no tabs, etc.
</p>
15 <p>Quotes (
<code><blockquote
></code>) are created by indenting the paragraph:
</p>
17 <div>Most good programmers do programming not because they expect to get paid or
18 get adulation by the public, but because it is fun to program.
19 – Linus Torvalds
</div></blockquote>
20 <p>Here
’s an en-dash
– and an m-dash
— too.
</p>
21 <h3 id=
"unicode-samples">Unicode samples
</h3>
22 <p>Copyright sign ©, and uacute Ú.
</p>
23 <h2 id=
"images">Images
</h2>
24 <p>Please use absolute paths (starting with
<code>/
</code>) for images:
</p>
25 <img alt=
"/native-client/images/NaclBlock.png" src=
"/native-client/images/NaclBlock.png" />
26 <h2 id=
"links">Links
</h2>
27 <h3 id=
"to-other-documents-within-the-tree">To other documents within the tree
</h3>
28 <p>Internal links to other documents are created
<a class=
"reference internal" href=
"/native-client/overview.html"><em>like this
</em></a>. The
29 document name within the angle brackets is relative to the root dir of the doc
30 tree and does not have an extension.
</p>
31 <p>Here
’s a link to a document in a subdirectory:
<a class=
"reference internal" href=
"/native-client/devguide/tutorial/tutorial-part1.html"><em>the tutorial
</em></a>. And a link to a subdirectory index page
32 <a class=
"reference internal" href=
"/native-client/devguide/index.html"><em>devguide index
</em></a>.
</p>
33 <h3 id=
"to-sections-inside-documents">To sections inside documents
</h3>
34 <p>To internal locations within documents, labels are used. For example, this link
35 goes to the label explicitly placed in this document -
36 <a class=
"reference internal" href=
"#link-for-section-heading"><em>Section heading
</em></a>. This works across documents as well. Label
37 names must be unique in the tree, and can refer to anything (like images).
</p>
38 <p>It
’s also possible to give such cross-references custom names:
<a class=
"reference internal" href=
"#link-for-section-heading"><em>Same
39 Section Heading
</em></a>.
</p>
40 <h3 id=
"to-external-locations">To external locations
</h3>
41 <p>Plain links can be placed like this:
<a class=
"reference external" href=
"http://google.com">http://google.com
</a> and also
<a class=
"reference external" href=
"http://google.com">like this
</a>.
</p>
42 <h2 id=
"definition-lists">Definition lists
</h2>
43 <p>Can be used to define a group of related terms. Internal formatting is supported
44 within the definition. No special formatting needs to be done for the definition
45 name/title - it
’s handled by the chromesite documentation server.
</p>
48 <dd>The apple is the pomaceous fruit of the apple tree, species Malus domestica in
49 the rose family (
<strong>Rosaceae
</strong>).
</dd>
51 <dd>The common fig (
<strong>Ficus carica
</strong>) is a species of flowering plant in the genus
52 Ficus, from the family Moraceae, known as the common fig (or just the fig),
53 anjeer (Iran, Pakistan), and dumur (Bengali).
</dd>
55 <dd>The pear is any of several tree and shrub species of genus Pyrus, in the
58 <h2 id=
"notes-and-admonitions">Notes and Admonitions
</h2>
59 <p>The documentation server supports special
“notes
” that are indented and have a
60 background color. We
’ll generate them with the
<code>Note
</code> directive, providing
61 the class explicitly. The class is one of
<code>note
</code>,
<code>caution
</code>,
<code>warning
</code>,
62 <code>special
</code>.
</p>
64 <p>This is a note.
</p>
69 <aside class=
"caution">
70 Caution
– you have been warned.
72 <h2 id=
"source-code">Source code
</h2>
73 <p>Here
’s source code that will be pretty-printed. It
’s just a plain
<code><pre
></code>
74 that presents pre-formatted code with coloring:
</p>
75 <pre class=
"prettyprint">
76 #include
<iostream
>
80 std::cout
<< "Hello world\n
";
84 <p>For some code (like shell samples), we want to disable pretty-printing:
</p>
87 $ echo
"hello world
"
89 <p>By default
<code>:prettyprint:
</code> is
<code>1</code>.
</p>
90 <p>For short inline code, use fixed-formatting like
<code>int x =
2;
</code>. Note that this
91 won
’t get syntax-highlighted and may be line-wrapped, so keep it very short.
</p>
92 <h2 id=
"section-heading"><span id=
"link-for-section-heading"></span>Section heading
</h2>
93 <p>Here
’s a demonstration of heading nesting levels. This is a top-level section in
94 the document. The document title is the first header and it
’s delimited by hash
95 signes (
<code>#
</code>) from above and below.
</p>
96 <h3 id=
"subsection-heading">Subsection heading
</h3>
98 <h4 id=
"sub-subsection-heading">Sub-subsection heading
</h4>
99 <p>That
’s pretty deep...
</p>
100 <h5 id=
"sub-sub-subsection-heading">Sub-sub-subsection heading
</h5>
101 <p>It
’s probably not the best idea to go this far (renders to
<code><h5
></code>).
</p>
102 <h2 id=
"lists">Lists
</h2>
103 <p>Auto-numbered ordered lists:
</p>
104 <ol class=
"arabic simple">
109 <p>Manually numbered ordered lists:
</p>
110 <ol class=
"arabic simple">
115 <p>Unordered (bullet) lists:
</p>
116 <ul class=
"small-gap">
121 <p>Lists can be nested and mixed too:
</p>
122 <ul class=
"small-gap">
123 <li><p class=
"first">Toplevel
</p>
124 <ol class=
"arabic simple">
129 <li>Back to top level
</li>
131 <h2 id=
"tables">Tables
</h2>
132 <p>The full scoop on tables is
<a class=
"reference external" href=
"http://sphinx-doc.org/rest.html#tables">http://sphinx-doc.org/rest.html#tables
</a> and the
133 Docutils pages linked from it.
</p>
134 <p>“Simple tables
” require less markup but are limited:
</p>
135 <table border=
"1" class=
"docutils">
138 <thead valign=
"bottom">
139 <tr class=
"row-odd"><th class=
"head">A
</th>
140 <th class=
"head">B
</th>
141 <th class=
"head">A and B
</th>
145 <tr class=
"row-even"><td>False
</td>
149 <tr class=
"row-odd"><td>True
</td>
153 <tr class=
"row-even"><td>False
</td>
157 <tr class=
"row-odd"><td>True
</td>
163 <p>“Grid tables
” are versatile but require more markup:
</p>
164 <table border=
"1" class=
"docutils">
167 <thead valign=
"bottom">
168 <tr class=
"row-odd"><th class=
"head">Header row, column
1
169 (header rows optional)
</th>
170 <th class=
"head">Header
2</th>
171 <th class=
"head">Header
3</th>
172 <th class=
"head">Header
4</th>
176 <tr class=
"row-even"><td>body row
1, column
1</td>
181 <tr class=
"row-odd"><td>body row
2</td>
190 {{/partials.standard_nacl_article}}