From 179b6843c60745bc2a18a8a465629442c4452df8 Mon Sep 17 00:00:00 2001 From: Leonardo Robol Date: Fri, 15 May 2009 18:10:42 +0200 Subject: [PATCH] =?UTF-8?q?L'esportazione=20in=20latex=20ora=20=C3=A8=20fu?= =?UTF-8?q?nzionante,=20ma=20ancora=20ignora=20le=20opzioni=20che=20l'uten?= =?UTF-8?q?te=20ha=20impostato?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- latex_manager.py | 24 ++++++++++++++++++++++++ songbook-editor.py | 3 ++- 2 files changed, 26 insertions(+), 1 deletion(-) diff --git a/latex_manager.py b/latex_manager.py index 13ed9d8..b12418b 100644 --- a/latex_manager.py +++ b/latex_manager.py @@ -74,11 +74,35 @@ class latex_manager(): buf = unicode() # TODO: Latex code to compile the songbook + # Document class + buf += "\documentclass[10pt,a5paper,twoside]{book}\n" + + # Packages + buf += "\usepackage[a5paper,chordbk]{songbook}\n" + buf += "\usepackage[utf8x]{inputenc}\n" + buf += "\usepackage{makeidx}\n" + buf += "\n\n" + + # Index generation + buf += "\MakeTitleIndex\n" + buf += "\MakeTitleContents\n" + buf += "\MakeKeyIndex\n" + buf += "\makeindex\n" + buf += "\n\n" + + # Document begins + buf += "\\begin{document}\n\n" for song in song_list: buf += "\n\n" # Put some space between songs buf += "% Canzone:" + song.title + "\n\n" buf += self.create_song(song) + + # The Index + buf += "\printindex\n" + + # Document ends + buf += "\end{document}\n\n" # Give buffer back to be printed return buf diff --git a/songbook-editor.py b/songbook-editor.py index 5624598..174f7de 100755 --- a/songbook-editor.py +++ b/songbook-editor.py @@ -251,7 +251,8 @@ class interface(QtGui.QMainWindow): self.opt["type"] = "tc" ## tc = text and chords, c = only chords, s = slide - +# This class manage the Dialog that prompt the user for +# common options... class option_interface(QtGui.QWidget): def __init__(self, parent=None): super(option_interface,self).__init__(parent) -- 2.1.4