mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Fix #2348: Move amsmath and amssymb to before fontpkg on LaTeX writer
This commit is contained in:
1
CHANGES
1
CHANGES
@@ -37,6 +37,7 @@ Bugs fixed
|
||||
* #2360: Fix numref in LaTeX output is broken
|
||||
* #2361: Fix additional paragraphs inside the "compound" directive are indented
|
||||
* #2364: Fix KeyError 'rootSymbol' on Sphinx upgrade from older version.
|
||||
* #2348: Move amsmath and amssymb to before fontpkg on LaTeX writer.
|
||||
|
||||
Documentation
|
||||
-------------
|
||||
|
||||
@@ -214,11 +214,6 @@ def number_equations(app, doctree, docname):
|
||||
node[0] = nodes.Text(num, num)
|
||||
|
||||
|
||||
def setup_amsfont(app):
|
||||
# use amsfonts if users do not configure latex_elements['amsfonts']
|
||||
app.config.latex_elements.setdefault('amsfonts', r'\usepackage{amsfonts}')
|
||||
|
||||
|
||||
def setup_math(app, htmlinlinevisitors, htmldisplayvisitors):
|
||||
app.add_config_value('math_number_all', False, 'html')
|
||||
app.add_node(math, override=True,
|
||||
@@ -243,4 +238,3 @@ def setup_math(app, htmlinlinevisitors, htmldisplayvisitors):
|
||||
app.add_role('eq', eq_role)
|
||||
app.add_directive('math', MathDirective)
|
||||
app.connect('doctree-resolved', number_equations)
|
||||
app.connect('builder-inited', setup_amsfont)
|
||||
|
||||
@@ -14,8 +14,6 @@
|
||||
\RequirePackage{fancybox}
|
||||
\RequirePackage{titlesec}
|
||||
\RequirePackage{tabulary}
|
||||
\RequirePackage{amsmath} % for \text
|
||||
\RequirePackage{amssymb} % for some symbols
|
||||
\RequirePackage{makeidx}
|
||||
\RequirePackage{framed}
|
||||
\RequirePackage{ifthen}
|
||||
|
||||
@@ -39,7 +39,7 @@ HEADER = r'''%% Generated by Sphinx.
|
||||
%(utf8extra)s
|
||||
%(cmappkg)s
|
||||
%(fontenc)s
|
||||
%(amsfonts)s
|
||||
%(amsmath)s
|
||||
%(babel)s
|
||||
%(fontpkg)s
|
||||
%(fncychap)s
|
||||
@@ -279,7 +279,7 @@ class LaTeXTranslator(nodes.NodeVisitor):
|
||||
'\\else\\fi'),
|
||||
'cmappkg': '\\usepackage{cmap}',
|
||||
'fontenc': '\\usepackage[T1]{fontenc}',
|
||||
'amsfonts': '',
|
||||
'amsmath': '\\usepackage{amsmath,amssymb}',
|
||||
'babel': '\\usepackage{babel}',
|
||||
'fontpkg': '\\usepackage{times}',
|
||||
'fncychap': '\\usepackage[Bjarne]{fncychap}',
|
||||
|
||||
Reference in New Issue
Block a user