home *** CD-ROM | disk | FTP | other *** search
/ InfoMagic Source Code 1993 July / THE_SOURCE_CODE_CD_ROM.iso / languages / perl / scripts-osu / up / up.rc < prev    next >
Encoding:
Text File  |  1993-07-14  |  3.0 KB  |  164 lines

  1. # jgreely@cis.ohio-state.edu, 89/10/23
  2. #
  3.  
  4. # this is the normal prolog, and defines everything used below
  5. #
  6. prolog=
  7. /inch {72 mul} def
  8. /moveU {0 11 inch translate} def
  9. /moveR {8.5 inch 0 translate} def
  10. /moveD {0 -11 inch translate} def
  11. /moveL {-8.5 inch 0 translate} def
  12. /rotR {-90 rotate} def
  13. /rotL {90 rotate} def
  14. /doSpiral {moveU moveR rotR 0.67 dup scale} def
  15. /moveHU { 0 5.5 inch translate} def
  16. /doRevSpiral {moveHU rotL 0.67 dup scale} def
  17. .
  18.  
  19. # up is a synonym for twoup, since my code doesn't work correctly for
  20. # the case n==1.  Until I robustify it, this will stay.
  21. #
  22. name=up
  23. modulus=2
  24. scale=7.75 inch 0 translate rotL 11 17 div dup scale
  25. 1=
  26. 2=moveR
  27. .
  28.  
  29. name=2up
  30. modulus=2
  31. scale=7.75 inch 0 translate rotL 11 17 div dup scale
  32. 1=
  33. 2=moveR
  34. .
  35.  
  36. # two-up with even pages rotated, for double-siding
  37. #
  38. name=pup
  39. modulus=2
  40. even=moveU moveR rotR rotR
  41. odd=
  42. scale=7.75 inch 0 translate rotL 11 17 div dup scale
  43. 1=
  44. 2=moveR
  45. .
  46.  
  47. # note that 4up is scaled a bit smaller than you might think.  If I
  48. # just scaled by .5, I'd lose my top and bottom edges (printer
  49. # limitations)
  50. #
  51. name=4up
  52. modulus=4
  53. scale=0.2125 inch 0.275 inch translate 0.475 dup scale
  54. 1=moveU
  55. 2=moveR
  56. 3=moveL moveD
  57. 4=moveR
  58. .
  59.  
  60. # this does a greeting-card format, designed to be folded into
  61. # fourths.  If you're not sure how it's supposed to look, run:
  62. #    makeup 4 | up -n card | lpr
  63. #
  64. name=card
  65. modulus=4
  66. scale=0.2125 inch 0.275 inch translate 0.475 dup scale
  67. 1=moveU moveU moveR rotR rotR
  68. 2=moveU moveU moveR rotR rotR
  69. 3=moveR
  70. 4=moveU moveU moveR rotR rotR
  71. .
  72.  
  73. # this is about the limit for a 300 dpi device, unless it's reasonably
  74. # new and you have good eyes.  I like it at 400 dpi.
  75. #
  76. name=6up
  77. modulus=6
  78. scale=0.25 inch 0.75 inch translate rotL 4 11 div dup scale
  79. 1=moveD
  80. 2=moveR
  81. 3=moveR
  82. 4=moveD moveL moveL
  83. 5=moveR
  84. 6=moveR
  85. .
  86.  
  87. # this is a bit too far for casual reading.  It's entering magnifying
  88. # glass territory, which is bad, unless you need to carry lots of RFCs
  89. # around.
  90. #
  91. name=8up
  92. modulus=8
  93. scale=0.7 inch 0 translate rotL 11 34 div dup scale
  94. 1=moveD
  95. 2=moveR
  96. 3=moveR
  97. 4=moveR
  98. 5=moveD moveL moveL moveL
  99. 6=moveR
  100. 7=moveR
  101. 8=moveR
  102. .
  103.  
  104. # Steve Romig's contribution to evil PostScript hacking.  To see what
  105. # it does, run:
  106. #    makeup 10 | up -n spiral | lpr
  107. #
  108. name=spiral
  109. modulus=10
  110. scale=7.75 inch 0 translate rotL 11 17 div dup scale
  111. 1=
  112. 2=doSpiral
  113. 3=doSpiral
  114. 4=doSpiral
  115. 5=doSpiral
  116. 6=doSpiral
  117. 7=doSpiral
  118. 8=doSpiral
  119. 9=doSpiral
  120. 10=doSpiral
  121. .
  122.  
  123. # More from Steve, this time in the other direction
  124. #
  125. name=revspiral
  126. modulus=10
  127. scale=7.75 inch 0 translate rotL 11 17 div dup scale
  128. 1=moveR
  129. 2=doRevSpiral
  130. 3=doRevSpiral
  131. 4=doRevSpiral
  132. 5=doRevSpiral
  133. 6=doRevSpiral
  134. 7=doRevSpiral
  135. 8=doRevSpiral
  136. 9=doRevSpiral
  137. 10=doRevSpiral
  138. .
  139.  
  140. # this is not legible on anything under 400 dpi, and even then you'll
  141. # probably want a magnifying glass.  You *can* read it with the naked
  142. # eye, but not for long.
  143. #
  144. name=16up
  145. modulus=16
  146. scale=0.25 0.25 scale
  147. 1=moveU moveU moveU
  148. 2=moveR
  149. 3=moveR
  150. 4=moveR
  151. 5=moveD moveL moveL moveL
  152. 6=moveR
  153. 7=moveR
  154. 8=moveR
  155. 9=moveD moveL moveL moveL
  156. 10=moveR
  157. 11=moveR
  158. 12=moveR
  159. 13=moveD moveL moveL moveL
  160. 14=moveR
  161. 15=moveR
  162. 16=moveR
  163. .
  164.