Main Page | Namespace List | Class Hierarchy | Class List | File List | Namespace Members | Class Members | File Members

PageRange Class Reference

#include <PageRange.h>

List of all members.

Public Member Functions

 PageRange ()
 Constructs a new PageRange object.
bool addSpec (const char, const char *)
 Add a constraint to the set of selected pages represented by this PageRange object.
bool isSelected (const int, const int *)
 Returns true if the specified page is to be included.

Static Public Member Functions

void verbosity (const verbosities level)


Constructor & Destructor Documentation

PageRange::PageRange  ) 
 

Constructs a new PageRange object.

This represents a selection of selected pages. When created, the PageRange object represents all pages, but this set can be constrained in a variety of ways using the addSpec method. The resulting object can be queried, to ask whether a particular page would be included in the set, using the isSelected method.


Member Function Documentation

bool PageRange::addSpec const char  type,
const char *  spec
 

Add a constraint to the set of selected pages represented by this PageRange object.

The arguments are a selector, which is one of the characters `l', `p', or `P', and a string representing one or more numbers. The meanings of the three selectors are as follows.

'l' pagenum
The last page printed will be the first one num- bered num Default is the last page in the document. If the num is prefixed by an equals sign, then it (and any argument to the -p option) is treated as a sequence number, rather than a value to compare with \count0 values. Thus, using -l =9 will end with the ninth page of the document, no matter what the pages are actually numbered.

'p' pagenum
The first page printed will be the first one num- bered num. Default is the first page in the docu- ment. If the num is prefixed by an equals sign, then it (and any argument to the -l option) is treated as a sequence number, rather than a value to compare with \count0 values. Thus, using -p =3 will start with the third page of the document, no matter what the pages are actually numbered.

'P' 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.

Any of these specifications may be prefixed by either = or :n: In the former case, DVI page numbers are used rather than TeX \count registers; in the latter case, the program examines the \countn register rather than the default \count0

Thus, the syntax of pagelist is extended to satisfy:

    pagenum:  prefix* number
    pagelist: prefix* page-or-range [',' page-or-range]*
    prefix: '=' | ':' number ':'
    page-or-range: number | number-number
 

Parameters:
type one of the letters `l', `p', `P'.
spec a page specification conforming to the grammar above

bool PageRange::isSelected const int  pagenum,
const int *  count
 

Returns true if the specified page is to be included.

We test either the page-sequence number or the TeX \count0-9 registers, depending on how the page range was specified.

Parameters:
pagenum a page-sequence number, counting pages from the beginning of the DVI file
count is the array of TeX \count0-9 register
Returns:
true if the current settings of this PageRange object would indicate that the specified page is to be printed

void PageRange::verbosity const verbosities  level  )  [inline, static]
 


The documentation for this class was generated from the following files:
Generated on Sun Aug 21 18:21:08 2005 for dvi2bitmap by doxygen 1.3.8