~ubuntu-branches/ubuntu/jaunty/texlive-bin/jaunty-security

« back to all changes in this revision

Viewing changes to build/TeX/texk/windvi/psheader.txt

  • Committer: Bazaar Package Importer
  • Author(s): Norbert Preining
  • Date: 2008-06-26 23:14:59 UTC
  • mfrom: (2.1.30 intrepid)
  • Revision ID: james.westby@ubuntu.com-20080626231459-y02rjsrgtafu83yr
Tags: 2007.dfsg.2-3
add missing source roadmap.fig of roadmap.eps in fontinst documentation
(Closes: #482915) (urgency medium due to RC bug)
(new patch add-missing-fontinst-source)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
%% These are from tex.lpro
2
 
/TeXDict 250 dict def   % define a working dictionary ( IBM: color - 200->250 )
3
 
TeXDict begin           % start using it.
4
 
/N {def} def
5
 
/B {bind def} N
6
 
/S {exch} N
7
 
/X { S N } B
8
 
/TR {translate} N
9
 
/vsize 11 72 mul N
10
 
end % TeXDict
11
 
 
12
 
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
13
 
%%     header for the \special command
14
 
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
15
 
%   The structure of the PostScript produced by dvips for \special is:
16
 
%         @beginspecial
17
 
%           - any number of @hsize, @hoffset, @hscale, etc., commands
18
 
%         @setspecial
19
 
%           - the user's file of PostScript commands
20
 
%         @endspecial
21
 
 
22
 
TeXDict begin
23
 
/SDict 200 dict N
24
 
SDict begin
25
 
 
26
 
/@SpecialDefaults
27
 
  { /hs 612 N
28
 
    /vs 792 N
29
 
    /ho 0 N
30
 
    /vo 0 N
31
 
    /hsc 1 N
32
 
    /vsc 1 N
33
 
    /ang 0 N
34
 
    /CLIP 0 N
35
 
    /rwiSeen false N
36
 
    /rhiSeen false N
37
 
    /letter {} N /note {} N /a4 {} N /legal {} N
38
 
  } B
39
 
 
40
 
%
41
 
%   The following definition sets up the units that hscale/vscale are in.
42
 
%   For certain sites this might require change, but it is
43
 
%   recommended instead that any macro packages that require
44
 
%   hscale/vscale set the units appropriately via
45
 
%
46
 
%   \special{! /@scaleunit 1 def }
47
 
%
48
 
%   if global, or
49
 
%
50
 
%   \special{" /@scaleunit 1 def }
51
 
%
52
 
%   before each instance if multiple macro packages with
53
 
%   different requirements are being used.
54
 
%
55
 
/@scaleunit 100 N
56
 
%       s @hscale  -    set scale factor
57
 
/@hscale {@scaleunit div /hsc X} B
58
 
/@vscale {@scaleunit div /vsc X} B
59
 
 
60
 
%       d @hsize   -    specify a horizontal clipping dimension
61
 
/@hsize {/hs X /CLIP 1 N} B
62
 
/@vsize {/vs X /CLIP 1 N} B
63
 
 
64
 
/@clip {/CLIP 2 N} B
65
 
 
66
 
%       d @hoffset -    specify a shift for the figure
67
 
/@hoffset {/ho X} B
68
 
/@voffset {/vo X} B
69
 
 
70
 
%       a @angle   -    set rotation angle
71
 
/@angle {/ang X} B
72
 
 
73
 
%
74
 
%   Here we handle bounding box calculations, if necessary.
75
 
%
76
 
/@rwi { 10 div /rwi X /rwiSeen true N } B % rwi will be real width after scaling
77
 
/@rhi { 10 div /rhi X /rhiSeen true N } B % rhi will be real height after scaling
78
 
/@llx { /llx X } B
79
 
/@lly { /lly X } B
80
 
/@urx { /urx X } B
81
 
/@ury { /ury X } B
82
 
 
83
 
/magscale true def
84
 
 
85
 
end % of SDict
86
 
 
87
 
/@MacSetUp
88
 
  { userdict /md known  % if md is defined
89
 
      { userdict /md get type /dicttype eq      % and if it is a dictionary
90
 
        {
91
 
        userdict begin                       % expand it if necessary
92
 
           md length 10 add md maxlength ge
93
 
           {/md md dup length 20 add dict copy def}if
94
 
        end
95
 
        md begin                             % then redefine some stuff
96
 
        /letter {} N
97
 
        /note {} N
98
 
        /legal {} N
99
 
        /od{txpose
100
 
            1 0 mtx defaultmatrix dtransform S atan/pa X
101
 
            newpath clippath mark
102
 
            {transform{itransform moveto}}
103
 
            {transform{itransform lineto}}
104
 
            { 6 -2 roll transform
105
 
              6 -2 roll transform
106
 
              6 -2 roll transform
107
 
              { itransform 6 2 roll
108
 
                itransform 6 2 roll
109
 
                itransform 6 2 roll
110
 
                curveto
111
 
              }
112
 
            }
113
 
            {{closepath}}
114
 
            pathforall newpath counttomark array astore /gc xdf
115
 
            pop ct 39 0 put
116
 
            10 fz 0 fs 2 F/|______Courier fnt invertflag{PaintBlack}if
117
 
        }N
118
 
        /txpose{
119
 
            pxs pys scale ppr aload pop
120
 
            por {
121
 
                noflips {
122
 
                    pop S neg S TR pop 1 -1 scale
123
 
                }if
124
 
                xflip yflip and {
125
 
                    pop S neg S TR 180 rotate 1 -1 scale
126
 
                    ppr 3 get ppr 1 get neg sub neg ppr 2 get
127
 
                    ppr 0 get neg sub neg TR
128
 
                }if
129
 
                xflip yflip not and {
130
 
                    pop S neg S TR pop 180 rotate
131
 
                    ppr 3 get ppr 1 get neg sub neg 0 TR
132
 
                }if
133
 
                yflip xflip not and {
134
 
                    ppr 1 get neg ppr 0 get neg TR
135
 
                }if
136
 
            }
137
 
            {
138
 
                noflips {
139
 
                    TR pop pop 270 rotate 1 -1 scale
140
 
                }if
141
 
                xflip yflip and {
142
 
                    TR pop pop 90 rotate 1 -1 scale
143
 
                    ppr 3 get ppr 1 get neg sub neg ppr 2 get
144
 
                    ppr 0 get neg sub neg TR
145
 
                }if
146
 
                xflip yflip not and {
147
 
                    TR pop pop 90 rotate ppr 3 get
148
 
                    ppr 1 get neg sub neg 0 TR
149
 
                }if
150
 
                yflip xflip not and {
151
 
                    TR pop pop 270 rotate ppr 2 get
152
 
                    ppr 0 get neg sub neg 0 S TR
153
 
                }if
154
 
            }ifelse
155
 
            scaleby96 {
156
 
                ppr aload pop 4 -1 roll add 2 div 3 1 roll add 2 div 2 copy
157
 
                TR .96 dup scale neg S neg S TR
158
 
            }if
159
 
        }N
160
 
        /cp {pop pop showpage pm restore}N
161
 
        end
162
 
      }if
163
 
    } if
164
 
  } N
165
 
 
166
 
%
167
 
%   The following procedure brings us back to PostScript size.  It takes
168
 
%   into account the current global dvi magnification, so graphics
169
 
%   scale with the document.
170
 
%
171
 
/normalscale {
172
 
    Resolution 72 div VResolution 72 div neg scale
173
 
    magscale { DVImag dup scale } if
174
 
    0 setgray
175
 
} N
176
 
%
177
 
%   We need the psfig macros.
178
 
%
179
 
% All software, documentation, and related files in this distribution of
180
 
% psfig/tex are Copyright (c) 1987 Trevor J. Darrell
181
 
%
182
 
% Permission is granted for use and non-profit distribution of psfig/tex
183
 
% providing that this notice be clearly maintained, but the right to
184
 
% distribute any portion of psfig/tex for profit or as part of any commercial
185
 
% product is specifically reserved for the author.
186
 
%
187
 
%
188
 
% psfigTeX PostScript Prolog
189
 
% $Header: /usr/local/src/TeX/Dvips-5.0.2/RCS/special.lpro,v 1.1 90/03/10 20:32:57 grunwald Exp $
190
 
%
191
 
/psfts { S 65781.76 div N } N
192
 
 
193
 
%  x y bb-llx bb-lly bb-urx bb-ury startTexFig -
194
 
/startTexFig {
195
 
        /psf$SavedState save N
196
 
        userdict maxlength dict begin
197
 
 
198
 
        /magscale true def
199
 
        normalscale
200
 
        currentpoint TR    %set the current point as the user's origin
201
 
 
202
 
        /psf$ury psfts
203
 
        /psf$urx psfts
204
 
        /psf$lly psfts
205
 
        /psf$llx psfts
206
 
        /psf$y psfts
207
 
        /psf$x psfts
208
 
 
209
 
        /psf$sx psf$x psf$urx psf$llx sub div N % scaling for x
210
 
        /psf$sy psf$y psf$ury psf$lly sub div N % scaling for y
211
 
 
212
 
        psf$sx psf$sy scale                     % scale by (sx,sy)
213
 
 
214
 
        psf$llx neg psf$ury neg TR
215
 
 
216
 
        /showpage {
217
 
        } N
218
 
        /erasepage {
219
 
        } N
220
 
        /copypage {
221
 
        } N
222
 
        /p 3 def % necessary to get around a bug in Adobe Illustrator
223
 
        @MacSetUp
224
 
} N
225
 
 
226
 
% llx lly urx ury doclip -      (args in figure coordinates)
227
 
/doclip {
228
 
        psf$llx psf$lly psf$urx psf$ury
229
 
        currentpoint 6 2 roll
230
 
        newpath 4 copy
231
 
        4 2 roll moveto
232
 
        6 -1 roll S lineto
233
 
        S lineto
234
 
        S lineto
235
 
        closepath clip
236
 
        newpath
237
 
        moveto
238
 
} N
239
 
% - endTexFig -
240
 
/endTexFig { end psf$SavedState restore } N
241
 
 
242
 
% this will be invoked as the result of a \special command (for the
243
 
% inclusion of PostScript graphics).  The basic idea is to change all
244
 
% scaling and graphics back to defaults, but to shift the origin
245
 
% to the current position on the page.
246
 
 
247
 
/@beginspecial          % - @beginspecial -     -- enter special mode
248
 
  { 
249
 
    /SpecialSave save N
250
 
    SDict begin
251
 
    gsave
252
 
    normalscale
253
 
    currentpoint TR    %set the current point as the user's origin
254
 
    @SpecialDefaults    % setup default offsets, scales, sizes, and angle
255
 
    count /ocount X /dcount countdictstack N
256
 
  } N
257
 
 
258
 
/@setspecial    % to setup user specified offsets, scales, sizes (for clipping)
259
 
  {
260
 
    CLIP 1 eq
261
 
      { newpath 0 0 moveto hs 0 rlineto 0 vs rlineto hs neg 0 rlineto
262
 
        closepath clip }
263
 
    if
264
 
    ho vo TR
265
 
    hsc vsc scale
266
 
    ang rotate
267
 
    rwiSeen {
268
 
       rwi urx llx sub div
269
 
       rhiSeen { rhi ury lly sub div } { dup } ifelse
270
 
       scale llx neg lly neg TR
271
 
    } {
272
 
       rhiSeen { rhi ury lly sub div dup scale llx neg lly neg TR } if
273
 
    } ifelse
274
 
    CLIP 2 eq
275
 
    { newpath llx lly moveto urx lly lineto urx ury lineto llx ury lineto
276
 
      closepath clip }
277
 
    if
278
 
    /showpage {} N
279
 
    /erasepage {} N
280
 
    /copypage {} N
281
 
    newpath
282
 
  } N
283
 
 
284
 
/@endspecial            % - @endspecial -       -- leave special mode
285
 
  { count ocount sub {pop} repeat
286
 
    countdictstack dcount sub {end} repeat
287
 
    grestore SpecialSave restore
288
 
    end
289
 
  } N
290
 
 
291
 
% xdvik special treatment for saving definitions made in SDict (while using
292
 
% the bang special; try to guarantee that the dictionary stack is ok!
293
 
%   xdvik should not systematically bracket code within save/restore pairs,
294
 
% anyway: such bracketing breaks a lot of code (many packages do change
295
 
% TeXDict from with ps: specials for instance) and we should only guarantee
296
 
% that bracketing is done within @beginspecial and @endspecial.  -- YA
297
 
 
298
 
/@xdvisavestate
299
 
  {
300
 
    userdict /xdvi$sav save put
301
 
  } N
302
 
 
303
 
/@defspecial
304
 
  {
305
 
    SDict begin
306
 
  } N
307
 
/@fedspecial
308
 
  {
309
 
    end
310
 
    @xdvisavestate
311
 
  } B
312
 
end                     % revert to previous dictionary