<?xml version="1.0" encoding="UTF-8"?>
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns="http://purl.org/rss/1.0/" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:syn="http://purl.org/rss/1.0/modules/syndication/" xmlns:admin="http://webns.net/mvcb/">
  <channel rdf:about="http://blog.gmane.org/gmane.text.docutils.user">
    <title>gmane.text.docutils.user</title>
    <link>http://blog.gmane.org/gmane.text.docutils.user</link>
    <description/>
    <syn:updatePeriod>hourly</syn:updatePeriod>
    <syn:updateFrequency>1</syn:updateFrequency>
    <syn:updateBase>1901-01-01T00:00+00:00</syn:updateBase>
    <items>
      <rdf:Seq>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.text.docutils.user/6711"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.text.docutils.user/6710"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.text.docutils.user/6709"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.text.docutils.user/6706"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.text.docutils.user/6701"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.text.docutils.user/6692"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.text.docutils.user/6688"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.text.docutils.user/6685"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.text.docutils.user/6676"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.text.docutils.user/6673"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.text.docutils.user/6668"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.text.docutils.user/6665"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.text.docutils.user/6656"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.text.docutils.user/6653"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.text.docutils.user/6645"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.text.docutils.user/6644"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.text.docutils.user/6642"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.text.docutils.user/6635"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.text.docutils.user/6634"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.text.docutils.user/6633"/>
      </rdf:Seq>
    </items>
    <image rdf:resource="http://gmane.org/img/gmane-25t.png"/>
    <textinput rdf:resource=""/>
  </channel>
  <image rdf:about="http://gmane.org/img/gmane-25t.png">
    <title>Gmane</title>
    <url>http://gmane.org/img/gmane-25t.png</url>
    <link>http://gmane.org</link>
  </image>
  <item rdf:about="http://comments.gmane.org/gmane.text.docutils.user/6711">
    <title>Extra directories for python 3</title>
    <link>http://comments.gmane.org/gmane.text.docutils.user/6711</link>
    <description>&lt;pre&gt;When compiling docutils 9 for python 3 I get the same directories I get with
python 2:

{root}/{prefix}/bin/
{root}/{prefix}/{site-packages}/docutils/

However, I also extra directories that are not present in the python 2 version.
 These are:

{root}/{prefix}/{site-packages}/test/
{root}/{prefix}/{site-packages}/tools/

Are these directories supposed to be here?  If so, can they be safely removed or
moved into the {root}/{prefix}/{site-packages}/docutils/ directory?  These are
fairly generic and uninformative names and I fear they may conflict with other
python packages.


------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
&lt;/pre&gt;</description>
    <dc:creator>Todd</dc:creator>
    <dc:date>2012-05-14T12:58:41</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.text.docutils.user/6710">
    <title>Style guide for documentation</title>
    <link>http://comments.gmane.org/gmane.text.docutils.user/6710</link>
    <description>&lt;pre&gt;Hi,

I am posting this message on docutils-users, sphinx-dev and doc-sig
mailing lists:

* &amp;lt; at &amp;gt;docutils-users, it's a proposal about some "restrictive"
  reStructuredText subset;
* &amp;lt; at &amp;gt;sphinx-dev, it's about Sphinx usage, i.e. best practices;
* &amp;lt; at &amp;gt;doc-sig, I wonder if it could be a PEP for documentation of Python
  packages.


I started to write down conventions for Sphinx-based documentations at
https://github.com/benoitbryon/documentation-style-guide-sphinx

I'd like to share this work, and I also need feedback.
I guess it could be compared to PEP-8, as a "style guide", but applied
to Sphinx-based documentations.
Python code can be valid even if it doesn't follow PEP-8; but Python
code should follow PEP-8 because it's the convention (and de facto 
best
practice).

More explanations below.


Story
=====

As a developer, I started using Sphinx five years ago. I contributed 
to
documentation of public or private projects using Sphinx. I also 
worked
in several teams with different background:

* private projects with Python developers working in the same company:

  * Python projects
  * PHP projects (yes, Sphinx is great to document a project, even if
    is not a Python project)

* public projects, with people I didn't know before.


I feel we lack some restrictive convention:

