diff --git a/sphinx/texinputs/sphinx.sty b/sphinx/texinputs/sphinx.sty index bb1cc1b75..9af98827c 100644 --- a/sphinx/texinputs/sphinx.sty +++ b/sphinx/texinputs/sphinx.sty @@ -160,7 +160,7 @@ % Support large numbered footnotes in minipage (cf. admonitions) \def\thempfootnote{\arabic{mpfootnote}} -% Preparations for SphinxVerbatim environment, which is a wrapper of fancyvrb +% Preparations for sphinxVerbatim environment, which is a wrapper of fancyvrb % Verbatim with framing allowing pagebreaks, with border and background colors % and possibly also a top caption, non separable by pagebreak. The original % fancyvrb Verbatim is still used within tables. @@ -286,7 +286,7 @@ \lccode`\~`\~ } -\newenvironment{SphinxVerbatim}[1][1]{% +\newenvironment{sphinxVerbatim}[1][1]{% % quit horizontal mode if we are still in a paragraph \par % list starts new par, but we don't want it to be set apart vertically @@ -336,7 +336,7 @@ {\kern\fontdimen2\font}% }% % go around fancyvrb's check of \@currenvir - \renewcommand*{\VerbatimEnvironment}{\gdef\FV@EnvironName{SphinxVerbatim}}% + \renewcommand*{\VerbatimEnvironment}{\gdef\FV@EnvironName{sphinxVerbatim}}% % go around fancyvrb's check of current list depth \def\@toodeep {\advance\@listdepth\@ne}% % Allow breaks at special characters using \PYG... macros. diff --git a/sphinx/writers/latex.py b/sphinx/writers/latex.py index 68073bd0b..678a8c8db 100644 --- a/sphinx/writers/latex.py +++ b/sphinx/writers/latex.py @@ -1909,11 +1909,11 @@ class LaTeXTranslator(nodes.NodeVisitor): self.table.has_verbatim = True else: hlcode = hlcode.replace('\\begin{Verbatim}', - '\\begin{SphinxVerbatim}') + '\\begin{sphinxVerbatim}') # get consistent trailer hlcode = hlcode.rstrip()[:-14] # strip \end{Verbatim} self.body.append('\n' + hlcode + '\\end{%sVerbatim}\n' % - ((not self.table) and 'Sphinx' or '')) + ((not self.table) and 'sphinx' or '')) if ids: self.body.append('\\let\\sphinxLiteralBlockLabel\empty\n') raise nodes.SkipNode diff --git a/tests/test_directive_code.py b/tests/test_directive_code.py index b53145592..fa454fb7c 100644 --- a/tests/test_directive_code.py +++ b/tests/test_directive_code.py @@ -228,11 +228,11 @@ def test_literalinclude_file_whole_of_emptyline(app, status, warning): app.builder.build_all() latex = (app.outdir / 'Python.tex').text(encoding='utf-8').replace('\r\n', '\n') includes = ( - '\\begin{SphinxVerbatim}[commandchars=\\\\\\{\\},numbers=left,firstnumber=1,stepnumber=1]\n' + '\\begin{sphinxVerbatim}[commandchars=\\\\\\{\\},numbers=left,firstnumber=1,stepnumber=1]\n' '\n' '\n' '\n' - '\\end{SphinxVerbatim}\n') + '\\end{sphinxVerbatim}\n') assert includes in latex diff --git a/tests/test_markup.py b/tests/test_markup.py index 1753acb72..b41080b86 100644 --- a/tests/test_markup.py +++ b/tests/test_markup.py @@ -140,9 +140,9 @@ def test_latex_escaping(): r'\(\Gamma\)\textbackslash{}\(\infty\)\$') # in verbatim code fragments yield (verify, u'::\n\n @Γ\\∞${}', None, - u'\\begin{SphinxVerbatim}[commandchars=\\\\\\{\\}]\n' + u'\\begin{sphinxVerbatim}[commandchars=\\\\\\{\\}]\n' u'@\\(\\Gamma\\)\\PYGZbs{}\\(\\infty\\)\\PYGZdl{}\\PYGZob{}\\PYGZcb{}\n' - u'\\end{SphinxVerbatim}') + u'\\end{sphinxVerbatim}') # in URIs yield (verify_re, u'`test `_', None, r'\\href{http://example.com/~me/}{test}.*')