Re: Override templates per page

2009-05-13 Thread tuos
On May 13, 10:05 am, Georg Brandl wrote: > tuos schrieb: > > > > > Is there any way to override templates per page? > > > After reading source, it seems to me that there is not. > > Apparently, html_additional_pages are used for other purposes and > >

Override templates per page

2009-05-06 Thread tuos
Is there any way to override templates per page? After reading source, it seems to me that there is not. Apparently, html_additional_pages are used for other purposes and cannot be used for this because empty context is passed to the handler: ./html.py-494-# additional pages from conf.py

Re: How to add strings into the head of a built page?

2009-05-03 Thread tuos
On May 3, 7:20 pm, Wei-Wei Guo wrote: > Dear all, > > I'm writing a Sphinx extension. I want to implement text folding in HTML like: > > >     href="javascript:toggleFold('fold1')">OpenedHead >     href="javascript:toggleFold('fold1')">ClosedHead >     MainText > > > It needs javascript and c

Re: How to change the behavior of "toctree"?

2009-04-25 Thread tuos
On Apr 25, 5:45 am, Wei-Wei Guo wrote: > Tuomas Räsänen 写道: > > Hi Tuomas, > > > > > Well, if I understood you correctly, I needed something similiar and > > ended up with this small extension: > > > toctree_items = [] > > > def html_page_context(app, pagename, templatename, context, doctree): >

Re: How/when to extract pagenames and their titles?

2009-04-22 Thread tuos
On Apr 22, 3:16 pm, tuos wrote: > Hi, > > I need to extract pagenames and their titles and get the order in > which they are defined in toctree (in source file). How to do that? > > I guess the right event should be 'doctree-resolved' or 'env-update

How/when to extract pagenames and their titles?

2009-04-22 Thread tuos
Hi, I need to extract pagenames and their titles and get the order in which they are defined in toctree (in source file). How to do that? I guess the right event should be 'doctree-resolved' or 'env-updated'. Titles can be accessed by doctree.env.titles but how to get them in the original order

Patch: Produce valid xhtml for toc-backreffed and permalinked titles

2009-04-21 Thread tuos
Hi, In version 0.6.1 sphinx/writers/html.py HTMLTranslator.depart_title does not take into account the situation where a title is a backref- link to toc and has also a permalink, i.e. the text of h-tag consists of two separate links. Therefore Sphinx's html-builder produces nested a-tags (not va