[Doc-SIG] reST block quotes

fantasai fantasai@escape.com
Sat, 14 Dec 2002 15:11:55 -0500


David Goodger wrote:
 > fantasai wrote:
 >>
 >>The [blockquote] syntax relies exclusively on indentation.
 >>
 >>This means one can't use indentation for other things--like
 >>indenting sections to make the document structure easier to grasp.
 >
 > Not true.  Indentation is used in many local contexts, such as list
 > items.  In the documentation philosophy embodied in reStructuredText,
 > section structure through indentation is a *misfeature*.  See "Section
 > Structure via Indentation" in
 > <http://docutils.sf.net/spec/rst/problems.html>, and "Questions &
 > Answers", item 3, in <http://docutils.sf.net/spec/pep-0258.html>.

I *know* that, and that's why I'm particularly glad reST
doesn't use indentation for structure like STX does. But
because of the blockquote syntax, it doesn't let me use
indentation as text formatting. Document structure is
easier to see if the sections are indented. I would like
to be able to indent sections of reST without triggering
*any* markup construct.

 >>The other problem is that attributions don't seem to
 >>be recognized. It would be nice to put uris in HTML's
 >>'cite' attribute and mark up just regular attributions
 >>as such.
 >>
 >>  | An Attribution identifies the source to whom a
 >>  | BlockQuote or Epigraph is ascribed.
 >>
 >>  -- http://www.docbook.org/tdg/en/html/attribution.html
 >
 >
 > I don't see this as a problem either.  It's new functionality.

I apologize for my inappropriate use of English vocabulary.

  > What would the result look like?

<blockquote cite="http://www.docbook.org/tdg/en/html/attribution.html">
    An Attribution identifies the source to whom a BlockQuote
    or Epigraph is ascribed.
</blockquote>

 >>An option could require the pipe quoting or another
 >>symbol (e.g. '>') and just treat indented blocks as
 >>regular text.
 >>
 > I think this may be an appropriate use of a directive.

Think what may be an appropriate use of a directive?
Attribution recognition or quoted blockquote recognition
or not recognizing purely indented blocks as blockquotes?

 > Please flesh out the spec more.

    An indented block in which each line begins with the
    same sequence of spaces+(>, |, #) is recognized as
    a blockquote.

    It may be optionally followed by blank lines and an
    attribution.

    The attribution begins with two dashes and a space
    (-- ) which must be indented at least to the preceding
    blockquote's quote character.

    The attribution may be multiple lines, but must be indented
    at least three spaces from the first dash.

     # quoted text
     # quoted text

     -- attribution attribution
        attribution attribution

    If a line in the attribution consists entirely of
    opening and closing angle brackets with a sequence of
    URI characters in between, the line is taken out of
    the attribution text and the URI sequence is put in
    the blockquote's 'cite' attribute.

    All other attribution content is parsed as inline
    content and placed in the attribution element, which
    is a child of the blockquote. In HTML, the attribution
    corresponds to

    <address class="attribution">attribution text</address>

So, this:

   | An Attribution identifies the source to whom a
   | BlockQuote or Epigraph is ascribed.

   -- DocBook: The Definitive Guide
      <http://www.docbook.org/tdg/en/html/attribution.html>

would result in this:

<blockquote cite="http://www.docbook.org/tdg/en/html/attribution.html">
    An Attribution identifies the source to whom a BlockQuote
    or Epigraph is ascribed.
    <address class="attribution">DocBook: The Definitive Guide</address>
</blockquote>