Re: [PATCH] SVG backend: Output a single SVG file for each page

2009-08-07 Thread Patrick McCarty
On Thu, Aug 06, 2009 at 09:09:35AM -0700, Patrick McCarty wrote:
 On Thu, Aug 06, 2009 at 11:44:17AM +0200, Valentin Villenave wrote:
  2009/8/6 Patrick McCarty pnor...@gmail.com:
   Any comments or suggestions are welcome.  This patch is one of the
   final steps towards producing SVG output that is both valid and
   compatible across all user agents I have tested (Inkscape, Firefox,
   etc.)
  
  Though single-page SVG output is a sensible default, perhaps we could
  keep the multi-page SVG output as a -d option just in case some users
  might indeed want to have one single output file?
 
 Just to clarify...
 
 I think it's okay to provide a -d option for a single-file output,
 instead of one-file-per-page output.

Sorry to bug you again, Valentin.  :-)

I'm starting to dislike this idea after all... At least for now.

SVG is a vector graphics format, so there should only be *one* page of
output per file.  If we want to provide an option to generate only one
SVG file, this option should apply to the PS, EPS, and PNG output as
well.  So this would be a different feature request, IMO.

For example, if you have a multiple-page score, and use the PS backend
to generate PNG output, you would get the following output if the file
is named `test.ly':

test-page1.png
test-page2.png
test-page3.png
etc...

Does anyone else have any thoughts about this, or the patch itself?

Thanks,
Patrick


___
lilypond-devel mailing list
lilypond-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/lilypond-devel


Re: [PATCH] SVG backend: Output a single SVG file for each page

2009-08-06 Thread Graham Percival
On Thu, Aug 06, 2009 at 12:29:58AM -0700, Patrick McCarty wrote:
 The details are listed on the Rietveld page, but I'll illustrate the
 naming convention here.
 
 1) One book, four pages (test.ly):
 
   test.svg
   test-page2.svg
   test-page3.svg
   test-page4.svg

Speaking as a user, could it detect if there's more than one page,
and if so, begin naming at test-page-1.svg?

 2) Two books, 3 pages each (test.ly):
 
   test.svg
   test-page2.svg
   test-page3.svg
   test-1.svg
   test-1-page2.svg
   test-1-page3.svg

Again, I'd rather have a uniform set of produced files.  If
there's more than one book, could it statrt numbering with
test-1-page-1.svg?

 This patch is one of the final steps towards producing SVG
 output that is both valid and compatible across all user agents
 I have tested (Inkscape, Firefox, etc.)

Awesome work!

Cheers,
- Graham


___
lilypond-devel mailing list
lilypond-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/lilypond-devel


Re: [PATCH] SVG backend: Output a single SVG file for each page

2009-08-06 Thread Patrick McCarty
On Thu, Aug 06, 2009 at 12:32:20AM -0700, Graham Percival wrote:
 On Thu, Aug 06, 2009 at 12:29:58AM -0700, Patrick McCarty wrote:
  The details are listed on the Rietveld page, but I'll illustrate the
  naming convention here.
  
  1) One book, four pages (test.ly):
  
test.svg
test-page2.svg
test-page3.svg
test-page4.svg
 
 Speaking as a user, could it detect if there's more than one page,
 and if so, begin naming at test-page-1.svg?

Yes, it could, if I changed the patch.  :-)

BTW, it would be nice if we had this autodetection for multiple \book
blocks too, but that belongs in the different thread.

  2) Two books, 3 pages each (test.ly):
  
test.svg
test-page2.svg
test-page3.svg
test-1.svg
test-1-page2.svg
test-1-page3.svg
 
 Again, I'd rather have a uniform set of produced files.  If
 there's more than one book, could it statrt numbering with
 test-1-page-1.svg?

Sure, that's an easy fix.

  This patch is one of the final steps towards producing SVG
  output that is both valid and compatible across all user agents
  I have tested (Inkscape, Firefox, etc.)
 
 Awesome work!

Thanks!

Here's the new patch:

http://codereview.appspot.com/105045/show


-Patrick


___
lilypond-devel mailing list
lilypond-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/lilypond-devel


Re: [PATCH] SVG backend: Output a single SVG file for each page

2009-08-06 Thread Valentin Villenave
2009/8/6 Patrick McCarty pnor...@gmail.com:
 Any comments or suggestions are welcome.  This patch is one of the
 final steps towards producing SVG output that is both valid and
 compatible across all user agents I have tested (Inkscape, Firefox,
 etc.)

Though single-page SVG output is a sensible default, perhaps we could
keep the multi-page SVG output as a -d option just in case some users
might indeed want to have one single output file?

Regards,
Valentin


___
lilypond-devel mailing list
lilypond-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/lilypond-devel


Re: [PATCH] SVG backend: Output a single SVG file for each page

2009-08-06 Thread Patrick McCarty
On Thu, Aug 06, 2009 at 11:44:17AM +0200, Valentin Villenave wrote:
 2009/8/6 Patrick McCarty pnor...@gmail.com:
  Any comments or suggestions are welcome.  This patch is one of the
  final steps towards producing SVG output that is both valid and
  compatible across all user agents I have tested (Inkscape, Firefox,
  etc.)
 
 Though single-page SVG output is a sensible default, perhaps we could
 keep the multi-page SVG output as a -d option just in case some users
 might indeed want to have one single output file?

I wouldn't be against that idea, but the *current* output of
multi-page SVG files is not usable.  For example, Inkscape cannot even
open an SVG file with pageSet or page in it.  So IMO, single SVG
files that contain multiple pages are not an option.

Would you rather have a -d option that could be used to only output
the *first* page?  That would be really easy.  What should the -d
option be called?

Of course, an output-preview-framework (for use with -dpreview) is
planned, and that would output the first system (plus titles and
headers) in a single SVG file, just like with the PostScript backend.
It might be a while before I attempt to do this though.  :-)

Thanks,
Patrick


___
lilypond-devel mailing list
lilypond-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/lilypond-devel


Re: [PATCH] SVG backend: Output a single SVG file for each page

2009-08-06 Thread Patrick McCarty
On Thu, Aug 06, 2009 at 11:44:17AM +0200, Valentin Villenave wrote:
 2009/8/6 Patrick McCarty pnor...@gmail.com:
  Any comments or suggestions are welcome.  This patch is one of the
  final steps towards producing SVG output that is both valid and
  compatible across all user agents I have tested (Inkscape, Firefox,
  etc.)
 
 Though single-page SVG output is a sensible default, perhaps we could
 keep the multi-page SVG output as a -d option just in case some users
 might indeed want to have one single output file?

Just to clarify...

I think it's okay to provide a -d option for a single-file output,
instead of one-file-per-page output.

I do *not* think it's okay for this option to use pageSet and
page, for the reasons I describe on Rietveld.  If a score compiles
fine, the SVG output should be *correct*.  We don't want to require
manual workarounds like the SVG output from 2.12.

Thanks,
Patrick


___
lilypond-devel mailing list
lilypond-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/lilypond-devel