X-Git-Url: https://git.mdrn.pl/librarian.git/blobdiff_plain/75abfdc7e8f14937b825a1502bb564fe2063ced4..f364038620aeb73b553191696c561107906d9f79:/librarian/pdf.py diff --git a/librarian/pdf.py b/librarian/pdf.py index 793c9b8..a5c4253 100644 --- a/librarian/pdf.py +++ b/librarian/pdf.py @@ -185,7 +185,7 @@ def package_available(package, args='', verbose=False): def transform(wldoc, verbose=False, save_tex=None, save_texml=None, morefloats=None, - cover=None, flags=None, customizations=None, documentclass='wl', resources=None): + cover=None, cover_file=None, flags=None, customizations=None, documentclass='wl', resources=None): """ produces a PDF file with XeLaTeX wldoc: a WLDocument @@ -276,6 +276,7 @@ def transform(wldoc, verbose=False, save_tex=None, save_texml=None, morefloats=N shutil.copy(get_resource('pdf/wl.cls'), temp) shutil.copy(get_resource('pdf/wlpub.cls'), temp) shutil.copy(get_resource('res/wl-logo.png'), temp) + shutil.copy(get_resource('res/cover.jpg'), temp) if resources: copy_tree(resources, temp) @@ -285,6 +286,9 @@ def transform(wldoc, verbose=False, save_tex=None, save_texml=None, morefloats=N cwd = None os.chdir(temp) + if resources: + os.putenv("TEXINPUTS", "::.:%s" % resources) + if verbose: p = call(['xelatex', tex_path]) else: