Commit Graph
100 Commits
Author SHA1 Message Date
Jean-François B e0b1e1002b Merge pull request #9332 from jfbu/latex_doc_9321_utf8x
Closes: #9321 (LaTeX utf8x usage doc)
2021-06-16 17:25:03 +02:00
jfbu f14561da80 Merge branch '4.0.x' into 4.x 2021-06-14 23:00:18 +02:00
Jean-François B 7507989a57 Merge pull request #9339 from astrojuanlu/hotfix-new-tutorial
Hotfixes new tutorial
2021-06-14 22:57:44 +02:00
jfbu 35f37a5d03 Same Unicode char replaced 2021-06-14 22:48:04 +02:00
Jean-François B 8939a75efa Merge pull request #9335 from jfbu/9305_platex_backslash_upquote
Fix #9305 LaTeX: backslash in sphinxupquote error with Japanese
2021-06-13 19:13:11 +02:00
jfbu ef9b55c961 Fix #9305 LaTeX: backslash in sphinxupquote error with Japanese 2021-06-13 18:34:06 +02:00
jfbu 9dbf2c9a98 Closes: #9321 (LaTeX utf8x usage doc) 2021-06-13 12:29:39 +02:00
jfbu 67e48df378 Update CHANGES 2021-06-09 07:40:35 +02:00
jfbu 7cc87d84c4 Fix #9313 2021-06-08 23:14:01 +02:00
Jean-François B d79d041f4f Merge pull request #9006 from jfbu/latex_pysigline_fix_stacked_labels
LaTeX: partially revert #8997 for \pysigline
2021-03-15 16:28:18 +01:00
jfbu 7e0295dbd7 LaTeX: partially revert #8997 \pysigline
Reason is that mark-up such as this:

   .. attribute:: state
                  state_machine

      The state and state machine which controls the parsing.  Used for
      ``nested_parse``.

generates two `\pysigline` each with `\phantomsection`. The latex code
to get good vertical spacing between label and its description, if label
``\parbox`` is multi-line, cause in this context the two (generally,
single-line) labels to be stacked vertically with no spacing.

This commit keeps the ``\parbox`` which fixes #8980, but drops the
attempt to correct vertical distance to description, so as to not alter
the possibly more common use case of items with common description.
2021-03-15 11:18:13 +01:00
Jean-François B 2934aac441 Merge pull request #8997 from jfbu/latex_pysigline
LaTeX: improve behavious of `\pysigline` and `\pysiglinewithargsret` in case of multi-line signature
2021-03-14 21:35:17 +01:00
Jean-François B 64ad5b5154 Merge pull request #9000 from jfbu/latex_2021_par
Refactor some internal LaTeX code
2021-03-14 21:34:38 +01:00
jfbu 5e0e6c8898 Refactor some internal LaTeX code
Codeline wrapping in literal blocks (possibly hard-wrap in presence of
unbreakable long strings) requires a measurement step. Spring 2021 LaTeX
adds quite some overhead to each and every paragraph to insert hooks at
begin and end of paragraphs. For technical reasons, our measurement
(which uses a paragraph in a scratch box) could be broken by the "after
para" hook. Work around that.
2021-03-14 11:55:51 +01:00
jfbu 9a4b4b5934 Update CHANGES 2021-03-13 16:57:06 +01:00
jfbu b6d143118d LaTeX: modify \pysigline and \pysiglinewithargsret
Fix #7241
Fix #8980
Fix #8995
2021-03-13 16:56:50 +01:00
Jean-François B 796d36fd62 Merge pull request #8907 from jfbu/pdf_bookmarksdepth
LaTeX: let bookmarks use high default depth
2021-03-12 22:15:35 +01:00
Jean-François B ebce50dfed Merge branch 'master' into pdf_bookmarksdepth 2021-03-12 21:59:04 +01:00
Jean-François B 3bbdc65451 Merge pull request #8879 from jfbu/latex_better_fix_pygments
LaTeX: better workaround for a Pygments LaTeXFormatter issue (with Pygments up to 2.7.4)
2021-03-12 21:58:01 +01:00
Jean-François B 1a62d89276 Merge branch 'master' into pdf_bookmarksdepth 2021-03-12 21:57:45 +01:00
Jean-François B 4c8418b58c Merge branch 'master' into latex_better_fix_pygments 2021-03-12 21:48:34 +01:00
Jean-François B 13341c77f8 Merge pull request #8926 from jfbu/latex_maxunderfull
LaTeX: let underfull calculation in wrapped code lines ignore last line
2021-02-24 19:13:20 +01:00
jfbu c9a1a9bb4f Gather LaTeX items in CHANGES for 4.0.0 2021-02-24 19:01:34 +01:00
jfbu 40b145c7dc Update CHANGES 2021-02-24 18:52:04 +01:00
jfbu 294870ba59 LaTeX: let underfull calculation in wrapped code lines ignore last line
Closes: #8925
2021-02-24 18:51:59 +01:00
jfbu ddef4950ee LaTeX: let bookmarks use high default depth
Add bookmarksdepth key to latex_elements['sphinxsetup']
2021-02-18 13:11:28 +01:00
jfbu 19ea727f1b Adapt our tests to Pygments 2.8.0 2021-02-14 21:17:17 +01:00
jfbu cea87d13ac Mention pygments_style in sphinxhighlight.sty 2021-02-13 10:20:05 +01:00
jfbu 473718c4d4 LaTeX, better workaround for a Pygments <= 2.7.4 line spacing issue
Closes: #8874

