brechtm/rinohtype

exception during pdf generation with including doxygen function

andybyc13 opened this issue · 3 comments

I have doxygen description to C function with elements related to breathe extension.
I include doxygenfunction in my rst file.
Html documentation build correctly.

When I try to generate pdf documentation (make rinoh) I get exception:

Exception occurred:
  File "/mypath/.local/lib/python3.7/site-packages/rinoh/frontend/__init__.py", line 42, in __getattr__
    raise AttributeError('No such element: {} in {}'.format(name, self))
AttributeError: No such element: styled_text in <rinoh.frontend.sphinx.nodes.Literal_Block object at 0x7f878ce133c8>
The full traceback has been saved in /tmp/sphinx-err-4nbatky2.log, if you want to report the issue to the developers.
Please also report this if it was a user error, so that a better error message can be provided next time.
A bug report can be filed in the tracker at <https://github.com/sphinx-doc/sphinx/issues>. Thanks!
make[1]: *** [Makefile:33: rinoh] Error 2
make[1]: Leaving directory '/mypath/rinoh-issue-02'
make: *** [Makefile:19: doc] Error 2

I attach directory with necessary files to reproduce error. It is needed to perform make doc command.
Inside of directory, in LOG subdir, there is log file, which includes configuration (versions) of used tools.

Please investigate what can be source of exception and how can i resolve this problem

rinoh-issue-02.zip

Hi All, I'm super excited about this project, but am having the same AttributeError as above. I'm using sphinx though, 4.4.0.

Sorry for the delay in getting back to you on this! Now that I have some time again, I'm slowly going through recently opened issues.

This is actually a bug in Breathe (@michaeljones). It produces a document tree with a literal_block as a child of a paragraph node. Paragraphs should only contain inline elements and literal_block is a body element. This is what Breathe outputs currently:

<desc_content>
    <paragraph>
        some description 
    <paragraph>
        <emphasis>
            command syntax
    <paragraph>
        <literal_block force="False" language="default" linenos="False" xml:space="preserve">
             cmd-name
    <paragraph>
        <emphasis>
            output
    <paragraph>
        <literal_block force="False" language="default" linenos="False" xml:space="preserve">
             command output description

This should be:

<desc_content>
    <paragraph>
        some description 
    <paragraph>
        <emphasis>
            command syntax
    <literal_block force="False" language="default" linenos="False" xml:space="preserve">
         cmd-name
    <paragraph>
        <emphasis>
            output
    <literal_block force="False" language="default" linenos="False" xml:space="preserve">
         command output description

Ticket logged with Breathe here: breathe-doc/breathe#827