X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=python%2Fbook_latex.py;h=f2aa5e36cf6106e2c427fe30465bf9c1d446be6f;hb=37082ba067de04d1892a514df2e08f34b91829ac;hp=be7c4e18830c2b10a014c6f61e0a635c10ea7865;hpb=7488b4ec5c3042b30b106cbf77186117def9c934;p=lilypond.git diff --git a/python/book_latex.py b/python/book_latex.py index be7c4e1883..f2aa5e36cf 100644 --- a/python/book_latex.py +++ b/python/book_latex.py @@ -132,7 +132,8 @@ Latex_output = { \fi }''', - PRINTFILENAME: '''\\texttt{%(filename)s} + PRINTFILENAME: r'''\texttt{%(filename)s} +\linebreak ''', QUOTE: r'''\begin{quote} @@ -298,7 +299,10 @@ class BookLatexOutputFormat (BookBase.BookOutputFormat): str = '' rep = snippet.get_replacements (); rep['base'] = basename.replace ('\\', '/') - str += self.output_print_filename (basename, snippet) + 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