global re;re = ly.re
# lilylib globals
-program_name = 'lilypond'
+program_name = os.path.split (sys.argv[0])[1]
program_version = '@TOPLEVEL_VERSION@'
# input without \book, use classic latex definitions
classic_p = 0
#junkme?
('', '', 'no-lily', _ ("don't run LilyPond")),
#junkme?
- ('', 'm', 'no-paper', _ ("produce MIDI output only")),
+ ('', 'm', 'no-layout', _ ("produce MIDI output only")),
- (_ ("FILE"), 'o', 'output', _ ("write output to FILE")),
+ (_ ("FILE"), 'o', 'output', _ ("write output to FILE (suffix will be added)")),
(_ ('RES'), '', 'preview-resolution',
_ ("set the resolution of the preview to RES")),
('', 'p', 'pdf', _ ("generate PDF output")),
if '@bindir@' == ('@' + 'bindir@') or not os.path.exists (lilypond_binary):
lilypond_binary = 'lilypond'
+lilypond_binary += ' --format=tex '
## Init to empty; values here take precedence over values in the file
extra_init = {
header_fields = extra_init.keys ()
include_path = ['.']
-paper_p = 1
+layout_p = 1
output_name = ''
## UGHr
if pseudo_filter_p:
opts += ' --output=lelie'
- if paper_p:
+ if layout_p:
opts += ' ' + string.join (map (lambda x : '--header=' + x,
header_fields))
else:
- opts = opts + ' --no-paper'
+ opts = opts + ' --no-layout'
if safe_mode_p:
opts = opts + ' --safe-mode'
# search only the first 10k
s = s[:10240]
for x in header_fields:
- m = re.search (r'\\def\\lilypondpaper%s{([^}]*)}' % x, s)
+ m = re.search (r'\\def\\lilypondlayout%s{([^}]*)}' % x, s)
if m:
set_setting (extra, x, m.group (1))
targets.append ('PNG')
elif o == '--preview-resolution':
preview_resolution = string.atoi (a)
- elif o == '--no-paper' or o == '-m':
+ elif o == '--no-layout' or o == '-m':
targets = ['MIDI']
- paper_p = 0
+ layout_p = 0
elif o == '--output' or o == '-o':
output_name = a
elif o == '--safe-mode' or o == '-s':