1DVISELECT(1)                General Commands Manual               DVISELECT(1)
2
3
4

NAME

6       dviselect - extract pages from DVI files
7

SYNOPSIS

9       dviselect  [ -s ] [ -i infile ] [ -o outfile ] list of pages [ infile [
10       outfile ] ]
11

DESCRIPTION

13       Dviselect selects pages from a DVI file produced by TeX, creating a new
14       DVI file usable by any of the TeX conversion programs, or even by dvis‐
15       elect itself.
16
17       A range is a string of the form even, odd,  or  first:last  where  both
18       first  and  last  are  optional  numeric strings, with negative numbers
19       indicated by a leading underscore character ``_''.  If both  first  and
20       last  are  omitted,  the  colon may also be omitted, or may be replaced
21       with an asterisk ``*''.  A page range is a list of ranges separated  by
22       periods.   A  list  of pages is described by a set of page ranges sepa‐
23       rated by commas and/or white space.
24
25       Dviselect actually looks at the ten count variables  that  TeX  writes;
26       the  first  of these (\count0) is the page number, with \count1 through
27       \count9 having varied uses depending on which  macro  packages  are  in
28       use.  (Typically \count1 might be a chapter or section number.)  A page
29       is included in dviselect's output if all its \count  values  match  any
30       one of the ranges listed on the command line.  For example, the command
31       ``dviselect *.1,35:'' might select everything in chapter 1, as well  as
32       pages  35 and up.  ``dviselect 10:30'' would select pages 10 through 30
33       (inclusive).  ``:43'' means everything up  to  and  including  page  43
34       (including  negative-numbered  pages).  To get all even-numbered pages,
35       use ``even''; to get all odd-numbered pages, use ``odd''.  If  a  Table
36       of  Contents  has  negative page numbers, ``:_1'' will select it.  Note
37       that ``*'' must be quoted from the shell; the empty string is more con‐
38       venient to use, if harder to read.
39
40       Instead  of \count values, dviselect can also select by ``absolute page
41       number'', where the first page is page 1, the second  page  2,  and  so
42       forth.   Absolute  page  numbers  are indicated by a leading equal sign
43       ``=''.  Ranges of absolute pages are also allowed:  ``dviselect  =3:7''
44       will  extract  the third through seventh pages.  Dot separators are not
45       legal in absolute ranges, and there are no negative absolute page  num‐
46       bers.   Even/odd  specifiers,  however,  are legal; ``dviselect =even''
47       selects every other page, starting with the second.
48
49       More precisely, an asterisk or an empty string  implies  no  limit;  an
50       equal  sign  means  absolute page number rather than \counts; a leading
51       colon means everything up to and including the given page;  a  trailing
52       colon  means everything from the given page on; the word ``even'' means
53       only even values shall be accepted; the word  ``odd''  means  only  odd
54       values  shall  be accepted; and a period indicates that the next \count
55       should be examined.  If fewer than 10 ranges are specified, the remain‐
56       ing  \counts  are left unrestricted (that is, ``1:5'' and ``1:5.*'' are
57       equivalent).  A single number n is treated as if it were the range n:n.
58       An arbitrary number of page selectors may be given, separated by commas
59       or whitespace; a page is selected if any of the selectors  matches  its
60       \counts or absolute page number.
61
62       Dviselect  normally  prints the page numbers of the pages selected; the
63       -s option suppresses this.
64

AUTHOR

66       Chris Torek, University of Maryland
67

SEE ALSO

69       dviconcat(1), latex(1), tex(1)
70       MC-TeX User's Guide
71       The TeXbook
72

BUGS

74       A leading ``-'' ought to be allowed for negative  numbers,  but  it  is
75       currently used as a synonym for ``:'', for backwards compatibility.
76
77       Section  or  subsection selection will sometimes fail, for the DVI file
78       lists only the \count values that were  active  when  the  page  ended.
79       Clever  macro  packages  can  alleviate  this  by  making  use of other
80       ``free'' \count registers.  Chapters normally begin on new  pages,  and
81       do not suffer from this particular problem.
82
83       The heuristic that decides which arguments are page selectors and which
84       are file names is often wrong.  Using shell redirection or the  -i  and
85       -o options is safest.
86
87       Dviselect  does  not  adjust  the parameters in the postamble; however,
88       since these values are normally used only to size certain structures in
89       the  output  conversion  programs,  and the parameters never need to be
90       adjusted upward, this has not proven to be a problem.
91
92
93
94                                                                  DVISELECT(1)
Impressum