home *** CD-ROM | disk | FTP | other *** search
/ Mega Top 1 / os2_top1.zip / os2_top1 / DOS_GG / TXT / DVIDVI.DAT < prev    next >
Text File  |  1995-05-20  |  5KB  |  105 lines

  1.        dvidvi 1.0, Copyright (C) 1988-91, Radical Eye Software
  2.  
  3. Here's a little hack I threw together for those doing pagination
  4. tricks.  Any improvements are appreciated.  Enjoy!
  5. The dvidvi program converts a dvi file into another dvi file,
  6. with perhaps certain changes.  Invocation is
  7.  
  8.         dvidvi param infile outfile
  9.  
  10. What are the parameters?  The 'easy' paramaters are the following:
  11.  
  12.     -f n     page n is first page selected
  13.     -l n     page n is last page selected
  14.     -n n     select at most n pages. Notice that n is the number of pages
  15.          selected, independently of the number of pages actually
  16.          contained in a sheet
  17.     -i { n1..n2 | n1 }[,...]
  18.          include pages (ranges allowed). When this option is
  19.          used, ONLY the specified pages are selected. However,
  20.          we can exclude from these pages with the option -x
  21.     -x { n1..n2 | n1 }[,...]
  22.          exclude pages (ranges allowed)
  23.     -q       work in quiet mode, that is do not print in the screen
  24.          messages of how the work is being done.
  25.     -r       reverse the order of the pages.
  26.  
  27. The page numbers for the above options -f -l -i and -x can be specified
  28. in different ways.
  29.  
  30. 1) If a number n is given, it is interpreted as the n'th page from the
  31. begining of the .dvi file. Of course, this number is independent of the
  32. page number assigned by TeX.
  33.  
  34. 2) TeX page numbers are those who are actually written in the page;
  35. these page numbers can be modified, for example, by using the TeX commands
  36. \pagenumbering, \setcounter{page}{n}, and \addtocounter{page}{n}.
  37. A TeX page number can be specified by preceding the number n with the
  38. character @. Thus, if you specify -f @25 -l @30 you select the pages
  39. between 25 and 30, these numbers being those assigned by TeX.
  40.  
  41. 3) However, several pages can have the same TeX page number in a .dvi file.
  42. For example, the introductory pages in a book are numbered i, ii, and so on
  43. until the first chapter begins and then, the pages are numbered 1, 2, etc.
  44. In this case, the pages numbered i and 1 in the .dvi file have the same TeX
  45. page number. If you want to select for example the second occurrence of the
  46. page numbered 1, you can specify a page number as (@2)1. Thus @1 is equivalent
  47. to (@1)1. For example, if you specify -f (@2)1 -l(@2)10 you select the pages
  48. between 1 and 10 of the first chapter, not the introductory pages between
  49. i and x.
  50.  
  51. There is another parameter that tells dvidvi how you want to change page
  52. layout and specifications. This is the -m parameter.
  53.  
  54.         The number preceding the colon is the modulo value.  Everything
  55. will be done in chunks of pages this big.  If there is no colon, than the
  56. default value is assumed to be one.  The last chunk of pages is padded
  57. with as many blank pages as necessary.
  58.  
  59.         Following the colon is a comma-separated list of page numbers.
  60. These page numbers are with respect to the current chunk of pages, and
  61. must lie in the range zero to the modulo value less one.  If a negative
  62. sign precedes the number, then the page is taken from the mirror chunk;
  63. if there are m chunks, then the mirror chunk of chunk n is the chunk
  64. numbered m-n-1.  Put simply, it is the chunk numbered the same, only
  65. from the end.  This can be used to reverse pages.  If no number is
  66. given, the page number defaults to 1.
  67.  
  68.         Following each page number is an optional offset value in
  69. parenthesis, which consists of a pair of comma-separated dimensions.
  70. Each dimension is a decimal number with an optional unit of measure.
  71. The default unit of measure is inches, or the last unit of measure
  72. used.  All units are in true dimensions.  Allowable units of measure
  73. are the same that TeX allows:  in, mm, cm, pt, pc, dd, and cc.
  74.  
  75.         Simple enough, eh?  Okay, let's do some simple things.
  76.  
  77. -m -      Reverses the order of the pages.  This time, both the modulo and
  78.       the page number are defaulted.
  79.  
  80. -m 2:0    Selects the first, third, fifth, etc. pages from the file.  Print
  81.       this one after printing the next, taking the paper out of the
  82.       feed tray and reinserting it into the paper feed.
  83.  
  84. -m 2:-1   Selects the second, fourth, etc. pages, and writes them in reverse
  85.       order.
  86. -m 4:-1,2(4.25in,0in)
  87. -m 4:-3,0(4.25in,0in)
  88.      Useful for printing a little booklet, four pages to a sheet,
  89.      double-sided, for stapling in the middle.  Print the first one,
  90.      put the stack back into the printer upside down, and print the
  91.      second.  The `in' specifications are superfluous.
  92. -m ,(1pt,1)
  93.         Scare your system administrator!  Actually, things are so
  94.         blurry with this option, you may want to send enemies letters
  95.         printed like this.  *Long* letters.
  96. -m 4:0(5.5in,4.25),3(0,4.25)
  97. -m 4:1(0in,4.25),2(5.5,4.25)
  98.         Print a four-page card on one sheet.  Print the first, rotate
  99.         the paper 180 degrees and feed it again.  (PostScript people
  100.         can do funny tricks with PostScript so this isn't necessary.)
  101.  
  102. Enjoy; this is an early release, so make suggestions, improvements,
  103. and I'll get back to you with a better version later.
  104.  
  105.