Skip to content
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

pdf from including exhale generated rst files has class hierarchy and file hierarchy empty #112

Open
pkp124 opened this issue Jul 22, 2021 · 2 comments

Comments

@pkp124
Copy link

pkp124 commented Jul 22, 2021

Hello,

The pdf generated using exhale has class and file hierarchy sections empty, I would suggest either to add some contents to it, or generate the library_root.rst with the directive .. only:: html as shown below,

Library API

 .. only:: html

    .. include:: class_view_hierarchy.rst

    .. include:: file_view_hierarchy.rst

 .. include:: unabridged_api.rst
@pkp124 pkp124 changed the title pdf from exhale has class hierarchy and file hierarchy empty pdf generated from including exhale generated rst files has class hierarchy and file hierarchy empty Jul 22, 2021
@pkp124 pkp124 changed the title pdf generated from including exhale generated rst files has class hierarchy and file hierarchy empty pdf from including exhale generated rst files has class hierarchy and file hierarchy empty Jul 22, 2021
@svenevs
Copy link
Owner

svenevs commented Jul 22, 2021

The .. only:: html is a good addition and I will leave this open for that, as the tree view only works for html.

Short response from phone but the only option for you right now is to set createTreeView to False to get a regular rst list that "works" in PDF.

PDF support in general isn't provided here, but there's another hack that may worth trying which is connecting to the sphinx source-read event, you can then transform anything you want including adding .. only:: html at the beginning and indenting the rest of the text to just skip the root library page altogether?

Unfortunately IIRC there are links on the individual pages that may also be invalid for PDF :S

Hope that helps some. Thank you for reporting! But I don't anticipate fixing PDF support anytime soon

@pkp124
Copy link
Author

pkp124 commented Aug 2, 2021

Thanks very much for your response.

Indeed there are links in every page, which refer to, in which file a function or variable etc is defined.

For example, for a class defined in file src/test.hpp, the following reference is created in the class rst file generated:

  • Defined in :ref:file_src_test.hpp

The link works fine in html, but does not work in pdf. In pdf the name of the link itself is printed. Like:

  • Defined in file_src_test.hpp

It would be great if this fixed, since in every element of the source, this line exists and makes it unreadable. Since you mentioned pdf support is not planned, could you suggest a way to disable this generation, if possible.

Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants