X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=python%2Fbook_latex.py;h=f2aa5e36cf6106e2c427fe30465bf9c1d446be6f;hb=21c9f487462d40436299a4e3a1e3289a1bc4bf15;hp=591de34eea79f470d1594b8fd8cd7c627ffe2b1e;hpb=a272dc9691c6663e4a2b59d0baa9d209b95c1c41;p=lilypond.git diff --git a/python/book_latex.py b/python/book_latex.py index 591de34eea..f2aa5e36cf 100644 --- a/python/book_latex.py +++ b/python/book_latex.py @@ -125,14 +125,15 @@ Latex_output = { \expandafter\preLilyPondExample \fi \def\lilypondbook{}%% -\input %(base)s-systems.tex +\input{%(base)s-systems.tex} \ifx\postLilyPondExample \undefined \else \expandafter\postLilyPondExample \fi }''', - PRINTFILENAME: '''\\texttt{%(filename)s} + PRINTFILENAME: r'''\texttt{%(filename)s} +\linebreak ''', QUOTE: r'''\begin{quote} @@ -297,8 +298,11 @@ class BookLatexOutputFormat (BookBase.BookOutputFormat): def snippet_output (self, basename, snippet): str = '' rep = snippet.get_replacements (); - rep['base'] = basename - str += self.output_print_filename (basename, snippet) + rep['base'] = basename.replace ('\\', '/') + rep['filename'] = os.path.basename (snippet.filename).replace ('\\', '/') + rep['ext'] = snippet.ext + if PRINTFILENAME in snippet.option_dict: + str += self.output[PRINTFILENAME] % rep if VERBATIM in snippet.option_dict: rep['verb'] = snippet.verb_ly () str += self.output[VERBATIM] % rep