* in each team, RST usage differ. As an example, one team choose .rst
  extension (sphinx-quickstart's default), whereas another choose .txt
  (docutils recommendation).
* often, RST usage differ within documents of a project, depending on
  the original author: one developer uses "=" for first level of 
sections
  whereas another uses "-" symbol.
* and many more use cases...
* as a new contributor, when I joined a project or team, I spent too 
much
  time discovering conventions of the project. About documentation, I
  had to read current project's documentation, and often there was no
  convention at all.
* when I tried to propose conventions in a team, we had discussions.
  Again it's time we'd better spend on development than on discussion.
  I mean it's important to discuss and to share vision, but for this
  particular topic we should have used an existing convention, we
  shouldn't have asked.
* when I proposed the convention from one team to another, we 
discussed
  it again. With other argues, and potentially a different convention 
at
  the end :'(

That's why I started to write down conventions in a collaborative 
place,
so that every team can use it, reference it and contribute to it:

https://github.com/benoitbryon/documentation-style-guide-sphinx


Key features
============

* more restrictive than reStructuredText: as told by the Zen of 
Python,
  "There should be one-- and preferably only one --obvious way to do 
it."
* focus on use case: Sphinx-based documentation for a project.
  As an example, use Sphinx's specific directives.
* provide more than just syntax. As an example, recommend usage of
  target-notes directive at the end of a document, instead of using
  inline hyperlinks.


Feedback required
=================

* I wonder whether such conventions already exist or not.
* I wonder whether I should maintain a standalone convention or 
contribute
  to Docutils, Sphinx or even Python via a PEP... In fact, I guess I'd
  rather contribute, but I am not sure...

  * maybe reStructuredText documentation could include some of the
    proposed conventions as recommendations, so that users naturally
    use these conventions.
  * maybe Sphinx documentation could recommend some points in its
    reStructuredText primer.
  * maybe a PEP could recommend every Python developer to follow some
    style guide when they write Sphinx documents.
  * ... other suggestions are welcome!

* if you are interested in the project, use it or open issues!


Regards,

--
Benoit Bryon


------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
&lt;/pre&gt;</description>
    <dc:creator>Benoît Bryon</dc:creator>
    <dc:date>2012-05-13T15:22:25</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.text.docutils.user/6709">
    <title>s5: logo on slides</title>
    <link>http://comments.gmane.org/gmane.text.docutils.user/6709</link>
    <description>&lt;pre&gt;Hi all.
Is there a template to produce slides with a small logo on top left?
We changed the CSS, but we found it difficult to produce a clean result.
In general, I think this is a very general requirement: perhaps better adding it as a
default in the standard template?
Thanks a lot.
&lt;/pre&gt;</description>
    <dc:creator>Paolo Cavallini</dc:creator>
    <dc:date>2012-05-12T05:16:01</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.text.docutils.user/6706">
    <title>rst2s5</title>
    <link>http://comments.gmane.org/gmane.text.docutils.user/6706</link>
    <description>&lt;pre&gt;Hi all.
I'm just starting with rst and s5, so please forgive my ignorance.
Why this slide:

I comandi di GRASS
--------------------
- Centinaia di comandi
   - Ognuno con numerose opzioni
- r.*= comandi per i raster
- v.*= comandi per i vettori

Appears as:

&amp;lt;div class="slide" id="i-comandi-di-grass"&amp;gt;
&amp;lt;h1&amp;gt;I comandi di GRASS&amp;lt;/h1&amp;gt;
&amp;lt;ul&amp;gt;
&amp;lt;li&amp;gt;&amp;lt;dl class="first docutils"&amp;gt;

&amp;lt;dt&amp;gt;Centinaia di comandi&amp;lt;/dt&amp;gt;
&amp;lt;dd&amp;gt;&amp;lt;ul class="first last simple"&amp;gt;
&amp;lt;li&amp;gt;Ognuno con numerose opzioni&amp;lt;/li&amp;gt;
&amp;lt;/ul&amp;gt;
&amp;lt;/dd&amp;gt;
&amp;lt;/dl&amp;gt;
&amp;lt;/li&amp;gt;
&amp;lt;li&amp;gt;&amp;lt;p class="first"&amp;gt;r.*= comandi per i raster&amp;lt;/p&amp;gt;
&amp;lt;/li&amp;gt;
&amp;lt;li&amp;gt;&amp;lt;p class="first"&amp;gt;v.*= comandi per i vettori&amp;lt;/p&amp;gt;
&amp;lt;/li&amp;gt;
&amp;lt;/ul&amp;gt;
&amp;lt;/div&amp;gt;

i.e., with unnecessary &amp;lt;/p&amp;gt; ?
Does this depend from the fact that there is a sublist?
Is it possible to avoid this unnecessary spacing (without editing the html, obviously)?
Thanks.
&lt;/pre&gt;</description>
    <dc:creator>Paolo Cavallini</dc:creator>
    <dc:date>2012-05-09T18:02:56</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.text.docutils.user/6701">
    <title>Unable to get syntax highlight with new codedirective in LaTeX</title>
    <link>http://comments.gmane.org/gmane.text.docutils.user/6701</link>
    <description>&lt;pre&gt;Hello everyone, I just read the other day the release notes of the 0.9
version and decided to test the new code directive and role [1].

My problem is that, though I have Pygments installed and the code seems to
be well parsed, I can't get it colored when I export to LaTeX using
rst2latex.

If I export to HTML, I can then do

    pygmentize -f html -S trac &amp;gt; style.css

add the stylesheet to the generated .html file and there I have the colors.
On the other hand, I cannot figure out how to do this with LaTeX.

I stumbled upon an old document on the sandbox mentioning rst2html-pygments
and rst2latex-pygments [2], which seems to be exactly what I want, but
these scripts are not included in the main distribution.

Any help?

[1]: http://docutils.sourceforge.net/docs/ref/rst/directives.html#code
[2]:
http://docutils.sourceforge.net/sandbox/code-block-directive/tools/pygments-enhanced-front-ends/
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/&lt;/pre&gt;</description>
    <dc:creator>Juan Luis Cano Rodríguez</dc:creator>
    <dc:date>2012-05-05T18:00:06</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.text.docutils.user/6692">
    <title>how to use latex section levels</title>
    <link>http://comments.gmane.org/gmane.text.docutils.user/6692</link>
    <description>&lt;pre&gt;Hi,

rst2latx gives me chapter* for all my section headings,
how do i affect the level

what i really need is chapter vs section vs subsection

&lt;/pre&gt;</description>
    <dc:creator>Ronny Pfannschmidt</dc:creator>
    <dc:date>2012-05-05T14:26:21</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.text.docutils.user/6688">
    <title>how to propperly handle custom directives that generate images from text</title>
    <link>http://comments.gmane.org/gmane.text.docutils.user/6688</link>
    <description>&lt;pre&gt;hi,

for my needs of explaining various flows,
i want to include something like blockdiag into 
rst2latex/rst2pdf/rst2html output

however i dont exactly see where i would get started with that

&lt;/pre&gt;</description>
    <dc:creator>Ronny Pfannschmidt</dc:creator>
    <dc:date>2012-05-04T14:36:43</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.text.docutils.user/6685">
    <title>Reporting errors</title>
    <link>http://comments.gmane.org/gmane.text.docutils.user/6685</link>
    <description>&lt;pre&gt;Hi,

I am now reporting errors with Docutils.

Python version = 3.2
OS = windows 7 professional, pack 1

The errors I am reporting are concerning:
     -- rst2odt.py
     -- buildhtlm.py

Please take a look at the four PNG files (here appended) to see the 
command line I have used to call these two scripts.

The scripts rst2html.py  and  rst2xml.py  seem to work well.

Regards

Constant Deniger

&lt;/pre&gt;</description>
    <dc:creator>Constant Deniger</dc:creator>
    <dc:date>2012-05-03T17:41:15</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.text.docutils.user/6676">
    <title>hackable repo?</title>
    <link>http://comments.gmane.org/gmane.text.docutils.user/6676</link>
    <description>&lt;pre&gt;is there any official git/hg mirror of docutils one can use for hacking?

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
&lt;/pre&gt;</description>
    <dc:creator>Ronny Pfannschmidt</dc:creator>
    <dc:date>2012-05-02T15:21:12</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.text.docutils.user/6673">
    <title>rst2html, with Python 3: TypeError: can't concat bytes to str</title>
    <link>http://comments.gmane.org/gmane.text.docutils.user/6673</link>
    <description>&lt;pre&gt;Running ``rst2html --math-output=HTML`` (that parameter is important) with


------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
&lt;/pre&gt;</description>
    <dc:creator>spider-mario</dc:creator>
    <dc:date>2012-05-02T00:18:53</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.text.docutils.user/6668">
    <title>how to incorporate a new role into distutils</title>
    <link>http://comments.gmane.org/gmane.text.docutils.user/6668</link>
    <description>&lt;pre&gt;Hi,

I have been playing with docutils and I have created a new role
:chem:, to process subscripts and superscripts for chemical formula
(i.e. :chem: or :ch:`Al2O3` == Al&amp;lt;sub&amp;gt;2&amp;lt;/sub&amp;gt;O&amp;lt;sub&amp;gt;3&amp;lt;/sub&amp;gt;).

It worked, and now I have it running in my local copy. However, I
still have a couple of questions:

1) So far I have included it in my local copy of roles.py. Is there
any other way of loading custom roles / add-ons to distutils that does
not involve modifying roles.py? (like a local directory where custom
roles could be added/imported into distutils?).
2) Is nodes.Text the standard way of returning a text node?
3) Can roles be made to work recursively? In other words, am I missing
a simple way of calling a role within a role (i.e. so that I can
expand Al2O3 into "Al :subs:`2`\ O:subs:`3`\ " and that magically
everything is taken care of)?.
4) Is a role the best way of doing this? Should I be using a directive
instead, or is it an overkill?

Many thanks,

ay

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
&lt;/pre&gt;</description>
    <dc:creator>Angel Yanguas-Gil</dc:creator>
    <dc:date>2012-04-30T04:45:42</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.text.docutils.user/6665">
    <title>Align attribute for list-table and csv-table</title>
    <link>http://comments.gmane.org/gmane.text.docutils.user/6665</link>
    <description>&lt;pre&gt;
Dear developers,

wouldn't it be nice if the list-table and csv-table directives have had an
":align:" attribute (much as like as the figure directive)?

http://docutils.sourceforge.net/docs/ref/rst/directives.html#figure

Would it take (too) much effort to accomplish this?


Greetings and thanks in advance,

Bernhard


------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/&lt;/pre&gt;</description>
    <dc:creator>Bernhard Grotz</dc:creator>
    <dc:date>2012-04-29T01:33:45</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.text.docutils.user/6656">
    <title>0.9/syntax highlighting timeframe?</title>
    <link>http://comments.gmane.org/gmane.text.docutils.user/6656</link>
    <description>&lt;pre&gt;Not a subscriber - please cc me

Curious about when 0.9 with the new "code" block and pygments syntax highlighting might be officially released?

Thought that after it's out, maybe GitHub might adopt it for their rst rendering. 

-Marc
http://marc-abramowitz.com
Sent from my iPhone 4


------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
&lt;/pre&gt;</description>
    <dc:creator>Marc Abramowitz</dc:creator>
    <dc:date>2012-04-26T16:29:10</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.text.docutils.user/6653">
    <title>composing abstract sections for tex</title>
    <link>http://comments.gmane.org/gmane.text.docutils.user/6653</link>
    <description>&lt;pre&gt;Hi,

for my thesis i want to use/create more more than one abstract section,
currently i don't see a nice way to create/add abstract sections in a 
natural way

the abstract docinfo fields doesnt really fit my needs

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
&lt;/pre&gt;</description>
    <dc:creator>Ronny Pfannschmidt</dc:creator>
    <dc:date>2012-04-26T13:49:25</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.text.docutils.user/6645">
    <title>Small text on s5?</title>
    <link>http://comments.gmane.org/gmane.text.docutils.user/6645</link>
    <description>&lt;pre&gt;Hi all.
I have found only one way of having smaller text on a slide, i.e. the
:tiny:`text` directive, but this is ugly if I want all or most of the text on a
slide smaller. In fact, lists and bullets are not well supported,and the
directive must be repeated for each line.
Is there a better way?
Thanks a lot.


------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
&lt;/pre&gt;</description>
    <dc:creator>Paolo Cavallini</dc:creator>
    <dc:date>2012-04-25T15:16:33</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.text.docutils.user/6644">
    <title>generating text fragments for use with input/include in a larger latex document</title>
    <link>http://comments.gmane.org/gmane.text.docutils.user/6644</link>
    <description>&lt;pre&gt;Hi,

for my thesis,
i would like to write most of the text with restructuredtext,

however for the added quality, i'd like to do things like the titlepage 
and some basic style stuff and the document structure in normal latex, 
and just include the generated fragments.

what would be the best/canonical way to do that?

Note that i already looked into generating the whole thesis from 
restructuredtext, but that turned out impractical and/or too low in quality

&lt;/pre&gt;</description>
    <dc:creator>Ronny Pfannschmidt</dc:creator>
    <dc:date>2012-04-25T17:36:25</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.text.docutils.user/6642">
    <title>rst2pdf backtrace</title>
    <link>http://comments.gmane.org/gmane.text.docutils.user/6642</link>
    <description>&lt;pre&gt;I have a large rst file [1] that is accepted by 'rst2html --strict', but which
fails with 'rst2pdf':

rst2pdf -o /tmp/upstart_cookbook.pdf /tmp/upstart_cookbook.rst
Traceback (most recent call last):
  File "/usr/bin/rst2pdf", line 9, in &amp;lt;module&amp;gt;
    load_entry_point('rst2pdf==0.16', 'console_scripts', 'rst2pdf')()
  File "/usr/lib/pymodules/python2.7/rst2pdf/createpdf.py", line 1456, in main
    compressed=options.compressed)
  File "/usr/lib/pymodules/python2.7/rst2pdf/createpdf.py", line 666, in createPdf
    pdfdoc.multiBuild(elements)
  File "/usr/lib/python2.7/dist-packages/reportlab/platypus/doctemplate.py",
line 960, in multiBuild
    self.build(tempStory, **buildKwds)
  File "/usr/lib/python2.7/dist-packages/reportlab/platypus/doctemplate.py",
line 880, in build
    self.handle_flowable(flowables)
  File "/usr/lib/pymodules/python2.7/rst2pdf/createpdf.py", line 774, in
handle_flowable
    if frame.add(f, canv, trySplit=self.allowSplitting):
  File "/usr/lib/pymodules/python2.7/rst2pdf/flowables.py", line 555, in add
    return Frame.add(self, flowable, canv, trySplit)
  File "/usr/lib/python2.7/dist-packages/reportlab/platypus/frames.py", line
159, in _add
    w, h = flowable.wrap(aW, h)
  File "/usr/lib/pymodules/python2.7/rst2pdf/flowables.py", line 233, in wrap
    return self.t.wrap(w, h)
  File "/usr/lib/python2.7/dist-packages/reportlab/platypus/tables.py", line
1113, in wrap
    self._calc(availWidth, availHeight)
  File "/usr/lib/python2.7/dist-packages/reportlab/platypus/tables.py", line
587, in _calc
    self._calc_height(availHeight,availWidth,W=W)
  File "/usr/lib/python2.7/dist-packages/reportlab/platypus/tables.py", line
553, in _calc_height
    spanFixDim(H0,H,spanCons,lim=hmax)
  File "/usr/lib/python2.7/dist-packages/reportlab/platypus/tables.py", line
205, in spanFixDim
    t = sum([V[x]+M.get(x,0) for x in xrange(x0,x1)])
TypeError: unsupported operand type(s) for +: 'NoneType' and 'int'

$ dpkg -l |grep docutils|awk '{print $2, $3}'
docutils-common 0.8.1-4ubuntu1
docutils-doc 0.8.1-4ubuntu1
python-docutils 0.8.1-4ubuntu1
$ 

I've tried adjusting my table widths, but to no avail.

Regards,

James

[1] -
http://bazaar.launchpad.net/~upstart-documenters/upstart-cookbook/trunk/view/head:/upstart_cookbook.rst


------------------------------------------------------------------------------
Better than sec? Nothing is better than sec when it comes to
monitoring Big Data applications. Try Boundary one-second 
resolution app monitoring today. Free.
http://p.sf.net/sfu/Boundary-dev2dev
&lt;/pre&gt;</description>
    <dc:creator>James Hunt</dc:creator>
    <dc:date>2012-04-18T14:53:00</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.text.docutils.user/6635">
    <title>Problem with rstdiff.py and multiple 'rawsource'keys</title>
    <link>http://comments.gmane.org/gmane.text.docutils.user/6635</link>
    <description>&lt;pre&gt;When I run rstdiff.py using Docutils 0.8.1, I get the following error:

system_message: children=()
Traceback (most recent call last):
  File "/usr/bin/rstdiff.py", line 1142, in &amp;lt;module&amp;gt;
    diffDoc = createDiff(pub, oldTree, newTree)
  File "/usr/bin/rstdiff.py", line 1127, in createDiff
    buildTree(dispatcher, diffDoc, opcode.getSubOpcodes(), oldTree, newTree)
  File "/usr/bin/rstdiff.py", line 983, in buildTree
    subOpcodes, oldRange[0], newRange[0])
  File "/usr/bin/rstdiff.py", line 983, in buildTree
    subOpcodes, oldRange[0], newRange[0])
  File "/usr/bin/rstdiff.py", line 983, in buildTree
    subOpcodes, oldRange[0], newRange[0])
  File "/usr/bin/rstdiff.py", line 983, in buildTree
    subOpcodes, oldRange[0], newRange[0])
  File "/usr/bin/rstdiff.py", line 983, in buildTree
    subOpcodes, oldRange[0], newRange[0])
  File "/usr/bin/rstdiff.py", line 983, in buildTree
    subOpcodes, oldRange[0], newRange[0])
  File "/usr/bin/rstdiff.py", line 986, in buildTree
    command, oldRange, newRange)
  File "/usr/bin/rstdiff.py", line 603, in mergeChildren
    for newChild in self.copyRange(srcRoot, srcRange, newType):
  File "/usr/bin/rstdiff.py", line 583, in copyRange
    root, newType))
  File "/usr/bin/rstdiff.py", line 561, in copyChildren
    return self.dispatchClass('copyChildren', head, tail, root, newType)
  File "/usr/bin/rstdiff.py", line 457, in dispatchClass
    result = method(node, *args)
  File "/usr/bin/rstdiff.py", line 565, in copyChildren_UNKNOWN
    for child in [ head, ] + tail ]
  File "/usr/bin/rstdiff.py", line 552, in copyChild
    return self.dispatchClass('copyChild', node, newType)
  File "/usr/bin/rstdiff.py", line 457, in dispatchClass
    result = method(node, *args)
  File "/usr/bin/rstdiff.py", line 555, in copyChild_UNKNOWN
    return self.setNewType(node.deepcopy(), newType)
  File "/usr/lib/python2.6/site-packages/docutils-0.8.1-
py2.6.egg/docutils/nodes.py", line 745, in deepcopy
    copy = self.copy()
  File "/usr/lib/python2.6/site-packages/docutils-0.8.1-
py2.6.egg/docutils/nodes.py", line 742, in copy
    return self.__class__(rawsource=self.rawsource, **self.attributes)
  File "/usr/lib/python2.6/site-packages/docutils-0.8.1-
py2.6.egg/docutils/nodes.py", line 1397, in __init__
    Element.__init__(self, '', *children, **attributes)
TypeError: __init__() got multiple values for keyword argument 'rawsource'

I've tried mucking with nodes.py to see if I could get the keyword arguments in 
self.attributes to exclude any 'rawsource' keys but it didn't work.  So now I'm 
stymied.  Any help would be greatly appreciated!


------------------------------------------------------------------------------
For Developers, A Lot Can Happen In A Second.
Boundary is the first to Know...and Tell You.
Monitor Your Applications in Ultra-Fine Resolution. Try it FREE!
http://p.sf.net/sfu/Boundary-d2dvs2
&lt;/pre&gt;</description>
    <dc:creator>Jeffrey C. "TimeHorse" Jacobs</dc:creator>
    <dc:date>2012-04-06T19:29:23</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.text.docutils.user/6634">
    <title>Warning info of compiling svn rst.el and two filesfor rst-mode</title>
    <link>http://comments.gmane.org/gmane.text.docutils.user/6634</link>
    <description>&lt;pre&gt;Hi, Stefan, Stefan, Stefan, and everyone,

The latest rst.el file in svn generates some warnings when compiling. I append those warnings in the
  end of the email.

I find my codes of inserting list are included. I write those codes many year age without any
consideration. Now I find the name of those function should be changed from "insert-list" to "list-insert"
to be compatible with other functions' name.

I also patched codes of inserting directives, options, hyperlinks, footnotes, and citations year ago.
I modified those codes and put them in separate files now.

- The rst-directives.el, which I use everyday, contains functions for inserting directives and options.

   - The function 'rst-directive-insert' can be used to insert directive.
   - The function 'rst-directive-option-insert' can be used to insert option for existed directive.
   - Some settings for Sphinx directives also included in the rst-directives.el file. You can see how to add
     your own directives.
   - The rst-directives.el is self-contained. I want to use some functionalities in the svn rst.el, such indent
      definitions, but I cannot understand, then I do nothing.

- The rst-links.el is for supporting links, footnotes, and citation. It's also self-contained. I rarely use it,
   so it quite primitive.

Those two files are attached. Hope those files is helpful. If you think those codes are fine, you can include
them in the rst.el and do any change you want.

Best wishes,
Wei-Wei

The following is the warning information generated by compiling the svn rst.el with Eamcs 23.4.
====================
In toplevel form:
rst.el:106:1:Warning: cl package required at runtime

In rst-re:
rst.el:460:31:Warning: reference to free variable `rst-re-alist'
rst.el:461:16:Warning: `char-valid-p' is an obsolete function (as of Emacs  23.1); use `characterp' instead.
rst.el:483:11:Warning: attempt to let-bind constant `rst-re-alist'
rst.el:491:5:Warning: variable assignment to constant `rst-re-alist'

In rst-mode:
rst.el:734:30:Warning: assignment to free variable `comment-continue'
rst.el:749:9:Warning: assignment to free variable `comment-region-function'
rst.el:751:9:Warning: assignment to free variable `uncomment-region-function'

In rst-reset-section-caches:
rst.el:1206:9:Warning: assignment to free variable `rst-all-sections'
rst.el:1207:9:Warning: assignment to free variable `rst-section-hierarchy'

In rst-toc-insert:
rst.el:2282:36:Warning: `delete-backward-char' used from Lisp code
That command is designed for interactive use only

In rst-font-lock-extend-region:
rst.el:3510:50:Warning: reference to free variable `font-lock-beg'
rst.el:3510:64:Warning: reference to free variable `font-lock-end'
rst.el:3512:13:Warning: assignment to free variable `font-lock-beg'
rst.el:3513:13:Warning: assignment to free variable `font-lock-end'

