mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
move "copy additional files" after "copying TeX support files" in latex builder.
It enables the user to override TeX support files such as sphinx.sty by setting latex_additional_files.
This commit is contained in:
parent
35c44b63fb
commit
8bec3b8777
@ -1147,6 +1147,9 @@ These options influence LaTeX output.
|
||||
|
||||
.. versionadded:: 0.6
|
||||
|
||||
.. versionchanged:: 1.1.3
|
||||
This overrides the files which is provided from Sphinx such as sphinx.sty.
|
||||
|
||||
.. confval:: latex_preamble
|
||||
|
||||
Additional LaTeX markup for the preamble.
|
||||
|
@ -157,6 +157,14 @@ class LaTeXBuilder(Builder):
|
||||
path.join(self.outdir, dest))
|
||||
self.info()
|
||||
|
||||
# copy TeX support files from texinputs
|
||||
self.info(bold('copying TeX support files...'))
|
||||
staticdirname = path.join(package_dir, 'texinputs')
|
||||
for filename in os.listdir(staticdirname):
|
||||
if not filename.startswith('.'):
|
||||
copyfile(path.join(staticdirname, filename),
|
||||
path.join(self.outdir, filename))
|
||||
|
||||
# copy additional files
|
||||
if self.config.latex_additional_files:
|
||||
self.info(bold('copying additional files...'), nonl=1)
|
||||
@ -171,11 +179,4 @@ class LaTeXBuilder(Builder):
|
||||
logobase = path.basename(self.config.latex_logo)
|
||||
copyfile(path.join(self.confdir, self.config.latex_logo),
|
||||
path.join(self.outdir, logobase))
|
||||
|
||||
self.info(bold('copying TeX support files... '), nonl=True)
|
||||
staticdirname = path.join(package_dir, 'texinputs')
|
||||
for filename in os.listdir(staticdirname):
|
||||
if not filename.startswith('.'):
|
||||
copyfile(path.join(staticdirname, filename),
|
||||
path.join(self.outdir, filename))
|
||||
self.info('done')
|
||||
|
Loading…
Reference in New Issue
Block a user