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
Headlines are not shown #116
Comments
Hi, Curious! I imagine that is a bug in Breathe. I don't think I've explicitly tested for them before. The interesting question is always: what does the Doxygen xml look like? I imagine it is all there but using some xml node that Breathe isn't handling at the moment. Thanks for reporting the issue :) |
Thanks to Your explanation in issue #81 I ended up with a working renderer stub class DocHeadingTypeSubRenderer(Renderer):
def render(self):
return [self.node_factory.Text("This is heading")] which actually prints the text instead of the headline. Now I'm lost. Docutils does not a have a class for headings, but only for sections. Sections in docutils are kind of a super-node for the section content while doxygen does not care about the section structure and just embeds a heading element on equal level as any other paragraph. Can anybody confirm that? |
Thanks for following that up. I'm glad the #81 explanation helped and thanks for the reminder that it is there. I meant to port that into the docs at some point. I agree that headings have a special significance in docutils and I'm not sure how to go about creating titles without them. It might be worth investigating what sphinx autodoc does for headings placed in Python rst docstrings. Perhaps that will provide guidance or maybe we'll have to find our own way here. I'll try to have a look at that this evening. |
I've realized, that member documentation uses emphasized text instead of sections. Breathe directives do not add anything to the TOC. How about doing the same with headings? I would rather like to see a comprehensive solution (issue #38). I'll submit a pull request. |
Hey, Thanks for investigating it further and for the pull request. It looks nice and clean and I'm happy to merge it in. And sorry for taking longer than promised to look at it. I've got to stop giving brief time scales as I rarely make them work. I am a little confused though. From my tests, if you put a RST heading in a Python docstring and use Sphinx autodoc, then it puts out a warning and basically ignores the heading in the final output. If I look at the Doxygen html for your example then Doxygen does honour the headings and puts out h2 and h3 tags as required. So I'm not sure what you are referring to when you say 'that member documentation uses emphasized text instead of sections'? Otherwise, I'm happy to treat them as emphasized text. We could possibly add custom classes to them so that people have the option to style them like headings if desirable. I'm sorry for the lack of progress on #38. It is desirable but I don't know where to start with it so I haven't blocked out the time. Thanks for the reminder though, as I am also guilty of forgetting about some of these issues. Cheers, |
Hi, no need to feel guilty. I can not see any paying customer out there ;-)
That in turn confuses me ;-) Of course Doxygen creates heading elements. But
My knowledge about Sphinx is still very limited. But as far as I am aware, Looking at a doxygen class documentation, one could now argue, that this And because breathe does not generate structured output, we can not utilize BTW: This is a good example for a well-structured class documentation and my The doxygen xml-output contains all necessary information for that. |
Ah, that's make sense. I didn't realise you were referring to the current output. Yes, Breathe doesn't create any sections itself and everything is just styled and indented text. And you're right that that is probably key to having Sphinx create a nice TOC for us. I am happy to investigate using sections. It is not something I've ever done from the docutils API and I wonder how it all works to be honest. The only two concerns I have are:
I can't really say what is and is not going to be a problem until I write some code and poke around at the results. I guess the concerns have slowed me down when it comes to embracing this idea. I might try to ask about that second issue on the docutils list and see where we go from there. I should probably try to look at the output of Sphinx autodoc for Python classes as well as that is kind of what I'm modelling Breathe after (though other influences are good.) I suspect they don't use sections there either but I'm not sure. Cheers, |
From the pseudo-xml here it looks like sections are purely order based, there aren't additional parameters to specify their importance. Also, unfortunately the sentence:
Indicates that we can't have a structure that would look like:
As the There might be other docutils nodes that we can use to achieve similar results (inclusion in the automatically generated TOC) without sections. I'm not sure. Cheers, |
Hi Michael, thank Your for the reply and the link to the docutils page. It explains very What You are saying makes totally sense from the Py API point of view. I Having one class per document, no indentation is needed at all and the I would like to know, how others think about that. How are they going to use |
In current versions of Breathe the headings are rendered in italic, so I guess this has been implemented in some way. Closing for now as I think this is okay, please comment if I'm missing something. |
Headers from doxygen documentation are not printed in Sphinx/Breathe.
I've tried different markup styles from within a class documentation:
None of them worked. They are simply missing in the output. Everything else is shown normal. I guess that Breathe supports any markup syntax that Doxygen understands. So I consider this to be an error. Or am I missing something?
The text was updated successfully, but these errors were encountered: