summaryrefslogtreecommitdiff
path: root/macros/generic/TeX-PS/mirr.hd
blob: 5c39e74fa792525a8029fa8f9b438a69b6d5c69d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
% The following header can be used for producing mirrored output on
% printers (phototypesetters don't need this) with T. Rokicki's DVIPS
% driver.
%
% USAGE:
%   dvips -hmirr.hd [other_options1] <file_name> [other_options2]
%
% WARNING:
%   Be careful when you use DVIDVI or DVI2DVI in the context of global
%   specials like `\special{landscape}'; fortunately, `\special{landscape}'
%   works smoothly with DVIDVI but not with DVI2DVI (Sawatzki's
%   implementation)---you have to use `\special{landscape}' on every
%   page that appears to be the first one after splitting a DVI by DVI2DVI;
%   the same technique concerns both DVIDVI and DVI2DVI if user-defined
%   global specials are used.
%
% In the case of difficulties mail to:
%    Piotr Pianowski or Bogus\l{}aw Jackowski or Piotr Strzelczyk
%    B.Jackowski@GUST.org.pl
%
userdict begin
/bop-hook {-1 1 scale isls {vsize} {hsize} ifelse neg 0 translate} def
/appenddef {
% use this for lengthening `bop-hook' in your TeX program, i.e.,
% instead of \special{ps:... userdict begin ... /bop-hook{...}def ... end}
% say \special{ps:... userdict begin ... /bop-hook{...}appenddef ... end}
  /stuff-to-append exch def /to-append exch def
  [/to-append load where {pop /to-append load load aload pop} if
  /stuff-to-append load aload pop] cvx /to-append load exch store
} def
end