In end of data:
rst.el:3944:1:Warning: the function `comment-string-strip' is not known to be   defined.



;;; rst-directives.el --- Build Sphinx projects.

;; Copyright (C) 2012 Wei-Wei Guo.

;; Author: Wei-Wei Guo &amp;lt;wwguocn at gmail dot com&amp;gt;
;; Version: 0.1
;;
;; This file is published under the GNU Gerneral Public License,
;; see &amp;lt;http://www.gnu.org/licenses/&amp;gt;.
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;
;;; Commentary:

;; This file provides funcationalities for Emacs rst-mode.


(defgroup rst-directive nil
  "Functions supporting of directives with \\[rst-directives]."
  :group 'rst
  :version "23.0")


(defun rst-directive-direct-format (type &amp;amp;optional argument)
  "Insert the first line of directive"
  (insert (concat ".. " type ":: " argument))
  (newline-and-indent))

(defun rst-directive-option-format (option &amp;amp;optional value)
  "Insert an option line of directive"
  (insert (concat ":" option ": " value)))

(defun rst-directive-option-insert ()
  "Insert a directive option."
  (interactive)
  (let (option value)
    (save-excursion
      (re-search-backward "\\.\\. \\(\\w+\\)\\|\\(\\w+-\\w+\\)::")
      (setq option (read-string "Providing directive option: "))
      (setq value (read-string "Providing option value: "))
      (end-of-line)
      (newline-and-indent)
      (insert "   ")
      (rst-directive-option-format option value))))

(defun rst-directive-option (optalist)
  "Insert directive options in directive inserting function."
  (let (optlist option type value)
    (setq optlist (mapcar 'car optalist))
    (setq option (completing-read "Providing option: " optlist))
    (setq type (car (cdr (assoc option optalist))))
    (setq value
          (cond 
           ((equal type "flag") nil)
           ((equal type "option") (completing-read 
                                   "Providing optional value: " 
                                   (cadr (cdr (assoc option optalist)))))
           ((equal type "number") (number-to-string 
                                   (read-number "Providing numeric value: ")))
           ((equal type "string") (read-string "Providing value: "))))
    (rst-directive-option-format option value)
    (newline-and-indent)))

(defun rst-directive-insert ()
  "Meta-function of all directives."
  (interactive)
  (let (type optlist content optnum)
    (setq type (completing-read "Providing directive type: " rst-directive-types))
    (funcall (cdr (assoc type rst-directive-type-alist)))
    (setq optlist (eval (car (cdr (assoc type rst-directive-option-list)))))
    (setq content (eval (cadr (cdr (assoc type rst-directive-option-list)))))
    (if (or optlist content)
        (progn
        (insert "   ")
        (if optlist
            (while (y-or-n-p "Set directive option(s)? ")
              (rst-directive-option optlist)
              (setq optnum 't)))
        (newline-and-indent)
        (if (and (not optnum) content)
            (insert "   "))
        (if (and optnum (not content))
            (progn
              (newline-and-indent)
              (delete-indentation))))
      (newline))))

;;======= Functions for adding directives by user =======

(defun rst-directive-add-type (type directfunc optalist content)
  "Adding new directive to directive alist and completion list.

Use the following way to add directive type.

  (rst-directive-add-type \"definition\" 
                          'rst-directive-insert-definition
                          'rst-directive-options 
                          'content-presence-boolean)
"
  (add-to-list 'rst-directive-types type)
  (add-to-list 'rst-directive-type-alist (cons type directfunc))
  (add-to-list 'rst-directive-option-list (list type optalist content)))

(defun rst-directive-append (directlist)
  "Meta function of add directives. 

Elements of directives should arranged as 

   (type funciton option-list content-boolean). 
"
  (dolist (direct directlist)
    (eval (cons 'rst-directive-add-type direct))))


;;;;====================================
;;;;====== Directives in Docutils ======
;;;;====================================

(defvar rst-directive-types
  '("definition" "field" "admonition" "image" "figure" "topic" 
    "sidebar" "line-block" "parsed-literal" "math" "rubric" 
    "epigraph" "highlights" "pull-quote" "compound" "container" 
    "table" "csv-table" "list-table" "contents" "sectnum" 
    "replace" "unicode" "date" "include" "raw")
  "List of directive types")

(defvar rst-directive-type-alist
  '(("definition" . rst-directive-insert-definition) 
    ("field" . rst-directive-insert-field) 
    ("admonition" . rst-directive-insert-admonition)
    ("image" . rst-directive-insert-image) 
    ("figure" . rst-directive-insert-figure)
    ("topic" . rst-directive-insert-topic) 
    ("sidebar" . rst-directive-insert-sidebar) 
    ("line-block" . rst-directive-insert-line-block) 
    ("parsed-literal" . rst-directive-insert-parsed-literal) 
    ("math" . rst-directive-insert-math)
    ("rubric" . rst-directive-insert-rubric) 
    ("epigraph" . rst-directive-insert-epigraph) 
    ("highlights" . rst-directive-insert-highlights) 
    ("pull-quote" . rst-directive-insert-pull-quote) 
    ("compound" . rst-directive-insert-compound) 
    ("container" . rst-directive-insert-container) 
    ("table" . rst-directive-insert-table) 
    ("csv-table" . rst-directive-insert-csv-table)
    ("list-table" . rst-directive-insert-list-table)
    ("contents" . rst-directive-insert-contents) 
    ("sectnum" . rst-directive-insert-sectnum) 
    ("replace" . rst-directive-insert-replace) 
    ("unicode" . rst-directive-insert-unicode) 
    ("date" . rst-directive-insert-date) 
    ("include" . rst-directive-insert-include) 
    ("raw" . rst-directive-insert-raw))
  "List of directive inserting functions of directive types.")

(defvar rst-directive-option-list
  '(("definition" rst-directive-option-definition t) 
    ("field" rst-directive-option-field t) 
    ("admonition" rst-directive-option-admonition nil)
    ("image" rst-directive-option-image nil) 
    ("figure" rst-directive-option-figure t)
    ("topic" nil t) 
    ("sidebar" rst-directive-option-sidebar t)
    ("line-block" nil t) 
    ("parsed-literal" nil t) 
    ("math" rst-directive-option-math t)
    ("rubric" nil nil) 
    ("epigraph" nil t) 
    ("highlights" nil t) 
    ("pull-quote" nil t) 
    ("compound" nil t) 
    ("container" nil t) 
    ("table" nil t) 
    ("csv-table" rst-directive-option-csv-table t)
    ("list-table" rst-directive-option-list-table t)
    ("contents" rst-contents-option nil) 
    ("sectnum" rst-sectnum-option nil) 
    ("replace" nil nil) 
    ("unicode" rst-directive-option-unicode nil) 
    ("date" nil nil) 
    ("include" rst-include-option nil) 
    ("raw" rst-directive-option-raw t))
  "List of option functions of directive types.")

;;====== Directive Definitions ======

(defun rst-directive-insert-admonition ()
  "Insert a admonition."
  (interactive)
  (let (admon argu)
    (setq admon (read-string "Providing admonition type: "))
    (setq argu (read-string "Providing admonition description: "))
    (rst-directive-direct-format admon argu)))

(defun rst-directive-insert-image ()
  "Insert a image."
  (interactive)
  (let (arg)
    (setq arg (read-string "Providing image and its path: "))
    (rst-directive-direct-format "image" arg)))

(defvar rst-directive-option-image
  '(("align" "option" ("top" "middle" "bottom" "left" "center" "right"))
    ("width" "string" "300")
    ("height" "string" "300")
    ("scale" "number" 80)
    ("alt" "string" "")
    ("target" "string" "")))

(defun rst-directive-insert-figure ()
  "Insert a image."
  (interactive)
  (let (arg)
    (setq arg (read-string "Providing figure and its path: "))
    (rst-directive-direct-format "figure" arg)))

(defvar rst-directive-option-figure
  '(("align" "option" ("left" "center" "right"))
    ("width" "string" "300")
    ("height" "string" "300")
    ("scale" "number" 80)
    ("figwidth" "string" "350")
    ("alt" "string" "")
    ("target" "string" "")))

(defun rst-directive-insert-topic ()
  "Insert a topic."
  (interactive)
  (let (arg)
    (setq arg (read-string "Providing topic title: "))
    (rst-directive-direct-format "topic" arg)))

(defun rst-directive-insert-sidebar ()
  "Insert a sidebar."
  (interactive)
  (let (arg)
    (setq arg (read-string "Providing sidebar title: "))
    (rst-directive-direct-format "sidebar" arg)))

(defvar rst-directive-option-sidebar
'(("subtitle" "string" "")))

(defun rst-directive-insert-line-block ()
  "Insert a line block."
  (interactive)
  (rst-directive-direct-format "line-block"))

(defun rst-directive-insert-parsed-literal ()
  "Insert a parsed literal."
  (interactive)
  (rst-directive-direct-format "parsed-literal"))

(defun rst-directive-insert-math ()
  "Insert a math."
  (interactive)
  (rst-directive-direct-format "math"))

(defvar rst-directive-option-math
  '(("label" "flag" nil)
    ("nowrap" "flag" nil)))

(defun rst-directive-insert-rubric ()
  "Insert a rubric title."
  (interactive)
  (let (arg)
    (setq arg (read-string "Providing rubric title: "))
    (rst-directive-direct-format "rubric" arg)))

(defun rst-directive-insert-epigraph ()
  "Insert a epigraph."
  (interactive)
  (rst-directive-direct-format "epigraph"))

(defun rst-directive-insert-highlights ()
  "Insert a highlights."
  (interactive)
  (rst-directive-direct-format "highlights"))

(defun rst-directive-insert-pull-quote ()
  "Insert a pull quote."
  (interactive)
  (rst-directive-direct-format "pull-quote"))

(defun rst-directive-insert-compound ()
  "Insert a compound."
  (interactive)
  (rst-directive-direct-format "compound"))

(defun rst-directive-insert-container ()
  "Insert a container."
  (interactive)
  (let (arg)
    (setq arg (read-string "Providing container title: "))
    (rst-directive-direct-format "container" arg)))

(defun rst-directive-insert-table ()
  "Insert a table."
  (interactive)
  (let (arg)
    (setq arg (read-string "Providing table title: "))
    (rst-directive-direct-format "table" arg)))

(defun rst-directive-insert-csv-table ()
  "Insert a table."
  (interactive)
  (let (arg)
    (setq arg (read-string "Providing table title: "))
    (rst-directive-direct-format "csv-table" arg)))

(defvar rst-directive-option-csv-table
'(("widths" "string" "")
  ("header-rows" "number" 0)
  ("stub-columns" "number" 0)
  ("header" "string" "")
  ("file" "string" "")
  ("url" "string" "")
  ("encoding" "string" "")
  ("delim" "string" "")
  ("quote" "string" "")
  ("keepspace" "flag" nil)
  ("escape" "string" "")))

(defun rst-directive-insert-list-table ()
  "Insert a table."
  (interactive)
  (let (arg)
    (setq arg (read-string "Providing table title: "))
    (rst-directive-direct-format "list-table" arg)))

(defvar rst-directive-option-list-table
'(("widths" "string" "")
  ("header-rows" "number" 0)
  ("stub-columns" "number" 0)))

(defun rst-directive-insert-contents ()
  "Insert a contents."
  (interactive)
  (let (arg)
    (setq arg (read-string "Providing contents title: "))
    (rst-directive-direct-format "contents" arg)))

(defvar rst-directive-option-contents
'(("backlinks" "option" ("entry" "top" "none"))
  ("depth" "number" 2)
  ("local" "flag" nil)))

(defun rst-directive-insert-sectnum ()
  "Set section-autonumbering."
  (interactive)
  (rst-directive-direct-format "sectnum"))

(defvar rst-directive-option-sectnum
'(("prefix" "string" "")
  ("suffix" "string" "")
  ("depth" "number" 2)
  ("start" "number" 1)))

(defun rst-directive-insert-replace ()
  "Insert the head of word replace."
  (interactive)
  (let (tag)
    (setq tag (read-string "Providing replaced word: "))
    (rst-directive-direct-format (concat "|" tag "| replace"))))

(defun rst-directive-insert-unicode ()
  "Insert unicode replacement."
  (interactive)
  (let (tag)
    (setq tag (read-string "Providing unicode string: "))
    (rst-directive-direct-format (concat "|" tag "| unicode"))))

(defvar rst-directive-option-unicode
  '(("ltrim" "flag" nil)
    ("rtrim" "flag" nil)
    ("trim" "flag" nil)))

(defun rst-directive-insert-date ()
  "Insert date or time."
  (interactive)
  (let (type value)
    (setq type (completing-read "Insert date or time? " '("date" "time")))
    (cond
     ((equal type "date") 
      (setq value (read-string "Providing date format: " nil nil "%Y-%m-%d")))
     ((equal type "time") 
      (setq value (read-string "Providing time format: " nil nil "%H:%M"))))
    (rst-directive-direct-format (concat "|" type "| date") value)))

(defun rst-directive-insert-include ()
  "Insert an external file."
  (interactive)
  (let (arg)
    (setq arg (read-string "Providing file path: "))
    (rst-directive-direct-format "include" arg)))

(defvar rst-directive-option-include
  '(("start-after" "string" "")
    ("end-before" "string" "")
    ("encoding" "string" "")
    ("literal" "flag" nil)))

(defun rst-directive-insert-raw ()
  "Insert raw data."
  (interactive)
  (let (arg)
    (setq arg (read-string "Providing raw data type: "))
    (rst-directive-direct-format "raw" arg)))

(defvar rst-directive-option-raw
  '(("file" "string" "")
    ("url" "string" "")
    ("encoding" "string" "")))

;;======= Directive-like definitions listed in Docutils =======

(defun rst-directive-insert-definition ()
  "Insert a definition list"
  (interactive)
  (let (term classifiers classel)
    (setq term (read-string "Providing the definition's term: "))
    (setq classifiers (read-string "Providing classifier(s) (if many, seperated by ', '): "))
    (if (equal classifiers "")
        (insert term "\n    ")
      (progn
        (setq classifiers (split-string classifiers ", "))
        (dolist (tmpclass classifiers)
          (setq classel (concat classel " : " tmpclass)))
        (insert term classel "\n    ")))))

(defun rst-directive-insert-field ()
  "Insert a field list."
  (interactive)
  (let (field value)
    (setq field (read-string "Providing field: "))
    (save-excursion
      (beginning-of-line)
      (insert (concat ":" field ": ")))))


;;;;==================================
;;;;====== Directives in Sphinx ======
;;;;==================================

(rst-directive-append
 '(("note" 'rst-directive-insert-note 'nil 't)
   ("glossary" 'rst-directive-insert-glossary 'nil 't)
   ("centered" 'rst-directive-insert-centered 'nil 'nil)
   ("hlist" 'rst-directive-insert-hlist 'rst-directive-option-hlist 't)
   ("tabularcolumns" 'rst-directive-insert-tabularcolumns 'nil 't)
   ;; showing code
   ("highlight" 'rst-directive-insert-highlight 'rst-directive-option-highlight 'nil)
   ("code-block" 'rst-directive-insert-code-block 'rst-directive-option-code-block 't)
   ;; sphinx.ext.doctest
   ("testcode" 'rst-directive-insert-testcode 'rst-directive-option-testcode 't)
   ("testoutput" 'rst-directive-insert-testoutput 'rst-directive-option-testoutput 't)
   ;; sphinx.ext.graphviz
   ("graph" 'rst-directive-insert-graph 'nil 't)
   ("graphviz" 'rst-directive-insert-graphviz 'nil 't)
   ("digraph" 'rst-directive-insert-digraph 'nil 't)
   ;; sphinx.ext.todo
   ("todo" 'rst-directive-insert-todo 'nil 't)
   ("todolist" 'rst-directive-insert-todolist 'nil 'nil)
   ))

(defun rst-directive-insert-note ()
  "Insert a note block."
  (interactive)
  (rst-directive-direct-format "note"))

(defun rst-directive-insert-glossary ()
  "Insert a glossary block."
  (interactive)
  (rst-directive-direct-format "glossary"))

(defun rst-directive-insert-centered ()
  "Insert a centered title."
  (interactive)
  (let (arg)
    (setq arg (read-string "Providing centered title: "))
    (rst-directive-direct-format "centered" arg)))

(defun rst-directive-insert-hlist ()
  "Insert a compact list."
  (interactive)
  (rst-directive-direct-format "hlist"))

(defvar rst-directive-option-hlist
  '(("columns" "number" 2)))

(defun rst-directive-insert-tabularcolumns ()
  "Insert a table that can specify columns like in LaTeX."
  (interactive)
  (rst-directive-direct-format "tabularcolumns"))

(defun rst-directive-insert-highlight ()
  "Insert a image."
  (interactive)
  (let (arg)
    (setq arg (read-string "Providing lexer type: "))
    (rst-directive-direct-format "highlight" arg)))

(defvar rst-directive-option-highlight
  '(("linenothreshold" "number" 5)))

(defun rst-directive-insert-code-block ()
  "Insert a code block."
  (interactive)
  (let (arg)
    (setq arg (read-string "Providing lexer type: "))
    (rst-directive-direct-format "code-block" arg)))

(defvar rst-directive-option-code-block
  '(("linenos" "flag" nil)))

(defun rst-directive-insert-testcode ()
  "Insert a testcode."
  (interactive)
  (rst-directive-direct-format "testcode"))

(defvar rst-directive-option-testcode
  '(("hide" "flag" nil)))

(defun rst-directive-insert-testoutput ()
  "Insert a testoutput."
  (interactive)
  (rst-directive-direct-format "testoutput"))

(defvar rst-directive-option-testoutput
  '(("hide" "flag" nil)
    ("options" "string" "")))

(defun rst-directive-insert-graphviz ()
  "Insert a graphviz block."
  (interactive)
  (rst-directive-direct-format "graphviz"))

(defun rst-directive-insert-graph ()
  "Insert a graphviz single graph."
  (interactive)
  (let (arg)
    (setq arg (read-string "Providing graph title: "))
    (rst-directive-direct-format "graph" arg)))

(defun rst-directive-insert-digraph ()
  "Insert a digraph block."
  (interactive)
  (let (arg)
    (setq arg (read-string "Providing digraph title: "))
    (rst-directive-direct-format "digraph" arg)))

(defun rst-directive-insert-todo ()
  "Insert a todo block."
  (interactive)
  (rst-directive-direct-format "todo"))

(defun rst-directive-insert-todolist ()
  "Insert a todolist block."
  (interactive)
  (rst-directive-direct-format "todolist"))


(provide 'rst-directives)
;;; rst-links.el --- Build Sphinx projects.

;; Copyright (C) 2012 Wei-Wei Guo.

;; Author: Wei-Wei Guo &amp;lt;wwguocn at gmail dot com&amp;gt;
;; Version: 0.1
;;
;; This file is published under the GNU Gerneral Public License,
;; see &amp;lt;http://www.gnu.org/licenses/&amp;gt;.
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;
;;; Commentary:

;; This file provides links functionalities for Emacs rst-mode.


(defgroup rst-link nil
  "Functions supporting of links with \\[rst-links]."
  :group 'rst
  :version "23.0")


(defvar rst-link-type-alist
  '(("hyperlink" . rst-link-inline-insert) 
    ("footnote"  . rst-link-footnote-insert) 
    ("citation"  . rst-link-citation-insert))
  "List of link types.")

(defvar rst-link-type
  '("hyperlink" "footnote" "citation")
  "List of link types for completion")

(defun rst-link-insert ()
  "Meta-function of all links."
  (interactive)
  (let (type)
    (setq type (completing-read "Providing link type: " rst-link-type))
    (funcall (cdr (assoc type rst-link-type-alist)))))

(defun rst-link-inline-insert ()
  "Insert a inline link with both target and reference."
  (interactive)
  (let (link target reference)
    (setq link (read-string "Providing link name: "))
    (if (string-match " " link)
        (progn
          (setq target (concat "`" link "`_"))
          (setq reference (concat ".. _`" link "`: ")))
      (progn
        (setq target (concat link "_"))
        (setq reference (concat ".. _" link ": "))))
    (save-excursion
      (if (equal (char-before) (string-to-char " "))
          (insert target " ")
        (insert (concat " " target " ")))
      (end-of-line)
      (insert (concat "\n\n" reference)))))

(defun rst-link-footnote-insert ()
  "Insert a inline footnote with both target and reference."
  (interactive)
  (let (footnote target reference)
    (setq footnote (read-string "Providing footnote name: "))
    (setq target (concat "[#" footnote "]_"))
    (setq reference (concat ".. [#" footnote "] "))
    (save-excursion
      (if (equal (char-before) (string-to-char " "))
          (insert target " ")
        (insert (concat " " target " ")))
      (end-of-line)
      (insert (concat "\n\n" reference)))))

(defun rst-link-citation-insert ()
  "Insert a inline citation with both target and reference."
  (interactive)
  (let (citation target reference)
    (setq citation (read-string "Providing citation name: "))
    (setq target (concat "[" citation "]_"))
    (setq reference (concat ".. [" citation "] "))
    (save-excursion
      (if (equal (char-before) (string-to-char " "))
          (insert target " ")
        (insert (concat " " target " ")))
      (end-of-line)
      (insert (concat "\n\n" reference)))))

;--- link jumping ---

(defun rst-link-hyper-reference-match ()
  "Match link target around the point."
  (let (link reference target)
    (save-excursion
      (if (search-forward "_" 
                          (save-excursion 
                            (forward-sentence) 
                            (point)) 
                          t 1)
          (progn
            (backward-char)
            (unless (equal (char-before) ?\\)
              (if (equal (char-before) ?`)
                  (progn
                    (forward-char)
                    (re-search-backward "`[[:alnum:][:punct:][:space:]]+`_" 
                                        (save-excursion 
                                          (search-backward "`" nil t 2) 
                                          (point)) 
                                        t)
                    (setq reference (match-string 0))
                    (setq link (substring reference 0 -1)))
                (progn
                  (forward-char)
                  (re-search-backward " \\sw+_" 
                                      (save-excursion 
                                        (search-backward " ") 
                                        (point)) 
                                      t)
                  (setq reference (match-string 0))
                  (setq link (substring reference 1 -1)))))
            (setq target (concat ".. _" link ":")))))
    (list reference target)))

