Skip to content

Commit

Permalink
[LaTeX] Re-style all admonitions to default to having icon + title
Browse files Browse the repository at this point in the history
- The colours, and also most icons, are emulated from the recent
  sphinx13.css update (PR #12486, PR #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
  • Loading branch information
jfbu committed Jul 6, 2024
1 parent 5ea16e7 commit 0aee21b
Show file tree
Hide file tree
Showing 10 changed files with 879 additions and 680 deletions.
12 changes: 12 additions & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,24 @@ Release 7.4.0 (in development)
Dependencies
------------

* LaTeX: the ``xcolor`` package is now required. It is anyhow part of
Ubuntu ``texlive-latex-recommended`` which has always been required.

* LaTeX: the ``fontawesome5`` LaTeX package is needed for the default choices
of icons now used in admonition titles in PDF output; but if unavailable the
PDF build will simply silently omit rendering such icons. Check the
documentation of the ``iconpackage`` key of :ref:`'sphinxsetup'
<latexsphinxsetup>` for more.

Incompatible changes
--------------------

Deprecated
----------

* LaTeX: the ``sphinxlightbox`` environment is not used anymore, all types
of admonitions use (by default) only ``sphinxheavybox``.

Features added
--------------

Expand Down
3 changes: 3 additions & 0 deletions bindep.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,13 @@ texlive-ctablestack [platform:rpm]
texlive-gnu-freefont [platform:rpm]
texlive-tex-gyre [platform:rpm]
texlive-pict2e [platform:rpm]
texlive-fontawesome5 [platform:rpm]
texlive-xcolor [platform:rpm]
latexmk [platform:rpm]

texlive-latex-recommended [platform:dpkg]
texlive-fonts-recommended [platform:dpkg]
texlive-fonts-extra [platform:dpkg]
tex-gyre [platform:dpkg]
texlive-latex-extra [platform:dpkg]
texlive-luatex [platform:dpkg]
Expand Down
Loading

0 comments on commit 0aee21b

Please sign in to comment.