mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Merge branch 'stable'
This commit is contained in:
commit
4be797ccd3
28
CHANGES
28
CHANGES
@ -41,14 +41,17 @@ Release 1.4.5 (in development)
|
||||
Features added
|
||||
--------------
|
||||
|
||||
* new config option ``latex_keep_old_macro_names``, defaults to True. If False, let macros (for text styling) be defined only with ``\sphinx``-prefixed names.
|
||||
* latex writer allows user customization of "shadowed" boxes (topics), via three length variables
|
||||
* new config option ``latex_keep_old_macro_names``, defaults to True. If False,
|
||||
let macros (for text styling) be defined only with ``\sphinx``-prefixed names.
|
||||
* latex writer allows user customization of "shadowed" boxes (topics), via
|
||||
three length variables
|
||||
|
||||
Bugs fixed
|
||||
----------
|
||||
|
||||
* #2676: (latex) Error with verbatim text in captions since Sphinx 1.4.4
|
||||
* #2629: memoir class crashes LaTeX. Fixed ``by latex_keep_old_macro_names=False`` (ref 2675)
|
||||
* #2684: `sphinx.ext.intersphinx` crashes with six-1.4.1
|
||||
|
||||
|
||||
Release 1.4.4 (released Jun 12, 2016)
|
||||
@ -67,8 +70,10 @@ Bugs fixed
|
||||
* #2351: latex crashes if enumerated lists are placed on footnotes
|
||||
* #2646: latex crashes if math contains twice empty lines
|
||||
* #2480: `sphinx.ext.autodoc`: memory addresses were shown
|
||||
* latex: allow code-blocks appearing inside lists and quotes at maximal nesting depth (ref #777, #2624, #2651)
|
||||
* #2635: Latex code directives produce inconsistent frames based on viewing resolution
|
||||
* latex: allow code-blocks appearing inside lists and quotes at maximal nesting
|
||||
depth (ref #777, #2624, #2651)
|
||||
* #2635: Latex code directives produce inconsistent frames based on viewing
|
||||
resolution
|
||||
* #2639: Sphinx now bundles iftex.sty
|
||||
* Failed to build PDF with framed.sty 0.95
|
||||
* Sphinx now bundles needspace.sty
|
||||
@ -81,15 +86,18 @@ Release 1.4.3 (released Jun 5, 2016)
|
||||
Bugs fixed
|
||||
----------
|
||||
|
||||
* #2530: got "Counter too large" error on building PDF if large numbered footnotes existed in admonitions
|
||||
* #2530: got "Counter too large" error on building PDF if large numbered
|
||||
footnotes existed in admonitions
|
||||
* ``width`` option of figure directive does not work if ``align`` option specified at same time (ref: #2595)
|
||||
* #2590: The ``inputenc`` package breaks compiling under lualatex and xelatex
|
||||
* #2540: date on latex front page use different font
|
||||
* Suppress "document isn't included in any toctree" warning if the document is included (ref: #2603)
|
||||
* #2614: Some tables in PDF output will end up shifted if user sets non zero \parindent in preamble
|
||||
* #2614: Some tables in PDF output will end up shifted if user sets non zero
|
||||
\parindent in preamble
|
||||
* #2602: URL redirection breaks the hyperlinks generated by `sphinx.ext.intersphinx`
|
||||
* #2613: Show warnings if merged extensions are loaded
|
||||
* #2619: make sure amstext LaTeX package always loaded (ref: d657225, 488ee52, 9d82cad and #2615)
|
||||
* #2619: make sure amstext LaTeX package always loaded (ref: d657225, 488ee52,
|
||||
9d82cad and #2615)
|
||||
* #2593: latex crashes if any figures in the table
|
||||
|
||||
|
||||
@ -130,7 +138,8 @@ Bugs fixed
|
||||
* #2397: Setup shorthandoff for turkish documents
|
||||
* #2447: VerbatimBorderColor wrongly used also for captions of PDF
|
||||
* #2456: C++, fix crash related to document merging (e.g., singlehtml and Latex builders).
|
||||
* #2446: latex(pdf) sets local tables of contents (or more generally topic nodes) in unbreakable boxes, causes overflow at bottom
|
||||
* #2446: latex(pdf) sets local tables of contents (or more generally topic
|
||||
nodes) in unbreakable boxes, causes overflow at bottom
|
||||
* #2476: Omit MathJax markers if :nowrap: is given
|
||||
* #2465: latex builder fails in case no caption option is provided to toctree directive
|
||||
* Sphinx crashes if self referenced toctree found
|
||||
@ -339,7 +348,8 @@ Bugs fixed
|
||||
is highlighted as Python 3 (which is mostly a superset of Python 2) if possible.
|
||||
To get the old behavior back, add ``highlight_language = "python"`` to conf.py.
|
||||
* #2329: Refresh environment forcely if source directory has changed.
|
||||
* #2331: Fix code-blocks are filled by block in dvi; remove ``xcdraw`` option from xcolor package
|
||||
* #2331: Fix code-blocks are filled by block in dvi; remove ``xcdraw`` option from
|
||||
xcolor package
|
||||
* Fix the confval type checker emits warnings if unicode is given to confvals which expects string value
|
||||
* #2360: Fix numref in LaTeX output is broken
|
||||
* #2361: Fix additional paragraphs inside the "compound" directive are indented
|
||||
|
@ -3011,10 +3011,9 @@ class DefinitionParser(object):
|
||||
self.fail('Expected ")" after "..." in '
|
||||
'parameters_and_qualifiers.')
|
||||
break
|
||||
if paramMode == 'function':
|
||||
arg = self._parse_type_with_init(outer=None, named='single')
|
||||
else:
|
||||
arg = self._parse_type(named=False)
|
||||
# note: it seems that function arguments can always sbe named,
|
||||
# even in function pointers and similar.
|
||||
arg = self._parse_type_with_init(outer=None, named='single')
|
||||
# TODO: parse default parameters # TODO: didn't we just do that?
|
||||
args.append(ASTFunctinoParameter(arg))
|
||||
|
||||
|
@ -34,7 +34,8 @@ from os import path
|
||||
import re
|
||||
|
||||
from six import iteritems, string_types
|
||||
from six.moves.urllib import parse, request
|
||||
from six.moves.urllib import request
|
||||
from six.moves.urllib.parse import urlsplit, urlunsplit
|
||||
from docutils import nodes
|
||||
from docutils.utils import relative_path
|
||||
|
||||
@ -145,7 +146,7 @@ def _strip_basic_auth(url):
|
||||
|
||||
:rtype: ``tuple``
|
||||
"""
|
||||
url_parts = parse.urlsplit(url)
|
||||
url_parts = urlsplit(url)
|
||||
username = url_parts.username
|
||||
password = url_parts.password
|
||||
frags = list(url_parts)
|
||||
@ -154,7 +155,7 @@ def _strip_basic_auth(url):
|
||||
frags[1] = "%s:%s" % (url_parts.hostname, url_parts.port)
|
||||
else:
|
||||
frags[1] = url_parts.hostname
|
||||
url = parse.urlunsplit(frags)
|
||||
url = urlunsplit(frags)
|
||||
return (url, username, password)
|
||||
|
||||
|
||||
@ -208,12 +209,12 @@ def _get_safe_url(url):
|
||||
url, username, _ = _strip_basic_auth(url)
|
||||
if username is not None:
|
||||
# case: url contained basic auth creds; obscure password
|
||||
url_parts = parse.urlsplit(url)
|
||||
url_parts = urlsplit(url)
|
||||
safe_netloc = '{0}@{1}'.format(username, url_parts.hostname)
|
||||
# replace original netloc w/ obscured version
|
||||
frags = list(url_parts)
|
||||
frags[1] = safe_netloc
|
||||
safe_url = parse.urlunsplit(frags)
|
||||
safe_url = urlunsplit(frags)
|
||||
|
||||
return safe_url
|
||||
|
||||
|
@ -8,6 +8,21 @@
|
||||
\NeedsTeXFormat{LaTeX2e}[1995/12/01]
|
||||
\ProvidesPackage{sphinx}[2016/06/10 LaTeX package (Sphinx markup)]
|
||||
|
||||
% this is the \ltx@ifundefined of ltxcmds.sty, which is loaded by
|
||||
% hyperref.sty, but we need it before, and initial ltxcmds.sty
|
||||
% as in TL2009/Debian had wrong definition.
|
||||
\newcommand{\spx@ifundefined}[1]{%
|
||||
\ifcsname #1\endcsname
|
||||
\expandafter\ifx\csname #1\endcsname\relax
|
||||
\expandafter\expandafter\expandafter\@firstoftwo
|
||||
\else
|
||||
\expandafter\expandafter\expandafter\@secondoftwo
|
||||
\fi
|
||||
\else
|
||||
\expandafter\@firstoftwo
|
||||
\fi
|
||||
}
|
||||
|
||||
\@ifclassloaded{memoir}{}{\RequirePackage{fancyhdr}}
|
||||
|
||||
% for \text macro and \iffirstchoice@ conditional even if amsmath not loaded
|
||||
@ -66,16 +81,18 @@
|
||||
|
||||
% for PDF output, use colors and maximal compression
|
||||
\newif\ifsphinxpdfoutput % used in \maketitle
|
||||
\ifx\pdfoutput\undefined\else\ifcase\pdfoutput
|
||||
\ifx\pdfoutput\undefined\else
|
||||
\ifnum\pdfoutput=\z@
|
||||
\let\py@NormalColor\relax
|
||||
\let\py@TitleColor\relax
|
||||
\else
|
||||
\else
|
||||
\sphinxpdfoutputtrue
|
||||
\input{pdfcolor}
|
||||
\def\py@NormalColor{\color[rgb]{0.0,0.0,0.0}}
|
||||
\def\py@TitleColor{\color{TitleColor}}
|
||||
\pdfcompresslevel=9
|
||||
\fi\fi
|
||||
\fi
|
||||
\fi
|
||||
|
||||
% XeLaTeX can do colors, too
|
||||
\ifx\XeTeXrevision\undefined\else
|
||||
@ -113,7 +130,7 @@
|
||||
\newcommand{\sphinxSetHeaderFamily}[1]{\renewcommand{\py@HeaderFamily}{#1}}
|
||||
|
||||
% Redefine the 'normal' header/footer style when using "fancyhdr" package:
|
||||
\@ifundefined{fancyhf}{}{
|
||||
\spx@ifundefined{fancyhf}{}{
|
||||
% Use \pagestyle{normal} as the primary pagestyle for text.
|
||||
\fancypagestyle{normal}{
|
||||
\fancyhf{}
|
||||
@ -124,9 +141,8 @@
|
||||
\renewcommand{\headrulewidth}{0.4pt}
|
||||
\renewcommand{\footrulewidth}{0.4pt}
|
||||
% define chaptermark with \@chappos when \@chappos is available for Japanese
|
||||
\ifx\@chappos\undefined\else
|
||||
\def\chaptermark##1{\markboth{\@chapapp\space\thechapter\space\@chappos\space ##1}{}}
|
||||
\fi
|
||||
\spx@ifundefined{@chappos}{}
|
||||
{\def\chaptermark##1{\markboth{\@chapapp\space\thechapter\space\@chappos\space ##1}{}}}
|
||||
}
|
||||
% Update the plain style so we get the page number & footer line,
|
||||
% but not a chapter or section title. This is to keep the first
|
||||
@ -417,7 +433,7 @@
|
||||
\newenvironment{sphinxShadowBox}
|
||||
{\def\FrameCommand {\spx@ShadowFBox }%
|
||||
% configure framed.sty not to add extra vertical spacing
|
||||
\ifdefined\OuterFrameSep \OuterFrameSep\z@skip \fi
|
||||
\spx@ifundefined{OuterFrameSep}{}{\OuterFrameSep\z@skip}%
|
||||
% the \trivlist will add the vertical spacing on top and bottom which is
|
||||
% typical of center environment as used in Sphinx <= 1.4.1
|
||||
% the \noindent has the effet of an extra blank line on top, to
|
||||
@ -533,7 +549,7 @@
|
||||
% configure framed.sty's parameters to obtain same vertical spacing
|
||||
% as for "light" boxes. We need for this to manually insert parskip glue and
|
||||
% revert a skip done by framed before the frame.
|
||||
\ifdefined\OuterFrameSep \OuterFrameSep\z@skip \fi
|
||||
\spx@ifundefined{OuterFrameSep}{}{\OuterFrameSep\z@skip}%
|
||||
\vspace{\FrameHeightAdjust}
|
||||
% copied/adapted from framed.sty's snugshade
|
||||
\def\FrameCommand##1{\hskip\@totalleftmargin
|
||||
@ -643,7 +659,7 @@
|
||||
% This sets up the fancy chapter headings that make the documents look
|
||||
% at least a little better than the usual LaTeX output.
|
||||
%
|
||||
\@ifundefined{ChTitleVar}{}{
|
||||
\spx@ifundefined{ChTitleVar}{}{
|
||||
\ChNameVar{\raggedleft\normalsize\py@HeaderFamily}
|
||||
\ChNumVar{\raggedleft \bfseries\Large\py@HeaderFamily}
|
||||
\ChTitleVar{\raggedleft \textrm{\Huge\py@HeaderFamily}}
|
||||
@ -842,11 +858,9 @@
|
||||
% Define literal-block environment
|
||||
\RequirePackage{newfloat}
|
||||
\DeclareFloatingEnvironment{literal-block}
|
||||
\ifx\c@chapter\undefined
|
||||
\SetupFloatingEnvironment{literal-block}{within=section,placement=h}
|
||||
\else
|
||||
\SetupFloatingEnvironment{literal-block}{within=chapter,placement=h}
|
||||
\fi
|
||||
\spx@ifundefined{c@chapter}
|
||||
{\SetupFloatingEnvironment{literal-block}{within=section,placement=h}}
|
||||
{\SetupFloatingEnvironment{literal-block}{within=chapter,placement=h}}
|
||||
\SetupFloatingEnvironment{literal-block}{name=List}
|
||||
% control caption around literal-block
|
||||
\RequirePackage{capt-of}
|
||||
|
@ -132,6 +132,11 @@ def test_type_definitions():
|
||||
|
||||
check('type', 'A = B', None, '1A')
|
||||
|
||||
# from breathe#267 (named function parameters for function pointers
|
||||
check('type', 'void (*gpio_callback_t)(struct device *port, uint32_t pin)',
|
||||
'gpio_callback_t', '15gpio_callback_t')
|
||||
check('type', 'void (*f)(std::function<void(int i)> g)', 'f', '1f')
|
||||
|
||||
|
||||
def test_member_definitions():
|
||||
check('member', ' const std::string & name = 42',
|
||||
|
Loading…
Reference in New Issue
Block a user