@@ -940,32 +940,32 @@ The color used in the above example is available from having passed the
940940
941941 Default: ``\fboxrule ``
942942
943- ``shadowsep ``
944- The separation between contents and frame for contents _ and
945- :dudir: `topic ` boxes.
946-
947- See :ref: `additionalcss ` for the alias ``div.topic_padding ``.
943+ .. important ::
948944
949- Default: ``5pt ``
945+ At 8.1.0 it became possible to style separately the :dudir: `topic `,
946+ contents _, and :dudir: `sidebar ` directives, and each acquired new defaults.
947+ See :ref: `additionalcss `.
948+ The ``shadowsep ``, ``shadowsize `` and ``shadowrule `` keys are kept for
949+ backward compatibility only.
950950
951- ``shadowsize ``
952- The width of the lateral " shadow" to the right and bottom.
951+ ``shadowsep ``
952+ This legacy option sets the padding (same in all directions) simultaneously
953+ for the :dudir: `topic `, contents _, and :dudir: `sidebar ` directives.
953954
954- See :ref:`additionalcss` for `` div.topic_box-shadow`` which allows to
955- configure separately the widths of the vertical and horizontal shadows.
955+ .. versionchanged :: 8.1.0 New separate defaults. See :ref:`additionalcss`.
956956
957- Default: ``4pt ``
957+ ``shadowsize ``
958+ This legacy option sets the shadow width simultaneously for the
959+ :dudir: `topic `, contents _, and :dudir: `sidebar ` directives.
958960
959- .. versionchanged :: 6.1.2
960- Fixed a regression introduced at ``5.1.0 `` which modified unintentionally
961- the width of topic boxes and worse had made usage of this key break PDF
962- builds.
961+ .. versionchanged :: 8.1.0 New separate defaults. See :ref:`additionalcss`.
963962
964963``shadowrule ``
965- The width of the frame around :dudir: `topic ` boxes. See also
966- :ref: `additionalcss ` for ``div.topic_border-width ``.
967964
968- Default: ``\fboxrule ``
965+ This legacy option sets the border-width (same on all sides) simultaneously
966+ for the :dudir: `topic `, contents _, and :dudir: `sidebar ` directives.
967+
968+ .. versionchanged :: 8.1.0 New separate defaults. See :ref:`additionalcss`.
969969
970970.. important ::
971971
@@ -1148,6 +1148,11 @@ Additional CSS-like ``'sphinxsetup'`` keys
11481148 set the foreground and background colors for the title as well as the
11491149 LaTeX code for the icon.
11501150
1151+ .. versionadded :: 7.4.0 Customizability of the :rst:dir:`seealso` and
1152+ :rst:dir: `todo ` directives.
1153+
1154+ .. versionadded :: 8.1.0 Separate customizability and new defaults for the
1155+ :dudir: `topic `, contents _, and :dudir: `sidebar ` directives.
11511156
11521157Perhaps in future these 5.1.0 (and 6.2.0) novel settings will be optionally
11531158imported from some genuine CSS external file, but currently they have to be used
@@ -1198,18 +1203,16 @@ which is then followed by an underscore, then the property name.
11981203 :header: Directive, Option prefix, LaTeX environment
11991204
12001205 :rst:dir: `code-block `, ``pre ``, ``sphinxVerbatim ``
1201- :dudir: `topic `, ``div.topic ``, ``sphinxShadowBox ``
1202- contents _, ``div.topic ``, ``sphinxShadowBox ``
1206+ :rst:dir: `literalinclude `, ``pre ``, ``sphinxVerbatim ``
1207+ :dudir: `topic `, ``div.topic ``, ``sphinxtopic ``
1208+ contents _, ``div.contents ``, ``sphinxcontents ``
1209+ :dudir: `sidebar `, ``div.sidebar ``, ``sphinxsidebar ``
12031210 :dudir: `note `, ``div.note ``, ``sphinxnote ``
12041211 :dudir: `warning `, ``div.warning ``, ``sphinxwarning ``
12051212 further admonition types ``<type> ``, ``div.<type> ``, ``sphinx<type> ``
12061213 :rst:dir: `seealso `, ``div.seealso ``, ``sphinxseealso ``
12071214 :rst:dir: `todo `, ``div.todo ``, ``sphinxtodo ``
12081215
1209-
1210- .. versionadded :: 7.4.0 Customizability of the :rst:dir:`seealso` and
1211- :rst:dir: `todo ` directives.
1212-
12131216Here are now these options as well as their common defaults.
12141217Replace below ``<prefix> `` by the actual prefix as explained above. Don't
12151218forget the underscore separating the prefix from the property names.
@@ -1224,15 +1227,18 @@ forget the underscore separating the prefix from the property names.
12241227 The default is that all those dimensions are equal. They are set to:
12251228
12261229 * ``0.4pt `` for :rst:dir: `code-block `,
1227- * ``0.5pt `` for :dudir: `topic ` or contents _ directive,
1230+ * ``0.5pt `` for :dudir: `topic ` and contents _ directive,
1231+ * ``1pt `` (top/bottom) and ``2pt `` (left/right) for :dudir: `sidebar ` directive,
12281232 * ``0.5pt `` for :dudir: `note ` and other " light" admonitions,
12291233 * `` 0.5pt`` for :rst:dir: `seealso ` and :rst:dir: `todo ` directives,
12301234 * ``1pt `` for :dudir: `warning ` and other " strong" admonitions except
12311235 :dudir:`error` which uses `` 1.25pt``.
12321236
1233- .. versionchanged :: 7.4.0
1237+ .. versionchanged :: 7.4.0 Changed defaults for :dudir:`topic` and
1238+ :dudir: `error `.
12341239
1235- Changed defaults for :dudir: `topic ` and :dudir: `error `.
1240+ .. versionchanged :: 8.1.0 Distinct from :dudir:`topic` defaults for
1241+ :dudir: `sidebar `.
12361242
12371243- ``<prefix>_box-decoration-break `` can be set to either ``clone `` or
12381244 ``slice `` and configures the behavior at page breaks.
@@ -1248,8 +1254,9 @@ forget the underscore separating the prefix from the property names.
12481254 The defaults:
12491255
12501256 * all four ``3pt `` for :rst:dir: `code-block `,
1251- * ``10pt ``, ``7pt ``, ``12pt ``, ``7pt `` for :dudir: `topic ` or
1252- contents _ directive,
1257+ * ``6pt ``, ``7pt ``, ``6pt ``, ``7pt `` for :dudir: `topic `,
1258+ * ``10pt ``, ``7pt ``, ``12pt ``, ``7pt `` for contents _,
1259+ * ``6pt ``, ``5.5pt ``, ``6pt ``, ``5.5pt `` for :dudir: `sidebar `,
12531260 * ``6pt ``, ``7pt ``, ``6pt ``, ``7pt `` for all " light" admonitions as well
12541261 as the :rst:dir:`seealso` and :rst:dir:`todo` directives.
12551262 * `` 6pt``, ``6.5pt ``, ``6pt ``, ``6.5pt `` for the strong admonition types
@@ -1263,6 +1270,9 @@ forget the underscore separating the prefix from the property names.
12631270 vertically across admonition types on same page in PDF. This is only a
12641271 property of defaults, not a constraint on possible user choices.
12651272
1273+ .. versionchanged :: 8.1.0 Separate defaults for :dudir:`topic`, contents_,
1274+ and :dudir: `sidebar `.
1275+
12661276- | ``<prefix>_border-top-left-radius ``,
12671277 | ``<prefix>_border-top-right-radius``,
12681278 | ``<prefix>_border-bottom-right-radius``,
@@ -1274,16 +1284,19 @@ forget the underscore separating the prefix from the property names.
12741284 The defaults:
12751285
12761286 * ``3pt `` for :rst:dir: `code-block ` (since 6.0.0) and all corners,
1277- * ``12pt `` for the bottom right corner of :dudir: `topic `, other corners are
1278- straight,
1287+ * ``8pt `` for all corners of :dudir: `topic `,
1288+ * ``12pt `` for the bottom right corner of contents _, others use ``0pt ``,
1289+ * ``12pt `` for the top-left and bottom-right corners for :dudir: `sidebar `,
1290+ ``0pt `` for top-right and bottom-left.
12791291 * all radii set to ``5pt `` for :dudir: `note `, :dudir: `hint ` and
12801292 :dudir: `tip `,
12811293 * ``0pt ``, i.e. straight corners for all other directives.
12821294
1283- .. versionchanged :: 7.4.0
1295+ .. versionchanged :: 7.4.0 :dudir:`topic` and :dudir:`note`\ -like
1296+ admonitions acquire (at least one) rounded corners.
12841297
1285- :dudir: ` topic ` and :dudir: `note ` \ -like admonitions acquire (at least one)
1286- rounded corners .
1298+ .. versionchanged :: 8.1.0 Separate defaults for :dudir:`topic`, contents_,
1299+ and :dudir: ` sidebar ` .
12871300
12881301 See a remark above about traps with spaces in LaTeX.
12891302- ``<prefix>_box-shadow `` is special in so far as it may be:
@@ -1294,10 +1307,17 @@ forget the underscore separating the prefix from the property names.
12941307 * or two dimensions followed by the keyword ``inset ``.
12951308
12961309 The x-offset and y-offset may be negative. The default is ``none ``,
1297- *except * for the :dudir: `topic ` or contents _ directives, for which it is
1298- ``4pt 4pt ``, i.e. the shadow has a width of ``4pt `` and extends to the right
1299- and below the frame. The lateral shadow then extends into the page right
1300- margin.
1310+ *except * for:
1311+
1312+ - the contents _ directive: ``4pt 4pt ``, i.e. the shadow has a width of
1313+ ``4pt `` and extends to the right and below the frame; the lateral shadow
1314+ extends into the page right margin,
1315+
1316+ - the :dudir: `sidebar ` directive: ``0pt 2pt ``, i.e. a small shadow at
1317+ bottom.
1318+
1319+ .. versionchanged :: 8.1.0 No shadow anymore for :dudir:`topic`.
1320+
13011321- | ``<prefix>_border-TeXcolor ``,
13021322 | ``<prefix>_background-TeXcolor``,
13031323 | ``<prefix>_box-shadow-TeXcolor``,
@@ -1314,14 +1334,14 @@ forget the underscore separating the prefix from the property names.
13141334
13151335 - ``{HTML}{F7F7F7} `` serves as background color to all.
13161336 - ``{HTML}{86989B} `` is border color of light admonitions (inclusive of
1317- :rst:dir: `seealso ` and :rst:dir: `todo `) as well as of :dudir: `topic ` and
1318- contents _ directives.
1337+ :rst:dir: `seealso ` and :rst:dir: `todo `) as well as of :dudir: `topic `,
1338+ contents _ and :dudir: ` sidebar ` directives.
13191339 - ``{HTML}{940000} `` is border color or :dudir: `warning `-type admonitions,
13201340 except :dudir: `error ` which uses ``{HTML}{B40000} ``.
13211341
1322- The only directives displaying a shadow per default are :dudir: ` topic ` and
1323- contents _ (handled identically at LaTeX level) and their shadow color is
1324- ``{HTML}{6C6C6C } ``. For all others the default shadow color is black .
1342+ The only directives displaying a shadow per default are contents _ and
1343+ :dudir: ` sidebar `. The shadow-color for the former is `` {HTML}{6C6C6C} ``
1344+ and for the latter ``{HTML}{9EACAF } ``.
13251345
13261346 The ``<prefix>_TeXcolor `` stands for the CSS property " color", i.e. it
13271347 influences the text color of the contents. As for the three other options,
@@ -1340,19 +1360,16 @@ forget the underscore separating the prefix from the property names.
13401360 start of the contents; for admonitions, this happens after the heading which
13411361 reproduces the admonition type.
13421362
1343- The next keys, for admonitions only, were all three added at 7.4.0. The
1344- default colors are the ones applying to the current HTML rendering of Sphinx
1345- own docs at https://www.sphinx-doc.org.
1363+ The next keys, for admonitions, :dudir: `topic `, contents _, and
1364+ :dudir: `sidebar `, were all three added at 7.4.0 (and 8.1.0 for the latter three).
13461365
13471366- ``div.<type>_title-background-TeXcolor ``: the background color for the title.
13481367
13491368 .. important ::
13501369
13511370 The colored title-row is produced as a result of the Sphinx default
1352- definitions for the various ``\sphinxstyle<type>title `` commands, see
1353- :ref: `latex-macros `. Custom redefinitions of these commands are
1354- possible, but to re-use the colors and the icon, it is needed to check in
1355- Sphinx LaTeX source code how the default definitions are done.
1371+ definitions for the various ``\sphinxstyle<type>title `` commands, which
1372+ employ the ``\sphinxdotitlerow `` LaTeX command. See :ref: `latex-macros `.
13561373
13571374- ``div.<type>_title-foreground-TeXcolor ``: the color to be used for the icon
13581375 (it applies only to the icon, not to the title of the admonition).
@@ -1429,24 +1446,20 @@ own docs at https://www.sphinx-doc.org.
14291446.. _ellipse : https://ctan.org/pkg/ellipse
14301447
14311448
1432- The following legacy behavior is currently not customizable :
1449+ The following legacy behavior applies :
14331450
1434- - For :rst:dir: `code-block `, padding and border-width and shadow (if one adds
1435- one) will go into the margin; the code lines remain at the same place
1436- independently of the values of the padding and border-width, except for
1437- being shifted vertically of course to not overwrite other text due to the
1438- width of the border or external shadow.
1451+ - For :rst:dir: `code-block ` (or :rst:dir: ` literalinclude `) , padding and
1452+ border-width and shadow (if one adds one ) will go into the margin; the code
1453+ lines remain at the same place independently of the values of the padding
1454+ and border-width, except for being shifted vertically of course to not
1455+ overwrite other text due to the width of the border or external shadow.
14391456
1440- - For :dudir: ` topic ` (and contents _) the shadow (if on right) goes into the
1441- page margin, but the border and the extra padding are kept within the text
1442- area. Same for admonitions .
1457+ - For all others than :rst:dir: ` code-block ` (or :rst:dir: ` literalinclude `) the
1458+ shadow (if on right) goes into the page margin, but the border and the extra
1459+ padding are kept within the text area .
14431460
1444- - The contents _ and :dudir: `topic ` directives are governed by the same options
1445- with ``div.topic `` prefix: the Sphinx LaTeX mark-up uses for both directives
1446- the same ``sphinxShadowBox `` environment which has currently no additional
1447- branching, contrarily to the ``sphinxadmonition `` environment which branches
1448- according to the admonition directive name, e.g. either to ``sphinxnote ``
1449- or ``sphinxwarning `` etc...
1461+ - :rst:dir: `code-block ` and :rst:dir: `literalinclude ` use the same LaTeX
1462+ environment and commands and are not separately customizable.
14501463
14511464
14521465LaTeX macros and environments
@@ -1565,8 +1578,8 @@ Macros
15651578 ``\sphinxstyleliteralintitle ``; ``\sphinxcode{#1} ``
15661579 ``\sphinxstylecodecontinued ``; ``{\footnotesize(#1)}} ``
15671580 ``\sphinxstylecodecontinues ``; ``{\footnotesize(#1)}} ``
1568- ``\sphinxstylenotetitle ``; ``\sphinxdotitlerowwithicon {note}{#1} ``
1569- ``\sphinxstylehinttitle ``; ``\sphinxdotitlerowwithicon {hint}{#1} ``
1581+ ``\sphinxstylenotetitle ``; ``\sphinxdotitlerow {note}{#1} ``
1582+ ``\sphinxstylehinttitle ``; ``\sphinxdotitlerow {hint}{#1} ``
15701583 ``\sphinxstyleimportanttitle ``; *similar *
15711584 ``\sphinxstyletiptitle ``; *similar *
15721585 ``\sphinxstylewarningtitle ``; *similar *
@@ -1576,6 +1589,9 @@ Macros
15761589 ``\sphinxstyleerrortitle ``; *similar *
15771590 ``\sphinxstyleseealsotitle ``; *similar *
15781591 ``\sphinxstyletodotitle ``; *similar *
1592+ ``\sphinxstyletopictitle ``; *similar *
1593+ ``\sphinxstylecontentstitle ``; *similar *
1594+ ``\sphinxstylesidebartitle ``; *similar *
15791595
15801596 .. note ::
15811597
@@ -1585,10 +1601,11 @@ Macros
15851601 .. code-block :: latex
15861602
15871603 \newcommand \sphinxstylenotetitle [1]%
1588- {\s phinxdotitlerowwithicon {note}{\s phinxremovefinalcolon{#1}}}
1604+ {\s phinxdotitlerow {note}{\s phinxremovefinalcolon{#1}}}
15891605
15901606 The same remark applies to all other similar commands associated with
1591- admonitions.
1607+ admonitions. The :dudir: `topic `, contents _, and :dudir: `sidebar ` do not
1608+ use it as they don't need it.
15921609
15931610 .. versionadded :: 1.5
15941611 These macros were formerly hard-coded as non customizable ``\texttt ``,
@@ -1610,6 +1627,8 @@ Macros
16101627 if this final colon is to be removed.
16111628
16121629 .. versionadded :: 7.4.0 The ``\sphinxdotitlerowwithicon`` LaTeX command,
1630+ (renamed at 8.1.0 ``sphinxdotitlerow ``, former name kept for backward
1631+ compatibility)
16131632 whose first argument is the admonition type, so that it can recover
16141633 the associated colours and icon for the title row, and the second
16151634 argument gets typeset after the icon.
@@ -1618,6 +1637,13 @@ Macros
16181637 legacy artefact from old ill-designed Sphinx LaTeX writer,
16191638 which postfixes (still today) the title with a colon automatically.
16201639
1640+ .. versionchanged :: 8.1.0 LaTeX command ``\sphinxdotitlerow`` detects
1641+ automatically if an icon is associated or not with the rendered element.
1642+
1643+ .. versionchanged :: 8.1.0 Title rows for :dudir:`topic`, contents_, and
1644+ :dudir: `sidebar ` directives (which have per defaults no associated
1645+ icons).
1646+
16211647- ``\sphinxtableofcontents ``: A wrapper (defined differently in
16221648 :file: `sphinxhowto.cls ` and in :file: `sphinxmanual.cls `) of standard
16231649 ``\tableofcontents ``. The macro ``\sphinxtableofcontentshook `` is executed
0 commit comments