Commit Graph
100 Commits
Author SHA1 Message Date
jfbu 18c31d52bb Update CHANGES for PR#3057 2016-10-16 17:47:38 +02:00
Jean-François B 828c96ec10 Fix #3047: spacing before footnote in pdf output is not coherent (#3057)
A ``\sphinxBeforeFootnote`` macro is inserted by footnote environment
and ``\footnotemark`` command. Its default is to remove the space before
the footnote mark. Formerly, footnotes from explicit mark-up were
preceded by a space allowing a linebreak, but automatically generated
footnotes had no such space.
2016-10-16 17:40:19 +02:00
jfbu 2b865cf90a Make `make synonym to make help` again 2016-10-15 23:42:00 +02:00
jfbu 16e9049bb3 No need for an empty recipe for Makefile as it has been set .PHONY 2016-10-15 22:59:12 +02:00
jfbu 362ee9d974 Fix make-mode in order to allow build to go through 2016-10-15 21:09:21 +02:00
jfbu 40b644b664 Update CHANGES for PR#3022 2016-10-15 12:19:08 +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
jfbu 58dab8d80b Update CHANGES for PR#3030 2016-10-15 11:56:17 +02:00
Jean-François B 3e21ef45cf Merge pull request #3030 from jfbu/loadhyperreflater
(latex) separate loading of hyperref from sphinx.sty
2016-10-15 11:47:51 +02:00
jfbu ec8dd32e35 add example to use of `'printindex'` key 2016-10-14 11:21:18 +02:00
jfbu 689327d6fc add missing versionchanged directive for tableofcontents 2016-10-14 11:14:15 +02:00
jfbu 536d52063f Revert "new `'packages' key to latex_elements`"
This reverts commit 9972d729ab.
2016-10-14 09:04:45 +02:00
jfbu 9972d729ab new `'packages' key to latex_elements`
serves to load packages after ``sphinx.sty`` itself and before hyperref.
2016-10-14 09:04:08 +02:00
jfbu 9cdf4fe00f (latex) separate loading of hyperref from sphinx.sty
new 'hyperref' key in ``latex_elements``.
2016-10-14 09:02:18 +02:00
Jean-François B 28d6e34bb3 Merge pull request #3051 from jfbu/betterfixforduplicatedestinationwarning
(latex) avoid in a better way duplicate name page.1 hyperref warning
2016-10-14 08:21:36 +02:00
jfbu 340edb32c6 (latex) mention Bjornstrup fncychap chapter style in the docs 2016-10-13 23:21:05 +02:00
Jean-François B b22db35849 Merge pull request #3040 from jfbu/updatelatexsphinxdocumentation
update latex.rst (``LaTeX customization`` chapter in the docs)
2016-10-13 22:14:15 +02:00
jfbu 4e88bfeff0 (latex) avoid in a better way duplicate name page.1 hyperref warning
The  ``\pagenumbering{alph}`` trick has the inconvenient that it is
mandatory to reset later the page numbering to arabic else errors will
arise as soon as the document has more than 26 pages. This resetting is
done by Sphinx code for ``\tableofcontents`` now called
``\sphinxtableofcontents`` but not by original ``\tableofcontents``.
Thus, user putting ``\tableofcontents`` in ``'tableofcontents'`` key
would get errors now without that fix.

The titlepage environment creates a group and clears the page before
exiting, thus this solution is quite analogous to the one recommended by
hyperref author at http://tex.stackexchange.com/a/333219/4686.
2016-10-13 20:17:28 +02:00
jfbu fc3908485c kill unwanted TABs 2016-10-13 15:47:30 +02:00
jfbu 44907736ec update more latex.rst 2016-10-13 14:09:43 +02:00
jfbu a16cb8ea57 update info strings of Sphinx LaTeX style file and classes
makes latex compilation logs more precise
2016-10-13 10:58:44 +02:00
jfbu c3b6f8cc95 Update CHANGES for PR#3032 2016-10-12 22:42:12 +02:00
Jean-François B 749a6a0558 Merge pull request #3032 from jfbu/improvelatexcompatibilities
Fix #3031: incompatibility with LaTeX package ``tocloft``
2016-10-12 22:40:28 +02:00
jfbu 0861ca9a03 escape some backslashes in latex.rst example code 2016-10-12 22:33:09 +02:00
jfbu 613b80d3ed update latex.rst (`LaTeX customization` chapter in the docs) 2016-10-12 22:12:36 +02:00
jfbu 1a540247b6 make sphinx prefixed names known to non-Sphinx document classes 2016-10-12 08:32:24 +02:00
jfbu 9826be6f69 fix forgotten needed redefinitions in sphinx.sty for jsclasses 2016-10-11 23:12:27 +02:00
jfbu 49031c3c40 make sphinx latex style file use a package option
for handling of ``latex_keep_old_macro_names`` conf.py setting
2016-10-11 22:50:12 +02:00
jfbu b0a3b6cbc0 fix typo in config.rst 2016-10-11 20:55:00 +02:00
jfbu bc8d9aa93d fix accidental replacement of section by chapter 2016-10-11 20:52:19 +02:00
jfbu 143daf21d8 Fix #3031: incompatibility with LaTeX package `tocloft`
Use ``\sphinxtableofcontents``,  and environments ``sphinxtheindex``
and ``sphinxthebibliography``.
2016-10-11 20:42:58 +02:00
jfbu e43a31da12 Re-insert check for LaTeX macro filename which got suppressed in merge 2016-10-10 21:15:53 +02:00
jfbu e4dd1bf04b Update CHANGES for PR#3023 2016-10-10 21:12:57 +02:00
Jean-François B 940fa11b9b Merge pull request #3023 from jfbu/fixpysiglineissue
Fix an issue with ``\pysigline`` in LaTeX style file.
2016-10-10 20:59:59 +02:00
jfbu 5b040dd754 Update CHANGES for PR#3020 2016-10-10 20:58:34 +02:00
jfbu 861973bfbb Merge branch 'usegeometrypackage' 2016-10-10 20:55:44 +02:00
jfbu 34ac39e583 Update CHANGES for PR#3017 2016-10-10 20:52:55 +02:00
Jean-François B 89ccf9e103 Merge pull request #3017 from jfbu/fixuseofncychap
Fix #147 and fix #1986: Problem with latex chapter style
2016-10-10 20:49:05 +02:00
jfbu 5e2c8b9f74 Fix an issue with `\pysigline` in LaTeX style file.
This issue was initially reported as
<http://tex.stackexchange.com/questions/201270/argument-of-item-has-an-extra>

The commit also fixes two other potential problematic code locations in
sphinx.sty
2016-10-09 22:19:25 +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
jfbu 5b78aa28fe Fix #147 and fix #1986: Problem with latex chapter style
Notice that as an after effect ``Contents`` or ``Python Module Index``
will appear (by default) in bold, and larger than formerly (it was a
bug of Sphinx that they were not styled).

I am leaving the `\py@HeaderFamily` in the `sphinx.sty` patch to the
Bjarne `fncychap.sty` style for backwards compatibility. And as it does
`\bfseries` by default I left only the size changing commands in the
`fncychap` customization of Bjarne style.

Also, the `\@makechapterhead` re-definition obeys `\mainmatter` etc...
2016-10-07 11:55:43 +02:00
jfbu 0875507497 Better wording in CHANGES for PR#3010 2016-10-06 19:50:42 +02:00
Jean-François B d36b0984fc Merge pull request #3010 from jfbu/fixcodeinparsedliteral
Fix #3009: Bad rendering of parsed-literals in LaTeX
2016-10-06 19:27:46 +02:00
jfbu 89487d02fe Update CHANGES for PR#3010 2016-10-06 19:27:20 +02:00
jfbu 446729dccf Improve wording in sphinx.sty and spare a few code lines at its end. 2016-10-06 19:26:32 +02:00
jfbu 44f595a63f Fix #3009: Bad rendering of parsed-literals in LaTeX
This reverts the ``\scantokens`` added (commit 86083875) to ``\code``
(aka ``\sphinxcode``), in case it is encountered inside a parsed-literal
directive. Indeed strange interference arise then. The problem would
occur in Verbatim too, but I think ``\sphinxcode`` is not encountered
there.
2016-10-06 19:26:32 +02:00
jfbu d6d6a8e0d8 Update CHANGES for PR#2997 2016-10-02 09:31:36 +02:00
Jean-François B 07e599a83a Merge pull request #2997 from jfbu/fixitalianshorthandoff
Fix #2810: Problems with pdflatex in an Italian document
2016-10-02 09:28:41 +02:00
jfbu 85b954714c Fix #2810: Problems with pdflatex in an Italian document
Depending on the version of the italian module for LaTeX Babel, the
double-quote character may have been or not declared as a babel
shorthand. The babel ``\shorthandoff`` macro emits an error which aborts
compilation if the character isn't a shorthand. This commits wraps the
macro in a conditional to test if the character is active or not.

	modified:   sphinx/writers/latex.py
2016-10-01 17:44:46 +02:00
jfbu 24dc3e601d Reset verbatim nolig list only in case of wrapping of codelines 2016-09-07 23:54:53 +02:00
jfbu 0464c52bce latex: code blocks linebreaks easier customized
Via re-definable ``\sphinxbreaksbeforelist`` and ``\sphinxbreaksafterlist``,
latex user can specify (using ``'preamble'`` key for example) if broken
code lines are split before or after the said character when code blocks
are wrapped. Punctuation characters use active catcodes and are
configurable via further macros ``\sphinxbreaksbeforeactivelist`` and
``\sphinxbreaksafteractivelist``. The defaults in ``sphinx.sty`` can be
modified by imitation in user document preamble.

n.b.: ``\sphinxbreaksatpunct`` has been renamed to ``\sphinxbreaksviaactive``.
2016-09-07 23:31:34 +02:00
jfbu 1d7c82b3bb Merge branch 'stable' into master
Conflicts (fixed)::
	sphinx/texinputs/sphinx.sty
2016-09-07 23:18:09 +02:00
jfbu 581216e50e Update CHANGES 2016-09-02 10:09:56 +02:00
jfbu 71b9f00d31 Fix #2873: code-block overflow in latex (due to commas)
The potential linebreaks at commas in code lines were not inserted due
to latex kernel macro ``\@noligs`` which is issued by fancyvrb.sty
during its line processing. From the default `` `<>,'- ``, only the
backtick is left to be handled by ``\@noligs`` because the others are
either already replaced by a macro by Pygments, or (only the comma) made
active by sphinx.sty to insert potential linebreaks.
2016-09-02 09:48:33 +02:00
jfbu 7db8141238 Amend merged PR#2736 to maintain strict stability of pdf title page
This maintains for the time being the diverging behaviour between
engines regarding the top of title page, as discussed at
https://github.com/sphinx-doc/sphinx/pull/2736#issuecomment-230140016
2016-07-03 10:49:05 +02:00
Jean-François B 532a804a66 Merge pull request #2736 from jfbu/fixunderfullhbox
Fix #2735: latexpdf ``Underfull \hbox`` warnings from title page
2016-07-02 12:46:39 +02:00
jfbu 0ecfa8e8e9 Fix #2735: latexpdf `Underfull \hbox` warnings from title page
This came from the spurious space tokens following a fullwidth rule at
top of ``\maketitle`` in ``sphinxhowto.cls`` and ``sphinxmanual.cls``.
The ``\newline\null\par`` incantation recreates the extra empty line
which originated in these spurious space tokens, but it avoids the
Underfull latex warning. Nothing is changed to layout from this fix.
2016-07-02 10:56:59 +02:00
jfbu 7796a553d3 Update CHANGES for PR#2726 2016-07-02 07:41:43 +02:00
Jean-François B 8a79144e26 Merge pull request #2726 from jfbu/fixmultirow
Fix #2723: extra spaces in latex pdf output from multirow cell
2016-07-02 07:39:47 +02:00
jfbu 35214d4518 Fix #2733: `make latexpdf` generates lots of hyperref warnings 2016-07-01 19:18:27 +02:00
jfbu b25dc5ef4c Fix #2723: extra spaces in latex pdf output from multirow cell
Adds some ``\relax``/``\unskip`` and removes spaces from ``visit_entry``
generated latex code. Earlier, multirow cell inherited one extra space
token at begin and one at end, making left or right alignment with other
cells fail because the native LaTeX space removal mechanism for table
cells could not apply there.

Memo: the ``\eqparbox`` part of ``visit_entry`` from e41f831f is left
untouched; separate analysis required.
2016-06-30 18:11:54 +02:00
Jean-François B 75ed2e6e4f Merge pull request #2721 from jfbu/makeVerbatimfontcustomizable
latex, make use of ``\small`` for code listings customizable
2016-06-30 11:22:49 +02:00
jfbu 067d3cabf0 latex, make use of `\small` for code listings customizable 2016-06-30 11:20:30 +02:00
jfbu f30a8d5a36 fix a mark-up typo in doc/install.rst 2016-06-30 11:10:58 +02:00
jfbu 446e93aca7 fix a typo in CHANGES 2016-06-30 00:08:40 +02:00
jfbu 2a1826022d Update to CHANGES 2016-06-30 00:03:06 +02:00
jfbu a20533540b Add a sentence in doc/config.rst on `'pxunit'` key 2016-06-29 20:55:07 +02:00
jfbu d76e9d48a5 Update doc/rest.rst 2016-06-26 23:13:32 +09:00
jfbu 6caf0b2a88 latex, add comment on the possibility of `\listof{literalblock}{foo}`
Memo: this command produces a list of the code listings in the document
(with chosen title foo), analogous to ``\listoffigures``, and it comes
from LaTeX package float.sty.
2016-06-25 18:50:24 +02:00
jfbu 830ffc7738 latex, load float package before wrapfig package
This should not change anything for Sphinx produced documents without
extra custom use of float package by user, and is recommended by wrapfig
doc for good functioning.
2016-06-25 18:26:25 +02:00
Jean-François B 2273be9c37 Merge pull request #2711 from jfbu/latex_allowpx2
latex, allow image dimensions using px unit (96px=1in)
2016-06-25 13:00:23 +02:00
jfbu fc2202fd2a latex, replace `'pixelsize' by more precise 'pxunit'` name 2016-06-25 10:32:48 +02:00
jfbu f6b0ae903d latex, allow image dimensions using px unit (96px=1in)
New key ``'pixelsize'`` in ``latex_elements`` dictionary.
2016-06-24 20:36:35 +02:00
jfbu 45ddb6387c Add a missing word in CHANGES and fix minor other issues there 2016-06-24 19:18:56 +02:00
jfbu 84ed2c394a Merge branch 'jfbu_fixspaceafterinlineliteral' into stable 2016-06-24 15:33:58 +02:00
jfbu b6daf6be56 fix latex, since 1.4.4 inline literal text is followed by spurious space
ref: a51681b use of ``\scantokens`` has a quirk with adding a space in
some cases which we fix by inserting a ``\relax`` at the end of the
argument.
2016-06-24 15:26:50 +02:00
jfbu 5bd76815ff Added an item about sphinxVerbatim to doc/latex.rst 2016-06-22 22:30:58 +02:00
jfbu 4919406f94 Fix a comment in sphinx.sty 2016-06-22 19:26:11 +02:00
jfbu 3bce72f49b Update a comment in latex.py 2016-06-22 19:12:08 +02:00
jfbu 77ea9daf43 Fix comments in sphinx.sty after merge of 'stable' 2016-06-22 18:56:02 +02:00
jfbu 9002966085 Merge branch 'stable' 2016-06-22 18:42:13 +02:00
jfbu 8feb92dd2d Update CHANGES for PR #2672 2016-06-22 18:33:43 +02:00
Jean-François B 0802e5499a Merge pull request #2672 from jfbu/jfbu_fixincludegraphics
Fix #2671: image directive may lead to inconsistent spacing in pdf
2016-06-22 18:25:46 +02:00
jfbu a4296a04d1 A bit of refactoring of latex entries in CHANGES for 1.5 2016-06-22 16:15:05 +02:00
Jean-François B 3e99ec91a2 Merge pull request #2704 from jfbu/jfbu_verbatim20
latex: customizable literal blocks
2016-06-22 16:14:26 +02:00
jfbu f1cc694af7 latex: customizable literal blocks
- new dimensions ``\sphinxverbatimsep`` and ``\sphinxverbatimborder``
  configure the frame width and its separation from contents,

- new ``\ifsphinxverbatimwithframe`` and ``\ifsphinxverbatimwrapslines``
  to customize behaviour of sphinxVerbatim or define wrapper
  environments, such as sphinxVerbatimNoFrame and sphinxVerbatimintable,

- the latter is used in table cells, in place of OriginalVerbatim, thus
  allowing to handle captions for code-blocks in tables (issue #2706).

On this occasion, a bit of refactoring in sphinx Verbatim code,
particularly the caption is typeset in advance to its insertion in
non-breakable from code location (this avoids using the amstext
``\iffirstchoice@`` conditional), and the sphinxVerbatim is usable
without any optional argument (but currently option is always present
and contains at least ``commandchars=\\\{\}`` to activate syntax
highlighting).
2016-06-22 15:57:03 +02:00
Jean-François B 188e669ee1 Merge pull request #2708 from jfbu/jfbu_fixtabularcolspecs
Fix #2707: (latex) the column width is badly computed for tabular
2016-06-22 09:54:44 +02:00
jfbu 4ab9854483 Update CHANGES for PR#2708 2016-06-22 09:36:10 +02:00
Jean-François B 49dd55ed1b Merge pull request #2701 from jfbu/jfbu_restoreUsageOfOriginalVerbatim
latex #2698: restore usage of OriginalVerbatim name for ``<1.5`` compat
2016-06-22 09:20:02 +02:00
jfbu c88193e3df fix flake8 violation 2016-06-21 23:25:06 +02:00
jfbu 8e45f54d07 Fix #2707: output more compact `*{N}{p{...}}` notation 2016-06-21 23:19:56 +02:00
jfbu 303f163b0a Fix #2707: (latex) the column width is badly computed for tabular
MEMO: the used formula is correct as long as package array is loaded.
Package array (which modifies how the width of vertical rules is counted
in the total width of the tabular) is a dependency of packages tabulary,
and eqparbox, and possibly others which are currently loaded by
sphinx.sty. Even if usage of package tabulary is dropped in future
version of sphinx.sty, there would still remain the dependency on array
via eqparbox, and the formula configured in latex.py will remain
correct.
2016-06-21 23:02:43 +02:00
jfbu 65653db479 latex #2698: restore usage of OriginalVerbatim name for `<1.5` compat 2016-06-20 11:49:08 +02:00
Jean-François B 452c8b162c Merge pull request #2685 from jfbu/jfbu_customizablenotices
latex: fully customizable notices/admonitions
2016-06-20 09:44:43 +02:00
jfbu 12ade10d55 New latex.rst for extended documentation of LaTeX's customizing. 2016-06-20 09:23:41 +02:00
jfbu e5db9da45d latex: fully customizable notices/admonitions
The refactoring maintains backwards compatibility for the non-customized
usage: but macros such as ``\py@noticesstart@note`` have been removed
and any customization by extension or user will be without effect.
However the ``notice`` environment is still used, hence customization or
modified usage of it will work as before.

The LaTeX writer now uses ``sphinxadmonition``. Currently it is a
wrapper of ``notice`` environment. At some future release ``>1.5`` of
Sphinx it is planned to remove definition of ``notice`` environment, and
rename it directly to ``sphinxadmonition``. In the transition period
both will work, but at end of transition period extensions using only
``notice`` will stop working and those using ``sphinxadmonition`` will
require at least Sphinx ``1.5``.
2016-06-20 09:06:28 +02:00
Jean-François B 033ef35273 Merge pull request #2660 from jfbu/jfbu_removenewfloatdependency
Remove use of latex package newfloat
2016-06-20 07:54:44 +02:00
Jean-François B 58100c2856 Merge pull request #2697 from jfbu/jfbu_reusefloatpackage
Fix #2679: (latex) load package float for 'H' value of 'figure_align'
2016-06-20 07:51:28 +02:00
jfbu 3650663bb3 Fix #2679: (latex) load package float for 'H' value of 'figure_align' 2016-06-19 20:57:38 +02:00
jfbu 01f1696d9b Remove usage by sphinx.sty of latex package newfloat.sty 2016-06-19 16:22:49 +02:00