1. WAKAYAMA shirou
  2. sphinx

Commits

WAKAYAMA shirou  committed 91f4476

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.

  • Participants
  • Parent commits a9793de
  • Branches default

Comments (0)

Files changed (2)

File doc/config.rst

View file
  • Ignore whitespace
 
    .. 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.

File sphinx/builders/latex.py

View file
  • Ignore whitespace
                          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)
             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')