On Wed, 9 Oct 2002, Garst R. Reese wrote:

> Rob Lahaye wrote:
[...]
> > Related GUI/Coding issues:
> >
> > - Should comma input be permitted ONLY for From field,
> >     and not for To field? In other words should we disable following:
> >        from  43  to  56,73  ?
> >
> > - And if so, disable the To field when the from field contains a comma?
> >    In other words disallow  from 79,153 to 210 ?
> >
> > By allowing all this input above, we could add interesting power to page
> > selection; e.g.
> >     "from 35,45  to 53,210" should print pages 35, 45 till 53 and 210.
> > I don't know if the print dialog should be that intelligent, though.
> I don't see much point in making it real intelligent. In our ancient WP,
> you entered a field like 35,45,47 50-59 65,66. That example would print
> 15 pages.
> My guess is that A just assumed that lyx would work the same way.

man dvips says:

     -pp pagelist
          A comma-separated list of pages and ranges (a-b) may be
          given,  which  will  be  interpreted as \count0 values.
          Pages not specified will not be printed.  Multiple  -pp
          options  may  be specified or all pages and page ranges
          can be specified with one -pp option.

So you should really allow "," and "-" in the From field so we
can once again write:
        35,45,47,50-59,65,66

And if either of those characters appears in the from field the to
field should be be disabled (maybe... IIRC the output is written as:
        -pp <From>-<To>
so if you left the To field active you'd only need to remove any
trailing commas from the From field.  Hmmm, that may have been how it
used to work actually... and so your example of "from 35,45  to
53,210" would be output as:
        -pp 35,45-53,210

> > Moreover, can the print command handle such peculiar page selections?
> Don't know.

Yes.  See the man page quote above.

I should have remembered this feature when we were discussing the
reorganisation of the Print dialog -- I did have a nagging feeling
there was something different about the handling of the from and to
fields and now I know what it was!  If only I'd added a comment
somewhere to this effect (hmmm, actually I have another nagging
feeling that I got started writing a filter for the from field but
didn't get it finished but the code was in a large comment in the
filter file).

Allan. (ARRae)

Reply via email to