2002-08-10 Jan Nieuwenhuizen <janneke@gnu.org>
+ * Documentation/user/tutorial.itely (Running LilyPond): Mention
+ xdvi and XFree86 option for Windows users.
+
+ * Documentation/user/invoking.itexi: Add ly2dvi's -p alias.
+
+ * scripts/ly2dvi.py: Bugfix for `ly2dvi -I ./foo foo.ly'. Also
+ append directory of first file to search path, allowing
+ `ly2dvi foo/foo.ly' when foo.ly includes other files from
+ directory foo. Add short option alias '-p' for --pdf.
+
* input/test/trills.ly:
* input/test/preset-extent.ly:
* scm/grob-property-description.scm: more extent renaming.
@unnumberedsubsec Windows users
Windows users can start the terminal by clicking on the LilyPond or
-Cygwin icons. You can use any text editor (such as Notepad) to edit
-the LilyPond file. Viewing the PS file can be done with:
+Cygwin icon. You can use any text editor (such as NotePad, Emacs or
+Vim) to edit the LilyPond file. If you install the Cygwin's XFree86
+X11 window system, tetex-x11 and ghostscript-x11 packages too, you can
+view the @code{dvi} output doing @code{xdvi test.dvi} as described
+above. If you have installed a PostScript/PDF viewer, such as
+@code{GSView} from @uref{http://www.cs.wisc.edu/~ghost}, viewing the
+PS file can be done with:
@quotation
@example
@code{gsview32 test.ps}
('', '', 'preview', _("Make a picture of the first system.")),
(_ ('RES'), '', 'preview-resolution', _("Set the resolution of the preview to RES.")),
('', 'P', 'postscript', _ ("generate PostScript output")),
- ('', '', 'pdf', _ ("generate PDF output")),
+ ('', 'p', 'pdf', _ ("generate PDF output")),
(_ ("KEY=VAL"), 's', 'set', _ ("change global setting KEY to VAL")),
('', 'V', 'verbose', _ ("verbose")),
('', 'v', 'version', _ ("print version number")),
def run_lilypond (files, outbase, dep_prefix):
+
opts = ''
# opts = opts + '--output=%s.tex' % outbase
opts = opts + ' ' + string.join (map (lambda x : '-I ' + x,
include_path.append (a)
elif o == '--postscript' or o == '-P':
targets.append ('PS')
- elif o == '--pdf':
+ elif o == '--pdf' or o == '-p':
targets.append ('PDF')
targets.append ('PS')
elif o == '--keep' or o == '-k':
sys.exit (0)
+# Don't convert input files to abspath, rather prepend '.' to include
+# path.
+include_path.insert (0, '.')
+
+# As a neat trick, add directory part of first input file
+# to include path. That way you can do without the clumsy -I in:
+
+# ly2dvi -I foe/bar/baz foo/bar/baz/baz.ly
+if files and files[0] != '-' and os.path.dirname (files[0]) != '.':
+ include_path.append (os.path.dirname (files[0]))
+
include_path = map (abspath, include_path)
-original_output = output_name
+original_output = output_name
+
if files and files[0] != '-':
# Ugh, maybe make a setup () function
for i in ('.dvi', '.latex', '.ly', '.ps', '.tex'):
output_name = strip_extension (output_name, i)
outbase = strip_extension (outbase, i)
- files = map (abspath, files)
for i in files[:] + [output_name]:
if string.find (i, ' ') >= 0: