Commit Graph

17151 Commits

Author SHA1 Message Date
jfbu
953f4511a2 Refactor LaTeX [3/2]: Add all missing .sty in the \ProvidesFile
Sorry for oversight
2021-01-27 17:29:31 +01:00
jfbu
a327be4a77 Update CHANGES for PR #8769 2021-01-27 17:04:47 +01:00
jfbu
af2949c654 Merge branch 'master' into refactor_latex_into_multiple_files 2021-01-27 17:02:00 +01:00
Takeshi KOMIYA
7f63c5442e
Merge pull request #8766 from tk0miya/8232_graphviz_in_subdir
graphviz: Image node is not rendered if graph file is in subdir (refs: #8232)
2021-01-28 01:01:42 +09:00
Takeshi KOMIYA
c9480f9943 Merge branch '3.x' 2021-01-28 00:56:46 +09:00
Takeshi KOMIYA
2952d9a0c3 graphviz: Image node is not rendered if graph file is in subdir (refs: #8232)
To support images for graphviz, graphviz commands (ex. dots) should be
invoked at the directory placed the graph file.
2021-01-28 00:49:14 +09:00
jfbu
5e81459486 Refactor LaTeX [2/2]: renamings of auxiliary Sphinx LaTeX packages
sphinxcyrillic -> sphinxpackagecyrillic
sphinxmulticell -> sphinxpackagemulticell
footnotehyper-sphinx -> sphinxpackagefootnote
2021-01-27 16:22:23 +01:00
Takeshi KOMIYA
62dad2f133
Merge pull request #8765 from jfbu/latex_memoir_french_footnote
LaTeX: sync with upstream footnotehyper
2021-01-28 00:13:17 +09:00
Takeshi KOMIYA
fb4dde3fdb
Merge pull request #8755 from tk0miya/8745_KeyError_for_new_auto_footnote_refs
Fix #8745: i18n: KeyError if a new auto footnote_ref in translations
2021-01-28 00:12:14 +09:00
Takeshi KOMIYA
9d706b6fb5
Merge branch '3.x' into latex_memoir_french_footnote 2021-01-28 00:05:20 +09:00
Takeshi KOMIYA
af97da37a7
Merge pull request #8767 from jfbu/8214_duplicate_in_latex_index
Fix #8214: duplicate entries in latex index if term also in glossary
2021-01-28 00:03:54 +09:00
jfbu
6e80d27841 Refactor LaTeX [1/2]: split sphinx.sty into separate components
The latex macros from sphinx.sty were already partitioned into
successive sections.  The file sphinx.sty is split into multiple
files in concordance with this pre-existing sectioning.

The files are loaded via \input. File extension is .sty not .tex
to not confuse the Makefile.
2021-01-27 15:58:48 +01:00
jfbu
f937facc69 Fix #8214: duplicate entries in latex index if term also in glossary
This makes .idx files contain \spxentry{..} with no space, whether or
not the \index latex command is encountered in main text or e.g. in a
label of a description list (like happens for terms from a glossary).

Xindy does not care about spaces, but Makeindex doesn't merge entries
whose typesetting is to be done via \spxentry{..} or \spxentry {..}.

An alternative work-around would be for Sphinx LaTeX writer to use some
wrapper, say, \sphinxindexwrap, only to fetch the argument and force TeX
tokenization and then hand over it to \index command.

But we choose to let \spxentry expand to its own name, with no trailing
space (it gets its final definition only from the python.ist file in
case of Makeindex).

In case both the :index: role and the glossary are on same page, Xindy
and Makeindex behave differently: the former gives only once the page
number, the latter issues them twice (but the indexed term only once),
and there is warning in the .ilg file. But this is unrelated and we
can't do here anything about it.
2021-01-26 19:18:47 +01:00
jfbu
5c96add193 LaTeX: sync with upstream footnotehyper
This fixes #7576
2021-01-26 16:29:30 +01:00
Takeshi KOMIYA
9f2f6b0037
Merge pull request #8764 from jfbu/8442_latex_memoir_index
Fix #8442: missing index entries in pdf output with memoir + xindy
2021-01-27 00:10:29 +09:00
Takeshi KOMIYA
e0321ebab8
Merge pull request #8763 from tk0miya/refactor_doc3
doc: Apply :params: to some APIs in app class
2021-01-27 00:05:38 +09:00
Takeshi KOMIYA
f22ef55af3
Merge pull request #8762 from tk0miya/refactor_doc2
doc: Add hyperlinks to classifiers for sphinx extensions and themes
2021-01-27 00:05:14 +09:00
jfbu
2772909861 Fix #8442: missing index entries in pdf output with memoir + xindy 2021-01-26 10:32:53 +01:00
Takeshi KOMIYA
241577f65e Merge branch '8137_urldecode' into 3.x 2021-01-26 02:11:13 +09:00
Takeshi KOMIYA
2ee0338388
Merge pull request #7942 from tk0miya/7879_default_setting_of_html_codeblock_linenos_style
html: html_codeblock_linenos_style defaults to 'inline' (refs: #7849)
2021-01-26 01:53:24 +09:00
Takeshi KOMIYA
84dc65ad51 html: html_codeblock_linenos_style defaults to 'inline' (refs: #7849)
As discussed in #7879, the default style of line numbers for code
blocks in HTML output becames 'inline' by default.  And 'table' style
is now deprecated and will be removed in Sphinx-6.0.
2021-01-26 01:42:17 +09:00
Takeshi KOMIYA
84ef92226f doc: Apply :params: to some APIs in app class 2021-01-26 01:19:47 +09:00
pbudzyns
ac5079ed85 redundant '+' has no effect 2021-01-25 16:07:18 +01:00
Takeshi KOMIYA
d6498f8209
Merge pull request #8757 from tk0miya/8756_viewcode_purge_doc
Fix #8756: viewcode: highlighted code is generated even if not referenced
2021-01-25 22:52:45 +09:00
Takeshi KOMIYA
37b07ca7a0
Merge pull request #8754 from tk0miya/7118_quickstart_mojibake
Fix #7118: quickstart: got Mojibake if libreadline unavailable
2021-01-25 22:51:14 +09:00
Takeshi KOMIYA
77fad1ec98
Merge pull request #8760 from jfbu/pdftex_8253
LaTeX: sync pdftex engine default imageresolution with pxunit
2021-01-25 22:50:21 +09:00
pbudzyns
381e30c23b add more extendable options and tests 2021-01-25 13:24:01 +01:00
pbudzyns
7348ba8d60 add more extendable options and tests 2021-01-25 13:15:13 +01:00
pbudzyns
0a85b4148e add more extendable options and tests 2021-01-25 12:54:08 +01:00
Takeshi KOMIYA
9a156baa87 Fix #7118: quickstart: got Mojibake if libreadline unavailable
Do not output escape sequence for libreadline (\1 and \2) when
libreadline is unavailable.
2021-01-25 20:36:53 +09:00
Takeshi KOMIYA
8203642c41
Merge pull request #8752 from tk0miya/1638_permalinks_for_glossary_terms
Close #1638: html: Add permalink icons to glossary terms
2021-01-25 20:35:44 +09:00
Takeshi KOMIYA
934dd62952
Merge pull request #8749 from tk0miya/8737_invalid_logo_is_shown
Fix #8737: html: broken img tag is appeared when html_logo not set
2021-01-25 20:35:08 +09:00
Takeshi KOMIYA
eaa14bb0b0
Merge pull request #8748 from tk0miya/6550_deprecation_warning_for_html_add_permalinks
Fix #6550: Emit a deprecation warning for html_add_permalinks
2021-01-25 20:34:09 +09:00
Takeshi KOMIYA
16a8a17779
Merge pull request #8747 from tk0miya/8134_args_for_mock_decorator
Fix #8134: autodoc: crashes when mocked decorator takes arguments
2021-01-25 20:33:40 +09:00
jfbu
a786f73d7f LaTeX: sync pdftex engine default imageresolution with pxunit
Closes: #8253

The 'pxunit' key from latex_elements instructs how to handle image
dimensions specified in px units.

But pdftex has \pdfimageresolution which is used when an image file does
not provide readable or legit values for the x and/or y resolution.

This commit syncs them: from 'pxunit' the default image resolution in
pixels per inch (an integer) is computed.

This way an image will behave the same if:

- it is loaded with no explicit size set, _and_ no readable image
  resolution data is readable from the file (or that data matches the
  'pxunit' setting)

- or a size is set in figure directive using px units and equal to the
  natural pixel size of the image,

This also with 'lualatex' but is ignored by with 'xelatex' and
'uplatex'.
2021-01-25 08:20:45 +01:00
Takeshi KOMIYA
8dc8c01425 Fix #8756: viewcode: highlighted code is generated even if not referenced
viewcode does not purge unreferenced modules on incremental build.  This
adds env-purge-doc handler to clean them.
2021-01-25 01:50:21 +09:00
Takeshi KOMIYA
81ba9273ca Fix #8745: i18n: KeyError if a new auto footnote_ref in translations
Some writers will be crashed by KeyError because of lack of the refid if
a new auto footnote reference is added to the message catalog by
translation misses.

This detects the invalid footnote references and removes them on
the translation phase.
2021-01-25 00:30:50 +09:00
Takeshi KOMIYA
ec375087b8
Merge pull request #8740 from tk0miya/7642_optimize_case_insensitive_match_of_term
Close #7642: std domain: Optimize case-insensitive match of term
2021-01-24 23:46:59 +09:00
Takeshi KOMIYA
949ec8737f Close #1638: html: Add permalink icons to glossary terms 2021-01-24 23:35:37 +09:00
Takeshi KOMIYA
b5ff272f77 Close #7642: std domain: Optimize case-insensitive match of term
Since 3.0.1, the term role has matched to the words in glossary
case-sensitively.  It's important change for preventing conflicts by
word cases.  But, it also brings a problem for references in natural
text.

This optimizes the case-insensitive match of the term role.  It allows
to search glossary words twice with no performance penalty; the first
search is case sensitive and another is case insenstive.
2021-01-24 23:32:53 +09:00
Takeshi KOMIYA
a3e83a80f0
Merge pull request #8746 from jfbu/latex_improve_our_pdfdocs
Improve Sphinx own pdf docs
2021-01-24 23:31:42 +09:00
Takeshi KOMIYA
a5c716b635
Merge pull request #8753 from francoisfreitag/rm-n
Linkcheck: Derive number of links from the post-transform result
2021-01-24 22:55:33 +09:00
Takeshi KOMIYA
6c01d7614b
Merge branch '3.x' into rm-n 2021-01-24 22:43:33 +09:00
Takeshi KOMIYA
2e0d7e539a
Merge pull request #8751 from francoisfreitag/mult-open
Linkcheck: Don’t repeatedly open/close log files
2021-01-24 21:22:47 +09:00
François Freitag
1121e5e8bc
Linkcheck: Derive number of links from the post-transform result
The number of links to check is the number of links in self.hyperlinks,
populated by the post-transform.
2021-01-24 12:24:52 +01:00
François Freitag
54df51e86f
Linkcheck: Don’t repeatedly open/close log files
Opening and closing a file requires processing from the operating
system. Repeatedly opening and closing wastes system resources and
hinders buffering, causing a flush (disk I/O) after each write
operation.

Using a context manager ensures the logs are flushed to disk and files
are properly closed whether the program exists successfully or an
exception occurs. Compared to the previous implementation, a brutal
shutdown of the machine (e.g. power cord disconnected) could cause some
log lines not to be written. That should not be an issue in practice.

Now, files are created and truncated when linkcheck submitted the links
to check to the threads and is ready to process the results, instead of
when the builder is constructed. It keeps the file operations closer to
their use.
2021-01-24 12:15:07 +01:00
Takeshi KOMIYA
34417831c5 doc: Add hyperlinks to classifiers for sphinx extensions and themes 2021-01-24 16:45:50 +09:00
Takeshi KOMIYA
0ad32905bf Merge branch '3.x' 2021-01-24 16:39:43 +09:00
Takeshi KOMIYA
51d500833e Merge branch '3.x' into 7774_remove_develop.rst 2021-01-24 16:34:47 +09:00
Takeshi KOMIYA
03629b1832 Fix #8737: html: broken img tag is appeared when html_logo not set 2021-01-24 15:36:52 +09:00