[sphinx-dev] modifications to the toctree() template function

2010-08-09 Thread andreash
Hi there,

I'm using Sphinx 1.0.1 to build some websites. While adapting the
basic template to my needs, I stumbled upon the need to modify the
toctree() template function to accomodate several things.

Most importantly, I'd like to have toctree() an option to start at the
level of the current document, and not at the root level. What I mean
is this:

root/
   doc1/
   doc2/
  doc2.1/
  doc2.2/
   doc3/

So I'd like to have the option to render a sidebar menu which only
contains the 'heading' "doc2", and then the members doc2.1 and doc2.2.
I was thinking about an option toctree(startatcurrent=True) to
accomodate this ...

Also, how do I get the title of and the link to the parent of the
current document (to accomodate the 'heading' as descibed above)?

I've been searching through the Sphinx code for quite some while, but
couldn'r really figure out which functions/variables are available to
the templates. What I did find out is that probably the code that I
want is in environment.py. But how would I go to implement changes?

Any help is greatly appreciated!

Cheers, A.

-- 
You received this message because you are subscribed to the Google Groups 
"sphinx-dev" group.
To post to this group, send email to sphinx-...@googlegroups.com.
To unsubscribe from this group, send email to 
sphinx-dev+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/sphinx-dev?hl=en.



[sphinx-dev] Re: modifications to the toctree() template function

2010-08-11 Thread andreash
I don't understand what you mean. What's the difference between
'compile time' and 'runtime'?

The toctree() template function takes parameters, which means that it
is evaluated when the HTML files are built. So it should just be a
matter of extending the Sphinx function which the template toctree()
function calls. But which is that? And how would I start?

On Aug 9, 11:14 am, "Alastair Dent"  wrote:
> As I understand it, the toctree is built at compile time, not runtime.
> So normally it is built, then inserted into the html file.
>
> So the sidebars are built, then inserted. So what you are asking for
> would be quite complicated.
>
> I use a 'local' toctree in a similar manner to what you are asking, but
> it is only in the first/overview html file for each chunk.
>
> -Original Message-
> From: sphinx-dev@googlegroups.com [mailto:sphinx-...@googlegroups.com]
>
> On Behalf Of andreash
> Sent: 09 August 2010 09:57
> To: sphinx-dev
> Subject: [sphinx-dev] modifications to the toctree() template function
>
> Hi there,
>
> I'm using Sphinx 1.0.1 to build some websites. While adapting the
> basic template to my needs, I stumbled upon the need to modify the
> toctree() template function to accomodate several things.
>
> Most importantly, I'd like to have toctree() an option to start at the
> level of the current document, and not at the root level. What I mean
> is this:
>
> root/
>    doc1/
>    doc2/
>       doc2.1/
>       doc2.2/
>    doc3/
>
> So I'd like to have the option to render a sidebar menu which only
> contains the 'heading' "doc2", and then the members doc2.1 and doc2.2.
> I was thinking about an option toctree(startatcurrent=True) to
> accomodate this ...
>
> Also, how do I get the title of and the link to the parent of the
> current document (to accomodate the 'heading' as descibed above)?
>
> I've been searching through the Sphinx code for quite some while, but
> couldn'r really figure out which functions/variables are available to
> the templates. What I did find out is that probably the code that I
> want is in environment.py. But how would I go to implement changes?
>
> Any help is greatly appreciated!
>
> Cheers, A.
>
> --
> You received this message because you are subscribed to the Google
> Groups "sphinx-dev" group.
> To post to this group, send email to sphinx-...@googlegroups.com.
> To unsubscribe from this group, send email to
> sphinx-dev+unsubscr...@googlegroups.com.
> For more options, visit this group 
> athttp://groups.google.com/group/sphinx-dev?hl=en.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"sphinx-dev" group.
To post to this group, send email to sphinx-...@googlegroups.com.
To unsubscribe from this group, send email to 
sphinx-dev+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/sphinx-dev?hl=en.



[sphinx-dev] Re: modifications to the toctree() template function

2010-08-11 Thread andreash
you're right, basic theme uses globaltoc.html template. but the code
in there just calls the toctree() template function. which I also do.
my question goes beyond that.

my system doesn't seem to know any localtoc() function.

where can i see which functions are available in the template, and how
to use them?

thanks for your insight :)

a.

On 11 Aug., 15:40, "Alastair Dent"  wrote:
> I was a bit woolly in my description, and on checking, I'm wrong as well.
>
> AFAIK, the sidebar is 'built' by taking info from an html file specified for 
> your theme.  For my setup, that's
> C:\Python26\Lib\site-packages\Sphinx-1.0b2-py2.6.egg\sphinx\themes\basic\globaltoc.html
>
> Can you use the function localtoc instead?
>
> -Original Message-
> From: sphinx-dev@googlegroups.com [mailto:sphinx-...@googlegroups.com] On 
> Behalf Of andreash
> Sent: 11 August 2010 11:45
> To: sphinx-dev
> Subject: [sphinx-dev] Re: modifications to the toctree() template function
>
> I don't understand what you mean. What's the difference between
> 'compile time' and 'runtime'?
>
> The toctree() template function takes parameters, which means that it
> is evaluated when the HTML files are built. So it should just be a
> matter of extending the Sphinx function which the template toctree()
> function calls. But which is that? And how would I start?
>
> On Aug 9, 11:14 am, "Alastair Dent"  wrote:
> > As I understand it, the toctree is built at compile time, not runtime.
> > So normally it is built, then inserted into the html file.
>
> > So the sidebars are built, then inserted. So what you are asking for
> > would be quite complicated.
>
> > I use a 'local' toctree in a similar manner to what you are asking, but
> > it is only in the first/overview html file for each chunk.
>
> > -Original Message-
> > From: sphinx-dev@googlegroups.com [mailto:sphinx-...@googlegroups.com]
>
> > On Behalf Of andreash
> > Sent: 09 August 2010 09:57
> > To: sphinx-dev
> > Subject: [sphinx-dev] modifications to the toctree() template function
>
> > Hi there,
>
> > I'm using Sphinx 1.0.1 to build some websites. While adapting the
> > basic template to my needs, I stumbled upon the need to modify the
> > toctree() template function to accomodate several things.
>
> > Most importantly, I'd like to have toctree() an option to start at the
> > level of the current document, and not at the root level. What I mean
> > is this:
>
> > root/
> >    doc1/
> >    doc2/
> >       doc2.1/
> >       doc2.2/
> >    doc3/
>
> > So I'd like to have the option to render a sidebar menu which only
> > contains the 'heading' "doc2", and then the members doc2.1 and doc2.2.
> > I was thinking about an option toctree(startatcurrent=True) to
> > accomodate this ...
>
> > Also, how do I get the title of and the link to the parent of the
> > current document (to accomodate the 'heading' as descibed above)?
>
> > I've been searching through the Sphinx code for quite some while, but
> > couldn'r really figure out which functions/variables are available to
> > the templates. What I did find out is that probably the code that I
> > want is in environment.py. But how would I go to implement changes?
>
> > Any help is greatly appreciated!
>
> > Cheers, A.
>
> > --
> > You received this message because you are subscribed to the Google
> > Groups "sphinx-dev" group.
> > To post to this group, send email to sphinx-...@googlegroups.com.
> > To unsubscribe from this group, send email to
> > sphinx-dev+unsubscr...@googlegroups.com.
> > For more options, visit this group 
> > athttp://groups.google.com/group/sphinx-dev?hl=en.
>
> --
> You received this message because you are subscribed to the Google Groups 
> "sphinx-dev" group.
> To post to this group, send email to sphinx-...@googlegroups.com.
> To unsubscribe from this group, send email to 
> sphinx-dev+unsubscr...@googlegroups.com.
> For more options, visit this group 
> athttp://groups.google.com/group/sphinx-dev?hl=en.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"sphinx-dev" group.
To post to this group, send email to sphinx-...@googlegroups.com.
To unsubscribe from this group, send email to 
sphinx-dev+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/sphinx-dev?hl=en.



[sphinx-dev] Output-format-dependent substitution

2012-01-09 Thread andreash
Hi Sphinx experts,

how can I make a substitution depending on the output-format?

Basically, I would like to have something like this::

   if html:
  |CLICK| unicode:: U+21E8
   elif latex:
  |CLICK| raw:: latex

 $\LongRightArrow$

but I cannot seem to get the syntax right.

Any help is greatly appreciated :)

Andreas.

-- 
You received this message because you are subscribed to the Google Groups 
"sphinx-dev" group.
To post to this group, send email to sphinx-dev@googlegroups.com.
To unsubscribe from this group, send email to 
sphinx-dev+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/sphinx-dev?hl=en.



[sphinx-dev] Re: Output-format-dependent substitution

2012-01-11 Thread andreash
Thanks, Günter, I actually use

   latex_preamble = "\\DeclareUnicodeCharacter{21E8}{\\ensuremath{\
\Rightarrow}}"

in my conf.py now.

Cheers,
Andreas.

On 10 Jan., 11:44, Guenter Milde  wrote:
> On 2012-01-09, andreash wrote:
> > Hi Sphinx experts,
> > how can I make a substitution depending on the output-format?
> > Basically, I would like to have something like this::
> >    if html:
> >       |CLICK| unicode:: U+21E8
> >    elif latex:
> >       |CLICK| raw:: latex
> >                  $\LongRightArrow$
>
> Ugly workaround:
>
> .. |CLICK| raw:: latex
>
>     $\LongRightArrow$
>
> .. |CLACK| raw:: html
>
>     ⇨
>
> Now |CLICK|\ |CLACK| here!
>
> Another option would be to add a conversion for U+21E8 in the
> LaTeX preamble. The latex writer uses e.g.
>
>   '\\DeclareUnicodeCharacter{00A0}{\\nobreakspace}',
>
> * I recommend \ensuremath{\LongRightArrow} to get this working in both
>   text and math.
> * of course this requires that you use utf8 encoding for
>   the latex source.
> * Untested!
>
> Günter

-- 
You received this message because you are subscribed to the Google Groups 
"sphinx-dev" group.
To post to this group, send email to sphinx-dev@googlegroups.com.
To unsubscribe from this group, send email to 
sphinx-dev+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/sphinx-dev?hl=en.



placeholders not replaced in html_title

2009-02-26 Thread andreash

Hi there,

I have a problem with html_title in conf.py.

When I do not set html_title in conf.py, the title of the HTML pages
is as I expect it to be. However, when I declare

html_title = ' Dokumentation :: SVN rev. '

the title of all my HTML documents becones

 Dokumentation :: SVN rev. 

I also already tried replacing the <> with ||, but that doesn't help
either.

What am I doing wrong here?

Thanks a lot!

Andreas


PS:
version = '62'
release = '62'

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"sphinx-dev" group.
To post to this group, send email to sphinx-dev@googlegroups.com
To unsubscribe from this group, send email to 
sphinx-dev+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/sphinx-dev?hl=en
-~--~~~~--~~--~--~---



question regarding contents directive

2009-03-18 Thread andreash

Hey there,

I have a question regarding the .. contents:: directive.

My document roughly looks as follows:


**
My Heading
**

.. contents:: Übersicht

First section
=

First subsection


Second section
==

The problem is that in the contents, the heading of the document is
also included:

Übersicht

* My Heading
  o First section
+ First subsection
  o Second section


I think that's not really necessary, since the document is titled My
Heading, and this is very big and visible on the top of the page.

So my question is:

How can I tell Sphinx that it shall not display the Heading in the
contents directive?

Thanks for your help,

Andreas

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"sphinx-dev" group.
To post to this group, send email to sphinx-dev@googlegroups.com
To unsubscribe from this group, send email to 
sphinx-dev+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/sphinx-dev?hl=en
-~--~~~~--~~--~--~---



