TEXIDOC = 'texidoc'
TEXINFO = 'texinfo'
VERBATIM = 'verbatim'
+FONTLOAD = 'fontload'
+
# NOTIME has no opposite so it isn't part of this dictionary.
# NOQUOTE is used internally only.
NOINDENT,
PRINTFILENAME,
TEXIDOC,
- VERBATIM
+ VERBATIM,
+ FONTLOAD
]
ly_options = {
OUTPUT: r'''
@iftex
@include %(base)s-systems.texi
-@end iftex''',
+@end iftex
+''',
OUTPUTIMAGE: r'''@noindent
-@ifnottex
+@ifinfo
@image{%(base)s,,,[image of music],%(ext)s}
-@end ifnottex
+@end ifinfo
+@html
+<p>
+ <a href="%(base)s.ly">
+ <img align="center" valign="center"
+ border="0" src="%(image)s" alt="[image of music]">
+ </a>
+</p>
+@end html
''',
PRINTFILENAME: '''@file{%(filename)s}
\paper {
#(define dump-extents #t)
+ %(font_dump_setting)s
%(paper_string)s
}
preamble_string = \
string.join (compose_dict[PREAMBLE], '\n ') % override
+ font_dump_setting = ''
+ if FONTLOAD in options:
+ font_dump_setting = '#(define-public force-eps-font-include #t)\n'
+
return (PREAMBLE_LY + body) % vars ()
def texstr_is_outdated (self):
if backend == 'ps':
return 0
-
+
base = self.basename ()
ok = self.ly_is_outdated ()
ok = ok and (os.path.exists (base + '.texstr'))
ext = ''
str += output[TEXINFO][OUTPUTIMAGE] % vars ()
- base = self.basename()
- str += output[format][OUTPUT] % vars()
+ base = self.basename ()
+ str += output[format][OUTPUT] % vars ()
return str
def output_latex (self):
verb = verbatim_texinfo (self.substring ('code'))
str += (output[TEXINFO][VERBATIM] % vars ())
if not QUOTE in self.options:
- str = output[TEXINFO][NOQUOTE] % vars()
+ str = output[TEXINFO][NOQUOTE] % vars ()
str += self.output_info ()
-
+
# str += ('@ifinfo\n' + self.output_info () + '\n@end ifinfo\n')
# str += ('@tex\n' + self.output_latex () + '\n@end tex\n')
# str += ('@html\n' + self.output_html () + '\n@end html\n')
ly.progress ('\n')
if ly_outdated:
- ly.progress (_ ("Processing...\n"))
+ ly.progress (_ ("Processing..."))
+ ly.progress ('\n')
process_snippets (process_cmd, ly_outdated, texstr_outdated, png_outdated)
else:
ly.progress (_ ("All snippets are up to date..."))
% input_filename))
ly.exit (1)
return format
-
+
def do_file (input_filename):
# Ugh.
if not input_filename or input_filename == '-':
global process_cmd, format
format = guess_format (files[0])
- formats = "ps"
+ formats = 'ps'
if format == TEXINFO:
formats += ',png'
if process_cmd == '':