Dima Diall | 2 Aug 2005 17:15
Picon

Fwd: Auto-enumerated lists

Hello everybody!

I am seeking help with auto-enumerated lists... I am using version
0.3.7 ("unstable" ~x86 on Gentoo Linux) and it doesn't show any
warnings in verbose mode (with 0.3.5 it did), but the output is not
right. For instance, the last two lines are not treated as list items:

1) Numbered list xxx

#) Numbered list yyy

#) Numbered list zzz

I tried all sorts of combinations described in the pages below with no luck:
http://docutils.sourceforge.net/docs/ref/rst/restructuredtext.html#enumerated-lists
http://docutils.sourceforge.net/docs/dev/rst/alternatives.html#auto-enumerated-lists

Thanks in advance,
--
/dima, http://www.cs.ucl.ac.uk/students/d.diall/

PS: This message may duplicated -- sorry... I sent it this morning
without being subscribed and am still awaiting for the moderator's
approval. In the meantime, I decided to subscribe and re-post.

-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_idt77&alloc_id492&op=click
(Continue reading)

Dima Diall | 2 Aug 2005 20:53
Picon

Multiple table of contents in LaTeX output

Hello list:

I am using docutils 0.3.7 and rst2html.py generates multiple instances
of the table of contents in its LaTeX output...

--- 8< --- snip
\setlength{\locallinewidth}{\linewidth}
\tableofcontents

\bigskip
\tableofcontents

\bigskip
\tableofcontents
--- 8< --- snip

The command used is the following:
rst2latex.py -v --tab-width=4 --documentclass=report
--use-latex-docinfo --use-latex-toc report.rst report.tex

I use the 'contents' directive in the input RST file because I want a
table of contents when generating HTML for example. When creating the
PDF version I also need a LaTeX list of figures, hence the
'--use-latex-toc' switch for consistency. Otherwise I could omit this
option and include the following in the source file:

.. raw:: LaTeX

   \tableofcontents
   \listoffigures
(Continue reading)

grubert | 3 Aug 2005 08:30
Picon
Gravatar

Re: Fwd: Auto-enumerated lists

On Tue, 2 Aug 2005, Dima Diall wrote:

> Hello everybody!
> 
> I am seeking help with auto-enumerated lists... I am using version
> 0.3.7 ("unstable" ~x86 on Gentoo Linux) and it doesn't show any

0.3.7 is too old (2004-12-24)
Release 0.3.9 (2005-05-26) should do it.

-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
Anthony Williams | 6 Aug 2005 00:03
Picon
Favicon

Repeated ID attributes in generated HTML

When generating HTML from RST, the anchors at the start of each section are
generated on two different elements. The first anchor is an ID attribute on
the DIV element which encompasses the whole section, and the second anchor is
an A element with a NAME attribute. The two anchors have the same name, which
is not permitted in HTML4, and consequently in XHTML (see section 12.2.3 of
the HTML4 spec). The ID attribute should be on the A element, rather than the
DIV element, since XHTML requires the use of the ID attribute. Using both the
ID and NAME attributes on the same element IS legal HTML4.

Anthony
--

-- 
Anthony Williams
Software Developer

-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
Dima Diall | 8 Aug 2005 23:22
Picon

Captions for tables

Hello list:

Is there any support to include captions for tables in RST? For LaTeX
conversion I planned to use the 'raw' directive to include
\listoftables (similarly to \listofimages).

The docs only refer to this possibility with figures... Actually I
might prefer to do this in a few cases to include complex tables from
spreadsheets (saved as images), but preferably applying "Table"
instead of "Figure" in the caption.

Any tips or comments will be very much appreciated.
--

-- 
/dima

-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
David Goodger | 10 Aug 2005 14:08
Favicon

Re: Captions for tables

[Dima Diall]
> Hello list:
>
> Is there any support to include captions for tables in RST?

