From 8c21abeccc4c3e691d2ea6efe3c9050fbd6c073e Mon Sep 17 00:00:00 2001 From: jfbu Date: Sat, 14 Jan 2017 12:32:20 +0100 Subject: [PATCH 01/10] Fix #3308: Parsed-literals don't wrap very long lines with pdf builder --- doc/latex.rst | 13 ++++++-- sphinx/texinputs/sphinx.sty | 64 ++++++++++++++++++++++++++++++++++++- sphinx/writers/latex.py | 4 +-- 3 files changed, 75 insertions(+), 6 deletions(-) diff --git a/doc/latex.rst b/doc/latex.rst index d378f2090..61f5a2a2c 100644 --- a/doc/latex.rst +++ b/doc/latex.rst @@ -143,14 +143,21 @@ Here are the currently available options together with their default values. LaTeX requires ``true`` or ``false`` to be specified in *lowercase*. ``verbatimwrapslines`` - default ``true``. Tells whether long lines in :rst:dir:`code-block`\ s - should be wrapped. + default ``true``. Tells whether long lines in :rst:dir:`code-block`\ 's + contents should wrap. .. (comment) It is theoretically possible to customize this even more and decide at which characters a line-break can occur and whether before or after, but this is accessible currently only by re-defining some macros with complicated LaTeX syntax from :file:`sphinx.sty`. +``parsedliteralwraps`` + default ``true``. Tells whether long lines in :dudir:`parsed-literal`\ 's + contents should wrap. + + .. versionadded:: 1.5.2 + set this option value to ``false`` to recover former behaviour. + ``inlineliteralwraps`` default ``true``. Allows linebreaks inside inline literals: but extra potential break-points (additionally to those allowed by LaTeX at spaces @@ -160,7 +167,7 @@ Here are the currently available options together with their default values. (or shrinked) in order to accomodate the linebreak. .. versionadded:: 1.5 - set this option to ``false`` to recover former behaviour. + set this option value to ``false`` to recover former behaviour. ``verbatimvisiblespace`` default ``\textcolor{red}{\textvisiblespace}``. When a long code line is diff --git a/sphinx/texinputs/sphinx.sty b/sphinx/texinputs/sphinx.sty index 3e82bafec..dac620141 100644 --- a/sphinx/texinputs/sphinx.sty +++ b/sphinx/texinputs/sphinx.sty @@ -6,7 +6,7 @@ % \NeedsTeXFormat{LaTeX2e}[1995/12/01] -\ProvidesPackage{sphinx}[2017/01/09 v1.5.2 LaTeX package (Sphinx markup)] +\ProvidesPackage{sphinx}[2017/01/14 v1.5.2 LaTeX package (Sphinx markup)] % we delay handling of options to after having loaded packages, because % of the need to use \definecolor. @@ -91,6 +91,8 @@ \DeclareBoolOption[true]{verbatimwithframe} \DeclareBoolOption[true]{verbatimwrapslines} \DeclareBoolOption[true]{inlineliteralwraps} +% parsed literal +\DeclareBoolOption[true]{parsedliteralwraps} % \textvisiblespace for compatibility with fontspec+XeTeX/LuaTeX \DeclareStringOption[\textcolor{red}{\textvisiblespace}]{verbatimvisiblespace} \DeclareStringOption % must use braces to hide the brackets @@ -535,6 +537,66 @@ \begin{sphinxVerbatim}} {\end{sphinxVerbatim}} +% Parsed literal: allow long lines to wrap like they do in code-blocks + +% this should be kept in sync with definitions in sphinx.util.texescape +\newcommand*\sphinxbreaksattexescapedchars{% + \def\do##1##2% put potential break point before character + {\def##1{\discretionary{}{\sphinxafterbreak\char`##2}{\char`##2}}}% + \do\{\{\do\textless\<\do\#\#\do\%\%\do\$\$% {, <, #, %, $ + \def\do##1##2% put potential break point after character + {\def##1{\discretionary{\char`##2}{\sphinxafterbreak}{\char`##2}}}% + \do\_\_\do\}\}\do\textasciicircum\^\do\&\&% _, }, ^, &, + \do\textgreater\>\do\textasciitilde\~% >, ~ +} +\newcommand*\sphinxbreaksviaactiveinparsedliteral{% + \sphinxbreaksviaactive % by default handles . , ; ? ! / + \do\-% we need also the hyphen character + \lccode`\~`\~ % + % update \dospecials as it is used by \url + % but deactivation will already have been done hence commented out + % \expandafter\def\expandafter\dospecials\expandafter{\dospecials + % \sphinxbreaksbeforeactivelist\sphinxbreaksafteractivelist\do\-}% +} +\newcommand*\sphinxbreaksatspaceinparsedliteral{% + \lccode`~32 \lowercase{\def~}{\leavevmode + \nobreak\hskip\z@ plus\fontdimen3\font minus\fontdimen4\font + \discretionary{\copy\sphinxvisiblespacebox}{\sphinxafterbreak} + {\kern\fontdimen2\font}% + }\lccode`\~`\~ +} +% now the hack for \url to work (hyperref is required dependency): +% the aim it to deactivate - . , ; ? ! / in \url's argument +\def\spx@hack@hyper@normalise {% + \expandafter\spx@hack@hyper@normalise@aux\hyper@normalise + \spx@hack@hyper@normalise@aux\hyper@n@rmalise\relax\spx@undefined +}% +\long\def\spx@hack@hyper@normalise@aux#1\hyper@n@rmalise#2#3\spx@undefined{% + \ifx\spx@hack@hyper@normalise@aux#2% + \def\hyper@normalise + {#1\let\do\@makeother + \sphinxbreaksbeforeactivelist\sphinxbreaksafteractivelist\do\-% + \hyper@n@rmalise}% + \else + \PackageWarning{sphinx}{Could not patch \string\url\space command.% + ^^J Not using active characters in alltt environment}% + \let\do\@makeother + \sphinxbreaksbeforeactivelist\sphinxbreaksafteractivelist\do\-% + \fi +}% +% now for the modified alltt environment +\newenvironment{sphinxalltt} +{\begin{alltt}% + \ifspx@opt@parsedliteralwraps + \sbox\sphinxcontinuationbox {\spx@opt@verbatimcontinued}% + \sbox\sphinxvisiblespacebox {\spx@opt@verbatimvisiblespace}% + \sphinxbreaksattexescapedchars + \sphinxbreaksviaactiveinparsedliteral + \sphinxbreaksatspaceinparsedliteral + \spx@hack@hyper@normalise + \fi } +{\end{alltt}}% \end{alltt} (<-- only to fix Emacs/AUCTeX fontification issue) + % Topic boxes % Again based on use of "framed.sty", this allows breakable framed boxes. diff --git a/sphinx/writers/latex.py b/sphinx/writers/latex.py index ddbf73c0a..b13c23d42 100644 --- a/sphinx/writers/latex.py +++ b/sphinx/writers/latex.py @@ -1929,7 +1929,7 @@ class LaTeXTranslator(nodes.NodeVisitor): if node.rawsource != node.astext(): # most probably a parsed-literal block -- don't highlight self.in_parsed_literal += 1 - self.body.append('\\begin{alltt}\n') + self.body.append('\\begin{sphinxalltt}\n') else: ids = '' for id in self.pop_hyperlink_ids('code-block'): @@ -1989,7 +1989,7 @@ class LaTeXTranslator(nodes.NodeVisitor): raise nodes.SkipNode def depart_literal_block(self, node): - self.body.append('\n\\end{alltt}\n') + self.body.append('\n\\end{sphinxalltt}\n') self.in_parsed_literal -= 1 visit_doctest_block = visit_literal_block depart_doctest_block = depart_literal_block From 06924cc21c762dfbf46ea3584ed635d23ba463ff Mon Sep 17 00:00:00 2001 From: jfbu Date: Sat, 14 Jan 2017 23:10:21 +0100 Subject: [PATCH 02/10] More powerful parsed-literal for LaTeX output --- sphinx/texinputs/footnotehyper-sphinx.sty | 5 +++-- sphinx/texinputs/sphinx.sty | 25 +++++++++++++---------- sphinx/writers/latex.py | 15 +++++++++++--- 3 files changed, 29 insertions(+), 16 deletions(-) diff --git a/sphinx/texinputs/footnotehyper-sphinx.sty b/sphinx/texinputs/footnotehyper-sphinx.sty index a714f211d..7617ec02a 100644 --- a/sphinx/texinputs/footnotehyper-sphinx.sty +++ b/sphinx/texinputs/footnotehyper-sphinx.sty @@ -1,6 +1,6 @@ \NeedsTeXFormat{LaTeX2e} \ProvidesPackage{footnotehyper-sphinx}% - [2016/10/27 v0.9f hyperref aware footnote.sty for sphinx (JFB)] + [2017/01/14 v1.5.2 hyperref aware footnote.sty for sphinx (JFB)] %% %% Package: footnotehyper-sphinx %% Version: based on footnotehyper.sty v0.9f (2016/10/03) @@ -15,6 +15,7 @@ %% 4. \sphinxfootnotemark, and use of \spx@opt@BeforeFootnote from sphinx.sty. %% Note: with \footnotemark[N]/\footnotetext[N] syntax, hyperref %% does not insert an hyperlink. This is _not_ improved here. +%% 5. use of \sphinxunactivateextrasandspace for parsed literals %% \DeclareOption*{\PackageWarning{footnotehyper}{Option `\CurrentOption' is unknown}}% \ProcessOptions\relax @@ -92,7 +93,7 @@ %% \spx@opt@BeforeFootnote is defined in sphinx.sty \def\FNH@fixed@footnote {\spx@opt@BeforeFootnote\ifx\@currenvir\fn@footnote \expandafter\FNH@footnoteenv\else\expandafter\fn@latex@@footnote\fi }% -\def\FNH@footnoteenv {\@ifnextchar[\FNH@xfootnoteenv%] +\def\FNH@footnoteenv {\sphinxunactivateextrasandspace\@ifnextchar[\FNH@xfootnoteenv%] {\stepcounter\@mpfn \protected@xdef\@thefnmark{\thempfn}\@footnotemark \def\FNH@endfntext@next{\FNH@endfntext@link}\fn@startfntext}}% diff --git a/sphinx/texinputs/sphinx.sty b/sphinx/texinputs/sphinx.sty index dac620141..d6dfee37e 100644 --- a/sphinx/texinputs/sphinx.sty +++ b/sphinx/texinputs/sphinx.sty @@ -559,10 +559,10 @@ % \sphinxbreaksbeforeactivelist\sphinxbreaksafteractivelist\do\-}% } \newcommand*\sphinxbreaksatspaceinparsedliteral{% - \lccode`~32 \lowercase{\def~}{\leavevmode + \lccode`~32 \lowercase{\def~}{\ifmmode\@xobeysp\else\leavevmode \nobreak\hskip\z@ plus\fontdimen3\font minus\fontdimen4\font \discretionary{\copy\sphinxvisiblespacebox}{\sphinxafterbreak} - {\kern\fontdimen2\font}% + {\kern\fontdimen2\font}\fi }\lccode`\~`\~ } % now the hack for \url to work (hyperref is required dependency): @@ -573,20 +573,21 @@ }% \long\def\spx@hack@hyper@normalise@aux#1\hyper@n@rmalise#2#3\spx@undefined{% \ifx\spx@hack@hyper@normalise@aux#2% - \def\hyper@normalise - {#1\let\do\@makeother - \sphinxbreaksbeforeactivelist\sphinxbreaksafteractivelist\do\-% - \hyper@n@rmalise}% + \def\hyper@normalise{#1\sphinxunactivateextras\hyper@n@rmalise}% \else \PackageWarning{sphinx}{Could not patch \string\url\space command.% - ^^J Not using active characters in alltt environment}% - \let\do\@makeother - \sphinxbreaksbeforeactivelist\sphinxbreaksafteractivelist\do\-% + ^^J Not using extra active characters in alltt environment}% + \sphinxunactivateextras \fi }% +\newcommand*{\sphinxunactivateextras}{\let\do\@makeother + \sphinxbreaksbeforeactivelist\sphinxbreaksafteractivelist\do\-}% +\newcommand*{\sphinxunactivateextrasandspace}{\catcode13=5\catcode32=10\relax + \sphinxunactivateextras}% % now for the modified alltt environment \newenvironment{sphinxalltt} -{\begin{alltt}% +{% at start of next line to work around Emacs/AUCTeX issue with this file +\begin{alltt}% \ifspx@opt@parsedliteralwraps \sbox\sphinxcontinuationbox {\spx@opt@verbatimcontinued}% \sbox\sphinxvisiblespacebox {\spx@opt@verbatimvisiblespace}% @@ -594,8 +595,10 @@ \sphinxbreaksviaactiveinparsedliteral \sphinxbreaksatspaceinparsedliteral \spx@hack@hyper@normalise + \everymath\expandafter{\the\everymath\catcode`\^=7\catcode`\_=8 }% + \everydisplay\expandafter{\the\everydisplay\catcode`\^=7\catcode`\_=8 }% \fi } -{\end{alltt}}% \end{alltt} (<-- only to fix Emacs/AUCTeX fontification issue) +{\end{alltt}} % Topic boxes diff --git a/sphinx/writers/latex.py b/sphinx/writers/latex.py index b13c23d42..303011b86 100644 --- a/sphinx/writers/latex.py +++ b/sphinx/writers/latex.py @@ -1030,14 +1030,20 @@ class LaTeXTranslator(nodes.NodeVisitor): self.body.append('%%\n\\begin{footnotetext}[%s]' '\\sphinxAtStartFootnote\n' % node['number']) else: - self.body.append('%%\n\\begin{footnote}[%s]' - '\\sphinxAtStartFootnote\n' % node['number']) + if self.in_parsed_literal: + self.body.append('\\begin{footnote}[%s]' % node['number']) + else: + self.body.append('%%\n\\begin{footnote}[%s]' % node['number']) + self.body.append('\\sphinxAtStartFootnote\n') def depart_collected_footnote(self, node): if 'footnotetext' in node: self.body.append('%\n\\end{footnotetext}') else: - self.body.append('%\n\\end{footnote}') + if self.in_parsed_literal: + self.body.append('\\end{footnote}') + else: + self.body.append('%\n\\end{footnote}') self.in_footnote -= 1 def visit_label(self, node): @@ -1434,6 +1440,9 @@ class LaTeXTranslator(nodes.NodeVisitor): attrs = node.attributes pre = [] # in reverse order post = [] + if self.in_parsed_literal: + pre = ['\\begingroup\\sphinxunactivateextrasandspace\\relax '] + post = ['\\endgroup '] include_graphics_options = [] is_inline = self.is_inline(node) if 'width' in attrs: From c1e093c2a115414913c2760e90e98cd17f5632e3 Mon Sep 17 00:00:00 2001 From: jfbu Date: Sun, 15 Jan 2017 11:04:10 +0100 Subject: [PATCH 03/10] Fix inline math issues inside parsed-literal for LaTeX --- sphinx/texinputs/footnotehyper-sphinx.sty | 5 +-- sphinx/texinputs/sphinx.sty | 38 ++++++++++++----------- 2 files changed, 23 insertions(+), 20 deletions(-) diff --git a/sphinx/texinputs/footnotehyper-sphinx.sty b/sphinx/texinputs/footnotehyper-sphinx.sty index 7617ec02a..763ce7323 100644 --- a/sphinx/texinputs/footnotehyper-sphinx.sty +++ b/sphinx/texinputs/footnotehyper-sphinx.sty @@ -1,6 +1,6 @@ \NeedsTeXFormat{LaTeX2e} \ProvidesPackage{footnotehyper-sphinx}% - [2017/01/14 v1.5.2 hyperref aware footnote.sty for sphinx (JFB)] + [2017/01/16 v1.5.2 hyperref aware footnote.sty for sphinx (JFB)] %% %% Package: footnotehyper-sphinx %% Version: based on footnotehyper.sty v0.9f (2016/10/03) @@ -93,7 +93,8 @@ %% \spx@opt@BeforeFootnote is defined in sphinx.sty \def\FNH@fixed@footnote {\spx@opt@BeforeFootnote\ifx\@currenvir\fn@footnote \expandafter\FNH@footnoteenv\else\expandafter\fn@latex@@footnote\fi }% -\def\FNH@footnoteenv {\sphinxunactivateextrasandspace\@ifnextchar[\FNH@xfootnoteenv%] +\def\FNH@footnoteenv {\catcode13=5\sphinxunactivateextrasandspace + \@ifnextchar[\FNH@xfootnoteenv%] {\stepcounter\@mpfn \protected@xdef\@thefnmark{\thempfn}\@footnotemark \def\FNH@endfntext@next{\FNH@endfntext@link}\fn@startfntext}}% diff --git a/sphinx/texinputs/sphinx.sty b/sphinx/texinputs/sphinx.sty index d6dfee37e..a81b22085 100644 --- a/sphinx/texinputs/sphinx.sty +++ b/sphinx/texinputs/sphinx.sty @@ -6,7 +6,7 @@ % \NeedsTeXFormat{LaTeX2e}[1995/12/01] -\ProvidesPackage{sphinx}[2017/01/14 v1.5.2 LaTeX package (Sphinx markup)] +\ProvidesPackage{sphinx}[2017/01/16 v1.5.2 LaTeX package (Sphinx markup)] % we delay handling of options to after having loaded packages, because % of the need to use \definecolor. @@ -399,6 +399,7 @@ \def\sphinx@verbatim@nolig@list {\do \`}% % Some characters . , ; ? ! / are not pygmentized. % This macro makes them "active" and they will insert potential linebreaks +% In math mode, the characters are de-activated. \newcommand*\sphinxbreaksbeforeactivelist {}% none \newcommand*\sphinxbreaksafteractivelist {\do\.\do\,\do\;\do\?\do\!\do\/} \newcommand*\sphinxbreaksviaactive {% @@ -413,6 +414,15 @@ \lccode`\~`\~ } +% If the linebreak is at a space, the latter will be displayed as visible +% space at end of first line, and a continuation symbol starts next line. +% Stretch/shrink are however usually zero for typewriter font. +\def\spx@verbatim@space {% + \nobreak\hskip\z@ plus\fontdimen3\font minus\fontdimen4\font + \discretionary{\copy\sphinxvisiblespacebox}{\sphinxafterbreak} + {\kern\fontdimen2\font}% +}% + % needed to create wrapper environments of fancyvrb's Verbatim \newcommand*{\sphinxVerbatimEnvironment}{\gdef\FV@EnvironName{sphinxVerbatim}} % Sphinx <1.5 optional argument was in fact mandatory. It is now really @@ -468,14 +478,7 @@ \doublehyphendemerits\z@\finalhyphendemerits\z@ \strut ##1\strut}% }% - % If the linebreak is at a space, the latter will be displayed as visible - % space at end of first line, and a continuation symbol starts next line. - % Stretch/shrink are however usually zero for typewriter font. - \def\FV@Space {% - \nobreak\hskip\z@ plus\fontdimen3\font minus\fontdimen4\font - \discretionary{\copy\sphinxvisiblespacebox}{\sphinxafterbreak} - {\kern\fontdimen2\font}% - }% + \let\FV@Space\spx@verbatim@space % Allow breaks at special characters using \PYG... macros. \sphinxbreaksatspecials % Breaks at punctuation characters . , ; ? ! and / (needs catcode activation) @@ -559,11 +562,7 @@ % \sphinxbreaksbeforeactivelist\sphinxbreaksafteractivelist\do\-}% } \newcommand*\sphinxbreaksatspaceinparsedliteral{% - \lccode`~32 \lowercase{\def~}{\ifmmode\@xobeysp\else\leavevmode - \nobreak\hskip\z@ plus\fontdimen3\font minus\fontdimen4\font - \discretionary{\copy\sphinxvisiblespacebox}{\sphinxafterbreak} - {\kern\fontdimen2\font}\fi - }\lccode`\~`\~ + \lccode`~32 \lowercase{\let~}\spx@verbatim@space\lccode`\~`\~ } % now the hack for \url to work (hyperref is required dependency): % the aim it to deactivate - . , ; ? ! / in \url's argument @@ -573,7 +572,7 @@ }% \long\def\spx@hack@hyper@normalise@aux#1\hyper@n@rmalise#2#3\spx@undefined{% \ifx\spx@hack@hyper@normalise@aux#2% - \def\hyper@normalise{#1\sphinxunactivateextras\hyper@n@rmalise}% + \def\hyper@normalise{#1\sphinxunactivateextrasandspace\hyper@n@rmalise}% \else \PackageWarning{sphinx}{Could not patch \string\url\space command.% ^^J Not using extra active characters in alltt environment}% @@ -582,7 +581,7 @@ }% \newcommand*{\sphinxunactivateextras}{\let\do\@makeother \sphinxbreaksbeforeactivelist\sphinxbreaksafteractivelist\do\-}% -\newcommand*{\sphinxunactivateextrasandspace}{\catcode13=5\catcode32=10\relax +\newcommand*{\sphinxunactivateextrasandspace}{\catcode32=10\relax \sphinxunactivateextras}% % now for the modified alltt environment \newenvironment{sphinxalltt} @@ -595,8 +594,11 @@ \sphinxbreaksviaactiveinparsedliteral \sphinxbreaksatspaceinparsedliteral \spx@hack@hyper@normalise - \everymath\expandafter{\the\everymath\catcode`\^=7\catcode`\_=8 }% - \everydisplay\expandafter{\the\everydisplay\catcode`\^=7\catcode`\_=8 }% +% alltt takes care of the ' as derivative ("prime") in math mode + \everymath\expandafter{\the\everymath\sphinxunactivateextrasandspace + \catcode`\<=12\catcode`\>=12\catcode`\^=7\catcode`\_=8 }% + \everydisplay\expandafter{\the\everydisplay\sphinxunactivateextrasandspace + \catcode`\<=12\catcode`\>=12\catcode`\^=7\catcode`\_=8 }% \fi } {\end{alltt}} From 283fee743c04e3fe0a73d54adba11bb59d607493 Mon Sep 17 00:00:00 2001 From: jfbu Date: Mon, 16 Jan 2017 00:49:24 +0100 Subject: [PATCH 04/10] Update CHANGES for PR#3340 --- CHANGES | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/CHANGES b/CHANGES index 91f26fe35..b48632e61 100644 --- a/CHANGES +++ b/CHANGES @@ -13,6 +13,8 @@ Features added * #3194: Refer the $MAKE environment variable to determine ``make`` command * Emit warning for nested numbered toctrees (refs: #3142) * #978: `intersphinx_mapping` also allows a list as a parameter +* #3340: (LaTeX) long lines in :dudir:`parsed-literal` are wrapped like in + :rst:dir:`code-block`, inline math and footnotes are fully functional. Bugs fixed ---------- @@ -42,6 +44,15 @@ Bugs fixed (ref #3341) * #3234: intersphinx failed for encoded inventories * #3158: too much space after captions in PDF output +* #3317: An URL in parsed-literal contents gets wrongly rendered in PDF if + with hyphen +* LaTeX crash if the filename of an image inserted in :dudir:`parsed-literal` + via a substitution contains an hyphen (ref #3340) +* LaTeX rendering of inserted footnotes in :dudir:`parsed-literal` is wrong + (ref #3340) +* Inline math in :dudir:`parsed-literal` is not rendered well by LaTeX + (ref #3340) +* #3308: Parsed-literals don't wrap very long lines with pdf builder (ref #3340) Release 1.5.1 (released Dec 13, 2016) From 1498897278fdc682025e0169b818429f112996c3 Mon Sep 17 00:00:00 2001 From: Jakob Lykke Andersen Date: Mon, 16 Jan 2017 08:57:55 +0900 Subject: [PATCH 05/10] Oops, fix key error on refexplicit --- sphinx/domains/cpp.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sphinx/domains/cpp.py b/sphinx/domains/cpp.py index f6bdf9c6d..9c3ee5ed8 100644 --- a/sphinx/domains/cpp.py +++ b/sphinx/domains/cpp.py @@ -4561,7 +4561,7 @@ class CPPDomain(Domain): # Also, if it's an 'any' ref that resolves to a function, we need to add # parens as well. addParen = 0 - if not node['refexplicit'] and declaration.objectType == 'function': + if not node.get('refexplicit', False) and declaration.objectType == 'function': # this is just the normal haxing for 'any' roles if env.config.add_function_parentheses and typ == 'any': addParen += 1 From 3114c7f5a26d8cd80cfde518483ff5e1ab6f1997 Mon Sep 17 00:00:00 2001 From: jfbu Date: Mon, 16 Jan 2017 08:38:06 +0100 Subject: [PATCH 06/10] Fix extra space in CHANGES entry causing mis-interpreted mark-up --- CHANGES | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGES b/CHANGES index b48632e61..d1f4ecb38 100644 --- a/CHANGES +++ b/CHANGES @@ -45,7 +45,7 @@ Bugs fixed * #3234: intersphinx failed for encoded inventories * #3158: too much space after captions in PDF output * #3317: An URL in parsed-literal contents gets wrongly rendered in PDF if - with hyphen + with hyphen * LaTeX crash if the filename of an image inserted in :dudir:`parsed-literal` via a substitution contains an hyphen (ref #3340) * LaTeX rendering of inserted footnotes in :dudir:`parsed-literal` is wrong From b879f043bca27255762db7fad2e6cc0d18c34aef Mon Sep 17 00:00:00 2001 From: jfbu Date: Mon, 16 Jan 2017 09:03:46 +0100 Subject: [PATCH 07/10] Remove in 1.5.2 CHANGES repeated identical footnotes for same link --- CHANGES | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/CHANGES b/CHANGES index d1f4ecb38..5cc1d3aa9 100644 --- a/CHANGES +++ b/CHANGES @@ -39,19 +39,16 @@ Bugs fixed * #3335: gettext does not extract field_name of a field in a field_list * #2952: C++, fix refs to operator() functions. * Fix Unicode super- and subscript digits in :rst:dir:`code-block` and - :dudir:`parsed-literal` LaTeX output (ref #3342) -* LaTeX writer: leave ``"`` character inside :dudir:`parsed-literal` as is - (ref #3341) + parsed-literal LaTeX output (ref #3342) +* LaTeX writer: leave ``"`` character inside parsed-literal as is (ref #3341) * #3234: intersphinx failed for encoded inventories * #3158: too much space after captions in PDF output * #3317: An URL in parsed-literal contents gets wrongly rendered in PDF if with hyphen -* LaTeX crash if the filename of an image inserted in :dudir:`parsed-literal` +* LaTeX crash if the filename of an image inserted in parsed-literal via a substitution contains an hyphen (ref #3340) -* LaTeX rendering of inserted footnotes in :dudir:`parsed-literal` is wrong - (ref #3340) -* Inline math in :dudir:`parsed-literal` is not rendered well by LaTeX - (ref #3340) +* LaTeX rendering of inserted footnotes in parsed-literal is wrong (ref #3340) +* Inline math in parsed-literal is not rendered well by LaTeX (ref #3340) * #3308: Parsed-literals don't wrap very long lines with pdf builder (ref #3340) From 6f0d0ede3a957d472ba894ed036e6b08e6bf2559 Mon Sep 17 00:00:00 2001 From: jfbu Date: Mon, 16 Jan 2017 09:41:37 +0100 Subject: [PATCH 08/10] polish an item in latex.rst doc file --- doc/latex.rst | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/doc/latex.rst b/doc/latex.rst index 61f5a2a2c..466e821c4 100644 --- a/doc/latex.rst +++ b/doc/latex.rst @@ -326,9 +326,10 @@ Here are the currently available options together with their default values. (non-breakable) space. .. versionadded:: 1.5 - formerly, footnotes from explicit mark-up were - preceded by a space (hence a linebreak there was possible), but - automatically generated footnotes had no such space. + formerly, footnotes from explicit mark-up (but not automatically + generated ones) were preceded by a space in the output ``.tex`` file + hence a linebreak in PDF was possible. To avoid insertion of this space + one could use ``foo\ [#f1]`` mark-up, but this impacts all builders. ``HeaderFamily`` default ``\sffamily\bfseries``. Sets the font used by headings. From e46887b1e9799d3973124066666778cc42f6bb1a Mon Sep 17 00:00:00 2001 From: jfbu Date: Mon, 16 Jan 2017 15:15:07 +0100 Subject: [PATCH 09/10] polish latex.rst doc slightly --- doc/latex.rst | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/doc/latex.rst b/doc/latex.rst index 466e821c4..355948c4d 100644 --- a/doc/latex.rst +++ b/doc/latex.rst @@ -132,16 +132,17 @@ Here are the currently available options together with their default values. rendering by Sphinx; if in future Sphinx offers various *themes* for LaTeX, the interface may change. +.. attention:: + + LaTeX requires for keys with Boolean values to use **lowercase** ``true`` or + ``false``. + ``verbatimwithframe`` default ``true``. Boolean to specify if :rst:dir:`code-block`\ s and literal includes are framed. Setting it to ``false`` does not deactivate use of package "framed", because it is still in use for the optional background colour (see below). - .. attention:: - - LaTeX requires ``true`` or ``false`` to be specified in *lowercase*. - ``verbatimwrapslines`` default ``true``. Tells whether long lines in :rst:dir:`code-block`\ 's contents should wrap. From cf3fd3a48135ff3b405f8a2c6ea2f72d710a8107 Mon Sep 17 00:00:00 2001 From: shimizukawa Date: Tue, 17 Jan 2017 14:13:31 +0900 Subject: [PATCH 10/10] remove MANIFEST.in file entries which doesn't exist --- MANIFEST.in | 2 -- 1 file changed, 2 deletions(-) diff --git a/MANIFEST.in b/MANIFEST.in index a4f643818..6fe5c7d6d 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -5,11 +5,9 @@ include CHANGES include CHANGES.old include CONTRIBUTING.rst include EXAMPLES -include TODO include babel.cfg include Makefile -include ez_setup.py include sphinx-autogen.py include sphinx-build.py include sphinx-quickstart.py