mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Slight rework of latex doc
This commit is contained in:
parent
5473851e8c
commit
e81f80880a
@ -8,8 +8,8 @@ LaTeX customization
|
|||||||
.. module:: latex
|
.. module:: latex
|
||||||
:synopsis: LaTeX specifics.
|
:synopsis: LaTeX specifics.
|
||||||
|
|
||||||
The *latex* target does not benefit from pre-prepared themes like the
|
For details of the LaTeX/PDF builder command line invocation, refer to
|
||||||
*html* target does (see :doc:`theming`).
|
:py:class:`~sphinx.builders.latex.LaTeXBuilder`.
|
||||||
|
|
||||||
.. raw:: latex
|
.. raw:: latex
|
||||||
|
|
||||||
@ -34,8 +34,10 @@ The *latex* target does not benefit from pre-prepared themes like the
|
|||||||
Basic customization
|
Basic customization
|
||||||
-------------------
|
-------------------
|
||||||
|
|
||||||
It is achieved via usage of the
|
The *latex* target does not benefit from prepared themes.
|
||||||
:ref:`latex-options` as described in :doc:`config`. For example::
|
|
||||||
|
Basic customization is obtained via usage of the :ref:`latex-options`. For
|
||||||
|
example::
|
||||||
|
|
||||||
# inside conf.py
|
# inside conf.py
|
||||||
latex_engine = 'xelatex'
|
latex_engine = 'xelatex'
|
||||||
@ -69,7 +71,7 @@ repertory, and get LaTeX to import it at run time::
|
|||||||
# or, if the \ProvidesPackage LaTeX macro is used in a file mystyle.sty
|
# or, if the \ProvidesPackage LaTeX macro is used in a file mystyle.sty
|
||||||
'preamble': r'\usepackage{mystyle}',
|
'preamble': r'\usepackage{mystyle}',
|
||||||
|
|
||||||
It is needed to set appropriately :confval:`latex_additional_files`, for
|
It is then needed to set appropriately :confval:`latex_additional_files`, for
|
||||||
example::
|
example::
|
||||||
|
|
||||||
latex_additional_files = ["mystyle.sty"]
|
latex_additional_files = ["mystyle.sty"]
|
||||||
@ -79,11 +81,14 @@ example::
|
|||||||
The LaTeX style file options
|
The LaTeX style file options
|
||||||
----------------------------
|
----------------------------
|
||||||
|
|
||||||
|
Additional customization is possible via LaTeX options of the Sphinx style
|
||||||
|
file.
|
||||||
|
|
||||||
The sphinxsetup interface
|
The sphinxsetup interface
|
||||||
~~~~~~~~~~~~~~~~~~~~~~~~~
|
~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
The ``'sphinxsetup'`` key of :confval:`latex_elements` provides a convenient
|
The ``'sphinxsetup'`` key of :confval:`latex_elements` provides a convenient
|
||||||
interface to the package options of the Sphinx style file::
|
interface::
|
||||||
|
|
||||||
latex_elements = {
|
latex_elements = {
|
||||||
'sphinxsetup': 'key1=value1, key2=value2, ...',
|
'sphinxsetup': 'key1=value1, key2=value2, ...',
|
||||||
@ -103,10 +108,11 @@ inside the document preamble, like this::
|
|||||||
|
|
||||||
.. versionadded:: 1.5
|
.. versionadded:: 1.5
|
||||||
|
|
||||||
It is possible to insert further uses of the ``\sphinxsetup`` LaTeX macro
|
.. hint::
|
||||||
directly into the body of the document, via the help of the :rst:dir:`raw`
|
|
||||||
directive. This is what is done for this documentation, for local styling
|
It is possible to insert further uses of the ``\sphinxsetup`` LaTeX macro
|
||||||
of this chapter in the PDF output::
|
directly into the body of the document, via the help of the :rst:dir:`raw`
|
||||||
|
directive. Here is how this present chapter in PDF is styled::
|
||||||
|
|
||||||
.. raw:: latex
|
.. raw:: latex
|
||||||
|
|
||||||
@ -125,18 +131,16 @@ of this chapter in the PDF output::
|
|||||||
cautionBorderColor={named}{Cyan},
|
cautionBorderColor={named}{Cyan},
|
||||||
cautionBgColor={named}{LightCyan}}
|
cautionBgColor={named}{LightCyan}}
|
||||||
|
|
||||||
at the start of the chapter and::
|
at the start of the chapter and::
|
||||||
|
|
||||||
.. raw:: latex
|
.. raw:: latex
|
||||||
|
|
||||||
\endgroup
|
\endgroup
|
||||||
|
|
||||||
at its end.
|
at its end.
|
||||||
|
|
||||||
.. note::
|
The colors used in the above are provided by the ``svgnames`` option of the
|
||||||
|
"xcolor" package::
|
||||||
The colors above are made available via the ``svgnames`` option of
|
|
||||||
the "xcolor" package::
|
|
||||||
|
|
||||||
latex_elements = {
|
latex_elements = {
|
||||||
'passoptionstopackages': r'\PassOptionsToPackage{svgnames}{xcolor}',
|
'passoptionstopackages': r'\PassOptionsToPackage{svgnames}{xcolor}',
|
||||||
@ -472,7 +476,6 @@ Miscellany
|
|||||||
.. versionchanged:: 1.5
|
.. versionchanged:: 1.5
|
||||||
formerly, use of *fncychap* with other styles than ``Bjarne`` was
|
formerly, use of *fncychap* with other styles than ``Bjarne`` was
|
||||||
dysfunctional.
|
dysfunctional.
|
||||||
- check file :file:`sphinx.sty` for more...
|
|
||||||
|
|
||||||
.. hint::
|
.. hint::
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user