Heading problem with docutils

29 views
Skip to first unread message

Nicolas MARTIN

unread,
Feb 20, 2018, 10:00:44 AM2/20/18
to Trac Users
Hello Trac users,


I have downloaded and build docutils for your hosted project, the rst
wikiprocessor is working but I face an issue with section headings: my
lonely highest section title is recognized as the document title and so
the headings structure is not met under Trac as the title use h1 tag for
rendering.
The issue is probably better described here:
http://docutils.sourceforge.net/FAQ.html#unexpected-results-from-tools-rst2html-py-h1-h1-instead-of-h1-h2-why

They suggest to modify the default setting in the configuration with
docutils.conf file but where do I have to put this file to be taken into
account by Trac? I tested in the docutils build directory, PYTHONPATH,
plugins directory but nothing seems to be working.

Otherwise, does anybody know a workaround for this ?


Regards,
Nicolas

RjOllos

unread,
Mar 3, 2018, 4:15:22 AM3/3/18
to Trac Users
Sourceforge is down so I can't see the "official" documentation, but it looks like you can specify the config file with the environment variable DOCUTILSCONFIG.

If you are using Apache and have loaded mod_env you can use the SetEnv directive:

Let me know if that works for you. I'm interested to know if we can rely on this environment variable, or if we need to make any modifications to Trac in order to have the config file respected.

- Ryan

Nicolas MARTIN

unread,
Apr 4, 2018, 9:56:11 AM4/4/18
to trac-...@googlegroups.com

Thanks Ryan for the tip.

In fact, I don't know how our administrator has handle this (no new env. variable declared in Apache conf file) but by one way or another my local configuration is now taken into account.

Unfortunately the suggested workaround doesn't seem to work, my first heading is still processed as the document title.


Nicolas

--
You received this message because you are subscribed to the Google Groups "Trac Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to trac-users+...@googlegroups.com.
To post to this group, send email to trac-...@googlegroups.com.
Visit this group at https://groups.google.com/group/trac-users.
For more options, visit https://groups.google.com/d/optout.

Nicolas MARTIN

unread,
Apr 4, 2018, 10:42:59 AM4/4/18
to trac-...@googlegroups.com

My bad, my initial setting was not the good one.

Here is the right lines to use:

[standalone reader]
doctitle_xform: false

RjOllos

unread,
Apr 10, 2018, 7:57:44 PM4/10/18
to Trac Users


On Wednesday, April 4, 2018 at 6:56:11 AM UTC-7, Nicolas MARTIN wrote:

Thanks Ryan for the tip.

In fact, I don't know how our administrator has handle this (no new env. variable declared in Apache conf file) but by one way or another my local configuration is now taken into account.


Just curios, what is the location of the docutils.conf that you are editing? 

- Ryan

Nicolas MARTIN

unread,
Apr 11, 2018, 6:35:05 AM4/11/18
to trac-...@googlegroups.com

As suggested by docutils configuration doc, I made some tests on a hidden .docutils file in the so-called HOME of the project (./trac, ./svn, ...).

It is outside of the Trac environment defined by TRAC_ENV variable in Apache conf and I still don't know what has changed in the system to take it into account.


Nicolas

Ryan Ollos

unread,
Apr 11, 2018, 3:09:20 PM4/11/18
to Trac Users
On Wed, Apr 11, 2018 at 3:34 AM, Nicolas MARTIN <ntm...@locean.upmc.fr> wrote:

As suggested by docutils configuration doc, I made some tests on a hidden .docutils file in the so-called HOME of the project (./trac, ./svn, ...).


I assume ./svn is the root of your Subversion repository. What is ./trac, if not the environment directory? 

It is outside of the Trac environment defined by TRAC_ENV variable in Apache conf and I still don't know what has changed in the system to take it into account.


I was expecting only /etc/docutils.conf to be considered, since the web server often runs as a user that doesn't have a home directory and it seems like "current directory" only applies when executing docutils from the command line.

- Ryan 

RjOllos

unread,
Apr 19, 2018, 7:17:38 PM4/19/18
to Trac Users

I made a ticket for adding a [mimeviewer] docutils_config_file option.
https://trac.edgewall.org/ticket/13012

- Ryan
Reply all
Reply to author
Forward
0 new messages