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

Recent upgrade of docutils seems to have broken formatting of RestructuredText descriptions #264

Closed
schlatterbeck opened this issue Oct 31, 2022 · 7 comments · Fixed by #265
Labels

Comments

@schlatterbeck
Copy link

Description
Included graphics now have an un-rendered <figure class="align-center"> start tag and end tag </figure>
For an example see https://pypi.org/project/plot-antenna/1.0/
This worked previously for the same ReST.

When including citation references, the citation at the end now has a newline after the citation mark and no hanging indent is used. An example is also under the link above.

Note for my Nikola Blog (also ReST based) I had to include the following CSS for correctly formatting citations:

aside.footnote p {
    display: inline;
}

aside.footnote {
    padding-left: 2em;
    text-indent: -2em;
}

Expected behavior
Github displays the same ReST fine: https://github.com/schlatterbeck/plot-antenna

To Reproduce
See https://pypi.org/project/plot-antenna/1.0/
source of is the README for https://github.com/schlatterbeck/plot-antenna

My Platform
Firefox browser on Debian Bullseye

@miketheman
Copy link
Member

@schlatterbeck Thanks for the report - you mention citation references, but there are none in the example RST file you referenced.

miketheman added a commit to miketheman/readme_renderer that referenced this issue Oct 31, 2022
Resolves pypa#264

Signed-off-by: Mike Fiedler <miketheman@gmail.com>
@schlatterbeck
Copy link
Author

@miketheman :
You claim that there are no citation refs in the RST file at:
https://pypi.org/project/plot-antenna/1.0/

When you scroll to the end you see something like

[2]

L. B. Cebik. Antenna Modeling Notes, volume 2. antenneX Online Magazine, 2003. Available with antenna models from the [Cebik collection](http://on5au.be/Books/allmodnotes.zip).

I would call that a citation reference, maybe I'm using the wrong terminology.
The formatting should be something like

[2] L. B. Cebik. Antenna Modeling Notes, volume 2. antenneX Online Magazine, 2003. Available with antenna models from the
     [Cebik collection](http://on5au.be/Books/allmodnotes.zip).

The cited css snipped does that for me in my nikola blog.

Can we re-open this issue? Seems I cannot. Or should I open a separate issue?

@miketheman
Copy link
Member

@schlatterbeck thanks for clarifying - docutils calls those footnotes, not citations - very similar, but different in their HTML counterparts and rendering - hence the confusion.

I've added a new pull request that confirms both footnotes and citations behavior, which confirms there's no further code change necessary on the library side.

For the visualization aspect, we may need some CSS tweaks on the warehouse side for display.

@schlatterbeck
Copy link
Author

@miketheman thanks for the followup, I wasn't aware that the numerical and non-numerical footnotes are different beasts.
Should we open a new issue on warehouse and/or resurrect the original issue there? Or are you taking care of this?

Thanks
Ralf

@miketheman
Copy link
Member

Let's let the updated version hit warehouse first, confirm that the figure works first.

@schlatterbeck
Copy link
Author

@miketheman : Seems your changes are in warehouse, the figure bug is gone from my project:
https://pypi.org/project/plot-antenna/1.0/

But the footnote formatting is still broken.
Let me know what to do: Open a new issue on warehouse? Resurrect the old issue and note that the figure part is fixed?

The fix as already reported involves a slight change to the CSS.

miketheman added a commit to miketheman/warehouse that referenced this issue Dec 16, 2022
As noted in pypa/readme_renderer#264

With these changes, the footnotes are styled in a more visually-pleasing
manner.

Signed-off-by: Mike Fiedler <miketheman@gmail.com>
@miketheman
Copy link
Member

@schlatterbeck Thanks for the ping - I've added the correction in a PR to warehouse - follow that one for resolution!

di pushed a commit to pypi/warehouse that referenced this issue Dec 16, 2022
As noted in pypa/readme_renderer#264

With these changes, the footnotes are styled in a more visually-pleasing
manner.

Signed-off-by: Mike Fiedler <miketheman@gmail.com>

Signed-off-by: Mike Fiedler <miketheman@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants