1DVIDVI(L)                                                            DVIDVI(L)
2
3
4

NAME

6       dvidvi - selects and/or re-arranges pages in a TeX dvi file
7

SYNOPSIS

9       dvidvi [param] infile outfile
10

DESCRIPTION

12   Introduction
13       The dvidvi program converts a dvi file into another dvi file, with per‐
14       haps certain changes.
15
16   Parameters
17       -f n      page n is first page selected
18       -l n      page n is last page selected
19       -n n      select at most n pages. Notice that n is the number of  pages
20                 selected,  independently of the number of pages actually con‐
21                 tained in a sheet
22       -i { n1..n2 | n1 }[,...]
23                 include pages (ranges allowed). When  this  option  is  used,
24                 ONLY  the  specified  pages  are  selected.  However,  we can
25                 exclude from these pages with the option -x
26       -x { n1..n2 | n1 }[,...]
27                 exclude pages (ranges allowed)
28       -q        work in quiet mode, that is do not print in the  screen  mes‐
29                 sages of how the work is being done.
30       -r        reverse the order of the pages.
31
32       The page numbers for the above options -f -l -i and -x can be specified
33       in different ways.
34       1)  If a number n is given, it is interpreted as the n'th page from the
35           beginning  of  the .dvi file. Of course, this number is independent
36           of the page number assigned by TeX.
37       2)  TeX page numbers are those who are actually written  in  the  page;
38           these  page  numbers can be modified, for example, by using the TeX
39           commands   \pagenumbering,   \setcounter{page}{n},   and    \addto‐
40           counter{page}{n}.   A TeX page number can be specified by preceding
41           the number n with the character @. Thus, if you specify -f  @25  -l
42           @30  you  select  the  pages between 25 and 30, these numbers being
43           those assigned by TeX.
44       3)  However, several pages can have the same TeX page number in a  .dvi
45           file.   For  example, the introductory pages in a book are numbered
46           i, ii, and so on until the first chapter begins and then, the pages
47           are  numbered  1, 2, etc.  In this case, the pages numbered i and 1
48           in the .dvi file have the same TeX page  number.  If  you  want  to
49           select  for  example  the second occurrence of the page numbered 1,
50           you can specify a page number as (@2)1. Thus @1  is  equivalent  to
51           (@1)1. For example, if you specify -f (@2)1 -l(@2)10 you select the
52           pages between 1 and 10 of the first chapter, not  the  introductory
53           pages between i and x.
54
55       There  is  another  parameter  that tells dvidvi how you want to change
56       page layout and specifications.  This is the -m parameter.
57       *   The number preceding the colon is  the  modulo  value.   Everything
58           will  be  done  in chunks of pages this big.  If there is no colon,
59           than the default value is assumed to be one.   The  last  chunk  of
60           pages is padded with as many blank pages as necessary.
61       *    Following  the  colon  is  a comma-separated list of page numbers.
62           These page numbers are with respect to the current chunk of  pages,
63           and  must lie in the range zero to the modulo value less one.  If a
64           negative sign precedes the number, then the page is taken from  the
65           mirror chunk; if there are m chunks, then the mirror chunk of chunk
66           n is the chunk numbered m-n-1.  Put simply, it is  the  chunk  num‐
67           bered  the  same,  only  from the end.  This can be used to reverse
68           pages.  If no number is given, the page number defaults to 1.
69       *   Following each page number is an optional offset value in parenthe‐
70           sis,  which consists of a pair of comma-separated dimensions.  Each
71           dimension is a decimal number with an  optional  unit  of  measure.
72           The  default unit of measure is inches, or the last unit of measure
73           used.  All units are in true dimensions.  Allowable units  of  mea‐
74           sure are the same that TeX allows: in, mm, cm, pt, pc, dd, and cc.
75
76   Copyright
77       dvidvi  1.0,  Copyright  (C) 1988-2011, Radical Eye Software Anyone may
78       freely use, modify and/or distribute this program and documentation, or
79       any portion thereof, without limitation.
80

EXAMPLES

82       -m  -      Reverses the order of the pages.  This time, both the modulo
83                 and the page number are defaulted.
84       -m 2:0    Selects the first, third, fifth, etc. pages  from  the  file.
85                 Print  this one after printing the next, taking the paper out
86                 of the feed tray and reinserting it into the paper feed.
87       -m 2:-1   Selects the second, fourth, etc. pages, and  writes  them  in
88                 reverse order.
89       -m 4:-1,2(4.25in,0in)
90       -m 4:-3,0(4.25in,0in)
91                 Useful  for printing a little booklet, four pages to a sheet,
92                 double-sided, for stapling in the middle.   Print  the  first
93                 one,  put  the  stack  back into the printer upside down, and
94                 print the second.  The `in' specifications are superfluous.
95       -m ,(1pt,1)
96                 Scare your system administrator!   Actually,  things  are  so
97                 blurry with this option, you may want to send enemies letters
98                 printed like this.  *Long* letters.
99       -m 4:0(5.5in,4.25),3(0,4.25)
100       -m 4:1(0in,4.25),2(5.5,4.25)
101                 Print a four-page card on one sheet.  Print the first, rotate
102                 the  paper 180 degrees and feed it again.  (PostScript people
103                 can do funny tricks with PostScript so this isn't necessary.)
104
105
106
107                                 February 2011                       DVIDVI(L)
Impressum