diff options
| author | wiemann <wiemann@929543f6-e4f2-0310-98a6-ba3bd3dd1d04> | 2004-10-20 19:26:40 +0000 |
|---|---|---|
| committer | wiemann <wiemann@929543f6-e4f2-0310-98a6-ba3bd3dd1d04> | 2004-10-20 19:26:40 +0000 |
| commit | 5ea0b81be882d9fe637aef1a09fa3136b32ae40d (patch) | |
| tree | 00482283a38246b4fd4e9c89c0851cd18f75ddcd /docutils/test/functional | |
| parent | 36607bfb1a5c8e53ead79421fa47de71bac019ee (diff) | |
| download | docutils-5ea0b81be882d9fe637aef1a09fa3136b32ae40d.tar.gz | |
extended line block test, moved from line_blocks.txt to standard.txt
git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk@2746 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
Diffstat (limited to 'docutils/test/functional')
5 files changed, 266 insertions, 182 deletions
diff --git a/docutils/test/functional/expected/standalone_rst_html4css1.html b/docutils/test/functional/expected/standalone_rst_html4css1.html index 6011b8586..5360548fa 100644 --- a/docutils/test/functional/expected/standalone_rst_html4css1.html +++ b/docutils/test/functional/expected/standalone_rst_html4css1.html @@ -84,76 +84,75 @@ They are transformed from section titles after parsing. --> <div class="contents topic" id="table-of-contents"> <p class="topic-title first"><a name="table-of-contents">Table of Contents</a></p> <ul class="auto-toc simple"> -<li><a class="reference" href="#structural-elements" id="id26" name="id26">1 Structural Elements</a><ul class="auto-toc"> -<li><a class="reference" href="#section-title" id="id27" name="id27">1.1 Section Title</a></li> -<li><a class="reference" href="#transitions" id="id28" name="id28">1.2 Transitions</a></li> +<li><a class="reference" href="#structural-elements" id="id25" name="id25">1 Structural Elements</a><ul class="auto-toc"> +<li><a class="reference" href="#section-title" id="id26" name="id26">1.1 Section Title</a></li> +<li><a class="reference" href="#transitions" id="id27" name="id27">1.2 Transitions</a></li> </ul> </li> -<li><a class="reference" href="#body-elements" id="id29" name="id29">2 Body Elements</a><ul class="auto-toc"> -<li><a class="reference" href="#paragraphs" id="id30" name="id30">2.1 Paragraphs</a><ul class="auto-toc"> -<li><a class="reference" href="#inline-markup" id="id31" name="id31">2.1.1 Inline Markup</a></li> +<li><a class="reference" href="#body-elements" id="id28" name="id28">2 Body Elements</a><ul class="auto-toc"> +<li><a class="reference" href="#paragraphs" id="id29" name="id29">2.1 Paragraphs</a><ul class="auto-toc"> +<li><a class="reference" href="#inline-markup" id="id30" name="id30">2.1.1 Inline Markup</a></li> </ul> </li> -<li><a class="reference" href="#bullet-lists" id="id32" name="id32">2.2 Bullet Lists</a></li> -<li><a class="reference" href="#enumerated-lists" id="id33" name="id33">2.3 Enumerated Lists</a></li> -<li><a class="reference" href="#definition-lists" id="id34" name="id34">2.4 Definition Lists</a></li> -<li><a class="reference" href="#field-lists" id="id35" name="id35">2.5 Field Lists</a></li> -<li><a class="reference" href="#option-lists" id="id36" name="id36">2.6 Option Lists</a></li> -<li><a class="reference" href="#literal-blocks" id="id37" name="id37">2.7 Literal Blocks</a></li> -<li><a class="reference" href="#line-blocks" id="id38" name="id38">2.8 Line Blocks</a></li> -<li><a class="reference" href="#block-quotes" id="id39" name="id39">2.9 Block Quotes</a></li> -<li><a class="reference" href="#doctest-blocks" id="id40" name="id40">2.10 Doctest Blocks</a></li> -<li><a class="reference" href="#footnotes" id="id41" name="id41">2.11 Footnotes</a></li> -<li><a class="reference" href="#citations" id="id42" name="id42">2.12 Citations</a></li> -<li><a class="reference" href="#targets" id="id43" name="id43">2.13 Targets</a><ul class="auto-toc"> -<li><a class="reference" href="#duplicate-target-names" id="id44" name="id44">2.13.1 Duplicate Target Names</a></li> -<li><a class="reference" href="#id18" id="id45" name="id45">2.13.2 Duplicate Target Names</a></li> +<li><a class="reference" href="#bullet-lists" id="id31" name="id31">2.2 Bullet Lists</a></li> +<li><a class="reference" href="#enumerated-lists" id="id32" name="id32">2.3 Enumerated Lists</a></li> +<li><a class="reference" href="#definition-lists" id="id33" name="id33">2.4 Definition Lists</a></li> +<li><a class="reference" href="#field-lists" id="id34" name="id34">2.5 Field Lists</a></li> +<li><a class="reference" href="#option-lists" id="id35" name="id35">2.6 Option Lists</a></li> +<li><a class="reference" href="#literal-blocks" id="id36" name="id36">2.7 Literal Blocks</a></li> +<li><a class="reference" href="#line-blocks" id="id37" name="id37">2.8 Line Blocks</a></li> +<li><a class="reference" href="#block-quotes" id="id38" name="id38">2.9 Block Quotes</a></li> +<li><a class="reference" href="#doctest-blocks" id="id39" name="id39">2.10 Doctest Blocks</a></li> +<li><a class="reference" href="#footnotes" id="id40" name="id40">2.11 Footnotes</a></li> +<li><a class="reference" href="#citations" id="id41" name="id41">2.12 Citations</a></li> +<li><a class="reference" href="#targets" id="id42" name="id42">2.13 Targets</a><ul class="auto-toc"> +<li><a class="reference" href="#duplicate-target-names" id="id43" name="id43">2.13.1 Duplicate Target Names</a></li> +<li><a class="reference" href="#id18" id="id44" name="id44">2.13.2 Duplicate Target Names</a></li> </ul> </li> -<li><a class="reference" href="#directives" id="id46" name="id46">2.14 Directives</a><ul class="auto-toc"> -<li><a class="reference" href="#document-parts" id="id47" name="id47">2.14.1 Document Parts</a></li> -<li><a class="reference" href="#images" id="id48" name="id48">2.14.2 Images</a></li> -<li><a class="reference" href="#admonitions" id="id49" name="id49">2.14.3 Admonitions</a></li> -<li><a class="reference" href="#topics-sidebars-and-rubrics" id="id50" name="id50">2.14.4 Topics, Sidebars, and Rubrics</a></li> -<li><a class="reference" href="#target-footnotes" id="id51" name="id51">2.14.5 Target Footnotes</a></li> -<li><a class="reference" href="#replacement-text" id="id52" name="id52">2.14.6 Replacement Text</a></li> -<li><a class="reference" href="#compound-paragraph" id="id53" name="id53">2.14.7 Compound Paragraph</a></li> +<li><a class="reference" href="#directives" id="id45" name="id45">2.14 Directives</a><ul class="auto-toc"> +<li><a class="reference" href="#document-parts" id="id46" name="id46">2.14.1 Document Parts</a></li> +<li><a class="reference" href="#images" id="id47" name="id47">2.14.2 Images</a></li> +<li><a class="reference" href="#admonitions" id="id48" name="id48">2.14.3 Admonitions</a></li> +<li><a class="reference" href="#topics-sidebars-and-rubrics" id="id49" name="id49">2.14.4 Topics, Sidebars, and Rubrics</a></li> +<li><a class="reference" href="#target-footnotes" id="id50" name="id50">2.14.5 Target Footnotes</a></li> +<li><a class="reference" href="#replacement-text" id="id51" name="id51">2.14.6 Replacement Text</a></li> +<li><a class="reference" href="#compound-paragraph" id="id52" name="id52">2.14.7 Compound Paragraph</a></li> </ul> </li> -<li><a class="reference" href="#substitution-definitions" id="id54" name="id54">2.15 Substitution Definitions</a></li> -<li><a class="reference" href="#comments" id="id55" name="id55">2.16 Comments</a></li> -<li><a class="reference" href="#id19" id="id56" name="id56">2.17 Line Blocks</a></li> -<li><a class="reference" href="#colspanning-tables" id="id57" name="id57">2.18 Colspanning tables</a></li> -<li><a class="reference" href="#rowspanning-tables" id="id58" name="id58">2.19 Rowspanning tables</a></li> -<li><a class="reference" href="#complex-tables" id="id59" name="id59">2.20 Complex tables</a></li> +<li><a class="reference" href="#substitution-definitions" id="id53" name="id53">2.15 Substitution Definitions</a></li> +<li><a class="reference" href="#comments" id="id54" name="id54">2.16 Comments</a></li> +<li><a class="reference" href="#colspanning-tables" id="id55" name="id55">2.17 Colspanning tables</a></li> +<li><a class="reference" href="#rowspanning-tables" id="id56" name="id56">2.18 Rowspanning tables</a></li> +<li><a class="reference" href="#complex-tables" id="id57" name="id57">2.19 Complex tables</a></li> </ul> </li> -<li><a class="reference" href="#error-handling" id="id60" name="id60">3 Error Handling</a></li> +<li><a class="reference" href="#error-handling" id="id58" name="id58">3 Error Handling</a></li> </ul> </div> <div class="section" id="structural-elements"> -<h1><a class="toc-backref" href="#id26" name="structural-elements">1 Structural Elements</a></h1> +<h1><a class="toc-backref" href="#id25" name="structural-elements">1 Structural Elements</a></h1> <div class="section" id="section-title"> -<h2><a class="toc-backref" href="#id27" name="section-title">1.1 Section Title</a></h2> +<h2><a class="toc-backref" href="#id26" name="section-title">1.1 Section Title</a></h2> <p>That's it, the text just above this line.</p> </div> <div class="section" id="transitions"> -<h2><a class="toc-backref" href="#id28" name="transitions">1.2 Transitions</a></h2> +<h2><a class="toc-backref" href="#id27" name="transitions">1.2 Transitions</a></h2> <p>Here's a transition:</p> <hr /> <p>It divides the section.</p> </div> </div> <div class="section" id="body-elements"> -<h1><a class="toc-backref" href="#id29" name="body-elements">2 Body Elements</a></h1> +<h1><a class="toc-backref" href="#id28" name="body-elements">2 Body Elements</a></h1> <div class="section" id="paragraphs"> -<h2><a class="toc-backref" href="#id30" name="paragraphs">2.1 Paragraphs</a></h2> +<h2><a class="toc-backref" href="#id29" name="paragraphs">2.1 Paragraphs</a></h2> <p>A paragraph.</p> <div class="section" id="inline-markup"> -<h3><a class="toc-backref" href="#id31" name="inline-markup">2.1.1 Inline Markup</a></h3> +<h3><a class="toc-backref" href="#id30" name="inline-markup">2.1.1 Inline Markup</a></h3> <p>Paragraphs contain text and may contain inline markup: <em>emphasis</em>, <strong>strong emphasis</strong>, <tt class="literal"><span class="pre">inline</span> <span class="pre">literals</span></tt>, standalone hyperlinks -(<a class="reference" href="http://www.python.org">http://www.python.org</a>), external hyperlinks (<a class="reference" href="http://www.python.org/">Python</a> <a class="footnote-reference" href="#id22" id="id23" name="id23">[5]</a>), internal +(<a class="reference" href="http://www.python.org">http://www.python.org</a>), external hyperlinks (<a class="reference" href="http://www.python.org/">Python</a> <a class="footnote-reference" href="#id21" id="id22" name="id22">[5]</a>), internal cross-references (<a class="reference" href="#example">example</a>), external hyperlinks with embedded URIs (<a class="reference" href="http://www.python.org">Python web site</a>), footnote references (manually numbered <a class="footnote-reference" href="#id6" id="id1" name="id1">[1]</a>, anonymous auto-numbered <a class="footnote-reference" href="#id9" id="id2" name="id2">[3]</a>, labeled @@ -162,7 +161,7 @@ auto-numbered <a class="footnote-reference" href="#label" id="id3" name="id3">[2 hyperlink targets</a> (see <a class="reference" href="#targets">Targets</a> below for a reference back to here). Character-level inline markup is also possible (although exceedingly ugly!) in <em>re</em><tt class="literal"><span class="pre">Structured</span></tt><em>Text</em>. Problems are indicated by -<a href="#id20" name="id21"><span class="problematic" id="id21">|problematic|</span></a> text (generated by processing errors; this one is +<a href="#id19" name="id20"><span class="problematic" id="id20">|problematic|</span></a> text (generated by processing errors; this one is intentional).</p> <p>The default role for interpreted text is <cite>Title Reference</cite>. Here are some explicit interpreted text roles: a PEP reference (<a class="reference" href="http://www.python.org/peps/pep-0287.html">PEP 287</a>); an @@ -181,7 +180,7 @@ live link to PEP 258 here.</p> </div> </div> <div class="section" id="bullet-lists"> -<h2><a class="toc-backref" href="#id32" name="bullet-lists">2.2 Bullet Lists</a></h2> +<h2><a class="toc-backref" href="#id31" name="bullet-lists">2.2 Bullet Lists</a></h2> <ul> <li><p class="first">A bullet list</p> <ul class="simple"> @@ -204,7 +203,7 @@ live link to PEP 258 here.</p> </ul> </div> <div class="section" id="enumerated-lists"> -<h2><a class="toc-backref" href="#id33" name="enumerated-lists">2.3 Enumerated Lists</a></h2> +<h2><a class="toc-backref" href="#id32" name="enumerated-lists">2.3 Enumerated Lists</a></h2> <ol class="arabic"> <li><p class="first">Arabic numerals.</p> <ol class="loweralpha simple"> @@ -237,7 +236,7 @@ live link to PEP 258 here.</p> </ol> </div> <div class="section" id="definition-lists"> -<h2><a class="toc-backref" href="#id34" name="definition-lists">2.4 Definition Lists</a></h2> +<h2><a class="toc-backref" href="#id33" name="definition-lists">2.4 Definition Lists</a></h2> <dl> <dt>Term</dt> <dd>Definition</dd> @@ -250,7 +249,7 @@ live link to PEP 258 here.</p> </dl> </div> <div class="section" id="field-lists"> -<h2><a class="toc-backref" href="#id35" name="field-lists">2.5 Field Lists</a></h2> +<h2><a class="toc-backref" href="#id34" name="field-lists">2.5 Field Lists</a></h2> <table class="field-list" frame="void" rules="none"> <col class="field-name" /> <col class="field-body" /> @@ -273,7 +272,7 @@ doesn't get stripped away.)</p> </table> </div> <div class="section" id="option-lists"> -<h2><a class="toc-backref" href="#id36" name="option-lists">2.6 Option Lists</a></h2> +<h2><a class="toc-backref" href="#id35" name="option-lists">2.6 Option Lists</a></h2> <p>For listing command-line options:</p> <table class="option-list" frame="void" rules="none"> <col class="option" /> @@ -319,7 +318,7 @@ regardless of where it starts.</p> description.</p> </div> <div class="section" id="literal-blocks"> -<h2><a class="toc-backref" href="#id37" name="literal-blocks">2.7 Literal Blocks</a></h2> +<h2><a class="toc-backref" href="#id36" name="literal-blocks">2.7 Literal Blocks</a></h2> <p>Literal blocks are indicated with a double-colon ("::") at the end of the preceding paragraph (over there <tt class="literal"><span class="pre">--></span></tt>). They can be indented:</p> <pre class="literal-block"> @@ -336,12 +335,66 @@ if literal_block: </pre> </div> <div class="section" id="line-blocks"> -<h2><a class="toc-backref" href="#id38" name="line-blocks">2.8 Line Blocks</a></h2> -<p>(To be inserted from line_blocks.txt once the LaTeX writer has -implemented it.)</p> +<h2><a class="toc-backref" href="#id37" name="line-blocks">2.8 Line Blocks</a></h2> +<p>This section tests line blocks. Line blocks are body elements which +consist of lines and other line blocks. Nested line blocks cause +indentation.</p> +<div class="line-block"> +<div class="line">This is a line block. It ends with a blank line.</div> +<div class="line-block"> +<div class="line">New lines begin with a vertical bar ("|").</div> +<div class="line">Line breaks and initial indent are significant, and preserved.</div> +<div class="line-block"> +<div class="line">Continuation lines are also possible. A long line that is intended +to wrap should begin with a space in place of the vertical bar.</div> +</div> +<div class="line">The left edge of a continuation line need not be aligned with +the left edge of the text above it.</div> +</div> +</div> +<div class="line-block"> +<div class="line">This is a second line block.</div> +<div class="line"><br /></div> +<div class="line">Blank lines are permitted internally, but they must begin with a "|".</div> +</div> +<p>Another line block, surrounded by paragraphs:</p> +<div class="line-block"> +<div class="line">And it's no good waiting by the window</div> +<div class="line">It's no good waiting for the sun</div> +<div class="line">Please believe me, the things you dream of</div> +<div class="line">They don't fall in the lap of no-one</div> +</div> +<p>Take it away, Eric the Orchestra Leader!</p> +<blockquote> +<div class="line-block"> +<div class="line">A one, two, a one two three four</div> +<div class="line"><br /></div> +<div class="line">Half a bee, philosophically,</div> +<div class="line-block"> +<div class="line">must, <em>ipso facto</em>, half not be.</div> +</div> +<div class="line">But half the bee has got to be,</div> +<div class="line-block"> +<div class="line"><em>vis a vis</em> its entity. D'you see?</div> +<div class="line"><br /></div> +</div> +<div class="line">But can a bee be said to be</div> +<div class="line-block"> +<div class="line">or not to be an entire bee,</div> +<div class="line-block"> +<div class="line">when half the bee is not a bee,</div> +<div class="line-block"> +<div class="line">due to some ancient injury?</div> +<div class="line"><br /></div> +</div> +</div> +</div> +<div class="line">Singing...</div> +</div> +</blockquote> </div> <div class="section" id="block-quotes"> -<h2><a class="toc-backref" href="#id39" name="block-quotes">2.9 Block Quotes</a></h2> +<h2><a class="toc-backref" href="#id38" name="block-quotes">2.9 Block Quotes</a></h2> <p>Block quotes consist of indented body elements:</p> <blockquote> <p>My theory by A. Elk. Brackets Miss, brackets. This theory goes @@ -353,7 +406,7 @@ own it, and what it is too.</p> </blockquote> </div> <div class="section" id="doctest-blocks"> -<h2><a class="toc-backref" href="#id40" name="doctest-blocks">2.10 Doctest Blocks</a></h2> +<h2><a class="toc-backref" href="#id39" name="doctest-blocks">2.10 Doctest Blocks</a></h2> <pre class="doctest-block"> >>> print 'Python-specific usage examples; begun with ">>>"' Python-specific usage examples; begun with ">>>" @@ -362,7 +415,7 @@ Python-specific usage examples; begun with ">>>" </pre> </div> <div class="section" id="footnotes"> -<h2><a class="toc-backref" href="#id41" name="footnotes">2.11 Footnotes</a></h2> +<h2><a class="toc-backref" href="#id40" name="footnotes">2.11 Footnotes</a></h2> <table class="footnote" frame="void" id="id6" rules="none"> <colgroup><col class="label" /><col /></colgroup> <tbody valign="top"> @@ -409,12 +462,12 @@ Here's a reference to the next footnote: <a class="footnote-reference" href="#id <colgroup><col class="label" /><col /></colgroup> <tbody valign="top"> <tr><td class="label"><a name="id13">[4]</a></td><td>Here's an unreferenced footnote, with a reference to a -nonexistent footnote: <a href="#id68" name="id69"><span class="problematic" id="id69">[5]_</span></a>.</td></tr> +nonexistent footnote: <a href="#id66" name="id67"><span class="problematic" id="id67">[5]_</span></a>.</td></tr> </tbody> </table> </div> <div class="section" id="citations"> -<h2><a class="toc-backref" href="#id42" name="citations">2.12 Citations</a></h2> +<h2><a class="toc-backref" href="#id41" name="citations">2.12 Citations</a></h2> <table class="citation" frame="void" id="cit2002" rules="none"> <colgroup><col class="label" /><col /></colgroup> <tbody valign="top"> @@ -422,59 +475,59 @@ nonexistent footnote: <a href="#id68" name="id69"><span class="problematic" id=" rendered separately and differently from footnotes.</td></tr> </tbody> </table> -<p>Here's a reference to the above, <a class="citation-reference" href="#cit2002" id="id15" name="id15">[CIT2002]</a>, and a <a href="#id70" name="id71"><span class="problematic" id="id71">[nonexistent]_</span></a> +<p>Here's a reference to the above, <a class="citation-reference" href="#cit2002" id="id15" name="id15">[CIT2002]</a>, and a <a href="#id68" name="id69"><span class="problematic" id="id69">[nonexistent]_</span></a> citation.</p> </div> <div class="section" id="targets"> -<h2><a class="toc-backref" href="#id43" name="targets">2.13 Targets</a></h2> +<h2><a class="toc-backref" href="#id42" name="targets">2.13 Targets</a></h2> <a class="target" id="example" name="example"></a><p>This paragraph is pointed to by the explicit "example" target. A reference can be found under <a class="reference" href="#inline-markup">Inline Markup</a>, above. <a class="reference" href="#inline-hyperlink-targets">Inline hyperlink targets</a> are also possible.</p> <p>Section headers are implicit targets, referred to by name. See <a class="reference" href="#targets">Targets</a>, which is a subsection of <a class="reference" href="#body-elements">Body Elements</a>.</p> <p>Explicit external targets are interpolated into references such as -"<a class="reference" href="http://www.python.org/">Python</a> <a class="footnote-reference" href="#id22" id="id24" name="id24">[5]</a>".</p> +"<a class="reference" href="http://www.python.org/">Python</a> <a class="footnote-reference" href="#id21" id="id23" name="id23">[5]</a>".</p> <p>Targets may be indirect and anonymous. Thus <a class="reference" href="#targets">this phrase</a> may also refer to the <a class="reference" href="#targets">Targets</a> section.</p> -<p>Here's a <a href="#id72" name="id73"><span class="problematic" id="id73">`hyperlink reference without a target`_</span></a>, which generates an +<p>Here's a <a href="#id70" name="id71"><span class="problematic" id="id71">`hyperlink reference without a target`_</span></a>, which generates an error.</p> <div class="section" id="duplicate-target-names"> -<h3><a class="toc-backref" href="#id44" name="duplicate-target-names">2.13.1 Duplicate Target Names</a></h3> +<h3><a class="toc-backref" href="#id43" name="duplicate-target-names">2.13.1 Duplicate Target Names</a></h3> <p>Duplicate names in section headers or other implicit targets will generate "info" (level-1) system messages. Duplicate names in explicit targets will generate "warning" (level-2) system messages.</p> </div> <div class="section" id="id18"> -<h3><a class="toc-backref" href="#id45" name="id18">2.13.2 Duplicate Target Names</a></h3> +<h3><a class="toc-backref" href="#id44" name="id18">2.13.2 Duplicate Target Names</a></h3> <p>Since there are two "Duplicate Target Names" section headers, we cannot uniquely refer to either of them by name. If we try to (like -this: <a href="#id74" name="id75"><span class="problematic" id="id75">`Duplicate Target Names`_</span></a>), an error is generated.</p> +this: <a href="#id72" name="id73"><span class="problematic" id="id73">`Duplicate Target Names`_</span></a>), an error is generated.</p> </div> </div> <div class="section" id="directives"> -<h2><a class="toc-backref" href="#id46" name="directives">2.14 Directives</a></h2> +<h2><a class="toc-backref" href="#id45" name="directives">2.14 Directives</a></h2> <div class="contents topic" id="contents"> <ul class="auto-toc simple"> -<li><a class="reference" href="#document-parts" id="id61" name="id61">2.14.1 Document Parts</a></li> -<li><a class="reference" href="#images" id="id62" name="id62">2.14.2 Images</a></li> -<li><a class="reference" href="#admonitions" id="id63" name="id63">2.14.3 Admonitions</a></li> -<li><a class="reference" href="#topics-sidebars-and-rubrics" id="id64" name="id64">2.14.4 Topics, Sidebars, and Rubrics</a></li> -<li><a class="reference" href="#target-footnotes" id="id65" name="id65">2.14.5 Target Footnotes</a></li> -<li><a class="reference" href="#replacement-text" id="id66" name="id66">2.14.6 Replacement Text</a></li> -<li><a class="reference" href="#compound-paragraph" id="id67" name="id67">2.14.7 Compound Paragraph</a></li> +<li><a class="reference" href="#document-parts" id="id59" name="id59">2.14.1 Document Parts</a></li> +<li><a class="reference" href="#images" id="id60" name="id60">2.14.2 Images</a></li> +<li><a class="reference" href="#admonitions" id="id61" name="id61">2.14.3 Admonitions</a></li> +<li><a class="reference" href="#topics-sidebars-and-rubrics" id="id62" name="id62">2.14.4 Topics, Sidebars, and Rubrics</a></li> +<li><a class="reference" href="#target-footnotes" id="id63" name="id63">2.14.5 Target Footnotes</a></li> +<li><a class="reference" href="#replacement-text" id="id64" name="id64">2.14.6 Replacement Text</a></li> +<li><a class="reference" href="#compound-paragraph" id="id65" name="id65">2.14.7 Compound Paragraph</a></li> </ul> </div> <p>These are just a sample of the many reStructuredText Directives. For others, please see <a class="reference" href="http://docutils.sourceforge.net/docs/ref/rst/directives.html">http://docutils.sourceforge.net/docs/ref/rst/directives.html</a>.</p> <div class="section" id="document-parts"> -<h3><a class="toc-backref" href="#id61" name="document-parts">2.14.1 Document Parts</a></h3> +<h3><a class="toc-backref" href="#id59" name="document-parts">2.14.1 Document Parts</a></h3> <p>An example of the "contents" directive can be seen above this section (a local, untitled table of <a class="reference" href="#contents">contents</a>) and at the beginning of the document (a document-wide <a class="reference" href="#table-of-contents">table of contents</a>).</p> </div> <div class="section" id="images"> -<h3><a class="toc-backref" href="#id62" name="images">2.14.2 Images</a></h3> +<h3><a class="toc-backref" href="#id60" name="images">2.14.2 Images</a></h3> <p>An image directive (also clickable -- a hyperlink reference):</p> <p><a class="reference" href="#directives"><img alt="../../../docs/user/rst/images/title.png" src="../../../docs/user/rst/images/title.png" /></a></p> <p>A figure directive:</p> @@ -504,7 +557,7 @@ document (a document-wide <a class="reference" href="#table-of-contents">table o </div> </div> <div class="section" id="admonitions"> -<h3><a class="toc-backref" href="#id63" name="admonitions">2.14.3 Admonitions</a></h3> +<h3><a class="toc-backref" href="#id61" name="admonitions">2.14.3 Admonitions</a></h3> <div class="attention"> <p class="admonition-title first">Attention!</p> Directives at large.</div> @@ -545,7 +598,7 @@ Reader discretion is strongly advised.</div> </div> </div> <div class="section" id="topics-sidebars-and-rubrics"> -<h3><a class="toc-backref" href="#id64" name="topics-sidebars-and-rubrics">2.14.4 Topics, Sidebars, and Rubrics</a></h3> +<h3><a class="toc-backref" href="#id62" name="topics-sidebars-and-rubrics">2.14.4 Topics, Sidebars, and Rubrics</a></h3> <div class="sidebar"> <p class="sidebar-title first">Sidebar Title</p> <p class="sidebar-subtitle">Optional Subtitle</p> @@ -562,20 +615,20 @@ background color.</p> <p class="rubric">This is a rubric</p> </div> <div class="section" id="target-footnotes"> -<h3><a class="toc-backref" href="#id65" name="target-footnotes">2.14.5 Target Footnotes</a></h3> -<table class="footnote" frame="void" id="id22" rules="none"> +<h3><a class="toc-backref" href="#id63" name="target-footnotes">2.14.5 Target Footnotes</a></h3> +<table class="footnote" frame="void" id="id21" rules="none"> <colgroup><col class="label" /><col /></colgroup> <tbody valign="top"> -<tr><td class="label"><a name="id22">[5]</a></td><td><em>(<a class="fn-backref" href="#id23">1</a>, <a class="fn-backref" href="#id24">2</a>, <a class="fn-backref" href="#id25">3</a>)</em> <a class="reference" href="http://www.python.org/">http://www.python.org/</a></td></tr> +<tr><td class="label"><a name="id21">[5]</a></td><td><em>(<a class="fn-backref" href="#id22">1</a>, <a class="fn-backref" href="#id23">2</a>, <a class="fn-backref" href="#id24">3</a>)</em> <a class="reference" href="http://www.python.org/">http://www.python.org/</a></td></tr> </tbody> </table> </div> <div class="section" id="replacement-text"> -<h3><a class="toc-backref" href="#id66" name="replacement-text">2.14.6 Replacement Text</a></h3> -<p>I recommend you try <a class="reference" href="http://www.python.org/">Python, <em>the</em> best language around</a> <a class="footnote-reference" href="#id22" id="id25" name="id25">[5]</a>.</p> +<h3><a class="toc-backref" href="#id64" name="replacement-text">2.14.6 Replacement Text</a></h3> +<p>I recommend you try <a class="reference" href="http://www.python.org/">Python, <em>the</em> best language around</a> <a class="footnote-reference" href="#id21" id="id24" name="id24">[5]</a>.</p> </div> <div class="section" id="compound-paragraph"> -<h3><a class="toc-backref" href="#id67" name="compound-paragraph">2.14.7 Compound Paragraph</a></h3> +<h3><a class="toc-backref" href="#id65" name="compound-paragraph">2.14.7 Compound Paragraph</a></h3> <div class="some-class compound"> <p>Compound 1, paragraph 1.</p> <p>Compound 1, paragraph 2.</p> @@ -614,12 +667,12 @@ LaTeX, the following paragraphs should all be first-line indented:</p> </div> </div> <div class="section" id="substitution-definitions"> -<h2><a class="toc-backref" href="#id54" name="substitution-definitions">2.15 Substitution Definitions</a></h2> +<h2><a class="toc-backref" href="#id53" name="substitution-definitions">2.15 Substitution Definitions</a></h2> <p>An inline image (<img alt="EXAMPLE" src="../../../docs/user/rst/images/biohazard.png" />) example:</p> <p>(Substitution definitions are not visible in the HTML source.)</p> </div> <div class="section" id="comments"> -<h2><a class="toc-backref" href="#id55" name="comments">2.16 Comments</a></h2> +<h2><a class="toc-backref" href="#id54" name="comments">2.16 Comments</a></h2> <p>Here's one:</p> <!-- Comments begin with two dots and a space. Anything may follow, except for the syntax of footnotes, hyperlink @@ -628,57 +681,8 @@ targets, directives, or substitution definitions. Double-dashes - - "- -" - - must be escaped somehow in HTML output. --> <p>(View the HTML source to see the comment.)</p> </div> -<div class="section" id="id19"> -<h2><a class="toc-backref" href="#id56" name="id19">2.17 Line Blocks</a></h2> -<div class="line-block"> -<div class="line">This is a line block. It ends with a blank line.</div> -<div class="line-block"> -<div class="line">New lines begin with a vertical bar ("|").</div> -<div class="line">Line breaks and initial indent are significant, and preserved.</div> -</div> -<div class="line">Continuation lines are also possible. A long line that is intended -to wrap should begin with a space in place of the vertical bar.</div> -<div class="line-block"> -<div class="line">The left edge of a continuation line need not be aligned with -the left edge of the text above it.</div> -</div> -</div> -<div class="line-block"> -<div class="line">This is a second line block.</div> -<div class="line"><br /></div> -<div class="line">Blank lines are permitted internally, but they must begin with a "|".</div> -</div> -<p>Take it away, Eric the Orchestra Leader!</p> -<blockquote> -<div class="line-block"> -<div class="line">A one, two, a one two three four</div> -<div class="line"><br /></div> -<div class="line">Half a bee, philosophically,</div> -<div class="line-block"> -<div class="line">must, <em>ipso facto</em>, half not be.</div> -</div> -<div class="line">But half the bee has got to be,</div> -<div class="line-block"> -<div class="line"><em>vis a vis</em> its entity. D'you see?</div> -<div class="line"><br /></div> -</div> -<div class="line">But can a bee be said to be</div> -<div class="line-block"> -<div class="line">or not to be an entire bee,</div> -<div class="line-block"> -<div class="line">when half the bee is not a bee,</div> -<div class="line-block"> -<div class="line">due to some ancient injury?</div> -<div class="line"><br /></div> -</div> -</div> -</div> -<div class="line">Singing...</div> -</div> -</blockquote> -</div> <div class="section" id="colspanning-tables"> -<h2><a class="toc-backref" href="#id57" name="colspanning-tables">2.18 Colspanning tables</a></h2> +<h2><a class="toc-backref" href="#id55" name="colspanning-tables">2.17 Colspanning tables</a></h2> <p>This table has a cell spanning two columns:</p> <table border="1" class="table"> <colgroup> @@ -716,7 +720,7 @@ the left edge of the text above it.</div> </table> </div> <div class="section" id="rowspanning-tables"> -<h2><a class="toc-backref" href="#id58" name="rowspanning-tables">2.19 Rowspanning tables</a></h2> +<h2><a class="toc-backref" href="#id56" name="rowspanning-tables">2.18 Rowspanning tables</a></h2> <p>Here's a table with cells spanning several rows:</p> <table border="1" class="table"> <colgroup> @@ -752,7 +756,7 @@ span rows.</td> </table> </div> <div class="section" id="complex-tables"> -<h2><a class="toc-backref" href="#id59" name="complex-tables">2.20 Complex tables</a></h2> +<h2><a class="toc-backref" href="#id57" name="complex-tables">2.19 Complex tables</a></h2> <p>Here's a complex table, which should test all features.</p> <table border="1" class="table"> <colgroup> @@ -802,7 +806,7 @@ empty: <tt class="literal"><span class="pre">--></span></tt></td> </div> </div> <div class="section" id="error-handling"> -<h1><a class="toc-backref" href="#id60" name="error-handling">3 Error Handling</a></h1> +<h1><a class="toc-backref" href="#id58" name="error-handling">3 Error Handling</a></h1> <p>Any errors caught during processing will generate system messages.</p> <p>There should be five messages in the following, auto-generated section, "Docutils System Messages":</p> @@ -810,20 +814,20 @@ section, "Docutils System Messages":</p> </div> <div class="system-messages section"> <h1><a>Docutils System Messages</a></h1> -<div class="system-message" id="id20"> -<p class="system-message-title">System Message: <a name="id20">ERROR/3</a> (<tt>functional/input/data/standard.txt</tt>, line 89); <em><a href="#id21">backlink</a></em></p> +<div class="system-message" id="id19"> +<p class="system-message-title">System Message: <a name="id19">ERROR/3</a> (<tt>functional/input/data/standard.txt</tt>, line 89); <em><a href="#id20">backlink</a></em></p> Undefined substitution referenced: "problematic".</div> -<div class="system-message" id="id68"> -<p class="system-message-title">System Message: <a name="id68">ERROR/3</a> (<tt>functional/input/standalone_rst_html4css1.txt</tt>, line 299); <em><a href="#id69">backlink</a></em></p> +<div class="system-message" id="id66"> +<p class="system-message-title">System Message: <a name="id66">ERROR/3</a> (<tt>functional/input/standalone_rst_html4css1.txt</tt>, line 335); <em><a href="#id67">backlink</a></em></p> Unknown target name: "5".</div> -<div class="system-message" id="id70"> -<p class="system-message-title">System Message: <a name="id70">ERROR/3</a> (<tt>functional/input/data/standard.txt</tt>, line 308); <em><a href="#id71">backlink</a></em></p> +<div class="system-message" id="id68"> +<p class="system-message-title">System Message: <a name="id68">ERROR/3</a> (<tt>functional/input/data/standard.txt</tt>, line 344); <em><a href="#id69">backlink</a></em></p> Unknown target name: "nonexistent".</div> -<div class="system-message" id="id72"> -<p class="system-message-title">System Message: <a name="id72">ERROR/3</a> (<tt>functional/input/data/standard.txt</tt>, line 333); <em><a href="#id73">backlink</a></em></p> +<div class="system-message" id="id70"> +<p class="system-message-title">System Message: <a name="id70">ERROR/3</a> (<tt>functional/input/data/standard.txt</tt>, line 369); <em><a href="#id71">backlink</a></em></p> Unknown target name: "hyperlink reference without a target".</div> -<div class="system-message" id="id74"> -<p class="system-message-title">System Message: <a name="id74">ERROR/3</a> (<tt>functional/input/data/standard.txt</tt>, line 346); <em><a href="#id75">backlink</a></em></p> +<div class="system-message" id="id72"> +<p class="system-message-title">System Message: <a name="id72">ERROR/3</a> (<tt>functional/input/data/standard.txt</tt>, line 382); <em><a href="#id73">backlink</a></em></p> Duplicate target name, cannot be used as a unique reference: "duplicate target names".</div> </div> </div> diff --git a/docutils/test/functional/expected/standalone_rst_latex.tex b/docutils/test/functional/expected/standalone_rst_latex.tex index e003983d3..26ff6957b 100644 --- a/docutils/test/functional/expected/standalone_rst_latex.tex +++ b/docutils/test/functional/expected/standalone_rst_latex.tex @@ -30,6 +30,14 @@ \addtolength{\leftmargin}{\labelsep} \renewcommand{\makelabel}{\optionlistlabel}} }{\end{list}} +\newenvironment{lineblock} +{\begin{list}{} + {\setlength{\partopsep}{\parskip} + \addtolength{\partopsep}{\baselineskip} + \topsep0pt\itemsep0.15\baselineskip\parsep0pt + \leftmargin2em} + \raggedright} +{\end{list}} % begin: floats for footnotes tweaking. \setlength{\floatsep}{0.5em} \setlength{\textfloatsep}{\fill} @@ -572,8 +580,75 @@ Or they can be quoted without indentation: \pdfbookmark[1]{2.8~~~Line Blocks}{line-blocks} \subsection*{2.8~~~Line Blocks} -(To be inserted from line{\_}blocks.txt once the LaTeX writer has -implemented it.) +This section tests line blocks. Line blocks are body elements which +consist of lines and other line blocks. Nested line blocks cause +indentation. + +\begin{lineblock} +\item[] This is a line block. It ends with a blank line. +\item[] +\begin{lineblock} +\item[] New lines begin with a vertical bar (``{\textbar}''). +\item[] Line breaks and initial indent are significant, and preserved. +\item[] +\begin{lineblock} +\item[] Continuation lines are also possible. A long line that is intended +to wrap should begin with a space in place of the vertical bar. +\end{lineblock} +\item[] The left edge of a continuation line need not be aligned with +the left edge of the text above it. +\end{lineblock} +\end{lineblock} + +\begin{lineblock} +\item[] This is a second line block. +\item[] +\item[] Blank lines are permitted internally, but they must begin with a ``{\textbar}''. +\end{lineblock} + +Another line block, surrounded by paragraphs: + +\begin{lineblock} +\item[] And it's no good waiting by the window +\item[] It's no good waiting for the sun +\item[] Please believe me, the things you dream of +\item[] They don't fall in the lap of no-one +\end{lineblock} + +Take it away, Eric the Orchestra Leader! +\begin{quote} + +\begin{lineblock} +\item[] A one, two, a one two three four +\item[] +\item[] Half a bee, philosophically, +\item[] +\begin{lineblock} +\item[] must, \emph{ipso facto}, half not be. +\end{lineblock} +\item[] But half the bee has got to be, +\item[] +\begin{lineblock} +\item[] \emph{vis a vis} its entity. D'you see? +\item[] +\end{lineblock} +\item[] But can a bee be said to be +\item[] +\begin{lineblock} +\item[] or not to be an entire bee, +\item[] +\begin{lineblock} +\item[] when half the bee is not a bee, +\item[] +\begin{lineblock} +\item[] due to some ancient injury? +\item[] +\end{lineblock} +\end{lineblock} +\end{lineblock} +\item[] Singing... +\end{lineblock} +\end{quote} %___________________________________________________________________________ diff --git a/docutils/test/functional/input/data/line_blocks.txt b/docutils/test/functional/input/data/line_blocks.txt deleted file mode 100644 index 092403eda..000000000 --- a/docutils/test/functional/input/data/line_blocks.txt +++ /dev/null @@ -1,30 +0,0 @@ -Line Blocks ------------ - -| This is a line block. It ends with a blank line. -| New lines begin with a vertical bar ("|"). -| Line breaks and initial indent are significant, and preserved. -| Continuation lines are also possible. A long line that is intended - to wrap should begin with a space in place of the vertical bar. -| The left edge of a continuation line need not be aligned with - the left edge of the text above it. - -| This is a second line block. -| -| Blank lines are permitted internally, but they must begin with a "|". - -Take it away, Eric the Orchestra Leader! - - | A one, two, a one two three four - | - | Half a bee, philosophically, - | must, *ipso facto*, half not be. - | But half the bee has got to be, - | *vis a vis* its entity. D'you see? - | - | But can a bee be said to be - | or not to be an entire bee, - | when half the bee is not a bee, - | due to some ancient injury? - | - | Singing... diff --git a/docutils/test/functional/input/data/standard.txt b/docutils/test/functional/input/data/standard.txt index e182a9d91..520d84312 100644 --- a/docutils/test/functional/input/data/standard.txt +++ b/docutils/test/functional/input/data/standard.txt @@ -244,8 +244,44 @@ Or they can be quoted without indentation:: Line Blocks ----------- -(To be inserted from line_blocks.txt once the LaTeX writer has -implemented it.) +This section tests line blocks. Line blocks are body elements which +consist of lines and other line blocks. Nested line blocks cause +indentation. + +| This is a line block. It ends with a blank line. +| New lines begin with a vertical bar ("|"). +| Line breaks and initial indent are significant, and preserved. +| Continuation lines are also possible. A long line that is intended + to wrap should begin with a space in place of the vertical bar. +| The left edge of a continuation line need not be aligned with + the left edge of the text above it. + +| This is a second line block. +| +| Blank lines are permitted internally, but they must begin with a "|". + +Another line block, surrounded by paragraphs: + +| And it's no good waiting by the window +| It's no good waiting for the sun +| Please believe me, the things you dream of +| They don't fall in the lap of no-one + +Take it away, Eric the Orchestra Leader! + + | A one, two, a one two three four + | + | Half a bee, philosophically, + | must, *ipso facto*, half not be. + | But half the bee has got to be, + | *vis a vis* its entity. D'you see? + | + | But can a bee be said to be + | or not to be an entire bee, + | when half the bee is not a bee, + | due to some ancient injury? + | + | Singing... Block Quotes ------------ diff --git a/docutils/test/functional/input/standalone_rst_html4css1.txt b/docutils/test/functional/input/standalone_rst_html4css1.txt index b0a5eec04..68f9de864 100644 --- a/docutils/test/functional/input/standalone_rst_html4css1.txt +++ b/docutils/test/functional/input/standalone_rst_html4css1.txt @@ -1,5 +1,4 @@ .. include:: data/standard.txt -.. include:: data/line_blocks.txt .. include:: data/table_colspan.txt .. include:: data/table_rowspan.txt .. include:: data/table_complex.txt |
