Commit Graph

18491 Commits

Author SHA1 Message Date
Takeshi KOMIYA
d743f21136 Merge pull request #9390 from marxin/fix-footnote-in-info
texinfo: fix emission of @footnote directives.
2021-12-11 23:15:46 +09:00
Takeshi KOMIYA
f886fc2625 Merge pull request #9958 from tk0miya/9108_accessible_highlights
Fix #9108: docs: Use default pygments_theme to get accessiblity
2021-12-11 23:15:27 +09:00
Takeshi KOMIYA
8e23b03263 refactor: texinfo: Remove CR char from output
The CR character was added for readability of output.  But it makes the
texinfo writer a bit complicated.  This removes it from output to keep
our code simple (reducing conditions).
2021-12-11 23:05:36 +09:00
Takeshi KOMIYA
5563f672ec Merge branch '4.x' into fix-footnote-in-info 2021-12-11 22:59:56 +09:00
Takeshi KOMIYA
0b238d897c Fix #9108: docs: Use default pygments_theme to get accessiblity
To increse accessiblity of our docs, this changes the pygments_theme of
sphinx-docs.org to "default".  It was updated to meet WCAG AA in
https://github.com/pygments/pygments/pull/1940.
2021-12-11 11:34:51 +09:00
Takeshi KOMIYA
c6fc5dff53 Update CHANGES for PR #9793 2021-12-11 11:25:38 +09:00
Takeshi KOMIYA
4c7df3f09a Merge pull request #9793 from samdoran/enable-parallel-on-macos
Set multiprocessing start method to `fork`
2021-12-11 11:23:34 +09:00
Takeshi KOMIYA
68703e87f7 Merge pull request #9953 from tk0miya/9947_source_info_less_topic_node
Fix #9947: i18n: topic directive having a bullet list can't be translatable
2021-12-11 11:00:21 +09:00
Takeshi KOMIYA
d3162d1ff2 Merge pull request #9931 from tk0miya/9075_autodoc_unqualified_typehints
Close #9075: autodoc: Add a config variable autodoc_unqualified_typehints
2021-12-11 10:59:23 +09:00
Takeshi KOMIYA
b5ee2d09fc Update CHANGES for PR #9578 2021-12-11 10:49:38 +09:00
Takeshi KOMIYA
18328981a1 Merge pull request #9578 from marxin/texinfo-add-texinfo_emit_document_references
texinfo: simplify reference emission.
2021-12-11 10:47:36 +09:00
Takeshi KOMIYA
9c6ebdf347 Fix flake8 warnings 2021-12-11 10:33:07 +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
6f7b830546 Update CHANGES for PR #9391 2021-12-11 10:26:41 +09:00
Takeshi KOMIYA
b232b00cf8 Merge pull request #9391 from marxin/info-samp-with-variable
texinfo: improve variable in :samp: directives
2021-12-11 10:25:07 +09:00
Jean-François B
7d6d5621fe Merge pull request #9946 from jfbu/9949_latex
Fix #9944 (LaTeX writer visit_desc_content())
2021-12-09 18:25:30 +01:00
Jean-François B
e05741e8c7 Merge pull request #9949 from jfbu/9925_latex
LaTeX: prohibit also with xelatex linebreaks at dashes in literal text (not code-blocks) (fixes #9925)
2021-12-09 18:22:18 +01:00
jfbu
e1b2936892 Fix #9944 (LaTeX writer visit_desc_content())
The "~" was added 14 years ago at 3761223d85

Seems not to be needed anymore and causes extra vertical space in some
circumstances.
t
2021-12-09 18:18:08 +01:00
jfbu
2b60f75963 Update CHANGES 2021-12-09 18:12:56 +01:00
jfbu
ccd2c83f2f Add \sphinxhyphenin{inline,parsed}literal for customizability
Whether or not to allow linebreaks is matter of debate because user of
pdf can not reflow the displayed text, and overfull lines may lead to
loss of data beyond page border.

Since Sphinx 1.5, inline literals allow linebreaks after the characters
".", ",", ";", "?", "!", "/" and "\" (cf the inlineliteralwraps key of
latex_elements['sphinxsetup']).

With pdflatex the dash "-" does not allow a linebreak when used with a
monospace font (btw the dash is escaped to \sphinxhyphen{} which expands
back to a dash).  But this failed with xelatex, so previous commits
ensured nobreak behaviour by redefining \sphinxhyphen to be
\sphinxhyphennobreak when encountered in inline and parsed literals.

This commit adds \sphinxhyphenin{inline,parsed}literal macros which
default to \sphinxhyphennobreak and thus allow to customize how the
dashes from sources will behave in such contexts in pdf output.
2021-12-09 18:12:29 +01:00
Takeshi KOMIYA
73da161def Merge pull request #9942 from jdknight/support-tox-coverage-on-win32
tox: support coverage on win32
2021-12-10 02:09:47 +09:00
jfbu
8ad49613a8 Make sure option names in xelatex pdf output do not split at dashes
Fix #9925
2021-12-09 18:09:33 +01:00
jfbu
3dbcab238d Fix inaccurate LaTeX comments 2021-12-09 18:09:33 +01:00
Takeshi KOMIYA
f2f91ffb84 Fix #9947: i18n: topic directive having a bullet list can't be translatable
It seems docutils does not fill the topic node with the source info when
a topic directive has a bullet list.  As a workaround, This fills the
source info of them.
2021-12-10 01:33:09 +09:00
François Freitag
5851344934 Merge pull request #9894 from croth1/linkcheck_ignore_docs
linkcheck: Exclude links from matched documents
2021-12-08 21:57:38 +01:00
Christian Roth
10023da895 linkcheck: Exclude links from matched documents 2021-12-08 10:01:45 +01:00
Takeshi KOMIYA
471022b6df Merge pull request #9948 from joukewitteveen/patch-1
doc: Improve autodoc extension example
2021-12-08 02:26:14 +09:00
Jouke Witteveen
e200e7b7c1 doc: Improve autodoc extension example
Enumerations can have aliases, which should be documented as well.
2021-12-06 12:31:09 +01:00
James Knight
334bdceeff tox: support coverage on win32
When invoking the `coverage` on a Windows environment, the following
exception may generate:

    ...
        raise CoverageException(f"Couldn't read {fname!r} as a config file")
    coverage.exceptions.CoverageException: Couldn't read 'C:mycodesphinx/setup.cfg' as a config file
    ERROR: InvocationError for command 'C:\mycode\sphinx\.tox\coverage\Scripts\python.EXE' -X dev -m pytest --durations 25 (exited with code 1)

Enclosing with configuration file with quotes can improve the handling
of a provided path on multiple platform types.

Signed-off-by: James Knight <james.d.knight@live.com>
2021-12-05 14:24:14 -05:00
Takeshi KOMIYA
edd14783f3 Merge pull request #9938 from sphinx-doc/bot/pull-translations
Update message catalogs
2021-12-05 16:00:15 +09:00
tk0miya
49a31b71aa Update message catalogs 2021-12-05 00:12:09 +00:00
Takeshi KOMIYA
be7313348c Merge pull request #9929 from jakobandersen/pre_line_wrap
Prevent line wrapping in literals
2021-12-04 15:39:50 +09:00
Takeshi KOMIYA
86639b7be9 Merge pull request #9852 from astrojuanlu/new-tutorial-deploying
New Sphinx tutorial, part IV
2021-12-04 12:02:23 +09:00
Takeshi KOMIYA
85efe39c55 Merge pull request #9910 from kianmeng/fix-typos
Fix typos
2021-12-04 11:46:13 +09:00
Takeshi KOMIYA
4d176d4564 Merge pull request #9928 from joukewitteveen/patch-1
doc: Fix autodoc extension example
2021-12-04 11:08:46 +09:00
Takeshi KOMIYA
c71ff1cd21 Close #9075: autodoc: Add a config variable autodoc_unqualified_typehints
If autodoc_unqualified_typehints feature enabled, autodoc suppresses the
leading module names of typehints of function signatures (ex.
`io.StringIO` -> `StringIO`)
2021-12-03 18:05:49 +09:00
Takeshi KOMIYA
5aa6cbbca8 Add unqualified_typehints parameter to stringify_signature()
To make the generated function signatures simple, this adds a new
parameter `unqualified_typehints` to sphinx.util.inspect:
stringify_signature() to suppress the leading module name of
typehints.
2021-12-03 18:05:49 +09:00
Takeshi KOMIYA
80f79aef91 Add smartref parameter to sphinx.util.typing:stringify()
To make the generated function signatures simple, this adds a new
parameter `smartref` to sphinx.util.typing:stringify() to suppress the
leading module name from typehints.
2021-12-03 18:05:49 +09:00
Jakob Lykke Andersen
aabf772722 Prevent literal line wrapping 2021-12-02 18:01:27 +01:00
Jouke Witteveen
bc849e2170 doc: Fix autodoc extension example
`directivetype` is set to mimic `ClassDocumenter`. Reflect that.

`isinstance` would work on the enum members, but that is not what we want here.
`issubclass` raises a TypeError when called on objects that are not classes.
2021-12-02 16:50:09 +01:00
Jakob Lykke Andersen
17dfa81107 Merge pull request #9914 from jakobandersen/cpp-typo
Fix typo in C++ domain
2021-11-30 18:59:50 +01:00
Jakob Lykke Andersen
ed79004e42 C++, fix typo in internal function 2021-11-30 18:35:39 +01:00
Kian-Meng, Ang
5161341b3e Fix typos 2021-11-30 05:48:44 +08:00
Takeshi KOMIYA
e188d38e9d Merge pull request #9908 from tk0miya/remove_debug_print
Fix autodoc: Remove debug print
2021-11-30 02:03:28 +09:00
Takeshi KOMIYA
5eaed2bed7 py domain: Allow "~" prefix as a prefix of typehints in signature
Now python domain supports the "~" prefix at the beginning of the
typehints of the function signatures:

  .. py:function:: func(x: ~typing.Dict)

It's rescognized as the same as python reference roles do
(ex. :py:class:`~typing.Dict`).
2021-11-30 01:54:23 +09:00
Takeshi KOMIYA
a3edc982c1 Merge pull request #9902 from tk0miya/9899_pydomain_crossref_specifier_in_typefield
Fix #9899: py domain: Allows cross-reference specifier to :type: option
2021-11-30 01:43:51 +09:00
Takeshi KOMIYA
4f622f33d4 Merge pull request #9906 from tk0miya/9800_extlinks_adjust_priority
extlinks: Adjust priority (refs: #9800)
2021-11-30 01:38:54 +09:00
Takeshi KOMIYA
c115eb5ea7 Merge branch '4.x' into remove_debug_print 2021-11-30 01:38:18 +09:00
Takeshi KOMIYA
e8e45a3678 Merge pull request #9905 from tk0miya/9883_ismock
Fix #9883: autodoc: doccomment for the alias to mocked object was ignored
2021-11-30 01:37:41 +09:00
Takeshi KOMIYA
e25589ca1d Merge branch '4.x' into 9899_pydomain_crossref_specifier_in_typefield 2021-11-30 01:37:04 +09:00