-interaction=nonstopmode in LaTeX build

2009-03-19 Thread andreash

Hey there,

for a project I'm building the documentation automatically upon a
commit using a post-commit hook (SVN). For this scenario it would be
really nice to have the option of adding --interaction=nonstopmode to
the latex commands. However, the Makefile seems to be re-written every
time I run 'make latex' in the documentation root directory. How can i
solve this?

Thanks,

Andreas

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"sphinx-dev" group.
To post to this group, send email to sphinx-dev@googlegroups.com
To unsubscribe from this group, send email to 
sphinx-dev+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/sphinx-dev?hl=en
-~--~~~~--~~--~--~---



Modify Sphinx documentation via web interface?

2009-04-01 Thread andreash

Hi there,

I would really like to be able to modify my project's Sphinx
documentation / .rst files via a web interface. Are there any ideas
out there how to do this? Perhaps with a Sphinx / Moin integration?

Thanks for you ideas,

Andreas

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"sphinx-dev" group.
To post to this group, send email to sphinx-dev@googlegroups.com
To unsubscribe from this group, send email to 
sphinx-dev+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/sphinx-dev?hl=en
-~--~~~~--~~--~--~---



[sphinx-dev] How to customize localization?

2010-03-15 Thread andreash
Is there any place where I can find out how to customize translations?
What I did:

* Create /locale/de/LC_MESSAGES
* Create a file sphinx.po in that directory
* Added "locale_dirs = ['../locale']" to conf.py
* put the following content in sphinx.po::

 #: sphinx/themes/basic/layout.html:196
 #, python-format
 msgid ""
 "Created using http://sphinx.pocoo.org/\";>Sphinx "
 "%(sphinx_version)s."
 msgstr ""
 "Erstellt mit http://sphinx.pocoo.org/\";>Sphinx "
 "%(sphinx_version)s."

So obviously what I want to do is override some of the "official"
translations for one project only. If now run ``make html``, nothing
seems to happen. Sorry to have to ask this, but couldn't find it
anywhere in the documentation ...

Thanks for your insight,

Andreas.

-- 
You received this message because you are subscribed to the Google Groups 
"sphinx-dev" group.
To post to this group, send email to sphinx-...@googlegroups.com.
To unsubscribe from this group, send email to 
sphinx-dev+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/sphinx-dev?hl=en.



[sphinx-dev] prevent TOCTREE from being displayed

2010-03-15 Thread andreash
Is there a way to prevent TOCTREEs from being displayed in HTML
output? I'm using Sphinx 1.0 with the agogo theme, and would like to
have the toctree in the sidebar only, not also somewhere in my
documents' bodies.

Thanks for you insight,

Andreas.

-- 
You received this message because you are subscribed to the Google Groups 
"sphinx-dev" group.
To post to this group, send email to sphinx-...@googlegroups.com.
To unsubscribe from this group, send email to 
sphinx-dev+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/sphinx-dev?hl=en.



[sphinx-dev] How to link to internal documents, not to marks within a document

2010-03-15 Thread andreash
Hi there,

I'm trying to build my website using Sphinx. So far, I linked from one
page to another using :ref:. However, if the page I link to is larger
than the screen, it is not shown from the top, but rather from the
first headline (I placed the :ref: right in before the page's title).
Is there any way to link to an internal document using a reference
instead of a path, but the link pointing to the html document and not
to the first anchor?

Thanks,

Andreas.

-- 
You received this message because you are subscribed to the Google Groups 
"sphinx-dev" group.
To post to this group, send email to sphinx-...@googlegroups.com.
To unsubscribe from this group, send email to 
sphinx-dev+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/sphinx-dev?hl=en.



[sphinx-dev] locale for last_updated timestamp

2010-03-15 Thread andreash
Hi there,

I set ``language = 'de'`` and ``html_last_updated_fmt = '%d. %B %Y'``
in ``conf.py`` (Sphinx 1.0). Now I would expect that today's date is
displayed as "15. März 2010", but instead it is dispayed as "15. March
2010". Why is that? My system's locale is set to "de_de.UTF-8", if
that has anything to do with it ...

Thanks for your insight,

Andreas.

-- 
You received this message because you are subscribed to the Google Groups 
"sphinx-dev" group.
To post to this group, send email to sphinx-...@googlegroups.com.
To unsubscribe from this group, send email to 
sphinx-dev+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/sphinx-dev?hl=en.



[sphinx-dev] Re: How to link to internal documents, not to marks within a document

2010-03-15 Thread andreash
Thanks - works like a charm :)

On 15 Mrz., 20:33, Kevin Horn  wrote:
> On Sun, Mar 14, 2010 at 3:20 PM, andreash  wrote:
> > Hi there,
>
> > I'm trying to build my website using Sphinx. So far, I linked from one
> > page to another using :ref:. However, if the page I link to is larger
> > than the screen, it is not shown from the top, but rather from the
> > first headline (I placed the :ref: right in before the page's title).
> > Is there any way to link to an internal document using a reference
> > instead of a path, but the link pointing to the html document and not
> > to the first anchor?
>
> > Thanks,
>
> > Andreas.
>
> use
>
> :doc:`reference to file`
>
> see:http://sphinx.pocoo.org/markup/inline.html#cross-referencing-documents
>
> Kevin Horn

-- 
You received this message because you are subscribed to the Google Groups 
"sphinx-dev" group.
To post to this group, send email to sphinx-...@googlegroups.com.
To unsubscribe from this group, send email to 
sphinx-dev+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/sphinx-dev?hl=en.



[sphinx-dev] Re: prevent TOCTREE from being displayed

2010-03-15 Thread andreash
Hmmm ...

Works fine for a toctree which is not in my master document. However,
when I apply the same to my master document, I get an error (see
below). The toctree inside my main index.txt looks like this:

.. toctree::
   :maxdepth: 2
   :titlesonly:
   :hidden:

   profil
   projekte
   partner
   kontakt
   impressum

And the error I get is this:

# Sphinx version: 1.0
# Docutils version: 0.5 release
# Jinja2 version: 2.1.1
Traceback (most recent call last):
  File "/home/andreas/lib/python2.6/sphinx/sphinx/cmdline.py", line
170, in main
app.build(all_files, filenames)
  File "/home/andreas/lib/python2.6/sphinx/sphinx/application.py",
line 144, in build
self.builder.build_update()
  File "/home/andreas/lib/python2.6/sphinx/sphinx/builders/
__init__.py", line 265, in build_update
'out of date' % len(to_build))
  File "/home/andreas/lib/python2.6/sphinx/sphinx/builders/
__init__.py", line 320, in build
self.write(docnames, list(updated_docnames), method)
  File "/home/andreas/lib/python2.6/sphinx/sphinx/builders/
__init__.py", line 359, in write
self.write_doc(docname, doctree)
  File "/home/andreas/lib/python2.6/sphinx/sphinx/builders/html.py",
line 380, in write_doc
self.handle_page(docname, ctx, event_arg=doctree)
  File "/home/andreas/lib/python2.6/sphinx/sphinx/builders/html.py",
line 743, in handle_page
output = self.templates.render(templatename, ctx)
  File "/home/andreas/lib/python2.6/sphinx/sphinx/jinja2glue.py", line
107, in render
return self.environment.get_template(template).render(context)
  File "/home/andreas/lib/python2.6/sphinx/sphinx/themes/basic/
page.html", line 10, in top-level template code
{% extends "layout.html" %}
  File "/home/andreas/edv-dl/orga/webseite/source/../themes/ahit/
layout.html", line 11, in top-level template code
{% extends "basic/layout.html" %}
  File "/home/andreas/lib/python2.6/sphinx/sphinx/themes/basic/
layout.html", line 149, in top-level template code
{%- block content %}
  File "/home/andreas/edv-dl/orga/webseite/source/../themes/ahit/
layout.html", line 52, in block "content"
{%- block sidebartoc %}
  File "/home/andreas/edv-dl/orga/webseite/source/../themes/ahit/
layout.html", line 54, in block "sidebartoc"
{{ toctree(collapse=True) }}
  File "/home/andreas/lib/python2.6/site-packages/Jinja2-2.1.1-py2.6-
linux-x86_64.egg/jinja2/sandbox.py", line 238, in call
return __context.call(__obj, *args, **kwargs)
  File "/home/andreas/lib/python2.6/site-packages/Jinja2-2.1.1-py2.6-
linux-x86_64.egg/jinja2/runtime.py", line 132, in call
return __obj(*args, **kwargs)
  File "/home/andreas/lib/python2.6/sphinx/sphinx/builders/html.py",
line 735, in 
ctx['toctree'] = lambda **kw: self._get_local_toctree(pagename,
**kw)
  File "/home/andreas/lib/python2.6/sphinx/sphinx/builders/html.py",
line 680, in _get_local_toctree
docname, self, collapse))['fragment']
  File "/home/andreas/lib/python2.6/sphinx/sphinx/builders/html.py",
line 200, in render_partial
doc.append(node)
  File "/usr/lib/python2.6/dist-packages/docutils/nodes.py", line 554,
in append
self.setup_child(item)
  File "/usr/lib/python2.6/dist-packages/docutils/nodes.py", line 95,
in setup_child
child.parent = self
AttributeError: 'NoneType' object has no attribute 'parent'


Any idea what might be happening?

Thanks for your insight,

Andreas.

-- 
You received this message because you are subscribed to the Google Groups 
"sphinx-dev" group.
To post to this group, send email to sphinx-...@googlegroups.com.
To unsubscribe from this group, send email to 
sphinx-dev+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/sphinx-dev?hl=en.



[sphinx-dev] Re: prevent TOCTREE from being displayed

2010-03-15 Thread andreash


On 15 Mrz., 22:42, Kevin Horn  wrote:
> On Mon, Mar 15, 2010 at 3:25 PM, andreash  wrote:
> > Hmmm ...
>
> > Works fine for a toctree which is not in my master document. However,
> > when I apply the same to my master document, I get an error (see
> > below). The toctree inside my main index.txt looks like this:
>
> > .. toctree::
> >   :maxdepth: 2
> >   :titlesonly:
> >   :hidden:
>
> >   profil
> >   projekte
> >   partner
> >   kontakt
> >   impressum
>
> > And the error I get is this:
>
> > # Sphinx version: 1.0
> > # Docutils version: 0.5 release
> > # Jinja2 version: 2.1.1
> > Traceback (most recent call last):
> >  File "/home/andreas/lib/python2.6/sphinx/sphinx/cmdline.py", line
> > 170, in main
> >    app.build(all_files, filenames)
> >  File "/home/andreas/lib/python2.6/sphinx/sphinx/application.py",
> > line 144, in build
> >    self.builder.build_update()
> >  File "/home/andreas/lib/python2.6/sphinx/sphinx/builders/
> > __init__.py", line 265, in build_update
> >    'out of date' % len(to_build))
> >  File "/home/andreas/lib/python2.6/sphinx/sphinx/builders/
> > __init__.py", line 320, in build
> >    self.write(docnames, list(updated_docnames), method)
> >  File "/home/andreas/lib/python2.6/sphinx/sphinx/builders/
> > __init__.py", line 359, in write
> >    self.write_doc(docname, doctree)
> >  File "/home/andreas/lib/python2.6/sphinx/sphinx/builders/html.py",
> > line 380, in write_doc
> >    self.handle_page(docname, ctx, event_arg=doctree)
> >  File "/home/andreas/lib/python2.6/sphinx/sphinx/builders/html.py",
> > line 743, in handle_page
> >    output = self.templates.render(templatename, ctx)
> >  File "/home/andreas/lib/python2.6/sphinx/sphinx/jinja2glue.py", line
> > 107, in render
> >    return self.environment.get_template(template).render(context)
> >  File "/home/andreas/lib/python2.6/sphinx/sphinx/themes/basic/
> > page.html", line 10, in top-level template code
> >    {% extends "layout.html" %}
> >  File "/home/andreas/edv-dl/orga/webseite/source/../themes/ahit/
> > layout.html", line 11, in top-level template code
> >    {% extends "basic/layout.html" %}
> >  File "/home/andreas/lib/python2.6/sphinx/sphinx/themes/basic/
> > layout.html", line 149, in top-level template code
> >    {%- block content %}
> >  File "/home/andreas/edv-dl/orga/webseite/source/../themes/ahit/
> > layout.html", line 52, in block "content"
> >    {%- block sidebartoc %}
> >  File "/home/andreas/edv-dl/orga/webseite/source/../themes/ahit/
> > layout.html", line 54, in block "sidebartoc"
> >    {{ toctree(collapse=True) }}
> >  File "/home/andreas/lib/python2.6/site-packages/Jinja2-2.1.1-py2.6-
> > linux-x86_64.egg/jinja2/sandbox.py", line 238, in call
> >    return __context.call(__obj, *args, **kwargs)
> >  File "/home/andreas/lib/python2.6/site-packages/Jinja2-2.1.1-py2.6-
> > linux-x86_64.egg/jinja2/runtime.py", line 132, in call
> >    return __obj(*args, **kwargs)
> >  File "/home/andreas/lib/python2.6/sphinx/sphinx/builders/html.py",
> > line 735, in 
> >    ctx['toctree'] = lambda **kw: self._get_local_toctree(pagename,
> > **kw)
> >  File "/home/andreas/lib/python2.6/sphinx/sphinx/builders/html.py",
> > line 680, in _get_local_toctree
> >    docname, self, collapse))['fragment']
> >  File "/home/andreas/lib/python2.6/sphinx/sphinx/builders/html.py",
> > line 200, in render_partial
> >    doc.append(node)
> >  File "/usr/lib/python2.6/dist-packages/docutils/nodes.py", line 554,
> > in append
> >    self.setup_child(item)
> >  File "/usr/lib/python2.6/dist-packages/docutils/nodes.py", line 95,
> > in setup_child
> >    child.parent = self
> > AttributeError: 'NoneType' object has no attribute 'parent'
>
> > Any idea what might be happening?
>
> > Thanks for your insight,
>
> > Andreas.
>
> Try taking out the :maxdepth: option
>
> Kevin Horn

No change, unfortunately. Error log is exactly the same. Tried taking
out :maxdepth:, tried taking out :titlesonly:, tried taking out self.
All to no avail :(

Andreas.

-- 
You received this message because you are subscribed to the Google Groups 
"sphinx-dev" group.
To post to this group, send email to sphinx-...@googlegroups.com.
To unsubscribe from this group, send email to 
sphinx-dev+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/sphinx-dev?hl=en.



[sphinx-dev] How to include bibliography from BibTeX

2010-05-30 Thread andreash
Hi there,

I am using Zotero (http://www.zotero.org) to manage my bibliography
database. Is there any way how I can include this bibliography into
Sphinx? Especially in the HTML output ... I'm not necessarily looking
for a way to actually use these items (although it would be nice); it
would rather be sufficient to generate the bibliography, if possible
with the BibTeX style of my choice ...

If this is not possible, what would be the best way to implement this?
I'd really be interested in implementing this ...

Cheers,

Andreas.

-- 
You received this message because you are subscribed to the Google Groups 
"sphinx-dev" group.
To post to this group, send email to sphinx-...@googlegroups.com.
To unsubscribe from this group, send email to 
sphinx-dev+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/sphinx-dev?hl=en.



[sphinx-dev] Re: How to include bibliography from BibTeX

2010-05-31 Thread andreash
Hi,

thanks for pointing me towards that. From a first glance, bibstuff
looks pretty promising. I'll look around docutils-dev to get going ...

Cheers,

Andreas.

On May 31, 8:09 am, Guenter Milde  wrote:
> On 2010-05-30, andreash wrote:
> > Hi there,
> > I am using Zotero (http://www.zotero.org) to manage my bibliography
> > database. Is there any way how I can include this bibliography into
> > Sphinx? Especially in the HTML output ... I'm not necessarily looking
> > for a way to actually use these items (although it would be nice); it
> > would rather be sufficient to generate the bibliography, if possible
> > with the BibTeX style of my choice ...
> > If this is not possible, what would be the best way to implement this?
>
> The fastest way would be to export from the BibTeX database to HTML (see
> below for tools able to do this) and include (or link to) the resulting
> file.
>
> > I'd really be interested in implementing this ...
>
> There is a TODO item for Docutils regarding citations:
>
>   Citations:
>     Collect citations that are referenced ...
>
>     Citations can be:
>
>     a) defined in the document as citation elements
>
>     b) auto-generated from entries in a bibliographic database.
>
>        + based on bibstuff_?
>        + also have a look at
>
>          * CrossTeX_, a backwards-compatible, improved bibtex
>            re-implementation in Python (including HTML export).
>            (development stalled since 2 years)
>
>          * Pybtex_,a drop-in replacement for BibTeX written in Python.
>
>            * BibTeX styles & (experimental) pythonic style API.
>            * Database in BibTeX, BibTeXML and YAML formats.
>            * full Unicode support.
>            * Write to TeX, HTML and plain text.
>
>     * Automatically insert a "References" heading?
>
> .. _bibstuff:http://code.google.com/p/bibstuff/
> .. _CrossTeX:http://www.cs.cornell.edu/people/egs/crosstex/
> .. _Pybtex:  http://pybtex.sourceforge.net/
>
> Once this is solved in the Docutils core, it will be available for Sphinx
> too.
>
> Günter

-- 
You received this message because you are subscribed to the Google Groups 
"sphinx-dev" group.
To post to this group, send email to sphinx-...@googlegroups.com.
To unsubscribe from this group, send email to 
sphinx-dev+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/sphinx-dev?hl=en.



[sphinx-dev] integrating pylit with sphinx

2010-06-01 Thread andreash
Hi there,

I was wondering if there is an easy way to integrate pylit with
sphinx?

I would like to put my Python scripts somewhere inside my sphinx tree,
and it would be great if sphinx (or rather, the makefile) would
automatically call pylit for each .py file inside the tree which is
referenced by a toctree element (toctree references myscript.py.txt =>
pylit myscript.py is called before sphinx-build)

Any idea how to easily implement this?

Thanks for your insight,

A.

-- 
You received this message because you are subscribed to the Google Groups 
"sphinx-dev" group.
To post to this group, send email to sphinx-...@googlegroups.com.
To unsubscribe from this group, send email to 
sphinx-dev+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/sphinx-dev?hl=en.



[sphinx-dev] Re: integrating pylit with sphinx

2010-06-03 Thread andreash
I solved this putting a

find . -type f -name '*.py' -exec pylit.py {} \;

in the makefile, at the beginning of each target definition.

On Jun 1, 6:57 pm, andreash  wrote:
> Hi there,
>
> I was wondering if there is an easy way to integrate pylit with
> sphinx?
>
> I would like to put my Python scripts somewhere inside my sphinx tree,
> and it would be great if sphinx (or rather, the makefile) would
> automatically call pylit for each .py file inside the tree which is
> referenced by a toctree element (toctree references myscript.py.txt =>
> pylit myscript.py is called before sphinx-build)
>
> Any idea how to easily implement this?
>
> Thanks for your insight,
>
> A.

-- 
You received this message because you are subscribed to the Google Groups 
"sphinx-dev" group.
To post to this group, send email to sphinx-...@googlegroups.com.
To unsubscribe from this group, send email to 
sphinx-dev+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/sphinx-dev?hl=en.