*** linux/bin/lilypond-book Mon Feb 18 15:25:42 2002 --- /usr/local/bin/lilypond-book Tue Jan 8 15:18:38 2002 *************** *** 365,371 **** 'letterpaper': {12: in2pt(6)}} option_definitions = [ ! ('EXT', 'f', 'format', 'set format. EXT is one of texi, latex and pdflatex.'), ('DIM', '', 'default-music-fontsize', 'default fontsize for music. DIM is assumed to be in points'), ('DIM', '', 'default-lilypond-fontsize', 'deprecated, use --default-music-fontsize'), ('DIM', '', 'force-music-fontsize', 'force fontsize for all inline lilypond. DIM is assumed be to in points'), --- 365,371 ---- 'letterpaper': {12: in2pt(6)}} option_definitions = [ ! ('EXT', 'f', 'format', 'set format. EXT is one of texi and latex.'), ('DIM', '', 'default-music-fontsize', 'default fontsize for music. DIM is assumed to be in points'), ('DIM', '', 'default-lilypond-fontsize', 'deprecated, use --default-music-fontsize'), ('DIM', '', 'force-music-fontsize', 'force fontsize for all inline lilypond. DIM is assumed be to in points'), *************** *** 406,433 **** 'output-tex': '{\\preLilypondExample \\input %(fn)s.tex \\postLilypondExample\n}', 'pagebreak': r'\pagebreak', }, - 'pdflatex': { - 'output-lilypond-fragment' : r"""\begin[pdf,singleline,%s]{lilypond} - \context Staff < - \context Voice{ - %s - } - > - \end{lilypond}""", - 'output-filename' : r''' - - \verb+%s+:''', - 'output-lilypond': r"""\begin[%s]{lilypond} - %s - \end{lilypond}""", - 'output-verbatim': "\\begin{verbatim}%s\\end{verbatim}", - 'output-default-post': "\\def\postLilypondExample{}\n", - 'output-default-pre': "\\def\preLilypondExample{}\n", - 'usepackage-graphics': '\\usepackage{graphics}\n', - 'output-eps': '\\noindent\\parbox{\\lilypondepswidth{%(fn)s.eps}}{\includegraphics{%(fn)s.pdf}}', - 'output-tex': '{\\preLilypondExample \\input %(fn)s.pdftex \\postLilypondExample\n}', - 'pagebreak': r'\pagebreak', - }, 'texi' : {'output-lilypond': """@lilypond[%s] %s @end lilypond --- 406,411 ---- *************** *** 495,519 **** 'singleline-comment': r"(?m)^.*?(?P(?P^%.*$\n+))", 'numcols': r"(?P\\(?Pone|two)column)", }, - 'pdflatex': {'input': r'(?m)^[^%\n]*?(?P\\mbinput{?([^}\t \n}]*))', - 'include': r'(?m)^[^%\n]*?(?P\\mbinclude{(?P[^}]+)})', - '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\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}", - 'intertext': r',?\s*intertext=\".*?\"', - 'multiline-comment': no_match, - 'singleline-comment': r"(?m)^.*?(?P(?P^%.*$\n+))", - 'numcols': r"(?P\\(?Pone|two)column)", - }, # why do we have distinction between @mbinclude and @include? --- 473,478 ---- *************** *** 730,736 **** if __main__.format == 'texi': scan_texi_preamble(chunks) else: ! assert __main__.format == 'latex' or __main__.format == 'pdflatex' scan_latex_preamble(chunks) --- 689,695 ---- if __main__.format == 'texi': scan_texi_preamble(chunks) else: ! assert __main__.format == 'latex' scan_latex_preamble(chunks) *************** *** 843,849 **** return [('lilypond', m.group('code'), options)] def do_columns(m): ! if __main__.format != 'latex' and __main__.format != 'pdflatex': return [] if m.group('num') == 'one': return [('numcols', m.group('code'), 1)] --- 802,808 ---- return [('lilypond', m.group('code'), options)] def do_columns(m): ! if __main__.format != 'latex': return [] if m.group('num') == 'one': return [('numcols', m.group('code'), 1)] *************** *** 946,955 **** basename = basename + "-%i" % taken_file_names[basename] if not g_read_lys: update_file(file_body, os.path.join(g_outdir, basename) + '.ly') ! if format == 'pdflatex': ! needed_filetypes = ['pdftex'] ! else: ! needed_filetypes = ['tex'] if format == 'texi': needed_filetypes.append('eps') --- 905,911 ---- basename = basename + "-%i" % taken_file_names[basename] if not g_read_lys: update_file(file_body, os.path.join(g_outdir, basename) + '.ly') ! needed_filetypes = ['tex'] if format == 'texi': needed_filetypes.append('eps') *************** *** 968,975 **** todo = [] if 'tex' in needed_filetypes and f(pathbase, '.ly', '.tex'): todo.append('tex') - if 'pdftex' in needed_filetypes and f(pathbase, '.ly', '.pdftex'): - todo.append('pdftex') if 'eps' in needed_filetypes and f(pathbase, '.tex', '.eps'): todo.append('eps') if 'png' in needed_filetypes and f(pathbase, '.eps', '.png'): --- 924,929 ---- *************** *** 994,1006 **** if format == 'latex': if 'eps' in opts: s = 'output-eps' ! else: s = 'output-tex' ! else: ! if format == 'pdflatex': ! s = 'output-tex' ! else: # format == 'texi' ! s = 'output-all' newbody = newbody + get_output (s) % {'fn': basename } return ('lilypond', newbody, opts, todo, basename) --- 948,957 ---- if format == 'latex': if 'eps' in opts: s = 'output-eps' ! else: s = 'output-tex' ! else: # format == 'texi' ! s = 'output-all' newbody = newbody + get_output (s) % {'fn': basename } return ('lilypond', newbody, opts, todo, basename) *************** *** 1076,1085 **** #ugh if base + '.ly' not in tex: tex.append (base + '.ly') - elif e == 'pdftex': - #ugh - if base + '.ly' not in tex: - tex.append (base + '.ly') elif e == 'png' and g_do_pictures: png.append (base) d = os.getcwd() --- 1027,1032 ---- *************** *** 1099,1108 **** if g_outdir: lilyopts = lilyopts + '--dep-prefix=' + g_outdir + '/' texfiles = string.join (tex, ' ') ! if __main__.format != 'pdflatex': ! system ('lilypond --header=texidoc %s %s' % (lilyopts, texfiles)) ! else : ! system ('lilypond --header=texidoc -fpdftex %s %s' % (lilyopts, texfiles)) # # Ugh, fixing up dependencies for .tex generation --- 1046,1052 ---- if g_outdir: lilyopts = lilyopts + '--dep-prefix=' + g_outdir + '/' texfiles = string.join (tex, ' ') ! system ('lilypond --header=texidoc %s %s' % (lilyopts, texfiles)) # # Ugh, fixing up dependencies for .tex generation