| {{+bindTo:partials.standard_nacl_article}} | |
| <section id="examples-of-rest-markup-for-chromesite-document-title"> | |
| <h1 id="examples-of-rest-markup-for-chromesite-document-title">Examples of ReST markup for chromesite (Document title)</h1> | |
| <h2 id="document-structure">Document structure</h2> | |
| <p>A document starts with a Sphinx target which serves as the document name | |
| throughout the tree. It can serve as a link target in other documents that want | |
| to link to this one (see the Links section below).</p> | |
| <h2 id="basic-markup">Basic markup</h2> | |
| <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> | |
| <p>Some <strong>bold text</strong> and <em>italic text</em> and <code>fixed-font text</code>. Non marked-up text | |
| can follow these immediately by using a backslash: <strong>pexe</strong>s.</p> | |
| <p>For pleasant collaborative editing, please use the accepted coding guidelines: | |
| wrap at 80 columns, no tabs, etc.</p> | |
| <p>Quotes (<code><blockquote></code>) are created by indenting the paragraph:</p> | |
| <blockquote> | |
| <div>Most good programmers do programming not because they expect to get paid or | |
| get adulation by the public, but because it is fun to program. | |
| – Linus Torvalds</div></blockquote> | |
| <p>Here’s an en-dash – and an m-dash — too.</p> | |
| <h3 id="unicode-samples">Unicode samples</h3> | |
| <p>Copyright sign ©, and uacute Ú.</p> | |
| <h2 id="images">Images</h2> | |
| <p>Please use absolute paths (starting with <code>/</code>) for images:</p> | |
| <img alt="/native-client/images/NaclBlock.png" src="/native-client/images/NaclBlock.png" /> | |
| <h2 id="links">Links</h2> | |
| <h3 id="to-other-documents-within-the-tree">To other documents within the tree</h3> | |
| <p>Internal links to other documents are created <a class="reference internal" href="/native-client/overview.html"><em>like this</em></a>. The | |
| document name within the angle brackets is relative to the root dir of the doc | |
| tree and does not have an extension.</p> | |
| <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 | |
| <a class="reference internal" href="/native-client/devguide/index.html"><em>devguide index</em></a>.</p> | |
| <h3 id="to-sections-inside-documents">To sections inside documents</h3> | |
| <p>To internal locations within documents, labels are used. For example, this link | |
| goes to the label explicitly placed in this document - | |
| <a class="reference internal" href="#link-for-section-heading"><em>Section heading</em></a>. This works across documents as well. Label | |
| names must be unique in the tree, and can refer to anything (like images).</p> | |
| <p>It’s also possible to give such cross-references custom names: <a class="reference internal" href="#link-for-section-heading"><em>Same | |
| Section Heading</em></a>.</p> | |
| <h3 id="to-external-locations">To external locations</h3> | |
| <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> | |
| <h2 id="definition-lists">Definition lists</h2> | |
| <p>Can be used to define a group of related terms. Internal formatting is supported | |
| within the definition. No special formatting needs to be done for the definition | |
| name/title - it’s handled by the chromesite documentation server.</p> | |
| <dl class="docutils"> | |
| <dt>Apple</dt> | |
| <dd>The apple is the pomaceous fruit of the apple tree, species Malus domestica in | |
| the rose family (<strong>Rosaceae</strong>).</dd> | |
| <dt>Fig</dt> | |
| <dd>The common fig (<strong>Ficus carica</strong>) is a species of flowering plant in the genus | |
| Ficus, from the family Moraceae, known as the common fig (or just the fig), | |
| anjeer (Iran, Pakistan), and dumur (Bengali).</dd> | |
| <dt>Pear</dt> | |
| <dd>The pear is any of several tree and shrub species of genus Pyrus, in the | |
| family Rosaceae.</dd> | |
| </dl> | |
| <h2 id="notes-and-admonitions">Notes and Admonitions</h2> | |
| <p>The documentation server supports special “notes” that are indented and have a | |
| background color. We’ll generate them with the <code>Note</code> directive, providing | |
| the class explicitly. The class is one of <code>note</code>, <code>caution</code>, <code>warning</code>, | |
| <code>special</code>.</p> | |
| <aside class="note"> | |
| <p>This is a note.</p> | |
| <p>Foo bar.</p> | |
| </aside> | |
| <p>Also:</p> | |
| <aside class="caution"> | |
| Caution – you have been warned. | |
| </aside> | |
| <h2 id="source-code">Source code</h2> | |
| <p>Here’s source code that will be pretty-printed. It’s just a plain <code><pre></code> | |
| that presents pre-formatted code with coloring:</p> | |
| <pre class="prettyprint"> | |
| #include <iostream> | |
| int main() { | |
| char c = 'x'; | |
| std::cout << "Hello world\n"; | |
| return 0; | |
| } | |
| </pre> | |
| <p>For some code (like shell samples), we want to disable pretty-printing:</p> | |
| <pre> | |
| $ ls | wc | |
| $ echo "hello world" | |
| </pre> | |
| <p>By default <code>:prettyprint:</code> is <code>1</code>.</p> | |
| <p>For short inline code, use fixed-formatting like <code>int x = 2;</code>. Note that this | |
| won’t get syntax-highlighted and may be line-wrapped, so keep it very short.</p> | |
| <h2 id="section-heading"><span id="link-for-section-heading"></span>Section heading</h2> | |
| <p>Here’s a demonstration of heading nesting levels. This is a top-level section in | |
| the document. The document title is the first header and it’s delimited by hash | |
| signes (<code>#</code>) from above and below.</p> | |
| <h3 id="subsection-heading">Subsection heading</h3> | |
| <p>Subsection.</p> | |
| <h4 id="sub-subsection-heading">Sub-subsection heading</h4> | |
| <p>That’s pretty deep...</p> | |
| <h5 id="sub-sub-subsection-heading">Sub-sub-subsection heading</h5> | |
| <p>It’s probably not the best idea to go this far (renders to <code><h5></code>).</p> | |
| <h2 id="lists">Lists</h2> | |
| <p>Auto-numbered ordered lists:</p> | |
| <ol class="arabic simple"> | |
| <li>One</li> | |
| <li>Two</li> | |
| <li>Three</li> | |
| </ol> | |
| <p>Manually numbered ordered lists:</p> | |
| <ol class="arabic simple"> | |
| <li>One</li> | |
| <li>Two</li> | |
| <li>Three</li> | |
| </ol> | |
| <p>Unordered (bullet) lists:</p> | |
| <ul class="small-gap"> | |
| <li>One</li> | |
| <li>Two</li> | |
| <li>Three</li> | |
| </ul> | |
| <p>Lists can be nested and mixed too:</p> | |
| <ul class="small-gap"> | |
| <li><p class="first">Toplevel</p> | |
| <ol class="arabic simple"> | |
| <li>One</li> | |
| <li>Two</li> | |
| </ol> | |
| </li> | |
| <li>Back to top level</li> | |
| </ul> | |
| <h2 id="tables">Tables</h2> | |
| <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 | |
| Docutils pages linked from it.</p> | |
| <p>“Simple tables” require less markup but are limited:</p> | |
| <table border="1" class="docutils"> | |
| <colgroup> | |
| </colgroup> | |
| <thead valign="bottom"> | |
| <tr class="row-odd"><th class="head">A</th> | |
| <th class="head">B</th> | |
| <th class="head">A and B</th> | |
| </tr> | |
| </thead> | |
| <tbody valign="top"> | |
| <tr class="row-even"><td>False</td> | |
| <td>False</td> | |
| <td>False</td> | |
| </tr> | |
| <tr class="row-odd"><td>True</td> | |
| <td>False</td> | |
| <td>False</td> | |
| </tr> | |
| <tr class="row-even"><td>False</td> | |
| <td>True</td> | |
| <td>False</td> | |
| </tr> | |
| <tr class="row-odd"><td>True</td> | |
| <td>True</td> | |
| <td>True</td> | |
| </tr> | |
| </tbody> | |
| </table> | |
| <p>“Grid tables” are versatile but require more markup:</p> | |
| <table border="1" class="docutils"> | |
| <colgroup> | |
| </colgroup> | |
| <thead valign="bottom"> | |
| <tr class="row-odd"><th class="head">Header row, column 1 | |
| (header rows optional)</th> | |
| <th class="head">Header 2</th> | |
| <th class="head">Header 3</th> | |
| <th class="head">Header 4</th> | |
| </tr> | |
| </thead> | |
| <tbody valign="top"> | |
| <tr class="row-even"><td>body row 1, column 1</td> | |
| <td>column 2</td> | |
| <td>column 3</td> | |
| <td>column 4</td> | |
| </tr> | |
| <tr class="row-odd"><td>body row 2</td> | |
| <td>...</td> | |
| <td>...</td> | |
| <td> </td> | |
| </tr> | |
| </tbody> | |
| </table> | |
| </section> | |
| {{/partials.standard_nacl_article}} |