X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=scripts%2Flilypond-book.py;h=4163ec4ed26b555e1eb488db2e86980fd400de51;hb=0817e0513d1016ff22a633b6fee20ddba2a062f2;hp=a2f447694d0e363be007d3c632009af75c9bf763;hpb=be6b7669873b8b227c224e9ff1e1e101c43426df;p=lilypond.git diff --git a/scripts/lilypond-book.py b/scripts/lilypond-book.py index a2f447694d..4163ec4ed2 100644 --- a/scripts/lilypond-book.py +++ b/scripts/lilypond-book.py @@ -43,7 +43,7 @@ import operator program_version = '@TOPLEVEL_VERSION@' if program_version == '@' + 'TOPLEVEL_VERSION' + '@': - program_version = '1.4pre' + program_version = '1.5.18' # # Try to cater for bad installations of LilyPond, that have @@ -188,7 +188,9 @@ class LatexPaper: elif name[-5:] == 'paper': self.m_papersize = name else: - self._set_dimen('m_geo_'+name, value) + pass + # what is _set_dimen ?? /MB + #self._set_dimen('m_geo_'+name, value) def __setattr__(self, name, value): if type(value) == type("") and \ dimension_conversion_dict.has_key (value[-2:]): @@ -418,15 +420,15 @@ def output_verbatim (body): re_dict = { 'latex': {'input': r'(?m)^[^%\n]*?(?P\\mbinput{?([^}\t \n}]*))', 'include': r'(?m)^[^%\n]*?(?P\\mbinclude{(?P[^}]+)})', - 'option-sep' : ', *', + 'option-sep' : ',\s*', 'header': r"\\documentclass\s*(\[.*?\])?", 'geometry': r"^(?m)[^%\n]*?\\usepackage\s*(\[(?P.*)\])?\s*{geometry}", 'preamble-end': r'(?P\\begin{document})', 'verbatim': r"(?s)(?P\\begin{verbatim}.*?\\end{verbatim})", 'verb': r"(?P\\verb(?P.).*?(?P=del))", - 'lilypond-file': r'(?m)^[^%\n]*?(?P\\lilypondfile(\[(?P.*?)\])?\{(?P.+)})', - 'lilypond' : r'(?m)^[^%\n]*?(?P\\lilypond(\[(?P.*?)\])?{(?P.*?)})', - 'lilypond-block': r"(?sm)^[^%\n]*?(?P\\begin(\[(?P.*?)\])?{lilypond}(?P.*?)\\end{lilypond})", + 'lilypond-file': r'(?m)^[^%\n]*?(?P\\lilypondfile\s*(\[(?P.*?)\])?\s*\{(?P.+)})', + 'lilypond' : r'(?m)^[^%\n]*?(?P\\lilypond\s*(\[(?P.*?)\])?\s*{(?P.*?)})', + 'lilypond-block': r"(?sm)^[^%\n]*?(?P\\begin\s*(\[(?P.*?)\])?\s*{lilypond}(?P.*?)\\end{lilypond})", 'def-post-re': r"\\def\\postLilypondExample", 'def-pre-re': r"\\def\\preLilypondExample", 'usepackage-graphics': r"\usepackage{graphics}", @@ -449,7 +451,7 @@ re_dict = { 'lilypond-file': '(?m)^(?!@c)(?P@lilypondfile(\[(?P.*?)\])?{(?P[^}]+)})', 'lilypond' : '(?m)^(?!@c)(?P@lilypond(\[(?P.*?)\])?{(?P.*?)})', 'lilypond-block': r"""(?m)^(?!@c)(?P(?s)(?P@lilypond(\[(?P.*?)\])?\s(?P.*?)@end lilypond\s))""", - 'option-sep' : ', *', + 'option-sep' : ',\s*', 'intertext': r',?\s*intertext=\".*?\"', 'multiline-comment': r"(?sm)^\s*(?!@c\s+)(?P@ignore\s.*?@end ignore)\s", 'singleline-comment': r"(?m)^.*?(?P(?P@c.*$\n+))",