Commit Graph

233 Commits

Author SHA1 Message Date
Harrissou Sant-anna
da6a20d50b
Fix typos in usage/configuration.rst (#10834) 2023-01-02 04:48:53 +00: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
Adam Turner
592b46c431
Revert `html_codeblock_linenos_style` removal (#10922) 2022-10-16 16:50:53 +01:00
Adam Turner
e70a0fac6d Merge branch '5.x'
# Conflicts:
#	.github/workflows/main.yml
#	CHANGES
#	sphinx/__init__.py
#	sphinx/domains/c.py
2022-10-16 11:24:18 +01: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
Adam Turner
63dea6172a Merge branch '5.x'
# Conflicts:
#	sphinx/locale/__init__.py
2022-09-30 16:15:24 +01:00
Adam Turner
650f63b9f7
Finer grained control over domain ToC entries (#10886)
- Implement `:nocontentsentry:` flag
- Use `:nocontentsentry:` in docs
- Add domain object table of contents configuration option
2022-09-30 10:31:58 +01:00
Adam Turner
56aa3412ef Merge branch '5.x'
# Conflicts:
#	setup.py
#	sphinx/__init__.py
2022-09-23 17:27:00 +01:00
Adam Turner
f57177de89
Add contents entries for domain objects (#10807)
- Add entries in the table of contents for domain objects (e.g. 
  `py:function`, `rst:role`, etc). Supported domains are Javascript,
  Python, and reStructuredText.
- Support content in `py:module` and `js:module` directives.
- Add the `noindexentry` and `noindex` flags to more domains.
- Add `toc_object_entries_show_parents` configuration setting
- Update documentation and tests
2022-09-13 20:20:02 +01:00
Adam Turner
ee005caf22 Do not apply epigraph style to all block quotes
Correct indentation where appropriate for stanzas that should not be
rendered as `<blockquote>` HTML elements.

Closes GH-10686
2022-09-12 19:54:36 +01:00
Adam Turner
19b54dce6a Merge branch '5.x'
# Conflicts:
#	CHANGES
#	sphinx/__init__.py
2022-07-24 14:15:26 +01:00
Adam Turner
e3337c78c6
Update include_patterns implementation (#10680) 2022-07-23 21:19:35 +01:00
Takeshi KOMIYA
1199f7bd75 Merge branch '5.x' 2022-07-23 15:32:38 +09:00
marxin
9a30edac7d Fix indentation of .. version{changed,added}. 2022-07-19 15:26:57 +02:00
Adam Turner
a4d41aa889 Merge branch '5.x' 2022-07-17 21:53:12 +01:00
Adam Turner
490a8a9162
Add include_patterns as the opposite of exclude_patterns (#10518) 2022-07-17 21:44:33 +01:00
Jean-François B
80198e82aa Merge branch '5.x' into master
Resolved merge conflicts:
    sphinx/ext/extlinks.py
    sphinx/ext/napoleon/docstring.py
    (and removed from the latter a now unused import for flake8 F401
    compliance)
2022-06-30 15:00:16 +02:00
jfbu
d730c55f13 [DOC] Fix sectioning level in usage/configuration.rst
The conf.py example ended up as sub-section of previous one
2022-06-26 11:36:38 +02:00
jfbu
8ecbe8a15a Improve mark-up in docs (follow-up to PR #10366) 2022-06-26 09:30:22 +02:00
Adam Turner
7e38d2dad8 Merge branch '5.x'
# Conflicts:
#	.github/workflows/builddoc.yml
#	.github/workflows/lint.yml
#	sphinx/registry.py
2022-06-16 21:46:54 +01:00
Adam Turner
ce31e1c0c7
Remove deprecated items for Sphinx 6.0 (#10471) 2022-06-16 21:05:37 +01:00
Martin Liška
f789148fa2
Allow emphasising placeholders in option directives (#10366)
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2022-06-16 20:46:01 +01:00
Takeshi KOMIYA
68252c646a doc: The default setting of "language" has been changed since v5.0 2022-05-28 19:09:35 +01:00
Adam Turner
3420d15cb9 Bump Docutils dependency 2022-04-19 03:09:45 +01:00
Takeshi KOMIYA
223b1a94f2 Merge branch '4.x' 2022-03-28 01:00:37 +09:00
Takeshi KOMIYA
7b55447b7e
Update versionadded to 4.5 2022-03-06 18:47:17 +09:00
Jean Abou Samra
dfcb5d2f4c Categorize warnings for inconsistent references in i18n
This allows suppressing them using the suppress_warnings configuration
variable.
2022-02-15 14:32:22 +01:00
Takeshi KOMIYA
d7c6fa853c Merge commit '2be06309518d9401a42880bb5b4321dfdd1e5e90' 2022-02-14 03:02:31 +09:00
Takeshi KOMIYA
72bb5c998f Close #9456: html search: Add a config variable; html_show_search_summary
refs: #9494
2022-01-17 01:44:42 +09:00
Takeshi KOMIYA
0e51ddef34 Merge branch '4.x' 2021-12-11 23:18:46 +09:00
Takeshi KOMIYA
8d071a8e8f
Merge branch '4.x' into texinfo-add-texinfo_emit_document_references 2021-12-11 10:27:50 +09:00
Takeshi KOMIYA
980ccc4c2a Merge branch '4.x' 2021-12-10 01:45:15 +09:00
Christian Roth
10023da895 linkcheck: Exclude links from matched documents 2021-12-08 10:01:45 +01:00
Takeshi KOMIYA
ecee2335c5 Merge branch '4.x' 2021-11-18 01:01:12 +09:00
Matt Ficke
2ed4bed33a Update RFC base url
The tools.ietf.org subdomain is being wound down and services are moving to
datatracker.ietf.org. Links to RFC documents using the old subdomain are being
redirected to datatracker; this updates the configured `rfc_base_url` to
point to the current subdomain.

Discussion: https://mailarchive.ietf.org/arch/msg/ietf/0n-6EXEmkTp3Uv_vj-5Vnm3o0bo/
2021-11-16 10:52:02 -05:00
Martin Liska
9ec829fb50 texinfo: simplify reference emission.
The commit adds a new config value 'texinfo_emit_document_references'
that blocks the emission of inline references and make it better readable
with legacy stand-alone reader ``info``.

Before the change we emit:
Default option value for @ref{e,,-Wshift-overflow3}.

while with texinfo_emit_document_references == True:
Default option value for -Wshift-overflow3.

It addresses limitations mentioned in Sphinx' FAQ:
https://www.sphinx-doc.org/en/master/faq.html#texinfo-info
2021-11-12 14:00:48 +01:00
Takeshi KOMIYA
0f6afa5992 Merge branch '4.x' 2021-11-11 02:25:42 +09:00
Takeshi KOMIYA
096e28693e
Merge pull request #9628 from tk0miya/9623_suppress_warnings_for_excluded_document_in_toctree
Close #9623: Allow to suppress warnings on excluded document found in toctree
2021-11-10 02:17:04 +09:00
Takeshi KOMIYA
7357b17e09 Merge branch '4.x' into 9623_suppress_warnings_for_excluded_document_in_toctree 2021-11-10 01:44:28 +09:00
Takeshi KOMIYA
22bec4ffe4 Fix #9623: Separate warning type 'toc.not_readable' to 'toc.excluded' 2021-11-10 01:43:59 +09:00
Takeshi KOMIYA
203094b4c3 Close #9618: i18n: Add gettext_allow_fuzzy_translations 2021-11-10 01:32:02 +09:00
Takeshi KOMIYA
4c623237c1 Merge branch '4.x' 2021-10-28 02:43:32 +09:00
François Freitag
70e0c314ca Fix linkcheck_auth link to Requests authentication
The link was directing to
https://www.sphinx-doc.org/en/master/usage/requests-auth>. Prefer using
the intersphinx module to generate the link, it’s more robust than
directly linking to the page.
2021-10-25 15:04:15 +02:00
Takeshi KOMIYA
3f51f1a6cf Merge branch '4.x' 2021-10-09 13:50:50 +09:00
Ghassan Maslamani
d20646194c doc: update description
Update description about how `conf.py` is loaded/executed
2021-09-30 13:43:09 +03:00
Takeshi KOMIYA
ca146ac18b Close #9623: Allow to suppress warnings on excluded document found in toctree 2021-09-12 19:23:19 +09:00
Takeshi KOMIYA
3d8fbd992c Merge branch '4.x' 2021-09-12 16:56:34 +09:00
Takeshi KOMIYA
260f217a3d
Merge pull request #9594 from hkuno/pr/no_empty_desc_4.x
let user skip printing command description
2021-09-11 19:08:37 +09:00