Yes: http://docutils.sf.net/docs/ref/rst/directives.html#table

--
David Goodger <http://python.net/~goodger>
Anthony Williams | 11 Aug 2005 10:50
Picon
Favicon

Re: Repeated ID attributes in generated HTML

Anthony Williams <anthony_w.geo <at> yahoo.com> writes:

> When generating HTML from RST, the anchors at the start of each section are
> generated on two different elements. The first anchor is an ID attribute on
> the DIV element which encompasses the whole section, and the second anchor is
> an A element with a NAME attribute. The two anchors have the same name, which
> is not permitted in HTML4, and consequently in XHTML (see section 12.2.3 of
> the HTML4 spec). The ID attribute should be on the A element, rather than the
> DIV element, since XHTML requires the use of the ID attribute. Using both the
> ID and NAME attributes on the same element IS legal HTML4.

Attached is a set of diffs for writers/html4css1.py against the current trunk,
which fixes the problem for the table-of-contents and section headings. This
also needs fixing for tables with IDs as well.

Anthony
--

-- 
Anthony Williams
Software Developer

3,4c3,4
< # Revision: $Revision$
< # Date: $Date$
---
> # Revision: $Revision: 3664 $
> # Date: $Date: 2005-07-07 04:12:44 +0200 (Thu, 07 Jul 2005) $
1173a1174,1181
>     def start_tag_with_title(self,node,tagname,**atts):
(Continue reading)

Edward K. Ream | 12 Aug 2005 20:32
Favicon

Bug (?) report involving FAQ_ and _FAQ

Here is a bug report.  It appears, though I am not certain about this, that 
there is something strange about the symbol FAQ_  In the source file below, if 
I change FAQ_ and _FAQ to faq_ and _faq there is no problem.  But as it is, I 
get the following traceback on Windows XP, Python 2.4, Docutils version (0.3.10 
[snapshot 2005-08-02, r3785]),

I am using the following code executed from within my Leo app:

def writeToDocutils (self,s,isHtml):
    '''Send s to docutils and return the result.'''
    pub = docutils.core.Publisher()
    pub.source      = docutils.io.StringInput(source=s)
    pub.destination = docutils.io.StringOutput
(pub.settings,encoding=self.encoding)
    pub.set_reader('standalone',None,'restructuredtext')
    pub.set_writer(g.choose(isHtml,'html','latex'))
    return pub.publish(argv=[r'--
stylesheet=c:\prog\leoCvs\leo\doc\default.css'])

BTW, I have never been able to get the --traceback option to work in the 
routine above, so I just put traceback.print_exc() in the report_Exception 
method in core.py.

<string>:130: (ERROR/3) Unknown target name: "FAQ".
<string>:130: (ERROR/3) Unknown target name: "FAQ".
EKR: added traceback
Traceback (most recent call last):
  File "c:\python24\lib\site-packages\docutils\core.py", line 223, in publish
    self.apply_transforms()
  File "c:\python24\lib\site-packages\docutils\core.py", line 192, in 
(Continue reading)

Thorsten Ottosen | 14 Aug 2005 12:49
Picon
Picon
Favicon

underlining and striking out text

Hi,

I need to underline and strike out text. The way I do that currently is
quite clumsy: I define a new role

.. role:: html(raw)
   :format: html

and then use it as

:html:`<strike>striken out text</strike>`.

Isn't there an easier way?

Thanks

Thorsten

-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
Christof Hoeke | 14 Aug 2005 12:23
Picon
Favicon

generating Python package documentation with docutils

hello,
somehow I thought one of docutils aims was to provide a format for Python
sourcecode inline documentation (is this actually an original aim?). 
Anyway I use docutils for this purpose and would like to generate HTML docs for
a Python package similar what javadoc for java or also epydoc for Python do. Is
there any script out there which generates HTML pages possibly with connecting
index/navigation pages from a reStructuredText documented Python package?

thanks
chris

-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf

Gmane