X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;ds=sidebyside;f=python%2Fbook_latex.py;h=f2aa5e36cf6106e2c427fe30465bf9c1d446be6f;hb=37082ba067de04d1892a514df2e08f34b91829ac;hp=591de34eea79f470d1594b8fd8cd7c627ffe2b1e;hpb=706b1bf8f6eed212eb1314641148ecea950623e8;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