X-Git-Url: https://git.mdrn.pl/librarian.git/blobdiff_plain/fe8e5b5e224d32baebbdaa2fecf4a847ed4e5354..e7471348f9839fec053b6ccbf3c6c8a2b06fe8aa:/librarian/pdf.py diff --git a/librarian/pdf.py b/librarian/pdf.py index 9308704..03879fe 100644 --- a/librarian/pdf.py +++ b/librarian/pdf.py @@ -175,7 +175,7 @@ def package_available(package, args='', verbose=False): def load_including_children(wldoc=None, provider=None, uri=None): """ Makes one big xml file with children inserted at end. - + Either wldoc or provider and URI must be provided. """ @@ -203,7 +203,7 @@ def load_including_children(wldoc=None, provider=None, uri=None): class PDFFormat(Format): """ Base PDF format. - + Available customization: nofootnotes: Doesn't do footnotes. nothemes: Doesn't do themes. @@ -265,6 +265,9 @@ class PDFFormat(Format): # Copy style shutil.copy(get_resource('pdf/wl.cls'), temp) shutil.copy(self.style, os.path.join(temp, 'style.sty')) + #for sfile in ['wasysym.sty', 'uwasyvar.fd', 'uwasy.fd']: + # shutil.copy(get_resource(os.path.join('res/wasysym', sfile)), temp) + # Save attachments if self.cover: self.cover.for_pdf().dump_to(os.path.join(temp, 'makecover.sty')) @@ -287,7 +290,7 @@ class PDFFormat(Format): p = call(['xelatex', '-interaction=batchmode', tex_path], stdout=PIPE, stderr=PIPE) if p: - raise ParseError("Error parsing .tex file") + raise ParseError("Error parsing .tex file: %s" % tex_path) if cwd is not None: os.chdir(cwd) @@ -303,7 +306,7 @@ class PDFFormat(Format): """ self.verbose = verbose self.save_tex = save_tex - + if morefloats is None and package_available('morefloats', 'maxfloats=19'): morefloats = 'new' self.morefloats = morefloats