Relates #4249
2021-02-13 09:50:21 +01:00
jfbu 62401ef1ec Merge branch '3.x' 2021-02-12 21:27:17 +01:00
Jean-François B a1489099ec Merge pull request #8877 from jfbu/latex_better_fix_8838
Fix #8838 by forcing horizontal mode before inserting the penalty
2021-02-12 21:26:26 +01:00
jfbu 683e64e8a3 Fix #8838 by forcing horizontal mode before inserting the penalty 2021-02-12 17:37:00 +01:00
jfbu 8b786382e4 Update latex comment 2021-02-10 23:09:44 +01:00
jfbu df6a8bc1ef Merge branch '3.x' into merge_3.x_into_master 2021-02-09 19:36:21 +01:00
jfbu e4ba80f92d Minor style issue in texinputs/sphinx.sty 2021-02-09 19:34:09 +01:00
jfbu b9c53c8ca6 Merge branch '3.x' into merge_3.x_into_master
Resolved Conflicts:
	sphinx/texinputs/sphinx.sty

Some hunks needed to go to sphinx/texinputs/sphinxlatexliterals.py,
others already belonged to split files.
2021-02-09 19:03:38 +01:00
Jean-François B 15209223ac Merge pull request #8862 from jfbu/latex_docs_minor_refactoring
Minor refactoring in doc/latex.rst
2021-02-09 18:42:09 +01:00
jfbu 87d0b15eab Also indent warning to not interrupt description list 2021-02-09 18:29:56 +01:00
jfbu a310c4c5b6 Indent note directive inside list item 2021-02-09 18:25:37 +01:00
jfbu 32d8b4e445 Minor refactoring in doc/latex.rst 2021-02-09 18:11:24 +01:00
jfbu 52fc9bdd86 s/node.attributes/node/ at one other location 2021-02-09 17:51:55 +01:00
Jean-François B a164d4c12c Merge pull request #8832 from jfbu/latex_hyperlinked_caption_footnotes_on_3.x
Latex hyperlinked caption footnotes on 3.x
2021-02-09 17:45:41 +01:00
Jean-François BandTakeshi KOMIYA e759bd14c8 Update sphinx/writers/latex.py
Co-authored-by: Takeshi KOMIYA <i.tkomiya@gmail.com>
2021-02-09 16:45:49 +01:00
jfbu 0c89c85a39 Merge branch '3.x' into latex_hyperlinked_caption_footnotes_on_3.x 2021-02-09 16:39:55 +01:00
Jean-François B 1c08467040 Merge pull request #8851 from jfbu/latex_enhance_docs_about_index
LaTeX: improve docs of 'printindex' and 'makeindex'
2021-02-09 16:16:26 +01:00
Jean-François B 86ea2a93e0 Merge pull request #8854 from jfbu/latex_longstringsincodeblocks
LaTeX: optionally apply a second forceful wrapping of long code lines
2021-02-09 16:14:48 +01:00
jfbu aaac721104 Typo 2021-02-09 16:04:01 +01:00
jfbu 035d13fd24 Update CHANGES and docs relative to new verbatimforcewraps 2021-02-09 15:47:15 +01:00
jfbu 7175d11f05 Add forgotten minwidth computation 2021-02-09 13:16:12 +01:00
jfbu eee17ff61a Fix forgotten link to Pygments home site, mmmmpf 2021-02-09 12:33:16 +01:00
jfbu abddafa98a Fix inexistent directive "notice", it is "note"... 2021-02-09 12:28:03 +01:00
jfbu c6a8fb1625 Add verbatimmaxoverfull and verbatimmaxunderfull 2021-02-09 12:18:31 +01:00
jfbu dffb819ec4 Support Unicode input when forcefully wrapping code lines
This needs special coding only for pdflatex, Unicode TeX engines already
handle Unicode characters as one token.

