Commit Graph

175 Commits

Author SHA1 Message Date
Jean-François B.
afaddd3c45
Update LaTeX docs with new admonition colours (#12588) 2024-07-15 18:28:40 +01:00
Adam Turner
7b570c06a1 Standardise on a common directive for describing code snippets 2024-07-15 02:15:52 +01:00
Jean-François B
aa6dac81ec
LaTeX: Revamp the styling of all admonitions (#12508)
In LaTeX output, all admonitions now also have a title row with icon.

The ``xcolor`` LaTeX package is now required and the ``fontawesome5`` LaTeX package is needed for the icons.
2024-07-13 17:33:22 +01:00
Jean-François B
e49e2933bb
LaTeX: Use the babel LaTeX package by default for 'lualatex' with French (#12557)
Previously ``polyglossia`` was used by default.
2024-07-13 09:02:43 +01:00
Adam Turner
82edc3d385
Rewrite `usage/configuration.rst` (#12537)
- Remove now-removed configuration values
- Use obvious 'unset' defaults for ``project`` and ``author``
- Prefer 'e.g.' to 'ex.'
- Allow non-list sequence types in various configuration values
- Add types and defaults to every confval directive
2024-07-10 21:43:14 +01:00
Jean-François B
b90482fc81
LaTeX: fix docs for `'babel' key of latex_elements` (#12411)
This fixes the documentation which was faulty since v1.7.6, but #12410 is left open until a decision is taken.
2024-06-05 12:52:35 +02:00
James Addison
0806a00f05
Support `.jinja` for theme static templates (#11916)
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2024-04-23 10:40:24 +01:00
Bénédikt Tran
b2069fb64f
[lint] update Makefile and lint doc (#12117) 2024-03-17 14:45:56 +01:00
Dimitri Papadopoulos Orfanos
460a63010f
Fix various spelling errors (#11735) 2024-01-04 02:37:44 +00:00
picnixz
480630c649
Support PEP 695 and PEP 696 syntax in the Python domain (#11444)
* Generic classes can be documented with ``.. py:class::`` using PEP 695 syntax:

  .. code:: rst

     .. py:class:: Sequence[T]

* Generic functions can be documented with ``.. py:function::`` using PEP 695 syntax:

  .. code:: rst

     .. py:function:: foo[T](x: T)

* Default values for type bounds are supported.

Co-authored-by: Adam Turner <9087854+aa-turner@users.noreply.github.com>
2023-07-23 23:22:40 +01:00
TLouf
86b07d4a97
Allow multi-line object description signatures (#11011)
Co-authored-by: Adam Turner <9087854+aa-turner@users.noreply.github.com>
Co-authored-by: Jean-François B <2589111+jfbu@users.noreply.github.com>
Co-authored-by: TLouf <loufthomas@gmail.com>
2023-05-11 14:28:57 +01:00
James Addison
59de8d5202
Revert "Support and prefer `.jinja to _t` for static templates (#11165)" (#11329)
This reverts commit 5d13215b58.
2023-04-23 19:06:44 +01:00
Jean-François B
188b869fa2 Use longtable for our document in PDF format
Previous commit applied longtable class to the next one, but this still
left the previous table prevent an earlier page break.
2023-04-11 22:59:28 +02:00
Jean-François B
256ac63bf9 Use a :class:longtable in our document for LaTeX PDF output
Now that #11268 has been fixed via #11319.
2023-04-11 20:48:24 +02:00
James Addison
5d13215b58
Support and prefer `.jinja to _t` for static templates (#11165)
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2023-04-07 18:07:15 +01:00
Adam Turner
7ecf037280 Enable 'nit-picky mode' for Sphinx's documentation
Fix several reference errors throughout the documentation and set
``nitpick_ignore`` in ``doc/conf.py``.
2023-04-06 23:11:39 +01:00
Jean-François B
8f9bac9c4f LaTeX: rename `\sphinxnotetitle into \sphinxstylenotetitle` (etc)
Follow-up to #11266.  Using \sphinxstyle prefix looked a posteriori
better, for coherency, although it is a bit long.
2023-03-27 15:21:06 +02:00
Jean-François B
7cdd9b2679 LaTeX: let \sphinxremovefinalcolon work also if no colon in input 2023-03-27 12:21:26 +02:00
Dimitri Papadopoulos
669bcc0a19
Fix typos found by codespell 2023-03-27 07:22:07 +02:00
Jean-François B
7144f4924a LaTeX: add \sphinxnotetitle et al.
In passing I reverted some deprecation I had added at 6bf40599e to some
internals of the sphinxadmonition environment, as it does not look that
pressing anyhow and the redundant namings of two colors in particular
may nevertheless prove useful to user \renewcommand's, as they avoid to
have to refer to \spx@noticetype.
2023-03-26 23:57:04 +02:00
Jean-François B
a7949d4290 LaTeX: let mark-up for seealso directive use explicit colon (fix #11264) 2023-03-26 23:57:04 +02:00
Jean-François B
ec25892dd9 LaTeX: doc updates
modified:   doc/latex.rst
2023-03-20 10:34:15 +01:00
Jean-François B
8ed2c6708d LaTeX: update doc, trim unneeded extra examples 2023-03-20 00:10:31 +01:00
Jean-François B
de60cd8618 LaTeX: support elliptical corners in rounded boxes 2023-03-19 21:47:03 +01:00
Jean-François B
f78d86554c LaTeX: remove more-or-less obsolete doc 2023-03-19 21:23:06 +01:00
Jean-François B
cf6273a6b1 LaTeX: fix nits with some mark-up in doc and code comment 2023-03-19 19:09:08 +01:00
Jean-François B
b433d4cb9d LaTeX: warn about \sphinxbox addstrut default possibly changed at 7.0.0 2023-03-19 18:33:13 +01:00
Jean-François B
6bf40599e2 LaTeX: add <prefix>_{TeXcolor,TeXextras} options
And add <type>TextColor and <type>TeXextras for <type>=hint, important,
note, tip for variants which do not trigger for sphinxheavybox but
still uses sphinxlightbox (suitably enhanced).

Similar named TeXcolor and TeXextras options for \sphinxbox.
2023-03-19 18:29:09 +01:00
Jean-François B
4d7347cf1b LaTeX: reset options in nested \sphinxbox'es 2023-03-19 18:28:37 +01:00
Jean-François B
e80c1e6b31 LaTeX: let rounded boxes support up to 4 distinct border-widths
Internally replace "strokepath" operation for drawing the border
(which mandated constant border-width) by only "fillpath" operations.
This also allowed to significantly simplify some other aspects of the
code related to box-decoration-break=slice.
2023-03-15 17:59:43 +01:00
Jean-François B
78e14fb6ba LaTeX: add boolean option addstrut to \sphinxbox/\sphinxboxsetup 2023-03-14 23:52:32 +01:00
Jean-François B
ee3c720cfa LaTeX: also admonition directives support box-decoration-break=slice 2023-03-13 19:50:31 +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
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
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
d50ae3c1c9 LaTeX: fix some documentation from #11224 2023-03-07 19:10:43 +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
b635150bc7 LaTeX: `\sphinxbox` for boxing inline text elements 2023-03-07 13:19:19 +01:00
Jean-François B
b88713e68e Update LaTeX docs 2023-01-24 14:45:46 +01:00
Jean-François B
55170d01d7 LaTeX: `\emph replaced by \sphinxparam and \sphinxsamedocref` 2023-01-24 14:11:24 +01:00
Jean-François B
6259c2b723 Markup typo in docs 2023-01-07 00:03:52 +01:00
Jean-François B
7945aeb22d
LaTeX: fix 5.1.0 bugs related to topic and contents boxes (#11102)
* Fix #11095 (PDF wrong placement of shadow of topic boxes since 5.1.0)

* Fix #11096 (LaTeX shadowsize regression at 5.1.0)

* Fix #11099 (shadowrule legacy sphinxsetup key vanished at 5.1.0)

* Fix #11101 (LaTeX div.topic_padding of sphinxsetup had wrong name)

* Add some checks that various sphinxsetup keys do not break PDF build

* Update LaTeX docs

* Update CHANGES

* Can not use :dudir:`contents` has it links to wrong place
2023-01-06 23:52:19 +01:00
Jean-François B
bfd95dadf2 Fix #6744: support for seealso directive should be via an environment 2023-01-03 18:58:39 +01:00
Jean-François B
b1ca6b3e12
Fix #10984 [DOC] document latex_additional_files behavior with .tex (#10993) 2022-11-30 18:52:48 +01:00
Jean-François B
49c48f5aee
LaTeX: switch to some nicer defaults for tables and code-blocks (#10924) 2022-10-17 11:19:25 +02:00
Jean-François B
b5ba1ede2a s/5.2.0/5.3.0 in various code comments as #10759 got merged in 5.3.0 2022-10-12 17:41:39 +02:00
Jean-François B
e7c0881992
LaTeX: support for booktabs-style and zebra-striped tables (#10759)
This is a combination of 2 + 28 + 7 + and some more commits...

* Cherry-pick: Add support for booktabs-style tables to LaTeX builder

* Cherry-pick: Add support for zebra-striped tables to LaTeX builder

Co-authored-by: Stefan Wiehler <stefan.wiehler@missinglinkelectronics.com>

Above work originally initiated by @sephalon (thanks!)

Development refactored and continued by @jfbu

* latex_table_style configuration, support booktabs, colorrows, borderless

Some details:

- Simplify a bit a conditional in the longtable template

  This also puts the target for a longtable with a label but no caption
  above the toprule for better hyperlinking (testing shows hyperlink
  target can not end up alone at bottom of previous page).

- Extend allowed syntax for colour assignments via 'sphinxsetup'

- latex_table_style new configuration value and coloured rows

  For the user interface I tried to look for inspiration in
  https://docutils.sourceforge.io/docs/user/config.html#table-style
  which mentions booktabs and borderless.  They also mention
  captionbelow which we can implement later, now that architecture
  is here.  They don't mention coloured rows.

- Test on our own document... looks fine!

- Work-around an incompatibility of \cline with row colours

- Reverse priority of classes to allow overruling booktabs by standard
  after parsing source but before letting LaTeX writer act

- Closes #8220

  Commit
  bb859c6696
  already improved a bit, this finishes it (as :rst:dir:`rst-class` was
  actually not linking to anywhere).

- Let booktabs style defaults to *not* using \cmidrule.  They actually
  don't make much sense there, as all \hline's are removed.

- Add \sphinxnorowcolor which allows construct such as this one in
  a tabularcolumns directive:

    >{\columncolor{blue}\sphinxnorowcolor}

  else LaTeX always overrides column colour by row colour

- Add TableMergeColorHeader, TableMergeColorOdd, TableMergeColorEven
  so single-row merged cells can be styled especially

- Extend row colours to all header rows not only the first one
  (all header rows will share same colour settings)

- Auto-adjust to a no '|'-colspec for optimal handling of merged cell

- Add \sphinxcolorblend

- Workaround LaTeX's \cline features and other grid tables matters

- Add \sphinxbuildwarning for important warnings

- Fix some white gaps in merged cells of tables with vlines and
  colorrows

- Work around LaTeX's \cline serious deficiencies for complex grid
  tables

  This commit corrects \cline badly impacting vertical spacing and
  making tables look even more cramped as they usually are in LaTeX
  (although one sees it clearly only with \arrarrulewidth a bit more
  than the LaTeX default of 0.4pt).

  Most importantly this commit solves the problem that \cline's got
  masked by colour panels from the row below.

- Update CHANGES for PR #10759

- Improve documentation of new latex_table_style regarding colours
2022-10-12 17:15:40 +02:00