Commit Graph

381 Commits

Author SHA1 Message Date
jfbu
bd2ca4763c [tests] LaTeX: use latex engines with `--halt-on-error` option 2018-12-18 13:41:48 +01:00
Jon Dufresne
bade33c7e4 Remove unnecessary encoding cookie from Python source files
In Python 3, the default encoding of source files is utf-8. The encoding
cookie is now unnecessary and redundant so remove it. For more details,
see the docs:

https://docs.python.org/3/howto/unicode.html#the-string-type

> The default encoding for Python source code is UTF-8, so you can
> simply include a Unicode character in a string literal ...

Includes a fix for the flake8 header checks to stop expecting an
encoding cookie.
2018-12-16 12:22:12 -08:00
Takeshi KOMIYA
c6bd84a614 refactor: Remove u-prefix from strings 2018-12-16 21:28:51 +09:00
Takeshi KOMIYA
b56f4f9022 Remove print_function feature 2018-12-15 23:16:10 +09:00
Takeshi KOMIYA
389f756f88 refactor: special rubric for footnotes 2018-12-10 00:07:25 +09:00
jfbu
16f47cded9 Merge branch '1.8' 2018-11-06 18:30:21 +01:00
Takeshi KOMIYA
dcc4ac55bb latex: Move \pageautorefname to sphinxmessages.sty 2018-11-01 22:47:15 +09:00
jfbu
4df3b067b7 LaTeX: add styling to general index, similar to domain indices
Closes: #5579. Also closes #5576.
2018-10-31 19:22:34 +01:00
Takeshi KOMIYA
8b687ac304 Merge branch '1.8' 2018-11-01 01:24:12 +09:00
jfbu
f4d7b2e60e Fix invalid escape sequence \d in test (refs #5513) 2018-10-30 17:47:59 +01:00
Takeshi KOMIYA
e7e07fd697 Merge branch '1.8' 2018-10-16 09:57:54 +09:00
jfbu
7ab09b5065 Fix #3704: wrong `\label` positioning for figures with a legend 2018-10-07 10:16:11 +02:00
Takeshi KOMIYA
6eb5b29484 Merge branch 'master' into refactor_latex 2018-10-07 13:33:55 +09:00
Takeshi KOMIYA
3a2418a827 refactoring: Drop PY2 and PY3 flags 2018-09-22 21:27:59 +09:00
Takeshi KOMIYA
848224f641 Add LaTeXBuilder.context: Build context object by builder 2018-08-13 23:52:44 +09:00
jfbu
3c3dca8203 Fix failed test (changed \sphinxleftcurlybrace) 2018-07-16 01:06:27 +02:00
Takeshi KOMIYA
f518d26e45 Merge branch 'master' into 1431_latex_enumlist 2018-06-22 00:27:49 +09:00
jfbu
dbb04d0a33 Obide by Docutils `node['prefix'] and node['suffix']` 2018-06-20 18:11:11 +02:00
Takeshi KOMIYA
b84240d871
Merge pull request #5108 from tk0miya/alabaster-0.711
Alabaster 0.711
2018-06-19 23:35:17 +09:00
Takeshi KOMIYA
2a9da1d031 Fix #5091: latex: curly braces in index entries are not handled correctly 2018-06-16 01:34:40 +09:00
jfbu
b41b1dac5c Deprecate sphinx.writers.latex.ExtBabel.get_shorthandoff()
This partially reverts d17f3955a5
2018-06-06 19:16:14 +02:00
jfbu
a32c358342 Remove usage of internal shorthandoff variable from LaTeX writer 2018-06-05 18:38:59 +02:00
jfbu
f9e2a41a48 Merge branch '1.7' 2018-06-05 18:17:18 +02:00
jfbu
66741b1ee9 LaTeX: make deactivation of = and " systematic
This avoids maintaining list of languages making " (or worse =) active
TeX characters.
2018-06-05 10:20:17 +02:00
jfbu
a08321f962 Better replacement for LaTeX's enumerated list support macros 2018-05-26 15:14:57 +02:00
Takeshi KOMIYA
600c948ff9 Close #1431: latex: Add alphanumeric enumerated list support 2018-05-26 00:19:27 +09:00
Takeshi KOMIYA
51962c715c Merge branch '1.7' 2018-05-23 21:41:45 +09:00
Takeshi KOMIYA
b6ba8cad10 Fix #4648: latex: Now "rubric" elements are rendered as unnumbered section title 2018-05-23 01:22:14 +09:00
Takeshi KOMIYA
0ba5c24f5e Close #4980: latex: Improve label handling of LaTeX builder (section) 2018-05-22 22:06:22 +09:00
Takeshi KOMIYA
1b5e910059 Close #4980: latex: Improve label handling of LaTeX builder (table) 2018-05-22 22:06:22 +09:00
Takeshi KOMIYA
fdc0697690 Close #4980: latex: Improve label handling of LaTeX builder (code-block) 2018-05-22 22:06:22 +09:00
Takeshi KOMIYA
f621fe8533 Close #4980: latex: Improve label handling of LaTeX builder (figure) 2018-05-22 22:06:22 +09:00
jfbu
e7adae9799 Revert extra \relax after \phantomsection in LaTeXTranslator.hypertarget 2018-05-21 16:27:37 +02:00
jfbu
0f2dffb0c8 Avoid unneeded \relax after \phantomsection in glossary item labels 2018-05-21 16:17:58 +02:00
Takeshi KOMIYA
506d4c87ef Merge branch '1.7' 2018-05-21 23:07:54 +09:00
Takeshi KOMIYA
ff3ac70c76 Fix #4973: latex: glossary directive adds whitespace to each item 2018-05-21 23:01:39 +09:00
Takeshi KOMIYA
057152e9e7 Merge branch '1.7' 2018-05-19 14:25:23 +09:00
Takeshi KOMIYA
de6f3b252e Fix #4979: latex: Incorrect escaping of curly braces in index entries 2018-05-19 14:15:02 +09:00
Takeshi KOMIYA
c6050a3d1e Fix latex: deeply nested enumerated list which is beginning with non-1 causes LaTeX engine crashed 2018-05-15 01:48:12 +09:00
Takeshi KOMIYA
f6259c696b Adjust MAX_CITATION_LABEL_LENGTH 2018-05-03 23:46:25 +09:00
Takeshi KOMIYA
8bc136a9cb Use \sphinxcite instead of \cite 2018-05-03 20:58:30 +09:00
Takeshi KOMIYA
c1b87ff0d3 Suppress braces surround bibitem 2018-05-03 20:57:29 +09:00
Takeshi KOMIYA
92d8935df0 latex: Use `\cite for citation references instead \hyperref` 2018-05-03 20:57:29 +09:00
Takeshi KOMIYA
82a123f1d4 Add testcase for thebibliography 2018-05-03 20:50:24 +09:00
Takeshi KOMIYA
a31e7beee7 Merge branch 'master' into refactor_latex_footnotes 2018-04-29 21:09:46 +09:00
Takeshi KOMIYA
61bf7c44df Fix #4717: latex: Compilation for German docs failed with LuaLaTeX and XeLaTeX 2018-04-21 18:47:11 +09:00
Takeshi KOMIYA
6977270b66 Fix #4850: latex: footnote inside footnote was not rendered 2018-04-20 21:39:42 +09:00
Takeshi KOMIYA
5ef8da518f Fix #4784: latex_show_urls assigns incorrect footnote numbers 2018-04-12 23:40:15 +09:00
jfbu
38dc048bce Fix broken LateX customization via templates (closes: #4795) 2018-03-29 14:58:32 +02:00
Takeshi KOMIYA
39835bf885 Fix #4720: message when an image is mismatched for builder is not clear 2018-03-18 01:35:42 +09:00
jfbu
711b8ecf70 Fix vertical space before equation in latex (closes: #4574) 2018-03-11 11:36:16 +01:00
Takeshi KOMIYA
63f6603297
Merge pull request #4651 from tk0miya/fix_flake8_violations
Fix flake8 violations
2018-02-19 23:57:00 +09:00
Takeshi KOMIYA
f7027049b1 Fix flake8 violations 2018-02-19 23:20:56 +09:00
Takeshi KOMIYA
6beab9c5a4 Fix #4577: Enumerated sublists with explicit start with wrong number 2018-02-18 17:29:17 +09:00
Takeshi KOMIYA
5b02d61a04 Use roots/basic for test_latex_logo_if_not_found 2018-02-14 01:35:00 +09:00
Takeshi KOMIYA
91873f09b8 Merge branch 'stable' into 1.7-release 2018-01-21 16:06:14 +09:00
Takeshi KOMIYA
896ab3a2f5 Fix #4434: pure numbers as link targets produce warning 2018-01-20 19:43:43 +09:00
jfbu
02ee4ec86b Merge branch 'stable' into 1.7-release 2018-01-20 10:38:03 +01:00
jfbu
9aca29a781 Fix "Undefined control sequence \\hlineSomeText" (#4431; refs: #3435) 2018-01-18 15:35:59 +01:00
Takeshi KOMIYA
33fd1f446a latex: Do not display Release label if :confval:release is not set 2018-01-10 21:35:21 +09:00
Takeshi KOMIYA
f1f6ca8cc9 Merge branch 'happy_new_year' into master 2018-01-01 01:09:17 +09:00
Takeshi KOMIYA
2426cedb8b A happy new year! 2018-01-01 01:06:58 +09:00
Takeshi KOMIYA
a9efb2517a Fix flake8 violations 2017-12-23 21:21:21 +09:00
jfbu
3bb61e9094 Let LaTeX obey :confval:math_numfig for equation numbering 2017-12-21 12:23:20 +01:00
jfbu
43bed034cd Add test for latex obey numfig_secnum_depth feature 2017-12-20 23:28:24 +01:00
jfbu
0a66d51cbc Merge branch 'stable' 2017-12-20 21:52:45 +01:00
jfbu
1ee2c2fb95 Re-use some existing test with extras 2017-12-20 21:30:05 +01:00
jfbu
245876c6e7 Add test for latex_toplevel_sectioning 2017-12-18 08:27:59 +01:00
Takeshi KOMIYA
e3baf213f5 Merge branch 'stable' 2017-10-23 23:04:32 +09:00
Takeshi KOMIYA
47c869c89a Fix flake8 and style-check violations 2017-10-23 23:01:18 +09:00
Takeshi KOMIYA
1892fc18b9 Merge branch 'stable' 2017-10-02 00:41:21 +09:00
jfbu
db36b42e55 Avoid extra space in PDF after image in parsed-literal (refs: Fix #4085) 2017-09-27 12:43:28 +02:00
jfbu
dc129e0532 Fix #4085 Failed PDF build from image in parsed-literal 2017-09-27 09:54:18 +02:00
Takeshi KOMIYA
00169a07e6 Merge branch 'stable' 2017-09-24 22:51:23 +09:00
jfbu
d0418f9129 Add test for #4066 latex \index indent fix 2017-09-20 10:30:45 +02:00
Jean-François B
8d32f03a86 Merge pull request #3872 from jfbu/literalblock_cappos
Add latex key to configure literal blocks caption position in PDF output
2017-07-23 22:46:39 +02:00
Takeshi KOMIYA
e57fb74ee5 Merge branch 'stable' 2017-06-25 01:48:23 +09:00
jfbu
634d76faf1 latex: add option to put literal block captions before or after
According to ``literalblockcappos`` setting in ``'sphinxsetup'``, (t)op
or (b)ottom, the caption will be typeset before or after the literal
block. If typeset above, its distance to frame is now identical to the
setting used for captions of tables (one half of the baseline).

Further keys ``verbatimcontinuedalign`` and ``verbatimcontinuesalign``
allow to horizontally align the continuation hints relative to the
literal block contents: either (l)eft, (c)enter, or (r)ight.
2017-06-17 10:40:12 +02:00
Andy Neebel
db8663db06 Fix the warnings, need to handle the repr escaping 2017-06-14 13:29:49 -05:00
Andy Neebel
f68c108f10 Mark tests as xfail/skip to allow successful run 2017-06-14 13:27:31 -05:00
Takeshi KOMIYA
dd3b100925 Follow translations 2017-05-17 00:03:39 +09:00
Takeshi KOMIYA
e7ffa63463 Merge branch 'stable' 2017-05-16 23:53:46 +09:00
Takeshi KOMIYA
384839f37c Merge pull request #3718 from sphinx-doc/3458-sphinx-testing
refs #3458 sphinx.testing
2017-05-16 15:06:02 +09:00
shimizukawa
d497d74370 refs #3458: add sphinx.testing that are moved from /tests directory. 2017-05-14 20:47:15 +09:00
Takeshi KOMIYA
515e3ad13d Refactor test_latex_table 2017-05-13 17:01:34 +09:00
jfbu
e277cb7285 Merge branch '1.6-release'
Fixed conflicts:
	tests/test_build_html5.py

Also updated tests/test_build_latex.py
2017-05-11 11:45:14 +02:00
jfbu
75653d85ac Fix #3479: add latex support for docutils table stub columns
This implementation in latex writer allows arbitrary columns to be
declared "stub columns". But currently Docutils option
``:stub-columns:`` only allows a number telling the how many initial
columns are "stub columns".
2017-05-10 11:35:12 +02:00
Jean-François B
e9df41535d Merge pull request #3686 from jfbu/dropthreeparttable
Drop usage of `threeparttable` (LaTeX)
2017-05-09 22:00:41 +02:00
jfbu
4fc77026a3 Remove deprecated `\sphinxstylethead` (latex) 2017-05-07 10:59:50 +02:00
jfbu
5ca651f220 Merge branch '1.6-release' 2017-05-07 10:49:45 +02:00
jfbu
e02f3f12b8 LaTeX: `\sphinxstyletheadfamily` to allow multiparagraph headers
Deprecate ``\sphinxstylethead`` at 1.6 with removal at 1.7.
2017-05-07 10:49:03 +02:00
jfbu
cdc1dadd8e Rename `\sphinxcaptionof to \sphinxcaption`, only 2 args 2017-05-04 16:10:58 +02:00
jfbu
069b937513 Separate `\sphinxcapstartof` macro, to facilitate caption below table 2017-05-04 15:45:28 +02:00
jfbu
e21a1702c2 Fix tests after dropping latex threeparttable 2017-05-01 16:22:04 +02:00
Takeshi KOMIYA
8fda21099d Remove deprecated testing utilities 2017-04-27 23:38:42 +09:00
Takeshi KOMIYA
3cf1883356 tests: compile by LaTeX only with py36 2017-04-22 18:14:06 +09:00
Takeshi KOMIYA
25f4c004d8 Emit warning when fetching remote images failed 2017-04-19 01:40:17 +09:00
Takeshi KOMIYA
3c46c2f5ac Add ImageDownloader transform to support remote images on some builders 2017-04-19 01:40:17 +09:00
Takeshi KOMIYA
939f01eae3 Fix #3594: LaTeX: single raw directive has been considereed as block level element 2017-04-08 11:54:01 +09:00
Takeshi KOMIYA
8f9dd64992 Merge branch 'stable' 2017-03-26 11:52:15 +09:00
Takeshi KOMIYA
c57e47e042 Year++ 2017-03-26 11:49:34 +09:00
Dmitry Shachnev
1d12165a12 tests: Fix invalid escape sequence
This fixes this warning:
tests/test_build_latex.py:958: DeprecationWarning: invalid escape sequence \s
2017-03-16 20:22:58 +03:00
jfbu
bc0682af0e Merge branch 'stable'
Conflicts resolved:
	sphinx/domains/cpp.py
	sphinx/domains/python.py
	sphinx/texinputs/sphinx.sty
	sphinx/util/docfields.py
	sphinx/writers/latex.py
	tests/test_build_latex.py

Also updated:
    sphinx/domains/__init__.py
2017-03-12 13:01:47 +01:00
Jean-François B
3128a4327d More robust hyperlink macros in LaTeX output (refs #3317, #3340, #3533) (#3538)
More robust hyperlink macros in LaTeX output (refs #3317, #3340, #3533)
2017-03-11 16:53:53 +01:00
jfbu
0882a41f24 Rename and simplify LaTeX macros
in particular:
``\sphinxbelowtablecaptionskip`` renamed to ``\sphinxbelowcaptionskip``
as it may be extended in future to usage for captions of literal blocks.
2017-03-04 16:09:49 +01:00
jfbu
5f71a2ccb3 Fix #3491 via equalizing vertical spaces for latex tables of all types
User interface via macros ``\sphinxtablepre``, ``\sphinxtablepost``
and ``\sphinxbelowtablecaptionskip``.
2017-03-04 00:08:02 +01:00
Yoshiki Shibukawa
7e178785a7 fix style check warnings 2017-03-03 22:03:16 +09:00
jfbu
3743199576 Remove frame around LaTeX longtable's "Continued on next page" footer
refs: PR #3497
2017-03-03 10:08:08 +01:00
jfbu
33bf5410f6 Update tests after 'stable' merge (refs: #3497) 2017-03-03 10:00:56 +01:00
jfbu
bc67d4298f Improve latex tables: fix #1574 and other rendering issues
- allow multi-paragraph contents in grid table merged cells
- allow code-blocks in merged cells
- allow generally speaking reST contents allowed in regular
  cells to be also allowed in merged cells, whether multirow,
  multicolumn, or both.

This is made possible by custom LaTeX macros replacing original
``\multicolumn`` and ``\multirow`` (none of the originals allows
verbatim contents as is needed for code-blocks). They are defined in
bundled LaTeX style file sphinxmulticell.sty. The multicolumn merged
cells give much better results with tabulary as it is coerced into
taking them into account in its automatic width algorithm.

This deprecates use of LaTeX packages eqparbox and multirow, which are
not needed anymore.

New config setting ``latex_use_latex_multicolumn`` (default value False,
currently) as custom Sphinx multicolumn is not fully compatible will all
types of custom table col specs which may be inserted via tabularcolumns
directive. It works best with standard ``|`` column separator.

The default tabulary column specifier has been changed from L
(flushleft) to J (justifying). Internally the column type is called T,
so ``r'\newcolumntype{T}{L}'`` in preamble key recovers the former
behaviour. A ``\Y`` column type is defined which admits one decimal
argument in place of the two integers for ``\X``.
2017-03-01 09:41:30 +01:00
jfbu
3e3d97ff9c fix test 2017-02-28 08:13:37 +01:00
jfbu
40d99445f8 same default settings for lualatex as for xelatex
this requires fontspec sufficiently recent (TeXLive 2013 or later)
2017-02-26 00:13:06 +01:00
jfbu
5bb8bd8930 update test_build_latex.py test of footnote in longtable caption 2017-02-18 16:48:46 +01:00
jfbu
99315fa8e0 update root footnote test 2017-02-18 16:26:00 +01:00
jfbu
9a8e36568d (latex) hyperlinked footnotes from table bodies
Memo: footnotehyper-sphinx LaTeX package incorporates here some fixes
from upstream footnotehyper 0.99. At Sphinx 1.6 il will for simplicity
copy all of upstream footnotehyper 0.99. Then old footnote.sty LaTeX
package is not a dependency of Sphinx anymore.
2017-02-18 12:36:28 +01:00
Takeshi KOMIYA
e1da72b59c Reduce DeprecationWarnings for regexp 2017-02-17 02:01:04 +09:00
jfbu
1c38710ed2 update latex table tests and CHANGES for PR#3415 2017-02-11 18:02:19 +01:00
jfbu
dcb211f5de refactor latex table templates to avoid extra vertical spaces (refs #3405)
also, make "center" the default for short table horizontal alignment (it
is already so for longtable)
2017-02-11 18:02:19 +01:00
Takeshi KOMIYA
37f3050933 latex: Fix assertion error for complex table (refs: #3395) 2017-02-11 12:19:12 +09:00
Takeshi KOMIYA
fe2daffb4a Fix #3377: Add support for Docutils 0.13 `:align:` option for tables 2017-02-11 10:28:18 +09:00
Takeshi KOMIYA
78c7206dee Refactor testcase 2017-02-11 10:28:18 +09:00
Takeshi KOMIYA
82e011cae6 Refactor: split .rst file for text-latex-table 2017-02-10 14:15:47 +09:00
Takeshi KOMIYA
8b2c92d54f latex: Refactor spanning cells 2017-02-08 00:11:46 +09:00
jfbu
f88e2f23f5 Streamlines newlines in latex output for tables 2017-02-04 16:51:05 +01:00
Takeshi KOMIYA
fdd6f90792 Fix changes in #3381 is lost on merging 2017-02-04 22:29:40 +09:00
Takeshi KOMIYA
976fc326b9 latex: Use templates to render tables 2017-02-04 20:17:49 +09:00
Takeshi KOMIYA
40a957009d Add testcases for latex tables 2017-02-04 20:09:46 +09:00
Takeshi KOMIYA
4f8b3f94d4 Add testcase for captioned table and longtable 2017-02-04 20:09:46 +09:00
Takeshi KOMIYA
10ae47d7b9 latex: Fix colwidths without :widths: option 2017-02-04 20:09:46 +09:00
Takeshi KOMIYA
cf2061dfad Fix flake8 violations 2017-01-26 01:13:17 +09:00
Takeshi KOMIYA
067044211e Fix #3158: too much space after captions in PDF output 2017-01-15 22:02:15 +09:00
shimizukawa
baaef9146d pytest: remove deprecated with_app decorator functions 2017-01-06 01:14:47 +09:00
shimizukawa
5b7d237db3 pytest migration 2017-01-04 00:59:30 +09:00
Takeshi KOMIYA
01736bb397 Fix test_latex failed if stylefiles not found (refs: #3264) 2016-12-24 19:30:32 +09:00
jfbu
9d1f95c9a0 fix 3 line too long style-check errors 2016-12-08 22:30:48 +01:00
jfbu
18e01c8341 fix one more test failure and fix previous fix test (missing u) 2016-12-08 22:05:08 +01:00
jfbu
2e9ee59ee9 fix tests for latex build 2016-12-08 21:43:04 +01:00
Takeshi KOMIYA
7e066e6513 Fix broken tests 2016-12-04 23:34:57 +09:00
shimizukawa
eb0aa50536 fix 3 test failures that cause by translation changed 2016-12-04 23:03:46 +09:00
Takeshi KOMIYA
0ee524e392 Merge branch 'stable' into 1.5-release 2016-11-23 13:22:38 +09:00
Takeshi KOMIYA
43197de299 Fix #3117: LaTeX writer crashes if admonition is placed before first section title 2016-11-23 00:42:34 +09:00
jfbu
53d202440f add `@skip_if_stylefiles_notfound` to maxlistdepth test 2016-11-05 11:50:12 +01:00
jfbu
0473e438dc add unit test for maxlistdepth (latex) 2016-11-04 23:57:00 +01:00
Takeshi KOMIYA
56958227c8 Refactor test_bulid_latex: add skip_if_stylefiles_notfound() 2016-11-04 15:14:41 +09:00
Takeshi KOMIYA
3f4721e140 Refactore test_build_latex: add compile_latex_document() 2016-11-04 12:06:19 +09:00
jfbu
4d3f5b3c1c update style files checklist for latex tests 2016-10-27 11:43:20 +02:00
Jean-François B
b8e0e935e4 Improve LaTeX footnotes (#3022)
Allow code-blocks in footnotes for LaTeX PDF output.

This is done via using a ``footnote environment``, provided by LaTeX
package footnotehyper which replaces old problematic package footnote.
No need to ship a custom tabulary anymore.

The footnote markers are silently removed from the table of contents and
do not end in the PDF bookmarks (the old code in ``sphinx.sty`` copying
``footmisc.sty`` was not satisfactory and has been deleted and replaced
by use of better ``\sphinxfootnotemark``.) Footnotes can be used also in
captions of literal blocks.
2016-10-15 12:09:58 +02:00
Takeshi KOMIYA
dd3f12a7fc Fix style-check violation 2016-10-11 18:59:12 +09:00
jfbu
e43a31da12 Re-insert check for LaTeX macro filename which got suppressed in merge 2016-10-10 21:15:53 +02:00
jfbu
34f1ce17fd Fix #3018: LaTeX problem with page dimensions and chapter titles
New key ``'geometry'`` to ``latex_elements``.
2016-10-07 23:40:39 +02:00