(defun rst-link-jump-to-target ()
  "Jump from intertext link reference to link target."
  (interactive)
  (let ((target (elt (rst-link-hyper-reference-match) 1)))
    (when (save-excursion
            (goto-char (point-min))
            (search-forward target))
      (goto-char (point-min))
      (search-forward target))))

(defun rst-link-jump-within-references ()
  "Jump within references of an intertext link, if exist."
  (interactive)
  (let ((reference (elt (rst-link-hyper-reference-match) 0)))
    (if (save-excursion
          (search-forward reference nil t 1))
        (progn
          (search-forward reference nil t 1)
          (backward-char 1))
      (when (y-or-n-p "No link reference behind. Search from the beginning?")
        (goto-char (point-min))
        (search-forward reference nil t 1)
        (backward-char 1)))))

(defun rst-link-hyper-target-match ()
  "Match link reference at the target line."
  (let (link reference target)
    (save-excursion
      (when (search-backward ".. _" (line-beginning-position) t 1)
        (re-search-forward 
         "^\\.\\. _`?[[:alnum:][:punct:][:space:]]+`?: " 
         (line-end-position) t 1)
        (setq target (match-string 0))))
    (setq link (substring target 4 -2))
    (if (equal (substring link 0 1) "`")
        (setq reference (concat link "_"))
      (setq reference (concat " " link "_")))
    (list reference target)))

