From: Jan Nieuwenhuizen Date: Sat, 10 Aug 2002 12:49:52 +0000 (+0000) Subject: * Documentation/user/tutorial.itely (Running LilyPond): Mention X-Git-Tag: release/1.5.72~15 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=737f9dba5c915391212b9b225f4109eab256ac18;p=lilypond.git * 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. --- diff --git a/ChangeLog b/ChangeLog index c1c132641c..18e762e675 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,15 @@ 2002-08-10 Jan Nieuwenhuizen + * 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. diff --git a/Documentation/user/invoking.itexi b/Documentation/user/invoking.itexi index e8b7699644..0907ed4a2f 100644 --- a/Documentation/user/invoking.itexi +++ b/Documentation/user/invoking.itexi @@ -261,8 +261,8 @@ files. The temporary directory is created in the current directory as @code{ly2d @item -P,--postscript Also generate PostScript output, using dvips. The postscript uses the standard @TeX{} bitmap fonts for your printer. -@item --pdf - Also generate Portable Document Format (PDF). This option will +@item -p,--pdf + Also generate Portable Document Format (PDF). This option will generate a PS file using scalable fonts, and will run the PS file through @code{ps2pdf} producing a PDF file. diff --git a/Documentation/user/tutorial.itely b/Documentation/user/tutorial.itely index c5ee4959b7..56174518a8 100644 --- a/Documentation/user/tutorial.itely +++ b/Documentation/user/tutorial.itely @@ -357,8 +357,13 @@ you use anything other than @code{dvips}. @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} diff --git a/scripts/ly2dvi.py b/scripts/ly2dvi.py index d15fd4452a..8b38de7607 100644 --- a/scripts/ly2dvi.py +++ b/scripts/ly2dvi.py @@ -338,7 +338,7 @@ option_definitions = [ ('', '', '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")), @@ -454,6 +454,7 @@ def quiet_system (cmd, name, ignore_error = 0): def run_lilypond (files, outbase, dep_prefix): + opts = '' # opts = opts + '--output=%s.tex' % outbase opts = opts + ' ' + string.join (map (lambda x : '-I ' + x, @@ -869,7 +870,7 @@ for opt in options: 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': @@ -903,11 +904,23 @@ for opt in options: 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 @@ -929,7 +942,6 @@ if files and files[0] != '-': 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: