-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
LaTeX: the py:class
directive renders badly in PDF when used for generics with typing
#12735
Comments
py:class
directives renders badly in PDFpy:class
directive renders badly in PDF
I forgot to say the problem goes away with
in conf.py:
but reappear with
(same bad PDF as initially reported). This is clearly a LaTeX problem with lists, which I will investigate but now I don't have much disponibility immediately. Let's milestone this nevertheless for 8.x. |
It is not clear this is a bug in so far as the parentheses are lacking from
as input forms. Edit, no it clearly is a bug (output has a macro defined to fetch 4 arguments but may have only 3). |
py:class
directive renders badly in PDFpy:class
directive renders badly in PDF when used for generics with typing
It's legit. Whatever signature is specified in the directive declaration is applied in the documentation; IF using autodoc then writing a declaration (e.g. This is strange:
Is this for Python syntax? How to read the square brackets for a class? |
Python 3.12 gives this example
but the vocabulary "parameters", "type parameters" may not be quite appropriate. If I say anything more people will realize the immensity of my ignorance and under pressure I will have to admit never having taken any CS class. |
Good example, it's for user defined generic classes which is a recent feature and arguably somewhat uncommon.
Don't worry, I took plenty of CS classes but I didn't get any smarter because of it. |
Describe the bug
With 7.4.0 and current Sphinx I obtain:
while with 7.0.1 I obtain
(intermediate 7.1.0, 7.2.0, and 7.3.0 raise an error when building the minimal example).
Perhaps my mark-up is not legit? But this copied over from tests/test_builders/test_build_latex.py::test_one_parameter_per_line.
The 7.4.0 HTML build is ok (like PDF from 7.0.1).
How to Reproduce
index.rst
Environment Information
Sphinx extensions
none
Additional context
I tested also with DocUtils 0.19 and DocUtils current master same output.
Same output with current Sphinx also.
I am not one hundred percent sure this is a bug because I never used directly the
py:class
directive always via autodoc. Ping @picnixz for advice.The text was updated successfully, but these errors were encountered: