Skip to content

Commit

Permalink
Use div.topic option prefix and not aside.topic
Browse files Browse the repository at this point in the history
  • Loading branch information
jfbu committed Jul 10, 2022
1 parent 3b42def commit ac51bb0
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 42 deletions.
54 changes: 27 additions & 27 deletions doc/latex.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1029,28 +1029,28 @@ if a shadow is present and is inset, the box will be rendered with straight corn

Options for topic boxes:

- ``aside.topic_border-top-width``,
- ``aside.topic_border-right-width``,
- ``aside.topic_border-bottom-width``,
- ``aside.topic_border-left-width``,
- ``aside.topic_border-width``, beware that this is a *single* dimension. Its
- ``div.topic_border-top-width``,
- ``div.topic_border-right-width``,
- ``div.topic_border-bottom-width``,
- ``div.topic_border-left-width``,
- ``div.topic_border-width``, beware that this is a *single* dimension. Its
default, and the ones of the separate widths is the setting of ``\fboxrule``
in the preamble, i.e. normally ``0.4pt``.
- ``aside.topic_box-decoration-break`` is currently ignored.
- ``aside.topic_padding-top``,
- ``aside.topic_padding-right``,
- ``aside.topic_padding-bottom``,
- ``aside.topic_padding-left``,
- ``aside.topic_padding``, again this is a single dimension. Its default is ``5pt``.
- ``aside.topic_border-top-left-radius``,
- ``aside.topic_border-top-right-radius``,
- ``aside.topic_border-bottom-right-radius``,
- ``aside.topic_border-bottom-left-radius``,
- ``aside.topic_border-radius``, are all single dimensions which default to ``0pt``.
- ``aside.topic_box-shadow`` defaults to ``4pt 4pt``.
- ``aside.topic_border-TeXcolor``,
- ``aside.topic_background-TeXcolor``,
- ``aside.topic_box-shadow-TeXcolor`` must all be of the format as accepted by
- ``div.topic_box-decoration-break`` is currently ignored.
- ``div.topic_padding-top``,
- ``div.topic_padding-right``,
- ``div.topic_padding-bottom``,
- ``div.topic_padding-left``,
- ``div.topic_padding``, again this is a single dimension. Its default is ``5pt``.
- ``div.topic_border-top-left-radius``,
- ``div.topic_border-top-right-radius``,
- ``div.topic_border-bottom-right-radius``,
- ``div.topic_border-bottom-left-radius``,
- ``div.topic_border-radius``, are all single dimensions which default to ``0pt``.
- ``div.topic_box-shadow`` defaults to ``4pt 4pt``.
- ``div.topic_border-TeXcolor``,
- ``div.topic_background-TeXcolor``,
- ``div.topic_box-shadow-TeXcolor`` must all be of the format as accepted by
LaTeX ``\definecolor``. They default to ``{rgb}{0,0,0}``, ``{rgb}{1,1,1}``
and ``{rgb}{0, 0, 0}`` respectively.

