mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
rename `'sphinxpackageoptions' to 'sphinxsetup'`
This commit is contained in:
@@ -1695,7 +1695,7 @@ These options influence LaTeX output. See further :doc:`latex`.
|
|||||||
to use ``'47363sp'``. To obtain ``72px=1in``, use ``'1bp'``.
|
to use ``'47363sp'``. To obtain ``72px=1in``, use ``'1bp'``.
|
||||||
|
|
||||||
.. versionadded:: 1.5
|
.. versionadded:: 1.5
|
||||||
``'sphinxpackageoptions'``
|
``'sphinxsetup'``
|
||||||
A comma separated list of ``key=value`` package options for the Sphinx
|
A comma separated list of ``key=value`` package options for the Sphinx
|
||||||
LaTeX style, default empty. See :doc:`latex`.
|
LaTeX style, default empty. See :doc:`latex`.
|
||||||
|
|
||||||
|
|||||||
@@ -78,7 +78,7 @@ configured, for example::
|
|||||||
The Sphinx LaTeX style package options
|
The Sphinx LaTeX style package options
|
||||||
--------------------------------------
|
--------------------------------------
|
||||||
|
|
||||||
The ``'sphinxpackageoptions'`` key to :confval:`latex_elements` provides a
|
The ``'sphinxsetup'`` key to :confval:`latex_elements` provides a
|
||||||
more convenient interface to various style parameters. It is a comma separated
|
more convenient interface to various style parameters. It is a comma separated
|
||||||
string of ``key=value`` instructions::
|
string of ``key=value`` instructions::
|
||||||
|
|
||||||
@@ -99,10 +99,10 @@ If non-empty, it will be passed as argument to the ``\sphinxsetup`` command::
|
|||||||
- Most options described next could also have been positioned as
|
- Most options described next could also have been positioned as
|
||||||
:file:`sphinx.sty` package options. But for those where the key value
|
:file:`sphinx.sty` package options. But for those where the key value
|
||||||
contains some LaTeX code the use of ``\sphinxsetup`` is mandatory. Hence
|
contains some LaTeX code the use of ``\sphinxsetup`` is mandatory. Hence
|
||||||
the whole ``'sphinxpackageoptions'`` string is passed as argument to
|
the whole ``'sphinxsetup'`` string is passed as argument to
|
||||||
``\sphinxsetup``.
|
``\sphinxsetup``.
|
||||||
|
|
||||||
- As an alternative to the ``'sphinxpackageoptions'`` key, it is possibly
|
- As an alternative to the ``'sphinxsetup'`` key, it is possibly
|
||||||
to insert explicitely the ``\\sphinxsetup{key=value,..}`` inside the
|
to insert explicitely the ``\\sphinxsetup{key=value,..}`` inside the
|
||||||
``'preamble'`` key. It is even possible to use the ``\sphinxsetup`` in
|
``'preamble'`` key. It is even possible to use the ``\sphinxsetup`` in
|
||||||
the body of the document, via the :rst:dir:`raw` directive, to modify
|
the body of the document, via the :rst:dir:`raw` directive, to modify
|
||||||
@@ -355,7 +355,7 @@ Let us now list some macros from the package file
|
|||||||
English is the document language). Their default definitions use either the
|
English is the document language). Their default definitions use either the
|
||||||
*sphinxheavybox* (for the first listed directives) or the *sphinxlightbox*
|
*sphinxheavybox* (for the first listed directives) or the *sphinxlightbox*
|
||||||
environments, configured to use the parameters (colours, border thickness)
|
environments, configured to use the parameters (colours, border thickness)
|
||||||
specific to each type, which can be set via ``'sphinxpackageoptions'`` string.
|
specific to each type, which can be set via ``'sphinxsetup'`` string.
|
||||||
|
|
||||||
.. versionchanged:: 1.5
|
.. versionchanged:: 1.5
|
||||||
use of public environment names, separate customizability of the parameters.
|
use of public environment names, separate customizability of the parameters.
|
||||||
|
|||||||
@@ -54,7 +54,6 @@ DEFAULT_SETTINGS = {
|
|||||||
'extraclassoptions': '',
|
'extraclassoptions': '',
|
||||||
'maxlistdepth': '',
|
'maxlistdepth': '',
|
||||||
'sphinxpkgoptions': '',
|
'sphinxpkgoptions': '',
|
||||||
'sphinxpackageoptions': '',
|
|
||||||
'sphinxsetup': '',
|
'sphinxsetup': '',
|
||||||
'passoptionstopackages': '',
|
'passoptionstopackages': '',
|
||||||
'geometry': ('\\usepackage[margin=1in,marginparwidth=0.5in]'
|
'geometry': ('\\usepackage[margin=1in,marginparwidth=0.5in]'
|
||||||
@@ -474,9 +473,9 @@ class LaTeXTranslator(nodes.NodeVisitor):
|
|||||||
if self.elements['sphinxpkgoptions']:
|
if self.elements['sphinxpkgoptions']:
|
||||||
self.elements['sphinxpkgoptions'] = ('[%s]' %
|
self.elements['sphinxpkgoptions'] = ('[%s]' %
|
||||||
self.elements['sphinxpkgoptions'])
|
self.elements['sphinxpkgoptions'])
|
||||||
if self.elements['sphinxpackageoptions']:
|
if self.elements['sphinxsetup']:
|
||||||
self.elements['sphinxsetup'] = ('\\sphinxsetup{%s}' %
|
self.elements['sphinxsetup'] = ('\\sphinxsetup{%s}' %
|
||||||
self.elements['sphinxpackageoptions'])
|
self.elements['sphinxsetup'])
|
||||||
if self.elements['extraclassoptions']:
|
if self.elements['extraclassoptions']:
|
||||||
self.elements['classoptions'] += ',' + \
|
self.elements['classoptions'] += ',' + \
|
||||||
self.elements['extraclassoptions']
|
self.elements['extraclassoptions']
|
||||||
|
|||||||
Reference in New Issue
Block a user