The utf8x LaTeX input encoding is not supported, only utf8.
2021-02-09 11:24:24 +01:00
jfbu 0076ad3fd3 Indicated force wrapping code lines is fragile with Unicode input 2021-02-09 00:01:39 +01:00
jfbu 702545da1c LaTeX: optionally apply a second forceful wrapping of long code lines
Closes #8849
2021-02-08 23:13:46 +01:00
jfbu a984f5f7cc LaTeX: improve docs of 'printindex' and 'makeindex'
Closes #8055
2021-02-08 14:59:20 +01:00
jfbu 4a239bb886 Extra references to explicitly numbered footnote get page indication
To achieve this the simplest was to use also the \label/\ref mechanism
as for footnotes typeset using footnotetext. Removing the hack into
footnotehyper internal macro, we use an enriched scope, which will
enable references with same number to each generate correct links.
2021-02-06 22:00:47 +01:00
Jean-François B a565e74039 Merge pull request #8840 from jfbu/latex_fix_table_spacing_broken
Revert "Add \nobreak inside \sphinxAtStartPar"
2021-02-06 16:55:32 +01:00
jfbu 38b14bbfef Revert "Add \nobreak inside \sphinxAtStartPar"
This reverts commit 17642a5e6b.

Fixes #8838. For some reason the \nobreak causes breakage in table
vertical spacing for merge cells in tabular and longtable, and regarding
tabulary for all cells...

Reverting this will cause as described in the reverted commit message
some much less annoying problem in certain circumstances when a long
word has no hyphenation point.
2021-02-06 16:35:16 +01:00
jfbu ff305ec258 Be extra cautious to not use \@arabic in \thesphinxscope 2021-02-06 13:57:07 +01:00
jfbu 6275a7756f Use \thesphinxscope mark-up (shorter, and may help trick for page scope) 2021-02-06 13:43:12 +01:00
jfbu c55216858e Abstract \stepcounter{sphinxscope} into macro for flexibility 2021-02-06 11:38:24 +01:00
jfbu 628c58abef Prepare for scope-limited footnote numbering 2021-02-06 10:45:50 +01:00
jfbu 9c823478e0 Update CHANGES 2021-02-05 20:39:32 +01:00
jfbu 98f4732a98 LaTeX: make all references to explicitly numbered footnote clickable 2021-02-05 20:26:17 +01:00
jfbu eb91fd292f Update CHANGES 2021-02-05 16:49:41 +01:00
jfbu a0b0a08e38 LaTeX footnotes from caption titles now hyperlinked in PDF
This is fifth item of #2616
2021-02-05 16:45:12 +01:00
jfbu 87fa272763 Merge branch '3.x' into merge_3.x_into_master
Resolved Conflicts:
	sphinx/texinputs/sphinxpackagefootnote.sty
2021-02-04 16:31:45 +01:00
Jean-François B ec5b169312 Merge pull request #8821 from jfbu/latex_sync_with_footnotehyper
Sync with footnotehyper 1.1d
2021-02-04 16:14:41 +01:00
jfbu 39e4ea23c6 Sync with footnotehyper 1.1d
This fixes a problem introduced at 1.1b which could case latex build
crash in case of extra user packages.

It also improves compatibility with babel + french.
2021-02-04 14:14:37 +01:00
jfbu e7b05111bc Re-insert if isinstance(node, ast.Constant): into py _parse_annotation
As master drop python 3.5 support, conditional

    if sys.version_info >= (3, 6):

not needed anymore.  This hunk had got lost in merge.

	modified:   sphinx/domains/python.py
2021-02-03 10:09:06 +01:00
jfbu af4015a788 Fix lost LaTeX in merge 2021-02-02 19:08:13 +01:00
jfbu fbafb308b8 Merge branch '3.x' into master_with_merged_3.x 2021-02-02 18:01:55 +01:00
jfbu c8eba61fe9 Update CHANGES 2021-02-02 00:13:48 +01:00
jfbu 7c7032dd05 Extend latex footnotes unit test 2021-02-02 00:10:45 +01:00
jfbu c3b44dc1c8 LaTeX: save footnotes arising from inside function signatures
if latex_show_urls == 'footnote'
2021-02-01 23:49:40 +01:00
jfbu fbe24647e4 LaTeX: sync with upstream footnotehyper 1.1c
Incorporate 1.1c fix to usage of savenotes around a mid-paragraph list,
and also the 1.0..1.1 upstream patch about usage within minipages while
we are at it.
2021-02-01 23:25:50 +01:00
jfbu a5939ea588 Fix accidental revert of f937facc (#8767) by #8790 merge
Due to file renaming
2021-01-31 15:50:18 +01:00
Jean-François B 4a85caeffe Merge pull request #8790 from jfbu/latex_refactor_style_files
Refactor LaTeX style files
2021-01-31 14:39:58 +01:00
jfbu 54078e8a26 LaTeX: document what the style files provide and require 2021-01-31 13:58:00 +01:00
jfbu 567cc4fb7b Update CHANGES 2021-01-31 09:58:06 +01:00
jfbu dd8e79e7fc Fix #8796: define \spx@image@box as a box not a dimen!
This bug was introduced at 2.0 (commit 669f9c3a) (sorry)
2021-01-31 09:53:09 +01:00
jfbu e77378da1c Merge branch '3.x' 2021-01-30 21:18:00 +01:00
jfbu c07adc4ebb Fix docs markup from d6e11b89
Sorry that I fixed this in master already, forgetting it was initially
merged into 3.x.
2021-01-30 21:17:07 +01:00
jfbu 6dea091257 Fix markup in docs (from d6e11b89) 2021-01-30 21:14:02 +01:00
Jean-François B 5969163c4f Merge pull request #8787 from jfbu/latex_repair_celllinetrimming_after_8781
Let latex writer line trimming from depart_entry() work as before #8781
2021-01-30 19:39:36 +01:00
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
jfbu 5b6a273825 Let latex writer line trimming from depart_entry() work as before #8781
This is cosmetic as the blank line starting varwidth environment used
for merged table cells in latex output changed nothing to PDF.

Nevertheless I extended a unit test to have a multi-paragraph merged
cell using varwidth. What is important is that \sphinxAtStartPar line
itself is never followed by blank line.
2021-01-30 10:26:42 +01: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
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
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