From 53307f88fcceedceb3f2b66fc05020f65e654ac6 Mon Sep 17 00:00:00 2001 From: Elena ``of Valhalla'' Grandi Date: Thu, 21 Apr 2011 18:01:59 +0200 Subject: template per la generazione del file LaTeX --- make_guides.py | 9 +++++---- tools/booklet-A6.template.tex | 15 +++++++++++++++ 2 files changed, 20 insertions(+), 4 deletions(-) create mode 100644 tools/booklet-A6.template.tex diff --git a/make_guides.py b/make_guides.py index d46ba13..79184c7 100755 --- a/make_guides.py +++ b/make_guides.py @@ -59,14 +59,15 @@ def build_latex(guide): fp.close() if not os.path.isdir(build_dir): os.mkdir(build_dir) - fp = open(os.path.join(build_dir,tex_name),'wt') + fp = open(os.path.join(build_dir,tex_name),'wb') + print(tools_dir) fp.write(docutils.core.publish_string(source, writer_name='latex', - settings_overrides={'language': 'it', + settings_overrides={'language_code': 'it', 'documentoptions': 'a6paper,twoside', 'stylesheet': 'lmodern', - 'hyperlink-color': '0', - 'output_encoding': 'unicode'})) + 'template': os.path.join(tools_dir,'booklet-A6.template.tex'), + 'hyperlink-color': '0'})) fp.close() def build_pdf(guide): diff --git a/tools/booklet-A6.template.tex b/tools/booklet-A6.template.tex new file mode 100644 index 0000000..8fea814 --- /dev/null +++ b/tools/booklet-A6.template.tex @@ -0,0 +1,15 @@ +% generated by Docutils +$head_prefix\usepackage[inner=14mm,outer=14mm,top=14mm,bottom=14mm]{geometry} +\usepackage{fixltx2e} % LaTeX patches, \textsubscript +\usepackage{cmap} % fix search and cut-and-paste in PDF +$requirements +%%% Custom LaTeX preamble +$latex_preamble +%%% User specified packages and stylesheets +$stylesheet +%%% Fallback definitions for Docutils-specific commands +$fallbacks$pdfsetup +%%% Body +\begin{document} +$body_pre_docinfo$docinfo$dedication$abstract$body +\end{document} -- cgit v1.2.3