Issues

Issue #449 resolved

TOC :glob: is incompatible with explicitly named files

Barry Warsaw
created an issue

I want to have the following toctree in my top level document:

{{{

.. toctree:: :glob:

docs/using.txt
docs/*
NEWS.txt

}}}

The idea being that I want the docs/using.txt to show up first, followed by everything else in the docs directory. This does not work though:

{{{

/home/me/projects/flufl/flufl.i18n/flufl/i18n/README.txt:86: (WARNING/2) toctree glob pattern u'docs/using.txt' didn't match any documents /home/me/projects/flufl/flufl.i18n/flufl/i18n/README.txt:86: (WARNING/2) toctree glob pattern u'NEWS.txt' didn't match any documents }}}

If there's no glob pattern, shouldn't it be taken as a literal file name and used to influence the sorting of the toc entries?

Oh, and why doesn't docs/*.txt work here?

Comments (4)

  1. Georg Brandl repo owner

    The problem is that inside "toctree", you specify document names, not file names. Document names are sans extension. Without the glob option, specifying the extension still works because there I can explicitly try removing the extension; for glob it won't.

  2. Log in to comment