fnp
/
librarian.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
set 5pt page margin instead of oversized 2em book margin
[librarian.git]
/
librarian
/
pdf.py
diff --git
a/librarian/pdf.py
b/librarian/pdf.py
index
c899afa
..
246fd0c
100644
(file)
--- a/
librarian/pdf.py
+++ b/
librarian/pdf.py
@@
-199,7
+199,7
@@
def package_available(package, args='', verbose=False):
def transform(wldoc, verbose=False, save_tex=None, morefloats=None,
def transform(wldoc, verbose=False, save_tex=None, morefloats=None,
- cover=None, flags=None, customizations=None):
+ cover=None, flags=None, customizations=None
, ilustr_path=''
):
""" produces a PDF file with XeLaTeX
wldoc: a WLDocument
""" produces a PDF file with XeLaTeX
wldoc: a WLDocument
@@
-268,6
+268,9
@@
def transform(wldoc, verbose=False, save_tex=None, morefloats=None,
# TeXML -> LaTeX
temp = mkdtemp('-wl2pdf')
# TeXML -> LaTeX
temp = mkdtemp('-wl2pdf')
+ for ilustr in document.edoc.findall("//ilustr"):
+ shutil.copy(os.path.join(ilustr_path, ilustr.get("src")), temp)
+
for sponsor in book_info.sponsors:
ins = etree.Element("data-sponsor", name=sponsor)
logo = sponsor_logo(sponsor)
for sponsor in book_info.sponsors:
ins = etree.Element("data-sponsor", name=sponsor)
logo = sponsor_logo(sponsor)