Commit Graph

20157 Commits

Author SHA1 Message Date
Jean-François B
27b30bba01 LaTeX: add support for div.topic_box-decoration-break=slice
It is however undecided if the slice style should suppress the
horizontal shadow forcefully.  It does not so far.

This commit has removed the \spx@ShadowFBox macro which got so
simple that its meaning could be put directly into \FrameCommand
definition.
2023-03-13 19:50:31 +01:00
Jean-François B
66c819ee21 LaTeX: refactoring of some internals from box-decoration-break support 2023-03-13 17:28:54 +01:00
Jean-François B
ff32c15ce0 LaTeX: comments following up on regression fix commit in sphinxShadowBox 2023-03-13 17:28:49 +01:00
Jean-François B
8b7758160e LaTeX: fix a regression revealed by test_includegraphics_oversized 2023-03-13 12:54:59 +01:00
Jean-François B
99863fb080 LaTeX: encapsulate dimension options in \dimexpr 2023-03-13 12:25:47 +01:00
Jean-François B
16a62a86ce LaTeX: guard against non-available xcolor in setting \sphinxbox defaults 2023-03-13 10:51:20 +01:00
Jean-François B
85fbfe1fa9 LaTeX: polish code comments 2023-03-13 10:47:01 +01:00
Jean-François B
819c7d508d LaTeX: mumble with trailing whitespaces in latex.rst 2023-03-12 18:37:21 +01:00
Jean-François B
e1c521f38b LaTeX: documentation and a mark-up fix in latex.rst 2023-03-12 18:28:54 +01:00
Jean-François B
aeeadb6f1e Fix #11235: LaTeX: `\color` may cause color leaks in topic or notices 2023-03-12 15:55:57 +01:00
Jean-François B
428097f305 LaTeX: fix breakage at 4de9d4604 from misuse of \pagecolor
This is a one-argument command to set the page colour, not a toggle to
use the page colour!
2023-03-12 14:01:09 +01:00
Jean-François B
bc6f31f660 LaTeX: use older syntax and not the `\expanded` added at #11234
Sorry about this, the \expanded was added to pdflatex in 2019 only
(but was available earlier to lualatex).  This is in contrast
with \unexpanded which has been available for more than 15 years.
2023-03-12 12:59:56 +01:00
Jean-François B
212ed5b940
LaTeX: add support for styling `note (hint, ...) similarly as warning ( danger`, ...) (#11234) 2023-03-12 11:28:36 +01:00
Jean-François B
7c062b828e Dummy commit to span CI as Windows failed test_gettext_dont_rebuild_mo 2023-03-10 11:54:56 +01:00
Jean-François B
05ba2df694 LaTeX: comment for future maintenance of \sphinxbox 2023-03-10 11:43:29 +01:00
Jean-François B
007f61ec81 LaTeX: guard against \renewsphinxbox[...]{\sphinxbox} 2023-03-10 10:36:05 +01:00
Jean-François B
9d0ff5af41 LaTeX: \sphinxbox must issue \leavevmode to let TeX enter paragraph mode 2023-03-10 10:24:16 +01:00
Jean-François B
00640b19ad LaTeX: refactoring to avoid code duplication 2023-03-09 19:35:49 +01:00
Jean-François B
d50ae3c1c9 LaTeX: fix some documentation from #11224 2023-03-07 19:10:43 +01:00
Jean-François B
75da848573 LaTeX: streamline matters related to pict2e availability 2023-03-07 17:41:41 +01:00
Jean-François B
f2eb2870d1 LaTeX: fix a glitch from recent internal renamings
On a system with LaTeX package pict2e unavailable it would lead
to an infinite loop.  Caused by forgotten update of a macro name
which has changed meaning.
2023-03-07 16:40:45 +01:00
Jean-François B
e39949fed0 Update some LaTeX comments and documentation after #11224 2023-03-07 13:58:02 +01:00
Jean-François B
3a142d99cb
Merge pull request #11224 from jfbu/latex_sphinxbox
LaTeX: add ``\sphinxbox`` command
2023-03-07 13:31:01 +01:00
Jean-François B
b635150bc7 LaTeX: `\sphinxbox` for boxing inline text elements 2023-03-07 13:19:19 +01:00
Jean-François B
f8a5183a97 Use narrower [method-assign] instead of [assignment] (mypy 1.1.1) 2023-03-07 11:12:49 +01:00
Jean-François B
c499e090e8 LaTeX: refactor how display environments use sphinxpackageboxes
This is to share code as much as possible and facilitate future
extensions.
2023-03-07 11:00:52 +01:00
Jean-François B
13c779b666 LaTeX: clean-up of comments for refactoring of CSS-like options support 2023-03-07 09:31:52 +01:00
Jean-François B
ba37288d67 LaTeX: fix unintended 1pt upwards vertical shift of rounded box frames
This issue was not clearly visible on code-blocks whose contents always
occupy at least one full height line and 1pt is small compared to it and
the default padding.  It became more obvious when experimenting (work in
progress) with applying the macro to inline contents with zero padding.
2023-03-07 00:58:58 +01:00
Jean-François B
bd1df24a18 Update CHANGES 2023-03-06 22:13:02 +01:00
Jean-François B
ad3235421f LaTeX: refactor support macros for CSS-like sphinxsetup options
Use batch definitions to handle in a unified way options for
code-blocks, topics and admonitions.
2023-03-06 21:58:50 +01:00
Jean-François B
c105ea0ad4 LaTeX: guard usage of shadow color via associated boolean
modified:   sphinxpackageboxes.sty
2023-03-06 21:47:39 +01:00
Jean-François B
4de9d4604d LaTeX: Fix shadow color leaks to border (rounded box) if no border color 2023-03-06 21:43:47 +01:00
Jean Abou-Samra
216a0c849e
Get docname from env in `sphinx.transforms.i18n` (#11160) 2023-03-05 19:19:31 +00:00
Adam Turner
29d7166af2 Drop OrderedDict
Since Python 3.7, dicts maintain insertion order.
2023-03-05 19:03:06 +00:00
Adam Turner
44326fe247 Remove tests that rely on setuptools 2023-03-05 19:03:06 +00:00
Adam Turner
43e681e88f Remove `.egg support from pycode ModuleAnalyser`
Python eggs are a now-obsolete binary distribution format.
2023-03-05 19:03:06 +00:00
Adam Turner
f435fc05e6 Prefer `contextlib.chdir to sphinx.util.osutil.cd` 2023-03-05 18:49:17 +00:00
Hugo van Kemenade
219d71315c
Make `--jobs a synonym for -j` (#11210)
Make --jobs a synonym for -j
2023-03-05 14:37:35 +00:00
Adam Turner
c5641702b5 Update tests for Babel 2.12 (CLDR 42) 2023-03-05 13:32:37 +00:00
Adam Turner
18f8c0bfc8 Resolve lint errors from Ruff 0.0.254 2023-03-05 12:54:24 +00:00
Adam Turner
ba080286b0 Explicitly select all linter checks 2023-02-18 02:16:50 +00:00
Adam Turner
f363f1b058 Update Ruff configuration 2023-02-18 02:16:50 +00:00
Adam Turner
4804390604 Resolve `flake8-return` errors 2023-02-18 02:16:50 +00:00
Adam Turner
6c56988979 Unescape quotation marks where possible 2023-02-18 02:16:50 +00:00
Adam Turner
13442f6901 Fix pytest style issues 2023-02-18 02:16:50 +00:00
Adam Turner
dc1a519a1d Avoid `unittest.TestCase` methods 2023-02-18 02:05:14 +00:00
Adam Turner
f6435a9bc3 Prefer `@pytest.fixture()` 2023-02-18 01:58:05 +00:00
Adam Turner
c8f4a03dac Fix COM812 2023-02-18 01:58:05 +00:00
Jeremy Maitin-Shepard
8de6638697
Add `content_offset parameter to nested_parse_with_titles` (#11147)
Previously, ``nested_parse_with_titles`` always passed ``0`` as the input
offset when invoking ``nested_parse``.  When parsing the content of a
directive, as is a common use case for ``nested_parse_with_titles``,
this leads to incorrect source file/line number information, as it
does not take into account the directive's ``content_offset``, which is
always non-zero.

This issue affects *all* object descriptions due to GH-10887.  It also
affects the ``sphinx.ext.ifconfig`` extension.

The ``py:module`` and ``js:module`` directives employed a workaround for
this issue, by wrapping the calls to ``nested_parse_with_title`` with
``switch_source_input``.  That worked, but was more complicated (and
likely less efficient) than necessary.

This commit adds an optional ``content_offset`` parameter to
``nested_parse_with_titles``, and fixes callers to pass the appropriate
content offset when needed.

This commit eliminates the now-unnecessary calls to
``switch_source_input`` and instead specifies the correct ``content_offset``.
2023-02-15 05:45:28 +00:00
Jeremy Maitin-Shepard
44684e1654
Restore correct parallel search index building (#11192)
Revert b32841e153
to fix parallel search index building

The image-related changes were already reverted in
2a7c40d07f,
but the search index changes also need to be reverted.

It would be nice to support parallel search index building, but the
necessary support for merging the search indices produced by each
process needs to be added first.
2023-02-15 05:26:10 +00:00