Commit Graph
49 Commits
Author SHA1 Message Date
jfbu cf2ff7594f Fix formatting typo in CHANGES 2016-05-24 22:52:09 +02:00
jfbu 2484efc855 Update CHANGES for PR #2551 2016-05-24 22:35:36 +02:00
Jean-François B 613c10c502 Merge pull request #2542 from jfbu/latex_fixbookmarks
Fix #2517: wrong bookmark encoding in PDF if using LuaLaTeX
2016-05-18 08:39:00 +02:00
jfbu 66bf27584b Update CHANGES for PR#2542 2016-05-18 08:22:21 +02:00
jfbu 0f0d505818 Fix #2517: wrong bookmark encoding in PDF if using LuaLaTeX 2016-05-18 08:20:46 +02:00
jfbu 3fb644b929 Extend pdflatex config in sphinx.sty to subparagraphs
This addresses #2547. As the two Sphinx classes set secnumdepth to 2 by
default, the label for paragraphs with the numbering is still skipped by
default. But if user increases secnumdepth to 4 or higher it will show,
contrarily to earlier situation. Also formerly paragraph headings used
\small, which looks wrong because the body text did not use \small.

And subparagraphs were not at all configured with \titleformat, thus did
not use same font as other headings.
2016-05-16 20:55:15 +02:00
Jean-François B 5ecbbec79d Merge pull request #2524 from jfbu/latex_fix2523
Fix #2523: LaTeX raises error for labeled code-block
2016-05-03 15:05:17 +02:00
jfbu e093846dcc Fix #2523: LaTeX raises error for labeled code-block
Was caused because produced latex source may not have blank line before
\begin{Verbatim}. Solved by adding a \par to sphinx.sty.
2016-05-03 14:49:52 +02:00
Jean-François B 06e2928ef0 Merge pull request #2509 from jfbu/latex_fixcomment
This better documents in sphinx.sty vertical spacing above code-blocks.
2016-05-01 08:21:06 +02:00
Jean-François B 57149d378f Merge pull request #2508 from jfbu/latex_frenchlistscompatibility
Fix #2507: French lists in LaTeX-PDF output cause vertical space problems
2016-05-01 08:19:46 +02:00
jfbu 0da097136d Fix and make more precise obsolete comment in sphinx.sty 2016-04-30 18:39:41 +02:00
jfbu 66fdb340f7 Fix #2507: French lists in LaTeX-PDF output cause vertical space problems
modified:   sphinx/texinputs/sphinx.sty
2016-04-30 17:47:04 +02:00
Jean-François B d0d2636c39 Merge pull request #2498 from jfbu/latex_less_space_above_codecaptions 2016-04-27 16:13:57 +02:00
jfbu 83f230799d Update CHANGES (ref: #2460) 2016-04-27 15:50:27 +02:00
Jean-François B df93a0e4ce Merge pull request #2493 from jfbu/latex_luatex85
Move luatex85 loading check from sphinx.sty to sphinx{howto,manual}.cls
2016-04-26 18:04:28 +02:00
jfbu 5833dfc60f Move luatex85 loading check from sphinx.sty to sphinx{howto,manual}.cls 2016-04-26 15:24:00 +02:00
jfbu b2b8fa41a5 Fix #2460: too much white space on top of captioned literal blocks in PDF output
the standard \abovecaptionskip should be enough.
2016-04-25 18:40:13 +02:00
Jean-François B 84191470f3 Merge pull request #2343 from jfbu/codeautolinebreakV3
Allow linebreaks in latex(pdf) codeblocks
2016-04-25 18:11:26 +02:00
jfbu 39e768e15b Update CHANGES after PR#2343 2016-04-25 17:56:50 +02:00
jfbu ac7d7b5f3a Fix #2304: auto line breaks in latexpdf codeblocks
Also related to #1534. Convert code lines into flushleft paragraphs,
thus allowing linebreaks at spaces, and use pre-existing Pygments
mark-up to also allow line breaks at (type 1) characters {, <, #, %, $,
' and " and (type 2) _, }, ^, &, >, -, ~, ., ;, :, ?, !, / and the
comma. Characters of type 1 go to next line in case of break, those of
type 2 stay on same line.

 - no new LaTeX package is used, but current use of fancyverb modified.

 - code line numbering is not affected (extra lines are not numbered.

 - spacing of top line and last line with respect of frame is improved.

 - near bottom of page the wrapping of lines longer than text width,
   which formerly continued into right margin, can produce one or more
   extra lines at bottom of page. It looks impossible without extensive
   rewrite of fancyvrb.sty or the switch to an altogether different
   LaTeX package doing source code formatting to allow page breaks
   there.
2016-04-25 17:30:29 +02:00
Jean-François B eabfd5e514 Merge pull request #2459 from jfbu/pdfvariablewidthcodeblocks
Make framing and captions of PDF literal code-blocks obey indentation
2016-04-25 16:52:19 +02:00
jfbu d3f73e7585 Make framing and captions of PDF literal code-blocks obey indentation
Thus, html and pdf look more similar.
2016-04-25 16:35:32 +02:00
jfbu d8b4ce585d fix a latex issue of vertical space
modified:   sphinx/texinputs/sphinx.sty
2016-04-20 13:59:37 +02:00
jfbu 75992bc831 Update CHANGES for PR #2453 2016-04-20 12:49:43 +02:00
jfbu 701749491e Merge branch 'stable' into fixpdfunbreakabletopicboxes 2016-04-20 12:48:30 +02:00
jfbu 68becb118e Fix #2446: latex(pdf) sets local tables of contents in unbreakable boxes
Allow page breaks in topic contents (e.g. local tables of contents) from
replacing \shadowbox of non anymore used package framebox by a custom
framed package environment.

Formerly, topic boxes extended into right margin; put only the shadow in
margin, locate the right frame exactly at the margin.

Use framed.sty also for framing admonitions of the warning type. Make
vertical spacing more coherent with the one for hint type notices.
Handle case with warning notices getting nested; the inner ones use a
minipage, only the outer one allows pagebreaks.
2016-04-20 12:28:39 +02:00
jfbu 5c823a770c Load compatibility patch for LuaTeX 0.85+
See http://ctan.org/pkg/luatex85 for more info. Old packages relying on
pdf naming of primitives will break under LuaTeX 0.85+, which will be
generally available starting with TeXLive 2016 release.

	modified:   sphinx/texinputs/sphinx.sty
2016-04-18 12:37:15 +02:00
jfbu 2bbeeffd94 Fix a vertical space in indented code-blocks for latexpdf
Add a missing \setlength\parsep{0pt} in Verbatim. There was a little
extra white space below top frame for indented code-blocks because of
that.

	modified:   sphinx/texinputs/sphinx.sty
2016-04-17 22:11:50 +02:00
jfbu bdba5655b9 Fix typo in comment after renaming.
Sorry.

	modified:   sphinx/texinputs/sphinx.sty
2016-04-14 18:23:33 +02:00
jfbu 4e69311599 Make more robust Verbatim code for PDF. No more redefines \fbox.
Although the definition was made locally, it meant that for example
macros of type \PYG... could not use internally \fbox whose meaning
had been modified. New code never modifies \fbox or \XC@fbox.

	modified:   sphinx/texinputs/sphinx.sty
2016-04-14 18:14:44 +02:00
jfbu 53cc2aa8a8 Fix #2447: VerbatimBorderColor wrongly used also for captions of PDF
On this opportunity the code and comments in sphinx.sty from commit
9d82cad (LaTeX captions of literal blocks now glued to framed verbatim)
have been re-organized, uses less macros. Only functional difference
should be the fix of #2447.

	modified:   sphinx/texinputs/sphinx.sty
2016-04-14 10:46:42 +02:00
jfbu 673222f20a Added Tests for latex(pdf) links to captioned or named literal blocks
As conf.py has now numfig = True, needed to modify accordingly test for
links in html output.

This topic branch fixes #2405, #2414, and also makes for latex(pdf)
functional hyperlinks to named references, but only for literal blocks
(code-block or literalinclude).

	modified:   tests/roots/test-directive-code/caption.rst
	modified:   tests/roots/test-directive-code/conf.py
	new file:   tests/roots/test-directive-code/namedblocks.rst
	modified:   tests/test_directive_code.py
2016-04-10 20:45:59 +02:00
jfbu a4aefd454a Remove unneeded \bgroup/\egroup in legacy sphinx.sty definition of Verbatim
Indeed, sphinx.sty redefines _environment_ Verbatim, and LaTeX's
environments always are scope-limiting for local assignments.

	modified:   sphinx/texinputs/sphinx.sty
2016-04-10 18:55:14 +02:00
jfbu afb83c249f Make reset of \SphinxVerbatimTitle to \empty explicit in produced LaTeX files
modified:   sphinx/texinputs/sphinx.sty
	modified:   sphinx/writers/latex.py
2016-04-10 18:55:13 +02:00
jfbu 267c266561 Fix comment
modified:   sphinx/writers/latex.py
2016-04-07 11:56:43 +02:00
jfbu 261ff1a9d2 Enable pdf hyperlinks to named literal-blocks without caption.
This is tango between latex.py and sphinx.sty to handle PDF hyperlinks
to literal-blocks (both code-block and literalinclude) either with name
or caption (then numref can be used) or both.

	modified:   sphinx/texinputs/sphinx.sty
	modified:   sphinx/writers/latex.py

This test file is now back to original.

	modified:   tests/test_directive_code.py
2016-04-07 11:27:33 +02:00
jfbu 238a3346d9 Merge branch 'stable' into jumptorightplace-onstable 2016-04-06 18:55:15 +02:00
jfbu 5cad1481aa Fix line too long issue reported by Travis CI
modified:   sphinx/writers/latex.py
2016-04-04 10:14:20 +02:00
jfbu ad1cc969d3 Fix two issues in latex.py reported by Travis CI
modified:   sphinx/writers/latex.py
2016-04-04 10:10:05 +02:00
jfbu d41caf9610 Merge branch 'stable' into jumptorightplace-onstable 2016-04-04 08:11:20 +02:00
jfbu a124a39625 Remove unneeded test "if 'ids':" from previous commit.
modified:   sphinx/writers/latex.py
2016-04-03 16:50:47 +02:00
jfbu a1647b6bb9 Fix broken numeric reference in PDF hyperlinks to "Listing " code-blocks
The `\label` is now inserted into the caption on top of the Verbatim,
and `\ref` will work as expected. No need for `\phantomsection`.

	modified:   sphinx/writers/latex.py
	modified:   tests/test_directive_code.py
2016-04-03 16:31:35 +02:00
jfbu 6123ea49e5 Fix #2405: numref link in PDF jumps to the wrong location
The hypertarget insertion by the LaTeX writer for literal blocks is
moved from depart_container to visit_caption.

	modified:   sphinx/writers/latex.py
2016-04-03 15:14:13 +02:00
jfbu 12c6c9dad2 Fix broken test_literalinclude_caption_latex
modified:   tests/test_directive_code.py
2016-03-04 13:11:00 +01:00
jfbu 038dd00777 Changes of LaTeX macro names in sphinx.sty to use Sphinx prefix.
modified:   sphinx/texinputs/sphinx.sty
	modified:   sphinx/writers/latex.py
	modified:   tests/test_directive_code.py
2016-03-04 12:46:34 +01:00
jfbu 60742ab9f5 Fix comments.
modified:   sphinx/texinputs/sphinx.sty
2016-02-15 13:07:02 +01:00
jfbu 31925e8fbe Removes unneeded comment from sphinx.sty
modified:   sphinx/texinputs/sphinx.sty
2016-02-15 12:32:04 +01:00
jfbu 59de4bf717 Fix #2262 (latex): avoid pagebreaks after captions of literal blocks
This could fix https://github.com/sphinx-doc/sphinx/issues/2262
and also perhaps https://github.com/sphinx-doc/sphinx/issues/2319

As now the caption is set in an environment it appears to possibly solve
also issue #2319 Table counter is overrided by code-block's in LaTeX

The parent commit used only \FirstFrameCommand of latex package
framed, but \FrameCommand also must be customized in case the
framed contents fit on a single page. This is fixed here.

	modified:   sphinx/texinputs/sphinx.sty
2016-02-14 10:05:22 +01:00
jfbu 89e8cb3459 Address #2262 (latex): avoid pagebreaks after captions of literal blocks
This could fix https://github.com/sphinx-doc/sphinx/issues/2262

The 1.3.5 Verbatim environment from sphinx.sty has many places allowing
a page break after the caption: from the \smallskip, from the list
environment, and from the \MakeFramed: indeed framed package
documentation explains that it encourages page breaks above it.

The only way to avoid the pagebreaks is to put the caption inside the
environment whic is started by \MakeFramed. However, as this environment
typesets multiple times its contents, we must inhibit within it the
increase of counters (only the literal-block counter is concerned), this
is done thanks to a switch provided by the package amsmath which is
already loaded by sphinx.sty.

	modified:   sphinx/texinputs/sphinx.sty
	modified:   sphinx/writers/latex.py
	modified:   tests/test_directive_code.py
2016-02-10 10:50:52 +01:00