-
-
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
[docs] add icons to admonition titles #12486
[docs] add icons to admonition titles #12486
Conversation
and also replace ad-hoc "more" icon in quickstart, with using `seealso` admonition
|
||
.. |more| image:: /_static/more.png | ||
:align: middle | ||
:alt: more info |
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.
This code removal puzzled me for a few moments; now I understand it's removal of a substitution definition that is no-longer-used on the page (a bit like an unused import).
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.
Looks good to me 👍
+1 I will copy these settings (which adds to #12439) and make them default for admonitions in PDF output (perhaps not yet for the icons, which however is possibly via |
The colours, and also most icons, are emulated from the recent sphinx13.css update (PR sphinx-doc#12486, PR sphinx-doc#12439).
@chrisjsewell I have tried to transfer this to PDF at #12508. I tried to use exact same choices for the colours of title rows. For the icons also I followed choices here except I was not able to find the fontawesome5 name for "spark" (used by caution and danger, so I used a "radiation" icon) and besides I used a "skull-crossbones" for error admonition in place of a "times-circle". I am making this comment here to ask what you would think of using shapes such as lightbulb rather than question mark for hint and info-circle for tip, and of using share for seealso ? I was told the pydata theme does something like that or similar (and actually their RTD home has a Seealso with the "share" icon I was hinting at). |
Yeh cheers, I'm certainly open to suggestions 👍 |
The icons I used were simply copy/pasted from furo, if I recall correctly |
ok, things for me are simple for PDF output I only need to use the name of an icon as provided by LaTeX fontawesome5 package, I am not using svg images. and those names are those in use at https://fontawesome.com/search |
- The colours, and also most icons, are emulated from the recent sphinx13.css update (PR sphinx-doc#12486, PR sphinx-doc#12439). - Add iconpackage key to sphinxsetup key of latex_elements fontawesome5 is used if available, else fall-back to fontawesome. If none is available, drop icons and shift titles left. In all cases, div.<type>_title-icon keys allow user to set arbitrary code to be used. - Defaults for padding and border-widths of admonitions have been changed, now that they all acquire a default background colour. The defaults always have horizontal padding plus border-width add up to 12.5pt, so contents of all types align exactly vertically. Or course user can specify arbitrary values. - The code inserting the coloured title-row incorporates a work-around to a feature of TeX vertical lists when they start with for example a colour special. It would not be necessary with LaTeX of 2023-06-01 and newer. cf Improve spacing at top of minipages in https://www.latex-project.org/news/latex2e-news/ltnews37.pdf
and also replace ad-hoc "more" icon in quickstart, with using
seealso
admonitionsee e.g.: https://sphinx--12486.org.readthedocs.build/en/12486/usage/installation.html
before:
after: