python / psf-salt

PSF infrastructure configuration
MIT License
111 stars 57 forks source link

docs(PDF) consider adding texlive-fonts-extra dependency for full support of Sphinx 7.4.0+ admonition rendering in PDF #473

Open jfbu opened 3 weeks ago

jfbu commented 3 weeks ago

At Sphinx release 7.4.0, the defaults for PDF outputs have been enhanced regarding rendering of admonitions (sphinx-doc/sphinx#12508). One can see the effect in current PDFs: admonitions (such as note, seealso, important, warning, etc...) are nicely rendered in PDF output. But are lacking icons. For this, Sphinx needs latex package fontawesome5.

Unfortunately Ubuntu packaging delivers it only via the texlive-fonts-extra. Sphinx PDF build process detects automatically if fontawesome5 is available or not and simply drops icons from title bars of admonitions if not; it may fall-back to fontawesome but Ubuntu also delivers the latter only as part of texlive-fonts-extra.

For Python PDF docs to have the icons the following change appears to be the one needed:

diff --git a/salt/docs/init.sls b/salt/docs/init.sls
index 4153212..3a98812 100644
--- a/salt/docs/init.sls
+++ b/salt/docs/init.sls
@@ -22,6 +22,7 @@ doc-pkgs:
       - texlive-latex-extra
       - texlive-latex-recommended
       - texlive-fonts-recommended
+      - texlive-fonts-extra
       - texlive-lang-all
       - texlive-xetex
       - xindy

Without it, PDFs are built fine. But will lack icons in admonitions title bars.