Merge branch 'usegeometrypackage'

This commit is contained in:
jfbu 2016-10-10 20:55:44 +02:00
commit 861973bfbb
5 changed files with 10 additions and 19 deletions

View File

@ -1675,6 +1675,12 @@ These options influence LaTeX output. See further :doc:`latex`.
example ``100px=1in``, one can use ``'0.01in'`` but it is more precise
to use ``'47363sp'``. To obtain ``72px=1in``, use ``'1bp'``.
.. versionadded:: 1.5
``'geometry'``
"geometry" package inclusion, the default definition is:
``'\\usepackage[margin=1in,marginparwidth=0.5in]{geometry}'``.
.. versionadded:: 1.5
``'babel'``
"babel" package inclusion, default ``'\\usepackage{babel}'``.

View File

@ -6,6 +6,7 @@
\let\sphinxpxdimen\pdfpxdimen\else\newdimen\sphinxpxdimen
\fi \sphinxpxdimen=<%= pxunit %>\relax
<%= passoptionstopackages %>
<%= geometry %>
<%= inputenc %>
<%= utf8extra %>
<%= cmappkg %>

View File

@ -102,24 +102,6 @@
\def\py@TitleColor{\color{TitleColor}}
\fi
% Increase printable page size (copied from fullpage.sty)
\topmargin 0pt
\advance \topmargin by -\headheight
\advance \topmargin by -\headsep
% attempt to work a little better for A4 users
\textheight \paperheight
\advance\textheight by -2in
\oddsidemargin 0pt
\evensidemargin 0pt
%\evensidemargin -.25in % for ``manual size'' documents
\marginparwidth 0.5in
\textwidth \paperwidth
\advance\textwidth by -2in
% Style parameters and macros used by most documents here
\raggedbottom
\sloppy

View File

@ -265,6 +265,8 @@ class LaTeXTranslator(nodes.NodeVisitor):
'classoptions': '',
'extraclassoptions': '',
'passoptionstopackages': '',
'geometry': '\\usepackage[margin=1in,marginparwidth=0.5in]'
'{geometry}',
'inputenc': '',
'utf8extra': ('\\ifdefined\\DeclareUnicodeCharacter\n'
' \\DeclareUnicodeCharacter{00A0}{\\nobreakspace}\n'

View File

@ -28,7 +28,7 @@ from test_build_html import ENV_WARNINGS
LATEX_ENGINES = ['pdflatex', 'lualatex', 'xelatex']
DOCCLASSES = ['howto', 'manual']
STYLEFILES = ['article.sty', 'fancyhdr.sty', 'titlesec.sty', 'amsmath.sty', 'framed.sty',
'color.sty', 'fancyvrb.sty', 'fncychap.sty', 'threeparttable.sty']
'color.sty', 'fancyvrb.sty', 'threeparttable.sty', 'geometry.sty']
LATEX_WARNINGS = ENV_WARNINGS + """\
%(root)s/index.rst:\\d+: WARNING: unknown option: &option