Commit Graph

18709 Commits

Author SHA1 Message Date
Takeshi KOMIYA
dbbf5ae95b Update CHANGES for PR #9390 2021-12-11 23:18:20 +09:00
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
dcfc3f60ec refactor: ssl.wrap_context() has been deprecated now 2021-12-11 11:38:24 +09:00
Takeshi KOMIYA
555e74b8ca refactor: app.html_themes was replaced by registry.html_themes 2021-12-11 11:38:24 +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
jfbu
b902d855ba Update CHANGES for #9941 2021-12-10 20:34:53 +01:00
jfbu
091c2de1a0 Update CHANGES 2021-12-09 18:31:09 +01:00
jfbu
b23036570c Fix Multi-function declaration in Python domain has cramped spacing
Fix #9940

Avoid \pysiglinewithargsret tricks to get correct vertical spacing
in multiline declarations in case mark-up inserts a \phantomsection.

Activate such tricks also in \pysigline, but now with the
\phantomsection test.

Relates #7241, #8980, #8995
2021-12-09 18:30:42 +01: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
75914c67c7 drop translator-specific unknown_visit calls
Removes the need for various translators from raising a
`NotImplementedError` exception when missing support for a specific node
type. docutils will already raise [1][2] a `NotImplementedError`
exception for these cases. This help reduce the implementation inside
Sphinx as well as prevents the possible undesired replication of
unknown-node handling with third-party extensions [3].

In most cases, generating a warning message for an unsupported node type
can be preferred. Providing an indication that a node is not supported
can be easier for a user of Sphinx to understand a limitation of a
builder over a generic "not implemented" exception. This commit takes
the logging call which is already used by `texinfo` and applies it to
the `SphinxTranslator` base class -- which any Sphinx translator
implementation can use.

[1]: https://repo.or.cz/docutils.git/blob/d169015ee0f412cffd69b33654d8a119d99bc0f3:/docutils/nodes.py#l2048
[2]: https://repo.or.cz/docutils.git/blob/53716a13b48128af6045139d3cd2909f61e7ed8e:/docutils/nodes.py#l1897
[3]: https://github.com/sphinx-doc/sphinx/issues/9921

Signed-off-by: James Knight <james.d.knight@live.com>
2021-12-05 15:03:57 -05: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
Jakob Lykke Andersen
3ae124f8ac
Merge pull request #9918 from jakobandersen/c-cpp-fundamental-type-permutation
C, C++: fundamental type parsing
2021-12-05 11:32:56 +01: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
f8f26286ad C, simple type specifier parsing, handling macro-keywords 2021-12-01 19:33:23 +01:00
Jakob Lykke Andersen
c09643c21f C, fix parsing of fundamental types
When multiple simple type specifiers are part of the type,
then they may appear in any order.
2021-11-30 22:00:54 +01:00