unknown
1970-01-01 00:00:00 UTC
I also need to figure out how to print that to the screen.
Do you mean the HTML/PDF/ODF or whatever output? Once you have thecorrect element node added to the document tree (at the right place),
conversion to the output format should be done by the writer without
further effort. This is the nice thing about the separation of parsing,
transforming and writing steps.
think I have it.
A very basic example of what I'm trying to do is...
.. mydirective:: fuzzy
A|b|c|d
wuzzy
was a
bear
I would like to do two things with this directive. I first want the
argument to generate a title and the first line to generate a table,
followed by the remaining stuff.
If I weren't making this directive, it would be something more like
this..... mydirective:: fuzzy
A|b|c|d
wuzzy
was a
bear
I would like to do two things with this directive. I first want the
argument to generate a title and the first line to generate a table,
followed by the remaining stuff.
If I weren't making this directive, it would be something more like
fuzzy
~~~~~
========= > > *Title 1* A
*Title 2* b
*Title 3* c
*Title 4* d
========= >
wuzzy
was a
bear
This is a grossly simplified version, but basically explains exactly
what I~~~~~
========= > > *Title 1* A
*Title 2* b
*Title 3* c
*Title 4* d
========= >
wuzzy
was a
bear
This is a grossly simplified version, but basically explains exactly
need. I need to first, register that heading, then I need to generate a
table.
I really hope this makes sense. I'm struggling to explain it and really
hopetable.
I really hope this makes sense. I'm struggling to explain it and really
that someone can help me figure this out.
For me, a help in creating such directives was to re-create the intendedbehaviour in rst (as you do above) and then have a look at the
rst2pseudoxml
or rst2xml output to see what the relevant part of the document tree looks
like. Then I go to docutils/docutils/parsers/rst/directives and look for
examples to copy and paste and adapt.
out.
--001a11369dc277d11e04eeba0336
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable <div dir="ltr">I think I'm finally starting to get this. sphinx-doc uses docutils to do most of its work. Docutils provides the parsing of rst along with pretty much all of the work that sphinx-doc does. So... it is indeed docutils that I need to work with to make this work.<br> <div><div class="gmail_extra"><br><div class="gmail_quote">On Sun, Dec 29, 2013 at 11:31 AM, Guenter Milde <span dir="ltr"><<a href="mailto:***@users.sf.net" target="_blank">***@users.sf.net</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">On 2013-12-29, Michael Lustfield wrote:<br></div></blockquote><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="im">
> This function now sticks things on the page, but... I can't figure out<br>
> how to register a heading. The heading I want to register will always<br>
> be the same level.<br>
<br>
</div>