-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Sections inside only:: tags do not show up in the html #886
Comments
From Georg Brandl on 2012-03-10 20:06:08+00:00 Duplicate of #795. |
From mateobur on 2012-08-10 12:48:32+00:00 The exact same issue seems to have reappeared. Ubuntu 12.04 |
From Jon Waltman on 2012-08-12 08:09:00+00:00 It wasn't ever really fixed; it just documented this as a known limitation of the only directive.
http://sphinx.pocoo.org/markup/misc.html?highlight=only%20dir#directive-only |
From mateobur on 2012-08-12 10:49:30+00:00 Thanks for the reply Jon, But if you see the attached document, for example example2.rst {{{ hello examplebla bla .. only:: randomtag
}}} To me, it seems like 'hello' is the main document heading and the sections with "==" are secondary, but still, the second section isn't appearing in the document. Sorry if this is me misunderstanding something. |
From Jon Waltman on 2012-08-12 11:15:47+00:00 Instead of the main document heading, I think it is actually the current heading. That is, only sub-headings are handled correctly. So this will work: {{{ examplebla bla .. only:: randomtag
}}} because the "--" heading is lower than "==". |
From mateobur on 2012-08-12 11:23:44+00:00 Thanks again for you attention, But then, this is not completely useful because 'lacabr' will have to be a subsection of 'example' and will appear as such in the document index, what I really want is to have a same-level section only when I apply the tag. Maybe that's just not possible, but seems odd. |
From Jon Waltman on 2012-08-12 11:42:45+00:00 Yea, but it does avoid some ambiguous situations like the following: {{{ Section Abla bla .. only:: randomtag
Subsection A.1 or B.1blah blah |
From mateobur on 2012-08-12 11:49:11+00:00 If it has the same indentation level as B, it will be B.1, in your example A.1 :). It can't be a subsection of B in your example because B may not be there in the final document. Odd thing is, I have some documents where the same-level headers inside only:: tag work for some of the tags and not for others. PD: I'm hanging around the #pocoo IRC channel if you want to chat directly. |
From Jon Waltman on 2012-08-12 17:41:59+00:00 I hacked together a new only directive that should work with nested and same-level headers. You try it out by adding the following to your conf.py {{{ from docutils.parsers.rst import Directive
def setup(app):
}}} |
From Georg Brandl on 2014-10-18 07:32:54+00:00 Removing version: 1.1.1 (automated comment) |
Please try to compile the attached example using: make html
The text was updated successfully, but these errors were encountered: