-
Notifications
You must be signed in to change notification settings - Fork 36
Fix bibliography alignment for PDF and HTML #148
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
Conversation
The Sphinx LaTeX writer has its maximum citation label length MAX_CITATION_LABEL_LENGTH set to 8 characters. [1] Larger citations labels cause misalignment in the resulting bibliography for target latexpdf (which we track as issue ARM-software#128). As there is no easy way to change this limit, shorten all our citations labels instead to a maximum of 8 characters and add a word about this limitation in the README. [1] https://github.com/sphinx-doc/sphinx/blob/master/sphinx/writers/latex.py Signed-off-by: Vincent Stehlé <vincent.stehle@arm.com>
The citations labels of the bibliography are badly aligned for the html and singlehtml output formats (see issue ARM-software#128). Add a custom CSS and use it to adjust the margin. We visually tailor the setting for citations labels of 8 characters maximum, which corresponds to the LaTeX formatter's setting. Signed-off-by: Vincent Stehlé <vincent.stehle@arm.com>
xypron
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please, update the links as indicated.
| .. [RVPRIVSPEC] `The RISC-V Instruction Set Manual Volume II: Privileged Architecture | ||
| .. [RVPRVSPC] `The RISC-V Instruction Set Manual Volume II: Privileged Architecture | ||
| <https://github.com/riscv/riscv-isa-manual/releases/download/Priv-v1.12/riscv-privileged-20211203.pdf>`_, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The current version is 20250508 Date: May 2025, available at https://docs.riscv.org/reference/isa/_attachments/riscv-privileged.pdf
Please, update the link.
| .. [RVSBISPEC] `RISC-V Supervisor Binary Interface specification | ||
| .. [RVSBISPC] `RISC-V Supervisor Binary Interface specification | ||
| <https://github.com/riscv-non-isa/riscv-sbi-doc>`_ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please, use https://docs.riscv.org/reference/platform-software/sbi/_attachments/riscv-sbi.pdf which has the latest ratified version (v3.0, 2025-07-16).
|
Accepted during the EBBR call of Nov 5. |
This is an attempt at fixing #128 (almost).
For the PDF format, the main drawback is that we need to give up on citations labels longer than 8 characters.
Let us please know if this is deemed acceptable; if nobody complains we can merge it.