elif package_available('morefloats', 'maxfloats=19'):
root.set('morefloats', 'new')
+ if customizations is None:
+ customizations = []
+ else:
+ customizations = list(customizations)
+
+ if book_info.endnotes:
+ customizations.append('endnotes')
+
# add customizations
if customizations is not None:
root.set('customizations', u','.join(customizations))
fix_hanging(document.edoc)
fix_tables(document.edoc)
mark_subauthors(document.edoc)
+ document.fix_pa_akap()
# wl -> TeXML
style_filename = get_stylesheet("wl2tex")
"""
if uri and provider:
- f = provider.by_uri(uri)
+ f = provider.by_slug(uri.slug)
text = f.read().decode('utf-8')
f.close()
elif wldoc is not None:
'Neither a WLDocument, nor provider and URI were provided.'
)
+ # Cyrrilic
text = re.sub(r"([\u0400-\u04ff]+)", r"<alien>\1</alien>", text)
+ # Geometric shapes.
+ text = re.sub(r"([\u25a0-\u25ff]+)", r"<alien>\1</alien>", text)
document = WLDocument.from_bytes(text.encode('utf-8'),
parse_dublincore=True, provider=provider)