~ubuntu-branches/ubuntu/precise/a2ps/precise-updates

« back to all changes in this revision

Viewing changes to tests/ps-ref/prolog-4.ps

  • Committer: Bazaar Package Importer
  • Author(s): Masayuki Hatta (mhatta)
  • Date: 2008-01-03 23:38:51 UTC
  • mfrom: (1.1.4 upstream) (4.1.1 lenny)
  • Revision ID: james.westby@ubuntu.com-20080103233851-izw2sup5iili3lhq
Tags: 1:4.14-1
* New upstream release.
* Bumped up Standards-Version to 3.7.3 (no physical changes).
* Sorted out copyright information.  Thanks to Patrick Schoenfeld
  - closes: #448454
* Now use autoload, not load, in emacsen-startup.  Thanks to Trent W. Buck 
  - closes: #446152
* Now a2ps try to use html2ps for parsing HTML - closes: #424161
  I'll try to support Iceweasel later.
* Now prefer emacs22 - closes: #434914, #283828
* Added a manpage for a2ps-lpr-wrapper.  Thanks to Michael Tautschnig 
  - closes: #425068
* debian/emacsen-install: do not load site files when byte-compiling, 
  and set symlinks to *.el files 
  - closes: #246296, #269409, #401684, #448144
* prerm, postinst: use emacsen-common stuff only when it is installed 
  and configured.
* rules: do not install emacsen snippets in {prerm,postinst}.
* Many thanks to Agustin Martin Domingo for these 3 hacks above.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
%!PS-Adobe-3.0
 
2
%%Title: a2ps output
 
3
%%For: Somebody
 
4
%%Creator: a version of a2ps
 
5
%%CreationDate: once upon a time
 
6
%%BoundingBox: 24 24 571 818
 
7
%%DocumentData: Clean7Bit
 
8
%%Orientation: Portrait
 
9
%%Pages: 2
 
10
%%PageOrder: Ascend
 
11
%%DocumentMedia: A4 595 842 0 () ()
 
12
%%DocumentNeededResources: font Courier
 
13
%%+ font Courier-Bold
 
14
%%+ font Helvetica
 
15
%%+ font Helvetica-Bold
 
16
%%+ font Symbol
 
17
%%+ font Times-Bold
 
18
%%+ font Times-Roman
 
19
%%DocumentProcessColors: Black Blue Green Red 
 
20
%%DocumentSuppliedResources: procset a2ps-color-prolog
 
21
%%+ encoding ISO-8859-1Encoding
 
22
%%EndComments
 
23
/a2psdict 200 dict def
 
24
a2psdict begin
 
25
%%BeginProlog
 
26
%%Copyright: (c) 1988, 89, 90, 91, 92, 93 Miguel Santana
 
27
%%Copyright: (c) 1995, 96, 97, 98 Akim Demaille, Miguel Santana
 
28
% Check PostScript language level.
 
29
/languagelevel where {
 
30
  pop /gs_languagelevel languagelevel def
 
31
} {
 
32
  /gs_languagelevel 1 def
 
33
} ifelse
 
34
 
 
35
% EPSF import as in the Red Book
 
36
/BeginInclude {
 
37
  /b4_Inc_state save def                % Save state for cleanup
 
38
  /dict_count countdictstack def        % Count objects on dict stack
 
39
  /op_count count 1 sub def             % Count objects on operand stack 
 
40
  userdict begin
 
41
    0 setgray 0 setlinecap
 
42
    1 setlinewidth 0 setlinejoin
 
43
    10 setmiterlimit [ ] 0 setdash newpath
 
44
    gs_languagelevel 1 ne {
 
45
      false setstrokeadjust false setoverprint 
 
46
    } if
 
47
} bind def
 
48
 
 
49
/EndInclude {
 
50
  count op_count sub { pos } repeat     % Clean up stacks
 
51
  countdictstack dict_count sub { end } repeat
 
52
  b4_Inc_state restore
 
53
} bind def
 
54
 
 
55
/BeginEPSF {
 
56
  BeginInclude
 
57
  /showpage { } def
 
58
} bind def
 
59
 
 
60
/EndEPSF {
 
61
  EndInclude
 
62
} bind def
 
63
 
 
64
% Page prefeed
 
65
/page_prefeed {         % bool -> -
 
66
  statusdict /prefeed known {
 
67
    statusdict exch /prefeed exch put
 
68
  } {
 
69
    pop
 
70
  } ifelse
 
71
} bind def
 
72
 
 
73
/deffont {
 
74
  findfont exch scalefont def
 
75
} bind def
 
76
 
 
77
/reencode_font {
 
78
  findfont reencode 2 copy definefont pop def
 
79
} bind def
 
80
 
 
81
% Function c-show (str => -)
 
82
% centers text only according to x axis.
 
83
/c-show { 
 
84
  dup stringwidth pop
 
85
  2 div neg 0 rmoveto
 
86
  show
 
87
} bind def
 
88
 
 
89
% Function l-show (str => -)
 
90
% prints texts so that it ends at currentpoint
 
91
/l-show {
 
92
  dup stringwidth pop neg 
 
93
  0 
 
94
  rmoveto show
 
95
} bind def
 
96
 
 
97
% center-fit show (str w => -)
 
98
% show centered, and scale currentfont so that the width is less than w
 
99
/cfshow {
 
100
  exch dup stringwidth pop
 
101
  % If the title is too big, try to make it smaller
 
102
  3 2 roll 2 copy
 
103
  gt
 
104
  { % if, i.e. too big
 
105
    exch div
 
106
    currentfont exch scalefont setfont
 
107
  } { % ifelse
 
108
    pop pop 
 
109
  }
 
110
  ifelse
 
111
  c-show                        % center title
 
112
} bind def
 
113
 
 
114
% Return the y size of the current font
 
115
% - => fontsize
 
116
/currentfontsize {
 
117
  currentfont /FontMatrix get 3 get 1000 mul
 
118
} bind def
 
119
 
 
120
% reencode the font
 
121
% <encoding-vector> <fontdict> -> <newfontdict>
 
122
/reencode { %def
 
123
  dup length 5 add dict begin
 
124
    { %forall
 
125
      % <vector> <key> <val>
 
126
      1 index /FID ne 
 
127
      { def }{ pop pop } ifelse
 
128
    } forall
 
129
    /Encoding exch def % -
 
130
 
 
131
    % Use the font's bounding box to determine the ascent, descent,
 
132
    % and overall height; don't forget that these values have to be
 
133
    % transformed using the font's matrix.
 
134
    % We use `load' because sometimes BBox is executable, sometimes not.
 
135
    % Since we need 4 numbers an not an array avoid BBox from being executed
 
136
    /FontBBox load aload pop
 
137
    FontMatrix transform /Ascent exch def pop
 
138
    FontMatrix transform /Descent exch def pop
 
139
    /FontHeight Ascent Descent sub def
 
140
 
 
141
    % Get the underline position and thickness if they're defined.
 
142
    % Use 1 if they are not defined.
 
143
    currentdict /FontInfo 2 copy known
 
144
    { get
 
145
      /UnderlinePosition 2 copy % <FontInfo> /UP <FontInfo> /UP
 
146
      2 copy known
 
147
      { get }{ pop pop 1 } ifelse
 
148
      0 exch FontMatrix transform exch pop
 
149
      def % <FontInfo>
 
150
 
 
151
      /UnderlineThickness 2 copy % <FontInfo> /UT <FontInfo> /UT
 
152
      2 copy known
 
153
      { get }{ pop pop 1 } ifelse
 
154
      0 exch FontMatrix transform exch pop
 
155
      def % <FontInfo>
 
156
      pop % -
 
157
    }{ pop pop
 
158
    } ifelse
 
159
 
 
160
    currentdict
 
161
  end 
 
162
} bind def
 
163
 
 
164
% Function print line number (<string> # -)
 
165
/# {
 
166
  gsave
 
167
    sx cw mul neg 2 div 0 rmoveto
 
168
    f# setfont
 
169
    c-show
 
170
  grestore
 
171
} bind def
 
172
 
 
173
% -------- Some routines to enlight plain b/w printings ---------
 
174
 
 
175
% Underline
 
176
% width --
 
177
/dounderline {
 
178
  currentpoint
 
179
  gsave
 
180
    moveto
 
181
    0 currentfont /Descent get currentfontsize mul rmoveto
 
182
    0 rlineto
 
183
    stroke
 
184
  grestore
 
185
} bind def
 
186
 
 
187
% Underline a string
 
188
% string --
 
189
/dounderlinestring {
 
190
  stringwidth pop
 
191
  dounderline
 
192
} bind def
 
193
 
 
194
/UL {
 
195
  /ul exch store
 
196
} bind def
 
197
 
 
198
% Draw a box of WIDTH wrt current font
 
199
% width --
 
200
/dobox {
 
201
  currentpoint
 
202
  gsave
 
203
    newpath
 
204
    moveto
 
205
    0 currentfont /Descent get currentfontsize mul rmoveto
 
206
    dup 0 rlineto
 
207
    0 currentfont /FontHeight get currentfontsize mul rlineto
 
208
    neg 0 rlineto
 
209
    closepath
 
210
    stroke
 
211
  grestore
 
212
} bind def
 
213
 
 
214
/BX {
 
215
  /bx exch store
 
216
} bind def
 
217
 
 
218
% Box a string
 
219
% string --
 
220
/doboxstring {
 
221
  stringwidth pop
 
222
  dobox
 
223
} bind def
 
224
 
 
225
%
 
226
% ------------- Color routines ---------------
 
227
%
 
228
/FG /setrgbcolor load def
 
229
 
 
230
% Draw the background
 
231
% width --
 
232
/dobackground {
 
233
  currentpoint
 
234
  gsave
 
235
    newpath
 
236
    moveto
 
237
    0 currentfont /Descent get currentfontsize mul rmoveto
 
238
    dup 0 rlineto
 
239
    0 currentfont /FontHeight get currentfontsize mul rlineto
 
240
    neg 0 rlineto
 
241
    closepath
 
242
    bgcolor aload pop setrgbcolor
 
243
    fill
 
244
  grestore
 
245
} bind def
 
246
 
 
247
% Draw bg for a string
 
248
% string --
 
249
/dobackgroundstring {
 
250
  stringwidth pop
 
251
  dobackground
 
252
} bind def
 
253
 
 
254
 
 
255
/BG {
 
256
  dup /bg exch store
 
257
  { mark 4 1 roll ] /bgcolor exch store } if
 
258
} bind def
 
259
 
 
260
 
 
261
/Show {
 
262
  bg { dup dobackgroundstring } if
 
263
  ul { dup dounderlinestring } if
 
264
  bx { dup doboxstring } if
 
265
  show
 
266
} bind def
 
267
 
 
268
% Function T(ab), jumps to the n-th tabulation in the current line
 
269
/T {
 
270
  cw mul x0 add
 
271
  bg { dup currentpoint pop sub dobackground } if
 
272
  ul { dup currentpoint pop sub dounderline } if
 
273
  bx { dup currentpoint pop sub dobox } if
 
274
  y0 moveto
 
275
} bind def
 
276
 
 
277
% Function n: move to the next line
 
278
/n {
 
279
  /y0 y0 bfs sub store
 
280
  x0 y0 moveto
 
281
} bind def
 
282
 
 
283
% Function N: show and move to the next line
 
284
/N {
 
285
  Show
 
286
  /y0 y0 bfs sub store
 
287
  x0 y0 moveto
 
288
} bind def
 
289
 
 
290
/S {
 
291
  Show
 
292
} bind def
 
293
 
 
294
%%Copyright: (c) 1988, 89, 90, 91, 92, 93 Miguel Santana
 
295
%%Copyright: (c) 1995, 96, 97, 98 Akim Demaille, Miguel Santana
 
296
% Function title: prints page header.
 
297
% <ct> <rt> <lt> are passed as argument
 
298
/title { 
 
299
  % 1. Draw the background
 
300
  x v get y v get moveto
 
301
  0 setgray
 
302
  gsave
 
303
    0 th 2 div neg rmoveto 
 
304
    th setlinewidth
 
305
    0.5 0.5 1 setrgbcolor
 
306
    pw 0 rlineto stroke
 
307
  grestore
 
308
  % 2. Border it
 
309
  gsave
 
310
    0.7 setlinewidth
 
311
    pw 0 rlineto
 
312
    0 th neg rlineto
 
313
    pw neg 0 rlineto
 
314
    closepath stroke
 
315
  grestore
 
316
  % stk: ct rt lt
 
317
  x v get y v get th sub 1 add moveto
 
318
%%IncludeResource: font Helvetica
 
319
  fHelvetica fnfs 0.8 mul scalefont setfont
 
320
  % 3. The left title
 
321
  gsave
 
322
    dup stringwidth pop fnfs 0.8 mul add exch % leave space took on stack
 
323
    fnfs 0.8 mul hm rmoveto
 
324
    show                        % left title
 
325
  grestore
 
326
  exch
 
327
  % stk: ct ltw rt
 
328
  % 4. the right title
 
329
  gsave
 
330
    dup stringwidth pop fnfs 0.8 mul add exch % leave space took on stack
 
331
    dup
 
332
    pw exch stringwidth pop fnfs 0.8 mul add sub
 
333
    hm
 
334
    rmoveto
 
335
    show                        % right title
 
336
  grestore
 
337
  % stk: ct ltw rtw
 
338
  % 5. the center title
 
339
  gsave
 
340
    pw 3 1 roll
 
341
    % stk: ct pw ltw rtw
 
342
    3 copy 
 
343
    % Move to the center of the left room
 
344
    sub add 2 div hm rmoveto
 
345
    % What is the available space in here?
 
346
    add sub fnfs 0.8 mul sub fnfs 0.8 mul sub
 
347
    % stk: ct space_left
 
348
%%IncludeResource: font Helvetica-Bold
 
349
  fHelvetica-Bold fnfs scalefont setfont
 
350
    1 setgray
 
351
    cfshow
 
352
  grestore
 
353
} bind def
 
354
 
 
355
% Function border: prints virtual page border
 
356
/border { %def
 
357
  gsave                         % print four sides
 
358
    0 setgray
 
359
    x v get y v get moveto
 
360
    0.7 setlinewidth            % of the square
 
361
    pw 0 rlineto
 
362
    0 ph neg rlineto
 
363
    pw neg 0 rlineto
 
364
    closepath stroke
 
365
  grestore
 
366
} bind def
 
367
 
 
368
% Function water: prints a water mark in background
 
369
/water { %def
 
370
  gsave
 
371
    scx scy moveto rotate
 
372
%%IncludeResource: font Times-Bold
 
373
  fTimes-Bold 100 scalefont setfont
 
374
    .97 setgray
 
375
    dup stringwidth pop 2 div neg -50 rmoveto
 
376
    show
 
377
  grestore
 
378
} bind def
 
379
 
 
380
% Function rhead: prints the right header
 
381
/rhead {  %def
 
382
  lx ly moveto
 
383
  fHelvetica fnfs 0.8 mul scalefont setfont
 
384
  l-show
 
385
} bind def
 
386
 
 
387
% Function footer (cf rf lf -> -)
 
388
/footer {
 
389
  fHelvetica fnfs 0.8 mul scalefont setfont
 
390
  dx dy moveto
 
391
  show
 
392
 
 
393
  snx sny moveto
 
394
  l-show
 
395
  
 
396
  fnx fny moveto
 
397
  c-show
 
398
} bind def
 
399
 
 
400
% Function print line number (<string> # -)
 
401
/# {
 
402
  gsave
 
403
    sx cw mul neg 2 div 0 rmoveto
 
404
    f# setfont
 
405
    c-show
 
406
  grestore
 
407
} bind def
 
408
%%BeginResource: procset a2ps-color-prolog 2.0 1
 
409
 
 
410
%% Definition of the color faces.
 
411
/p {
 
412
  0 0 0 FG
 
413
  false BG
 
414
  false UL
 
415
  false BX
 
416
  fCourier bfs scalefont setfont
 
417
  Show
 
418
} bind def
 
419
 
 
420
/sy {
 
421
  0 0 0 FG
 
422
  false BG
 
423
  fSymbol bfs scalefont setfont
 
424
  Show
 
425
} bind def
 
426
 
 
427
/k {
 
428
  false BG
 
429
  false UL
 
430
  false BX
 
431
  0 0 0.9 FG
 
432
  fCourier bfs scalefont setfont
 
433
  Show
 
434
} bind def
 
435
 
 
436
/K {
 
437
  false BG
 
438
  false UL
 
439
  false BX
 
440
  0 0 0.8 FG
 
441
  fCourier-Bold bfs scalefont setfont
 
442
  Show
 
443
} bind def
 
444
 
 
445
/c {
 
446
  false BG
 
447
  false UL
 
448
  false BX
 
449
  0.8 0 0 FG
 
450
  fCourier bfs scalefont setfont
 
451
  Show
 
452
} bind def
 
453
 
 
454
/C {
 
455
  false BG
 
456
  false UL
 
457
  false BX
 
458
  0.8 0 0 FG
 
459
  fCourier-Bold bfs scalefont setfont
 
460
  Show
 
461
} bind def
 
462
 
 
463
/l {
 
464
  0 0 0 FG
 
465
  0.8 0.8 0 true BG
 
466
  false UL
 
467
  false BX
 
468
  fCourier bfs scalefont setfont
 
469
  Show
 
470
} bind def
 
471
 
 
472
/L {
 
473
  0 0 0 FG
 
474
  1 1 0 true BG
 
475
  false UL
 
476
  false BX
 
477
  fCourier-Bold bfs scalefont setfont
 
478
  Show
 
479
} bind def
 
480
 
 
481
/str {
 
482
  false BG
 
483
  false UL
 
484
  false BX
 
485
  0 0.5 0 FG
 
486
  fTimes-Roman bfs scalefont setfont
 
487
  Show
 
488
} bind def
 
489
 
 
490
/e{
 
491
  1 0 0 true BG
 
492
  false UL
 
493
  true BX
 
494
  1 1 1 FG
 
495
  fHelvetica-Bold bfs scalefont setfont
 
496
  Show
 
497
} bind def
 
498
 
 
499
% Function print line number (<string> # -)
 
500
/# {
 
501
  gsave
 
502
    sx cw mul 2 div neg 0 rmoveto
 
503
    f# setfont
 
504
    0.8 0.1 0.1 FG
 
505
    c-show
 
506
  grestore
 
507
} bind def
 
508
%%EndResource
 
509
%%EndProlog
 
510
%%BeginSetup
 
511
%%IncludeResource: font Courier
 
512
%%IncludeResource: font Courier-Bold
 
513
%%IncludeResource: font Times-Roman
 
514
%%IncludeResource: font Symbol
 
515
%%BeginResource: encoding ISO-8859-1Encoding
 
516
/ISO-8859-1Encoding [
 
517
/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef 
 
518
/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef 
 
519
/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef 
 
520
/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef 
 
521
/space /exclam /quotedbl /numbersign /dollar /percent /ampersand /quoteright 
 
522
/parenleft /parenright /asterisk /plus /comma /minus /period /slash 
 
523
/zero /one /two /three /four /five /six /seven 
 
524
/eight /nine /colon /semicolon /less /equal /greater /question 
 
525
/at /A /B /C /D /E /F /G 
 
526
/H /I /J /K /L /M /N /O 
 
527
/P /Q /R /S /T /U /V /W 
 
528
/X /Y /Z /bracketleft /backslash /bracketright /asciicircum /underscore 
 
529
/quoteleft /a /b /c /d /e /f /g 
 
530
/h /i /j /k /l /m /n /o 
 
531
/p /q /r /s /t /u /v /w 
 
532
/x /y /z /braceleft /bar /braceright /asciitilde /.notdef 
 
533
/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef 
 
534
/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef 
 
535
/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef 
 
536
/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef 
 
537
/space /exclamdown /cent /sterling /currency /yen /brokenbar /section 
 
538
/dieresis /copyright /ordfeminine /guillemotleft /logicalnot /hyphen /registered /macron 
 
539
/degree /plusminus /twosuperior /threesuperior /acute /mu /paragraph /bullet 
 
540
/cedilla /onesuperior /ordmasculine /guillemotright /onequarter /onehalf /threequarters /questiondown 
 
541
/Agrave /Aacute /Acircumflex /Atilde /Adieresis /Aring /AE /Ccedilla 
 
542
/Egrave /Eacute /Ecircumflex /Edieresis /Igrave /Iacute /Icircumflex /Idieresis 
 
543
/Eth /Ntilde /Ograve /Oacute /Ocircumflex /Otilde /Odieresis /multiply 
 
544
/Oslash /Ugrave /Uacute /Ucircumflex /Udieresis /Yacute /Thorn /germandbls 
 
545
/agrave /aacute /acircumflex /atilde /adieresis /aring /ae /ccedilla 
 
546
/egrave /eacute /ecircumflex /edieresis /igrave /iacute /icircumflex /idieresis 
 
547
/eth /ntilde /ograve /oacute /ocircumflex /otilde /odieresis /divide 
 
548
/oslash /ugrave /uacute /ucircumflex /udieresis /yacute /thorn /ydieresis 
 
549
] def
 
550
%%EndResource
 
551
% Initialize page description variables.
 
552
/sh 842 def
 
553
/sw 595 def
 
554
/llx 24 def
 
555
/urx 571 def
 
556
/ury 818 def
 
557
/lly 24 def
 
558
/#copies 1 def
 
559
/th 15.000000 def
 
560
/fnfs 11 def
 
561
/bfs 5.477068 def
 
562
/cw 3.286241 def
 
563
 
 
564
% Dictionary for ISO-8859-1 support
 
565
/iso1dict 6 dict begin
 
566
  /fCourier ISO-8859-1Encoding /Courier reencode_font
 
567
  /fCourier-Bold ISO-8859-1Encoding /Courier-Bold reencode_font
 
568
  /fHelvetica ISO-8859-1Encoding /Helvetica reencode_font
 
569
  /fHelvetica-Bold ISO-8859-1Encoding /Helvetica-Bold reencode_font
 
570
  /fTimes-Bold ISO-8859-1Encoding /Times-Bold reencode_font
 
571
  /fTimes-Roman ISO-8859-1Encoding /Times-Roman reencode_font
 
572
currentdict end def
 
573
/bgcolor [ 0 0 0 ] def
 
574
/bg false def
 
575
/ul false def
 
576
/bx false def
 
577
% The font for line numbering
 
578
/f# /Helvetica findfont bfs .6 mul scalefont def
 
579
/fSymbol /Symbol findfont def
 
580
/hm fnfs 0.25 mul def
 
581
/pw
 
582
   cw 81.400000 mul
 
583
def
 
584
/ph
 
585
   359.843364 th add
 
586
def
 
587
/pmw urx llx sub pw 2 mul sub 1 div def
 
588
/pmh ury lly sub ph 2 mul sub 24 sub 1 div def
 
589
/v 0 def
 
590
/x [
 
591
  0
 
592
  dup pmw add pw add
 
593
  0
 
594
  dup pmw add pw add
 
595
] def
 
596
/y [
 
597
  pmh ph add 1 mul ph add
 
598
  dup
 
599
  pmh ph add 0 mul ph add
 
600
  dup
 
601
] def
 
602
/scx sw 2 div def
 
603
/scy sh 2 div def
 
604
/snx urx def
 
605
/sny lly 2 add def
 
606
/dx llx def
 
607
/dy sny def
 
608
/fnx scx def
 
609
/fny dy def
 
610
/lx snx def
 
611
/ly ury fnfs 0.8 mul sub def
 
612
/sx 0 def
 
613
/tab 8 def
 
614
/x0 0 def
 
615
/y0 0 def
 
616
%%EndSetup