Commit Graph

16865 Commits

Author SHA1 Message Date
jfbu
0c0be64ece Refactor LaTeX style files
This is a (continuation and) re-work of #8769 (e6bf9145dc)

I have reintegrated option handling and most package loading into the
original file sphinx.sty and reorganized completely the filenames of
secondary style files.

sphinx.sty had become too big and first #8769 now this more definitive
refactoring is necessary to clarify structure, dependencies, and ease up
future maintenance.

Unfortunately this means a lot of moving around hunks of latex code with
some alterations.  I tried to carefully check everything is defined in
right order (as LaTeX being a macro expansion language, often one can
manipulate things before them being defined, nevertheless I checked
things are done in order).

Only simple thing is to review is that I added missing EOLs at last
lines of the extracted files...
2021-01-30 19:05:46 +01:00
jfbu
1ebc9c26c7 Merge branch '3.x'
Resolved Conflicts:
	sphinx/texinputs/sphinx.sty

	modified:   CHANGES
	modified:   sphinx/texinputs/sphinxlatexstyleheadings.sty
2021-01-30 16:56:48 +01:00
Jean-François B
34ac0ffae8
Merge pull request #8789 from jfbu/latex_fix_prehistoric_bug
LaTeX: remove last argument of \titleformat in sphinx.sty
2021-01-30 16:29:01 +01:00
jfbu
da00a1c22a LaTeX: remove last argument of \titleformat in sphinx.sty
The {\py@NormalColor} was wrong it should have been [\py@NormalColor].

It got executed by latex during document preamble and never got
integrated as part of the heading...

Closes: #8788
2021-01-30 16:09:58 +01:00
Takeshi KOMIYA
a2cfa0201e
Merge pull request #8786 from tk0miya/master
Merge 3.x to master
2021-01-30 20:42:40 +09:00
Takeshi KOMIYA
339ce2f894 Merge branch '3.x' 2021-01-30 11:49:08 +09:00
Jean-François B
be20f17892
Merge pull request #8779 from jfbu/latex_hlist_support
Fix #8072: Directive hlist not implemented in LaTeX
2021-01-29 21:05:19 +01:00
Jean-François B
879bf54a05
Merge pull request #8781 from jfbu/latex_hyphenation_of_first_word
Fix #8780: long words in narrow columns may not be hyphenated
2021-01-29 20:57:54 +01:00
jfbu
9abe2edf93 Remove unneeded versionchanged data in docs of hlist directive 2021-01-29 20:21:07 +01:00
jfbu
17642a5e6b Add \nobreak inside \sphinxAtStartPar
Else, a non-hyphenatable long word as first word in a narrow column in a
longtable/tabular (with column type e.g. p{1cm} from tabularcolumns
directive) gets shifted downwards vertically in PDF output.

Memo:

1. I did not find other cases where such a vertical shift may occur (I
tried with deeply nested lists and artificial words such as 'A'*32) with
LaTeX mark-up produced by Sphinx,

2. but with the support of hlist directive via PR #8779 using multicols
environment, there is again this situation of downwards shift of
non-hyphenatable long first words.  But it occurs whether or not
\sphinxAtStartPar is used (\nobreak does not modify this).
2021-01-29 13:10:21 +01:00
jfbu
d6e11b89e9 Fix suppression of needed whiteline, encapsulate into \sphinxAtStartPar
Define it to do nothing with lualatex engine
2021-01-29 10:40:50 +01:00
jfbu
185a2d27fe Fix #8780: long words in narrow columns may not be hyphenated
This is done by adding '\hskip0pt\relax\n' whenever a paragraph starts.
2021-01-29 00:24:44 +01:00
jfbu
a68a05533d Fix #8072: Directive hlist not implemented in LaTeX
Adds ``multicol`` LaTeX package requirement, but it is a required
part of any latex distribution.
2021-01-28 21:21:01 +01:00
Takeshi KOMIYA
57126d9ee2
Merge pull request #8773 from francoisfreitag/app-build
Linkcheck: Use app.build() to trigger the test build
2021-01-28 23:28:31 +09:00
Takeshi KOMIYA
14f2c9ebfa
Merge pull request #8770 from francoisfreitag/else
linkcheck: Raise on unknown status in process_result()
2021-01-28 23:27:27 +09:00
Jean-François B
401124ccf3
Merge pull request #8772 from jfbu/fix_lost_confpy_change_from_3.x_merge
Revert alteration at c9480f994 merge of 3.x of doc/conf.py
2021-01-27 19:03:36 +01:00
François Freitag
c7eb7cd127
Linkcheck: Use app.build() to trigger the test build
Instead of using application members to access the builder and trigger a
build, use the main app interface.
It ensures the builder setup is realistic, builder cleanups are executed
and the build-finished events are emitted.
2021-01-27 18:55:36 +01:00
jfbu
365ae80cc4 Revert alteration at c9480f994 merge of 3.x of doc/conf.py
Compare doc/conf.py after merge at c9480f994 to what it was at 2ee033838.

It loses the modification from #8716 (merged at 38c614347) and thus
reverts doc/conf.py to former font config using mathpazo.
2021-01-27 18:44:56 +01:00
Jean-François B
e6bf9145dc
Merge pull request #8769 from jfbu/refactor_latex_into_multiple_files
Refactor latex into multiple files
2021-01-27 17:47:27 +01:00
François Freitag
227955cbe8
linkcheck: Raise on unknown status in process_result()
Helps catching programming errors. The else clause should never be
reached.
2021-01-27 17:36:10 +01:00
jfbu
b25948590d Refactor LaTeX [4/2]: suppress extra bracket from bad latex merge :( 2021-01-27 17:35:35 +01:00
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
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
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