(defun rst-link-jump-to-reference ()
  "Jump from intertext link target to link reference."
  (interactive)
  (let ((reference (elt (rst-link-hyper-target-match) 0)))
    (when (save-excursion
            (goto-char (point-max))
            (search-backward reference))
      (goto-char (point-max))
      (search-backward reference))))

;--- footnote and citation ---

(defun rst-link-footnote-citation-reference-match ()
  "Match footnote or citation reference around the point."
  (let (link reference target)
    (save-excursion
      (when (search-forward "]_" 
                            (save-excursion 
                              (forward-sentence) 
                              (point)) 
                            t 1)
        (re-search-backward "\\[[[:alnum:][:punct:][:space:]]+\\]_" 
                            (save-excursion 
                              (search-backward "[" nil t 1) 
                              (point)) 
                            t)
        (setq reference (match-string 0))))
    (setq link (substring reference 1 -2))
    (setq target (concat ".. [" link "]"))
    (list reference target)))

(defun rst-link-footnote-citation-target-match ()
  "Match footnote or citation reference at the target line."
  (let (link reference target)
    (save-excursion
      (when (search-backward ".. [" (line-beginning-position) t 1)
        (re-search-forward 
         "^\\.\\. \\[[[:alnum:][:punct:][:space:]]+\\] " 
         (line-end-position) t 1)
        (setq target (match-string 0))))
    (setq link (substring target 4 -2))
    (setq reference (concat " [" link "]_"))
    (list reference target)))

