Different index files for latex and html

26 views
Skip to first unread message

Stefano David

unread,
Nov 24, 2020, 5:23:22 AM11/24/20
to sphinx-users
Hi,

I know I read something about my problem somewhere, but I can not find references to it anymore.

Scenario: I have a project with two different index files (index.rst for html and latex.rst for latex), because the HTML version has a section with download links that should not be part of the latex versions. The point is that at every build (both html and latex) there is a warning message "latex.rst: WARNING: document isn't included in any toctree", although the latex.rst is referenced:
latex_documents = [
('latex', 'manual.tex', 'My Manual', '', 'manual', False),

The warning itself does not create any problem in the build, except for a file latex.html being created, it is just annoying. Adding :orphan: does not help either

My question is therefore: is there a (suggested) way to let this warning disappear? Or, in other words, what is the correct way to set up the source/index in these cases?

Thanks for any pointer,
Stefano

Komiya Takeshi

unread,
Nov 24, 2020, 10:32:54 AM11/24/20
to sphinx...@googlegroups.com
Hi,

My suggestion is using orphan metadata.
https://www.sphinx-doc.org/en/master/usage/restructuredtext/field-lists.html#metadata

2020年11月24日(火) 19:23 Stefano David <ste...@gmail.com>:
> --
> You received this message because you are subscribed to the Google Groups "sphinx-users" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to sphinx-users...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/sphinx-users/1b507b1e-f1d4-48da-82be-8809bc717155n%40googlegroups.com.

Stefano David

unread,
Nov 26, 2020, 11:24:40 AM11/26/20
to sphinx-users
Hi Taheshi,



On Tuesday, 24 November 2020 at 16:32:54 UTC+1 i.tk...@gmail.com wrote:
> Hi,
>
> My suggestion is using orphan metadata.
Unfortunately when using :orphan:, a latex.html is created, I already tried it. I will probably revert to use a only:: directive to separate the two toctrees in a same index.rst file (a solution that I don't like that much, but it seems to work).

Thank you,
Stefano
Reply all
Reply to author
Forward
0 new messages