Skip to content

Commit 4469731

Browse files
pushfoocspotcode
authored andcommitted
Update paper size variable names for clarity
1 parent 0b6039d commit 4469731

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

doc/make.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -12,21 +12,21 @@
1212
SPHINXOPTS = []
1313
SPHINXBUILD = "sphinx-build"
1414
SPHINXAUTOBUILD = "sphinx-autobuild"
15-
PAPER = None
15+
PAPER_SIZE = None
1616
BUILDDIR = "build"
1717

1818

1919
# Internal variables.
20-
PAPEROPTS = {}
21-
PAPEROPTS[None] = []
22-
PAPEROPTS['a4'] = ['-D', 'latex_paper_size=a4']
23-
PAPEROPTS['letter'] = ['-D', 'latex_paper_size=letter']
24-
ALLSPHINXOPTS = ['-d', f'{BUILDDIR}/doctrees', *PAPEROPTS[PAPER], *SPHINXOPTS, '.']
20+
PAPER_SIZE_OPTS = {}
21+
PAPER_SIZE_OPTS[None] = []
22+
PAPER_SIZE_OPTS['a4'] = ['-D', 'latex_paper_size=a4']
23+
PAPER_SIZE_OPTS['letter'] = ['-D', 'latex_paper_size=letter']
24+
ALLSPHINXOPTS = ['-d', f'{BUILDDIR}/doctrees', *PAPER_SIZE_OPTS[PAPER_SIZE], *SPHINXOPTS, '.']
2525
SPHINXAUTOBUILDOPTS = ['--watch', '../arcade']
2626

2727
# Important: the i18n builder cannot share the environment and doctrees with the others
2828
# This allows for internationalization / localization of doc.
29-
I18NSPHINXOPTS = [*PAPEROPTS[PAPER], *SPHINXOPTS, '.']
29+
I18NSPHINXOPTS = [*PAPER_SIZE_OPTS[PAPER_SIZE], *SPHINXOPTS, '.']
3030

3131

3232
# Change dirs into root arcade project folder
@@ -197,7 +197,7 @@ def epub():
197197
@app.command()
198198
def latex():
199199
"""
200-
to make LaTeX files, you can set PAPER=a4 or PAPER=letter
200+
to make LaTeX files, you can set PAPER_SIZE=a4 or PAPER_SIZE=letter
201201
"""
202202
run([SPHINXBUILD, "-b", "latex", *ALLSPHINXOPTS, f"{BUILDDIR}/latex"])
203203
print()

0 commit comments

Comments
 (0)