(defun rst-link-footnote-citation-jump-to-target ()
  "Jump from footnote or citation reference to target."
  (interactive)
  (let ((target (elt (rst-link-footnote-citation-reference-match) 1)))
    (when (save-excursion
            (goto-char (point-min))
            (search-forward target))
      (goto-char (point-min))
      (search-forward target))))

(defun rst-link-footnote-citation-jump-within-references ()
  "Jump within references of an footnote or citation, if exist."
  (interactive)
  (let ((reference (elt (rst-link-footnote-citation-reference-match) 0)))
    (if (save-excursion
          (search-forward reference nil t 1))
        (progn
          (search-forward reference nil t 1)
          (backward-char 1))
      (when (y-or-n-p "No link reference behind. Search from the beginning?")
        (goto-char (point-min))
        (search-forward reference nil t 1)
        (backward-char 2)))))

(defun rst-link-footnote-citation-jump-to-reference ()
  "Jump from footnote or citation target to reference."
  (interactive)
  (let ((reference (elt (rst-link-footnote-citation-target-match) 0)))
    (when (save-excursion
            (goto-char (point-max))
            (search-backward reference))
      (goto-char (point-max))
      (search-backward reference))))

(provide 'rst-links)
------------------------------------------------------------------------------
Better than sec? Nothing is better than sec when it comes to
monitoring Big Data applications. Try Boundary one-second 
resolution app monitoring today. Free.
http://p.sf.net/sfu/Boundary-dev2dev&lt;/pre&gt;</description>
    <dc:creator>Wei-Wei Guo</dc:creator>
    <dc:date>2012-04-04T13:46:58</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.text.docutils.user/6633">
    <title>Frames / Marginalia rst2odt</title>
    <link>http://comments.gmane.org/gmane.text.docutils.user/6633</link>
    <description>&lt;pre&gt;In order to create atractive documents I was thinking that the raw directive
could give the posibility of processing a code like this...
.. raw:: odt
&amp;lt;text:p text:style-name="Text_20_body"&amp;gt;
&amp;lt;draw:frame draw:style-name="fr3" draw:name="Frame3" text:anchor-type="paragraph"
svg:width="2cm" draw:z-index="2"&amp;gt;
&amp;lt;draw:text-box fo:min-height="0.499cm"&amp;gt;
&amp;lt;text:p text:style-name="Frame_20_contents"&amp;gt;The text inside the frame&amp;lt;/text:p&amp;gt;
                    &amp;lt;/draw:text-box&amp;gt;
                &amp;lt;/draw:frame&amp;gt;The main paragraph!
            &amp;lt;/text:p&amp;gt;
I haven't success. Is it possible?  
How could I markup several portion of text for 
avoiding parse depending on the output? 

Maybe with some Python code... Could you give me some idea?

Thanks in advance for your help!


------------------------------------------------------------------------------
Better than sec? Nothing is better than sec when it comes to
monitoring Big Data applications. Try Boundary one-second 
resolution app monitoring today. Free.
http://p.sf.net/sfu/Boundary-dev2dev
&lt;/pre&gt;</description>
    <dc:creator>Paulo</dc:creator>
    <dc:date>2012-04-03T06:55:16</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.text.docutils.user/6628">
    <title>TODO: Improve handling on Windows</title>
    <link>http://comments.gmane.org/gmane.text.docutils.user/6628</link>
    <description>&lt;pre&gt;I've recently grown quite attracted to the idea of migrating our technical documentation to reStructuredText, for mostly the same reasons people use rst to begin with.  

I'm working under the general restriction, however, that non-developers will be writing some of this documentation, and therefore I need a distribution of docutils for windows that is usable without a separate python install.

I see this has request has lived for a while at:

http://docutils.sourceforge.net/docs/dev/todo.html


But, I don't require any sort of GUI (though one would be nice).  I started to play with py2exe to see if I could package docutils myself.  Py2exe is a bit awkward to wrap around docutils, but I succeeded in a version that could run rst2html.py and would at least *start* execution.

I'm currently stuck because the current distribution assumes that resources like html4css1.css are accessible via normal open() calls, which is not the case for py2exe because of the bundling of resources inside the library.zip.  This is apparently not an unknown issue:

http://www.digipedia.pl/usenet/thread/16040/2325/

Looking through the code, I suppose it's possible to modify io.py to support loading resources from paths that traverse into zip files, but I got the nasty feeling I was going head-first down the rabbit-hole and wanted to step back for a minute.

Has there been any other work on a windows distribution?  

Is hacking io.py the right approach?  

Perhaps re-organizing non-python resources would be a better approach?

I'm at the point of giving up and going with a non-python rst processor, but I really want to eventually bundle pygments and rst2pdf.  

This would be a killer start for getting adoption on windows, and once the CLI works, wiring up a simple GUI isn't too far off.

Thoughts?

~Chris

------------------------------------------------------------------------------
This SF email is sponsosred by:
Try Windows Azure free for 90 days Click Here 
http://p.sf.net/sfu/sfd2d-msazure
&lt;/pre&gt;</description>
    <dc:creator>Chris Scott</dc:creator>
    <dc:date>2012-03-30T17:58:15</dc:date>
  </item>
  <textinput rdf:about="http://search.gmane.org/?group=$group=gmane.text.docutils.user">
    <title>Search Engine</title>
    <description>Search the mailing list at Gmane</description>
    <name>query</name>
    <link>http://search.gmane.org/?group=$group=gmane.text.docutils.user</link>
  </textinput>
</rdf:RDF>

