-
-
Notifications
You must be signed in to change notification settings - Fork 202
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
Differences rendering between versions #695
Comments
@Andrei1Byte I think your issue is effectively the same #693, can you check? |
@vermeeren Theoretically I think it seems to be the same issue, as what I observed is that between the versions there is a difference in the render. For example Parameters were a subchapter with a gray background and values were listed as a list and marked in red. But now with 4.30.0 is like this: No subchapter with gray background, and the values are not marked with red. And also the return values are inserted separately, instead of only Returns: STATUS_OK and STATUS_ERROR as a list, as for the parameters. Here you can find the documentation generated with the different versions: Sphinx = 3.5.4 Breathe = 4.27.0 and sphinx_rtd_theme = 0.5.2 Sphinx = 4.0.1, Breathe = 4.30.0 and sphinx_rtd_theme = 0.5.2 And this is the project So was this part with subchapter with gray background and values marked with red a intended change, or ? |
This is a side-effect of switching to translating paramters, exceptions, returns, etc. to using the field lists in Docutils/Sphinx. I think we can break it into 3 semi-orthogonal issues:
|
@jakobandersen Thanks a lot for the detailed explanation, so it is because now Breathe is using Docutils. I know that there are different coding flavors and no one can implement something to please everyone, for me personally the old render has a bigger visual impact and you can easily follow the information, as it is structured with headers and marked with different colors. As I don't have a lot of experience with Breathe /Sphinx and so one, maybe can you or @vermeeren create an issue related to adding a new directive, or even customize the elements? As you have more info in the topic and I'm peaty sure you guys can detail the issue in a better way than me. By the way, one thing that I just saw that if I have in my code " @param [in] a This is an int parameter " using 4.30.0 it will end up like a - [in] This is an int parameter , so first is the parameter name and then [in], in 4.27.0 it was [in] a : This is an int parameter, first [in] and after that the parameter name. This is again a side-effect of how Docutils is handling the fields? |
A bit more background: Docutils provides the underlying infrastructure for representing documents and manipulating them. Sphinx then layers on top of that and provides, for example, infrastructure for documenting APIs in different languages ("domains"). Breathe is then an extension on top of that, that converts Doxygen XML into document fragments, using the Sphinx domains and Docutils nodes. The change of where the parameter direction is rendered is due to how fields are handled by Sphinx and the domains. A parameter field in the C domain (and most other domains). can have the following form: |
@jakobandersen Thanks a lot for the explanation. Can some of you guys handle the issue for customization of the elements ? |
Hello,
I'm generating documentation using Breathe in combination with Sphinx and Doxygen for C, and until now using Sphinx = 3.5.4 Breathe = 4.27.0 and sphinx_rtd_theme = 0.5.2 the documentation was rendered like this
The Parameters and Returns were separate chapters, and each parameter or return value was represented on a row. Also the name of the parameter and the return values were with a different color than the explanation.
But now I order to fix #655 I have to update Sphinx to 4.0.1, but I also have to update Breathe to 4.30.0 because of this:
But now the page is rendered like this:
The Parameters and Returns don't have separate chapters anymore, and no color is used for the name of the parameters and return values.
Was this render changed in Breathe > 4.27.0 ?
I prefer the older render because the information is much more obvious, and easier to follow :D
The text was updated successfully, but these errors were encountered: