insert_tags(doc,
re.compile("(?<=[^-\s])-(?=[^-\s])"),
"dywiz",
- exclude=[DCNS("identifier.url"), DCNS("rights.license")]
+ exclude=[DCNS("identifier.url"), DCNS("rights.license"), "www"]
)
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
if customizations is not None:
root.set('customizations', u','.join(customizations))
- root.set('documentclass', documentclass)
+ root.set('documentclass', documentclass or 'wl')
# add editors info
root.set('editors', u', '.join(sorted(
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)
cwd = None
os.chdir(temp)
+ if resources:
+ os.putenv("TEXINPUTS", "::.:%s" % resources)
+
if verbose:
p = call(['xelatex', tex_path])
else: