2009/6/7 Neil Puttock <n.putt...@gmail.com>: > 2009/6/5 Francisco Vila <paconet....@gmail.com>: > >> This minimal LaTeX file spits the error when I try to process it >> through lilypond-book: >> >> \documentclass{article} >> \usepackage{tikz} >> \begin{document} >> Hello >> \end{document} > > The temporary logfile this generates to determine the textwidth > includes the following line: > > \...@matrix@numberofcolumns=\count106 > > This is erroneously picked up by the regular expression which searches > for columns=[a number] here: > > 1750 m = re.search ('columns=([0-9.]*)', parameter_string) > 1751 if m: > 1752 columns = int (m.group (1)) > > The search is greedy, but it can't read `\count106' and convert it to > an integer. > > The simplest solution would be to change the regexp to the following: > > 1750 m = re.search ('columns=([0-9.]+)', parameter_string) > > This will ensure the search tries to match at least one digit directly > after the equal sign. > > Alternatively re.match could be used as a less greedy search, but I'm > not that familiar with lilypond-book and its interaction with LaTeX to > know whether this is desirable, since it would only match strings > which begin with `columns'. > > Regards, > Neil
Great! Let's do it, could you send a patch? Forwarding to -devel. -- Francisco Vila. Badajoz (Spain) www.paconet.org _______________________________________________ lilypond-devel mailing list lilypond-devel@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-devel