Commit Graph

239 Commits

Author SHA1 Message Date
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
Takeshi KOMIYA
bc6b4bf70e Remove unused LaTeX macro filename from tests 2016-10-02 06:58:55 +09:00
Takeshi KOMIYA
2b10fc0188 Fix #2916: numref role can also refer caption as an its linktext 2016-09-17 15:51:18 +09:00
Takeshi KOMIYA
1aafc7e2e5 Fix #326: numref role can also refer sections 2016-09-17 15:51:18 +09:00
Takeshi KOMIYA
6399f8703b Invoke latex building tests using latex_engine 2016-07-19 11:03:38 +09:00
Takeshi KOMIYA
a692009808 Merge branch 'stable' 2016-07-15 00:51:29 +09:00
Takeshi KOMIYA
6686ebf158 Optimized tests: Add test-warnings 2016-07-14 23:12:57 +09:00
Takeshi KOMIYA
d1a427c51e Merge branch 'stable' 2016-07-08 01:09:28 +09:00
Takeshi KOMIYA
7eca745b5c Fix #2667: latex crashes if resized images appeared in section title 2016-07-05 14:33:44 +09:00
Takeshi KOMIYA
efd74a9e14 latex, replace `pt by TeX equivalent bp if found in width or height` attribute of an image (ref: #2714) 2016-06-26 12:03:55 +09:00
Takeshi KOMIYA
51937f8089 #2597: Show warning messages as darkred 2016-06-24 14:23:19 +09:00
jfbu
9002966085 Merge branch 'stable' 2016-06-22 18:42:13 +02:00
jfbu
01f1696d9b Remove usage by sphinx.sty of latex package newfloat.sty 2016-06-19 16:22:49 +02:00
jfbu
beeeb56c27 latex `\noindent` for non-inline images, not only if top level 2016-06-19 11:04:45 +02:00
jfbu
664e24cf86 Fix #2671: image directive may lead to inconsistent spacing in pdf 2016-06-17 10:08:31 +02:00
jfbu
2cec5a25b2 Merge branch 'stable'
Conflicts:
	sphinx/domains/cpp.py
	sphinx/texinputs/sphinx.sty
	tests/test_build_latex.py
2016-06-15 18:29:58 +02:00
jfbu
5510653d6e Fix #2629. Add new config option `latex_keep_old_macro_names`
The cause of the issue was a clash about ``\titleref`` macro being already
defined in memoir class context. To avoid similar problems, this makes
the text styling macros

  ``\strong``, ``\code``, ``\bfcode``, ``\email``, ``\tablecontinued``,
  ``\titleref``, ``\menuselection``, ``\accelerator``, ``\crossref``,
  ``\termref``, ``\optional``,

also available with ``\sphinx`` prefix, with a conf.py boolean option to
let sphinx.sty only define ``\sphinx``-prefixed macros. As default value
is False, backwards compatibility is maintained.

On this occasion, some internal non-public macros have been renamed with
prefix ``\spx@``. The command

    find . -name '*.sty' -exec grep -l \\\\spx@ {} \;

has been executed in TeXLive 2015 and 2016 installations to check no
package defines macros starting with ``\spx@``.

Some internal macros having public names (because they are written by
latex.py into the body of the latex document) have been renamed to have
``\sphinx`` prefix. The macros in sphinx.sty starting with \py@, or \DU,
or \PYG have not been modified. Similarly ``\release``, ``\version``,
``\releasename``, etc... have not been renamed.
2016-06-15 08:53:24 +02:00
Takeshi KOMIYA
e41a6340da '%' is no needed after \sphinxAtStartFootnote 2016-06-12 00:43:29 +09:00
Takeshi KOMIYA
88c026d0bd Merge branch 'stable' 2016-06-12 00:42:47 +09:00
Takeshi KOMIYA
80921b2ab8 Fix flake8 violation under tests/ 2016-06-12 00:02:11 +09:00
Takeshi KOMIYA
f6ebd372d4 Merge branch 'stable' 2016-06-05 17:24:41 +09:00
jfbu
96e30b0d0e Fix #2593 (continued): allow figure captions in LaTeX tabulary tables 2016-06-05 14:21:21 +09:00
Takeshi KOMIYA
bb6bb7ded6 Fix #2593: latex crashes if any figures in the table 2016-06-05 14:21:21 +09:00
Takeshi KOMIYA
1b939042df Make testcases robust 2016-06-03 00:30:39 +09:00
Takeshi KOMIYA
24beece2a3 Fix combination of figure directive options; width, figwidth and align (ref: #2595) 2016-05-30 13:13:38 +09:00
Takeshi KOMIYA
e3be266be3 Merge branch 'stable' 2016-05-28 17:29:43 +09:00
Takeshi KOMIYA
b74b9cb585 Fix #2383: The generated footnote by latex_show_urls overflows lines 2016-05-28 14:46:13 +09:00
Takeshi KOMIYA
5cdf7a9a33 Adjust spacing in numref role (ref: #2382) 2016-05-28 13:23:37 +09:00
Takeshi KOMIYA
c64a23f3c6 Add testcase for #2382 2016-05-28 12:57:46 +09:00
Takeshi KOMIYA
771e715f50 `:maxdepth: option of toctree affects secnumdepth` (ref: #2547) 2016-05-26 23:23:07 +09:00
Takeshi KOMIYA
885653a35d Fix the caption of figure is always put on center even if `:align:` was specified 2016-05-04 01:27:54 +09:00
Takeshi KOMIYA
4789ef899f Fix #2492: Figure directive with :figwidth: generates incorrect Latex-code 2016-05-04 01:27:31 +09:00
Takeshi KOMIYA
ad738a0978 Fix #2309: Could not refer "indirect hyperlink targets" by ref-role 2016-04-24 13:57:32 +09:00
Takeshi KOMIYA
c289a35c1b Fix #2397: Setup shorthandoff for turkish documents 2016-04-16 18:28:15 +09:00
Takeshi KOMIYA
150ce21fb3 Fix broken testcase caused by translation 2016-03-29 12:40:42 +09:00
Takeshi KOMIYA
0d807a62cc Remove duplicated testcase for latex builder
test_numref_on_bable_disabled and test_numref_with_language_el are mainly
used for testing babel (not for numref).  But now we added enough testcases
for babel.
2016-03-29 12:21:58 +09:00
Takeshi KOMIYA
0211e19ae6 Fix #2337: Use `\url{URL} macro instead of \href{URL}{URL}` in LaTeX writer 2016-03-04 15:45:28 +09:00
Takeshi KOMIYA
4899214238 Merge branch 'stable' 2016-03-03 23:18:53 +09:00
Takeshi KOMIYA
da94ca5699 Merge branch '2327_toplevel_sectioning' 2016-03-03 20:41:17 +09:00
Takeshi KOMIYA
3939c4d684 Merge branch '2229_suppress_warnings' 2016-03-03 20:40:38 +09:00
Takeshi KOMIYA
92934ebe79 Add `\sphinxAtStartFootnote` macro 2016-03-03 00:19:48 +09:00
Takeshi KOMIYA
d91fd33de5 Rename `\internalreference to \crossref` 2016-03-02 22:58:17 +09:00
Takeshi KOMIYA
6efdd07d94 #2351: Fix footnote spacing 2016-03-02 12:22:05 +09:00