mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2026-09-03 20:52:55 -05:00
Fix #2245: Add `latex_elements["passoptionstopackages"]` option to call PassOptionsToPackages in early stage of preambles
This commit is contained in:
@@ -10,6 +10,8 @@ Features added
|
||||
longtables.
|
||||
* Select an image by similarity if multiple images are globbed by ``.. image:: filename.*``
|
||||
* #1921: Support figure substitutions by :confval:`language` and :confval:`figure_language_filename`
|
||||
* #2245: Add ``latex_elements["passoptionstopackages"]`` option to call PassOptionsToPackages
|
||||
in early stage of preambles.
|
||||
|
||||
Bugs fixed
|
||||
----------
|
||||
|
||||
@@ -1545,6 +1545,10 @@ These options influence LaTeX output.
|
||||
the "Bjarne" style uses numbers spelled out in English). Other
|
||||
"fncychap" styles you can try include "Lenny", "Glenn", "Conny" and
|
||||
"Rejne". You can also set this to ``''`` to disable fncychap.
|
||||
``'passoptionstopackages'``
|
||||
"PassOptionsToPackage" call, default empty.
|
||||
|
||||
.. versionadded:: 1.4
|
||||
``'preamble'``
|
||||
Additional preamble content, default empty.
|
||||
``'figure_align'``
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
%The xcolor package draws better fcolorboxes
|
||||
%around verbatim code
|
||||
\IfFileExists{xcolor.sty}{
|
||||
\RequirePackage[xcdraw]{xcolor}
|
||||
\RequirePackage{xcolor}
|
||||
}{
|
||||
\RequirePackage{color}
|
||||
}
|
||||
|
||||
@@ -34,6 +34,7 @@ from sphinx.util.smartypants import educate_quotes_latex
|
||||
HEADER = r'''%% Generated by Sphinx.
|
||||
\def\sphinxdocclass{%(docclass)s}
|
||||
\documentclass[%(papersize)s,%(pointsize)s%(classoptions)s]{%(wrapperclass)s}
|
||||
%(passoptionstopackages)s
|
||||
%(inputenc)s
|
||||
%(utf8extra)s
|
||||
%(cmappkg)s
|
||||
@@ -271,6 +272,7 @@ class LaTeXTranslator(nodes.NodeVisitor):
|
||||
'pointsize': '10pt',
|
||||
'classoptions': '',
|
||||
'extraclassoptions': '',
|
||||
'passoptionstopackages': '',
|
||||
'inputenc': '\\usepackage[utf8]{inputenc}',
|
||||
'utf8extra': ('\\ifdefined\\DeclareUnicodeCharacter\n'
|
||||
' \\DeclareUnicodeCharacter{00A0}{\\nobreakspace}\n'
|
||||
|
||||
Reference in New Issue
Block a user