Expand Down Expand Up @@ -1126,13 +1126,13 @@ Here is a random example which has been tested:
pre_box-shadow=10pt 10pt,
pre_box-shadow-TeXcolor={RGB}{192,192,192},
%
aside.topic_border-TeXcolor={RGB}{102,102,102},%
aside.topic_box-shadow-TeXcolor={RGB}{187,187,187},%
aside.topic_background-TeXcolor={RGB}{238,238,255},%
aside.topic_border-bottom-right-radius=10pt,%
aside.topic_border-top-right-radius=10pt,%
aside.topic_border-width=2pt,%
aside.topic_box-shadow=10pt 10pt,%
div.topic_border-TeXcolor={RGB}{102,102,102},%
div.topic_box-shadow-TeXcolor={RGB}{187,187,187},%
div.topic_background-TeXcolor={RGB}{238,238,255},%
div.topic_border-bottom-right-radius=10pt,%
div.topic_border-top-right-radius=10pt,%
div.topic_border-width=2pt,%
div.topic_box-shadow=10pt 10pt,%
%
div.danger_border-width=10pt,%
div.danger_background-TeXcolor={rgb}{0.6,.8,0.8},%
Expand Down
30 changes: 15 additions & 15 deletions sphinx/texinputs/sphinx.sty
Original file line number Diff line number Diff line change
Expand Up @@ -309,12 +309,12 @@
\definecolor{sphinxVerbatimShadowColor}{rgb}{0,0,0}
% topics
\let\spxdimen@topic@border\sphinxshadowrule
\define@key{sphinx}{aside.topic_border-top-width}{\def\spx@topic@border@top{#1}}
\define@key{sphinx}{aside.topic_border-right-width}{\def\spx@topic@border@right{#1}}
\define@key{sphinx}{aside.topic_border-bottom-width}{\def\spx@topic@border@bottom{#1}}
\define@key{sphinx}{aside.topic_border-left-width}{\def\spx@topic@border@left{#1}}
\define@key{sphinx}{div.topic_border-top-width}{\def\spx@topic@border@top{#1}}
\define@key{sphinx}{div.topic_border-right-width}{\def\spx@topic@border@right{#1}}
\define@key{sphinx}{div.topic_border-bottom-width}{\def\spx@topic@border@bottom{#1}}
\define@key{sphinx}{div.topic_border-left-width}{\def\spx@topic@border@left{#1}}
% attention currently accepts only one dimension specification
\define@key{sphinx}{aside.topic_border-width}{%
\define@key{sphinx}{div.topic_border-width}{%
\spxdimen@topic@border\dimexpr #1\relax
\def\spx@topic@border@top {\spxdimen@topic@border}%
\let\spx@topic@border@right \spx@topic@border@top
Expand All @@ -328,7 +328,7 @@
\expandafter\let\expandafter\KV@sphinx@shadowrule
\csname KV@sphinx@topic_border-width\endcsname
\newif\ifspx@topic@border@open % defaults to false (legacy)
\define@key{sphinx}{aside.topic_box-decoration-break}%
\define@key{sphinx}{div.topic_box-decoration-break}%
{\edef\spx@tempa{#1}%
\ifx\spx@tempa\spxstring@clone
\spx@topic@border@openfalse
Expand Down Expand Up @@ -356,11 +356,11 @@
\def\spx@topic@radius@topright{\z@}
\def\spx@topic@radius@bottomright{\z@}
\def\spx@topic@radius@bottomleft{\z@}
\define@key{sphinx}{aside.topic_border-top-left-radius}{\def\spx@topic@radius@topleft{#1}}
\define@key{sphinx}{aside.topic_border-top-right-radius}{\def\spx@topic@radius@topright{#1}}
\define@key{sphinx}{aside.topic_border-bottom-right-radius}{\def\spx@topic@radius@bottomright{#1}}
\define@key{sphinx}{aside.topic_border-bottom-left-radius}{\def\spx@topic@radius@bottomleft{#1}}
\define@key{sphinx}{aside.topic_border-radius}{%
\define@key{sphinx}{div.topic_border-top-left-radius}{\def\spx@topic@radius@topleft{#1}}
\define@key{sphinx}{div.topic_border-top-right-radius}{\def\spx@topic@radius@topright{#1}}
\define@key{sphinx}{div.topic_border-bottom-right-radius}{\def\spx@topic@radius@bottomright{#1}}
\define@key{sphinx}{div.topic_border-bottom-left-radius}{\def\spx@topic@radius@bottomleft{#1}}
\define@key{sphinx}{div.topic_border-radius}{%
\def\spx@topic@radius@topleft {#1}%
\let\spx@topic@radius@topright \spx@topic@radius@topleft
\let\spx@topic@radius@bottomright\spx@topic@radius@topleft
Expand All @@ -379,7 +379,7 @@
\newif\ifspx@topic@withshadow
\newif\ifspx@topic@insetshadow
% Attention only "none" or "<xoffset> <yoffset> [optional inset]", no color
\define@key{sphinx}{aside.topic_box-shadow}{\spx@topic@box@shadow@setter #1 {} {} \@nnil}%
\define@key{sphinx}{div.topic_box-shadow}{\spx@topic@box@shadow@setter #1 {} {} \@nnil}%
\def\spx@topic@box@shadow@setter #1 #2 #3 #4\@nnil{%
\edef\spx@tempa{#1}%
\ifx\spx@tempa\spxstring@none
Expand Down Expand Up @@ -412,17 +412,17 @@
\definecolor{sphinxTopicBackgroundColor}{rgb}{1,1,1}
\definecolor{sphinxTopicShadowColor}{rgb}{0,0,0}
\newif\ifspx@topic@withbordercolor
\define@key{sphinx}{aside.topic_border-TeXcolor}{%
\define@key{sphinx}{div.topic_border-TeXcolor}{%
\spx@topic@withbordercolortrue
\definecolor{sphinxTopicBorderColor}#1%
}
\newif\ifspx@topic@withbackgroundcolor
\define@key{sphinx}{aside.topic_background-TeXcolor}{%
\define@key{sphinx}{div.topic_background-TeXcolor}{%
\spx@topic@withbackgroundcolortrue
\definecolor{sphinxTopicBackgroundColor}#1%
}
\newif\ifspx@topic@withshadowcolor
\define@key{sphinx}{aside.topic_box-shadow-TeXcolor}{%
\define@key{sphinx}{div.topic_box-shadow-TeXcolor}{%
\spx@topic@withshadowcolortrue
\definecolor{sphinxTopicShadowColor}#1%
}
Expand Down

0 comments on commit ac51bb0

Please sign in to comment.