include file with no title

653 views
Skip to first unread message

Andrea Cassioli

unread,
Sep 10, 2014, 7:48:37 AM9/10/14
to sphinx...@googlegroups.com
Hi,
I'd like to know whether is possible to include a file with no title. I have tried to add it to a toctree as 


.. toctree::
   :hidden:
  
    <a-file.rst>


but the file is not included. Any ideas?

Takayuki Shimizukawa

unread,
Sep 14, 2014, 11:18:20 PM9/14/14
to sphinx...@googlegroups.com
Hi,

There is no way to reference to non-title reST file from toctree directive.
If you just want to *include* reST file, you can use `.. include::
a-file.rst` directive.

.. for internally:
.. toctree need least 1 section header for each reST file to reference
(for html builder).

Regards,
--
Takayuki SHIMIZUKAWA
http://about.me/shimizukawa
> --
> 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 post to this group, send email to sphinx...@googlegroups.com.
> Visit this group at http://groups.google.com/group/sphinx-users.
> For more options, visit https://groups.google.com/d/optout.

Andrea Cassioli

unread,
Oct 8, 2014, 9:09:56 AM10/8/14
to sphinx...@googlegroups.com

I was wondering,
I see that you need a title, but could it be possible to hide it in the page?

I am creating a documentation in which I have a page per class. I'd like to start the page with the class definition:

.. class:: classname


and so on. The class definition should be the class title  too....

Any ideas?

Takayuki Shimizukawa

unread,
Oct 19, 2014, 2:31:39 AM10/19/14
to sphinx...@googlegroups.com
Hi,

Sorry for late reply.

2014-10-08 22:09 GMT+09:00 Andrea Cassioli <andrea....@mosek.com>:
> I was wondering,
> I see that you need a title, but could it be possible to hide it in the
> page?

I think there is no way to hide the title.
As a workaround, it might be hidden by using CSS.


> I am creating a documentation in which I have a page per class. I'd like to
> start the page with the class definition:
>
> .. class:: classname
>
> and so on. The class definition should be the class title too....
>
> Any ideas?

In such case, scikit-learn is writing a page as::

:mod:`sklearn.svm`.SVC
=============================

.. currentmodule:: sklearn.svm

.. autoclass:: SVC

.. automethod:: __init__


http://scikit-learn.org/stable/_sources/modules/generated/sklearn.svm.SVC.txt

And it is rendered as:
http://scikit-learn.org/stable/modules/generated/sklearn.svm.SVC.html
The class name appears as a page title and a class definition.
It looks fine.

Can you apply the style to your documentation?

Regards,

> On Monday, September 15, 2014 5:18:20 AM UTC+2, Takayuki SHIMIZUKAWA wrote:
>>
>> Hi,
>>
>> There is no way to reference to non-title reST file from toctree
>> directive.
>> If you just want to *include* reST file, you can use `.. include::
>> a-file.rst` directive.
>>
>> .. for internally:
>> .. toctree need least 1 section header for each reST file to reference
>> (for html builder).
>>
>> Regards,
>> --
>> Takayuki SHIMIZUKAWA
>> http://about.me/shimizukawa
>>
>>
>> 2014-09-10 20:48 GMT+09:00 Andrea Cassioli <andrea....@mosek.com>:
>> > Hi,
>> > I'd like to know whether is possible to include a file with no title. I
>> > have
>> > tried to add it to a toctree as
>> >
>> >
>> > .. toctree::
>> > :hidden:
>> >
>> > <a-file.rst>
>> >
>> >
>> > but the file is not included. Any ideas?

--
Takayuki SHIMIZUKAWA
http://about.me/shimizukawa

Andrea Cassioli

unread,
Oct 20, 2014, 4:15:37 AM10/20/14
to sphinx...@googlegroups.com
Hi,
thanks.

I am doing something similar to what you suggest. Your are right, using CSS may be a simpler solution though.


--
You received this message because you are subscribed to a topic in the Google Groups "sphinx-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/sphinx-users/FABotwguqbY/unsubscribe.
To unsubscribe from this group and all its topics, send an email to sphinx-users...@googlegroups.com.

To post to this group, send email to sphinx...@googlegroups.com.
Visit this group at http://groups.google.com/group/sphinx-users.
For more options, visit https://groups.google.com/d/optout.



--
Andrea Cassioli

MOSEK APS 
Fruebjergvej 3, Box 16, 
DK-2100 Copenhagen O

Reply all
Reply to author
Forward
0 new messages