Sophie

Sophie

distrib > Fedora > 14 > i386 > by-pkgid > dd7a95aabe1c049ac9f84beede8143d3 > files > 1974

synopsis-doc-0.12-4.fc14.i686.rpm

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>ReStructured Text</title><link rel="stylesheet" href="synopsis.css" type="text/css" /><meta name="generator" content="DocBook XSL Stylesheets V1.73.2" /><link rel="start" href="index.html" title="Synopsis Tutorial" /><link rel="up" href="markup.html" title="Appendix C. Supported Documentation Markup" /><link rel="prev" href="javadoc.html" title="Javadoc" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">ReStructured Text</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="javadoc.html">Prev</a> </td><th width="60%" align="center">Appendix C. Supported Documentation Markup</th><td width="20%" align="right"> </td></tr></table></div><div class="section" lang="en" xml:lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="rest"></a>ReStructured Text</h2></div></div></div><p>Synopsis supports the full set of ReStructuredText markup (See 
        <a class="ulink" href="http://docutils.sourceforge.net/docs/ref/rst/restructuredtext.html" target="_top">http://docutils.sourceforge.net/docs/ref/rst/restructuredtext.html</a>).
        In order to process ReST docstrings, docutils 0.4 or higher must be installed. 
        If Docutils is not installed, ReST docstrings will be rendered as plaintext.</p><p>ReST provides a wide variety of markup that allows documentation strings to be
        formatted in a wide variety of ways. Among the many features are different list styles,
        tables, links, verbatim blocks, etc.</p><p><a class="ulink" href="http://docutils.sourceforge.net/docs/ref/rst/restructuredtext.html#interpreted-text" target="_top">Interpreted text</a>
        is used to mark up program identifiers, such as the names of variables, functions, classes, and modules. Synopsis will
        attempt to look them up in its symbol table, and generate suitable cross-references.</p><div class="example"><a id="id493718"></a><p class="title"><b>Example C.2. C++ code snippet using ReST-style comments.</b></p><div class="example-contents"><pre class="programlisting">
//. The Nurbs class. It implements a nurbs curve
//. for the given order. It is a very powerful
//. and flexible curve representation. For simpler
//. cases you may prefer to use a `Paths::Bezier` curve.
//.
//. While non-rational curves are not sufficient to represent a circle,
//. this is one of many sets of NURBS control points for an almost uniformly 
//. parameterized circle:
//.
//. +--+----+-------------+
//. |x |  y | weight      |
//. +==+====+=============+
//. |1 |  0 | 1           |
//. +--+----+-------------+
//. |1 |  1 | `sqrt(2)/2` |
//. +--+----+-------------+
//. |0 |  1 | 1           |
//. +--+----+-------------+
//. |-1|  1 | `sqrt(2)/2` |
//. +--+----+-------------+
//. |-1|  0 | 1           |
//. +--+----+-------------+
//. |-1| -1 | `sqrt(2)/2` |
//. +--+----+-------------+
//. |0 | -1 | 1           |
//. +--+----+-------------+
//. |1 | -1 | `sqrt(2)/2` |
//. +--+----+-------------+
//. |1 |  0 | 1           |
//. +--+----+-------------+
//.
//. The order is three, the knot vector is {0, 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 4}.
//. It should be noted that the circle is composed of four quarter circles,
//. tied together with double knots. Although double knots in a third order NURBS
//. curve would normally result in loss of continuity in the first derivative,
//. the control points are positioned in such a way that the first derivative is continuous.
//. (From Wikipedia_ )
//.
//. .. _Wikipedia: http://en.wikipedia.org/wiki/NURBS
//.
//. Example::
//.
//.   Nurbs&lt;3&gt; circle;
//.   circle.insert_control_point(0, Vertex(1., 0.), 1.);
//.   circle.insert_control_point(0, Vertex(1., 1.), sqrt(2.)/2.);
//.   ...
//.
        </pre></div></div><br class="example-break" /><p>To see how this is formatted please refer to the
        <a class="ulink" href="http://synopsis.fresco.org/docs/examples/index.html#docbook" target="_top">DocBook example</a>.</p></div><div class="navfooter"><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="javadoc.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="markup.html">Up</a></td><td width="40%" align="right"> </td></tr><tr><td width="40%" align="left" valign="top">Javadoc </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> </td></tr></table></div></body></html>