mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2026-11-02 20:30:30 -06:00
LaTeX: Allow to override papersize and pointsize from LaTeX themes
This commit is contained in:
1 parent
3fba1d57ec
commit
1ca0b7ab62
6 files changed
+38
-9
No files matched your search
@@ -1,4 +1,6 @@
|
||||
[theme]
|
||||
docclass = book
|
||||
wrapperclass = sphinxbook
|
||||
papersize = a4paper
|
||||
pointsize = 12pt
|
||||
toplevel_sectioning = chapter
|
||||
@@ -221,7 +221,18 @@ def test_latex_theme(app, status, warning):
|
||||
result = (app.outdir / 'python.tex').read_text(encoding='utf8')
|
||||
print(result)
|
||||
assert r'\def\sphinxdocclass{book}' in result
|
||||
assert r'\documentclass[letterpaper,10pt,english]{sphinxbook}' in result
|
||||
assert r'\documentclass[a4paper,12pt,english]{sphinxbook}' in result
|
||||
|
||||
|
||||
@pytest.mark.sphinx('latex', testroot='latex-theme',
|
||||
confoverrides={'latex_elements': {'papersize': 'b5paper',
|
||||
'pointsize': '9pt'}})
|
||||
def test_latex_theme_papersize(app, status, warning):
|
||||
app.builder.build_all()
|
||||
result = (app.outdir / 'python.tex').read_text(encoding='utf8')
|
||||
print(result)
|
||||
assert r'\def\sphinxdocclass{book}' in result
|
||||
assert r'\documentclass[b5paper,9pt,english]{sphinxbook}' in result
|
||||
|
||||
|
||||
@pytest.mark.sphinx('latex', testroot='basic', confoverrides={'language': 'zh'})
|
||||
|
||||
Reference in new issue
Block a user