Subject: v11i075: Including PostScript figures in ditroff, Part04/05 Newsgroups: comp.sources.unix Sender: sources Approved: rs@uunet.UU.NET Submitted-by: trevor@linc.cis.upenn.edu (Trevor Darrell) Posting-number: Volume 11, Issue 75 Archive-name: psfig/Part04 # This is a shell archive. Remove anything before this line, # then unpack it by saving it in a file and typing "sh file". # # Contents: trf/doc/figs/black.ps trf/doc/figs/gray.ps trf/doc/figs/lab.ps # trf/doc/figs/mac.pro trf/doc/figs/piechart.ps trf/doc/figs/pretzel.ps # trf/doc/figs/rosette.ps trf/doc/figs/smiley.ps trf/doc/figs/star.ps # trf/doc/figs/white.ps echo x - trf/doc/figs/black.ps sed 's/^@//' > "trf/doc/figs/black.ps" <<'@//E*O*F trf/doc/figs/black.ps//' %! balck.ps: a unit square. %%BoundingBox: 0 0 1 1 0 setgray 0 0 moveto 0 1 lineto 1 1 lineto 1 0 lineto closepath fill @//E*O*F trf/doc/figs/black.ps// chmod u=rw,g=r,o=r trf/doc/figs/black.ps echo x - trf/doc/figs/gray.ps sed 's/^@//' > "trf/doc/figs/gray.ps" <<'@//E*O*F trf/doc/figs/gray.ps//' %! gray.ps: a unit square for printing text against %%BoundingBox: 0 0 1 1 @.95 setgray 0 0 moveto 0 1 lineto 1 1 lineto 1 0 lineto closepath fill @//E*O*F trf/doc/figs/gray.ps// chmod u=rw,g=r,o=r trf/doc/figs/gray.ps echo x - trf/doc/figs/lab.ps sed 's/^@//' > "trf/doc/figs/lab.ps" <<'@//E*O*F trf/doc/figs/lab.ps//' %! %%BoundingBox: 135 410 462 688 md begin T 64 1520 50 72 72 psu (NewLab3; user: )jn %%Title: NewLab3 %%Creator: MAC LaserWriter Driver %%For: 1320 od %%EndProlog %%Page: ? 1 op 0 0 xl 1 1 pen 0 0 gm 0 0 1440 1080 6 dorect 64 grlevel 369 723 442 742 4 dorect 0 grlevel 369.5 723.5 441.5 741.5 0 dorect 2 2 pen 797 158 gm 32 grlevel 776 179 lin 869 179 gm 848 158 lin 719 200 gm 0 grlevel 719 527 lin 749 608 gm 32 grlevel 749 596 lin 869 530 gm 869 578 lin 293 596 gm 671 596 lin bc 4 4 pen 292 529 gm 0 grlevel pt 292 643 pl 280 655 pl 256 655 pl 244 643 pl 244 526 pl eu 1 1 pen 0 0 gm 64 grlevel 585 267 634 274 4 dorect 0 grlevel 585.5 267.5 633.5 273.5 0 dorect 294 627 gm 273 627 lin 294 621 gm 273 621 lin 294 615 gm 273 615 lin 294 609 gm 273 609 lin 294 603 gm 273 603 lin 294 597 gm 273 597 lin 294 591 gm 273 591 lin 267 627 gm 246 627 lin 267 621 gm 246 621 lin 267 615 gm 246 615 lin 267 609 gm 246 609 lin 267 603 gm 246 603 lin 267 597 gm 246 597 lin 267 591 gm 246 591 lin bc 4 4 pen 292 526 gm 64 grlevel tr 0 grlevel pt 277 526 pl 277 544 pl 292 544 pl eu bc 670 529 gm pt 670 649 pl 685 664 pl 757 664 pl 769 652 pl 769 619 pl 757 607 pl 748 607 pl eu bc 718 595 gm pt 850 595 pl 868 577 pl eu 2 2 pen 869 458 gm 32 grlevel 869 506 lin 869 386 gm 869 434 lin 869 314 gm 869 362 lin 869 242 gm 869 290 lin 4 4 pen 868 289 gm 0 grlevel 868 313 lin 868 361 gm 868 385 lin 868 433 gm 868 457 lin 868 505 gm 868 529 lin bc 670 217 gm 64 grlevel tr 0 grlevel pt 685 217 pl 685 199 pl 670 199 pl eu bc 292 316 gm pt 292 205 pl 280 193 pl 244 193 pl 232 205 pl 232 283 pl 244 295 pl eu 2 2 pen 671 248 gm 32 grlevel 293 248 lin 4 4 pen 0 0 gm 64 grlevel 217 670 320 689 4 dorect 0 grlevel 219. 672. 318. 687. 0 dorect 685 526 gm 685 661 lin 670 526 gm 685 526 lin 0 0 gm 64 grlevel 247 277 320 296 4 dorect 0 grlevel 249. 279. 318. 294. 0 dorect 2 2 pen 293 527 gm 668 527 lin 671 317 gm 293 317 lin 245 524 gm 32 grlevel 245 491 lin 4 4 pen 271 247 gm 0 grlevel 292 247 lin 2 2 pen 389 317 gm 389 248 lin 449 317 gm 449 248 lin 509 317 gm 509 248 lin 575 317 gm 575 248 lin 575 596 gm 575 527 lin 509 596 gm 509 527 lin 449 596 gm 449 527 lin 389 596 gm 389 527 lin 4 4 pen 775 199 gm 718 199 lin 709 526 gm 718 526 lin 685 199 gm 688 199 lin 670 217 gm 670 142 lin 718 142 gm 718 199 lin 1 1 pen 672 147 gm 693 147 lin 672 153 gm 693 153 lin 672 159 gm 693 159 lin 672 165 gm 693 165 lin 699 147 gm 720 147 lin 699 153 gm 720 153 lin 699 159 gm 720 159 lin 699 165 gm 720 165 lin bc 693 144 gm pt 693 171 pl 699 171 pl 699 144 pl eu 4 4 pen 0 0 gm 64 grlevel 439 277 494 296 4 dorect 0 grlevel 441. 279. 492. 294. 0 dorect 64 grlevel 352 277 407 296 4 dorect 0 grlevel 354. 279. 405. 294. 0 dorect 1 1 pen 64 grlevel 210 240 247 286 4 dorect 0 grlevel 210.5 240.5 246.5 285.5 0 dorect 285 246 gm 240 210 lin 240 246 gm 285 210 lin 2 2 pen 473 527 gm 64 grlevel 455 527 lin 1 1 pen 456 528 gm 0 grlevel 456 546 lin 0 0 gm 510.5 438.5 546.5 474.5 360 450 0 doarc 2 2 pen 413 527 gm 64 grlevel 395 527 lin 1 1 pen 396 528 gm 0 grlevel 396 546 lin 0 0 gm 510.5 378.5 546.5 414.5 360 450 0 doarc 2 2 pen 365 527 gm 64 grlevel 383 527 lin 1 1 pen 384 528 gm 0 grlevel 384 546 lin 0 0 gm 510.5 366.5 546.5 402.5 90 180 0 doarc 2 2 pen 362 317 gm 64 grlevel 380 317 lin 1 1 pen 381 318 gm 0 grlevel 381 300 lin 0 0 gm 300.5 363.5 336.5 399.5 180 270 0 doarc 2 2 pen 533 527 gm 64 grlevel 515 527 lin 1 1 pen 516 528 gm 0 grlevel 516 546 lin 0 0 gm 510.5 498.5 546.5 534.5 360 450 0 doarc 2 2 pen 599 527 gm 64 grlevel 581 527 lin 1 1 pen 582 528 gm 0 grlevel 582 546 lin 0 0 gm 510.5 564.5 546.5 600.5 360 450 0 doarc 2 2 pen 599 317 gm 64 grlevel 581 317 lin 1 1 pen 582 318 gm 0 grlevel 582 300 lin 0 0 gm 300.5 564.5 336.5 600.5 270 360 0 doarc 2 2 pen 536 317 gm 64 grlevel 518 317 lin 1 1 pen 519 318 gm 0 grlevel 519 300 lin 0 0 gm 300.5 501.5 336.5 537.5 270 360 0 doarc 2 2 pen 476 317 gm 64 grlevel 458 317 lin 1 1 pen 459 318 gm 0 grlevel 459 300 lin 0 0 gm 300.5 441.5 336.5 477.5 270 360 0 doarc 2 2 pen 416 317 gm 64 grlevel 398 317 lin 1 1 pen 399 318 gm 0 grlevel 399 300 lin 0 0 gm 300.5 381.5 336.5 417.5 270 360 0 doarc 690 201 gm 690 186 lin 720 201 gm 720 186 lin 0 0 gm 186.5 675.5 216.5 705.5 270 360 0 doarc 186.5 705.5 216.5 735.5 180 270 0 doarc 246 528 gm 246 543 lin 276 528 gm 276 543 lin 0 0 gm 513.5 231.5 543.5 261.5 360 450 0 doarc 513.5 261.5 543.5 291.5 90 180 0 doarc 4 4 pen 718 595 gm 718 529 lin 2 2 pen 293 440 gm 293 404 lin 671 440 gm 671 404 lin 1 1 pen 0 0 gm 510.5 279.5 540.5 309.5 180 270 0 doarc 480.5 279.5 510.5 309.5 90 180 0 doarc 294 525 gm 279 525 lin 294 495 gm 279 495 lin 0 0 gm 336.5 279.5 366.5 309.5 180 270 0 doarc 306.5 279.5 336.5 309.5 90 180 0 doarc 294 351 gm 279 351 lin 294 321 gm 279 321 lin 0 0 gm 510.5 654.5 540.5 684.5 270 360 0 doarc 480.5 654.5 510.5 684.5 360 450 0 doarc 669 525 gm 684 525 lin 669 495 gm 684 495 lin 0 0 gm 336.5 657.5 366.5 687.5 270 360 0 doarc 306.5 657.5 336.5 687.5 360 450 0 doarc 672 351 gm 687 351 lin 672 321 gm 687 321 lin 0 0 gm 64 grlevel 443 408 480 457 4 dorect 0 grlevel 443.5 408.5 479.5 456.5 0 dorect 32 grlevel 449.5 420.5 473.5 444.5 0 doval 432 464 gm 0 grlevel 432 458 lin 435 461 gm 429 461 lin 423 489 gm 64 grlevel 481 420 492 446 2 dorect 0 grlevel 0 1 6 [tb {0 fs}fx {9 fz}fx %%Changefont: |----1Helvetica F /|----1Helvetica fnt 21 am (Hand)aa ]es 0 0 gm 64 grlevel 419 437 432 450 4 doval 0 grlevel 419.5 437.5 431.5 449.5 0 doval 64 grlevel 410 422 441 441 4 dorect 0 grlevel 410.5 422.5 440.5 440.5 0 dorect 64 grlevel 420 425 430 435 4 dorect 0 grlevel 420.5 425.5 429.5 434.5 0 dorect 32 grlevel 420 434 430 438 4 dorect 0 grlevel 420.5 434.5 429.5 437.5 0 dorect 64 grlevel 387 486 433 535 4 dorect 0 grlevel 387.5 486.5 432.5 534.5 0 dorect 499 428 gm 0 1 6 [tb gf 25 am (Vision)aa ]es 0 0 gm 64 grlevel 363 495 376 508 4 doval 0 grlevel 363.5 495.5 375.5 507.5 0 doval 64 grlevel 354 504 385 523 4 dorect 0 grlevel 354.5 504.5 384.5 522.5 0 dorect 64 grlevel 364 510 374 520 4 dorect 0 grlevel 364.5 510.5 373.5 519.5 0 dorect 32 grlevel 364 507 374 511 4 dorect 0 grlevel 364.5 507.5 373.5 510.5 0 dorect 399 670 gm 64 grlevel 642 396 678 586 2 dorect 0 grlevel 1 1 6 [tb {1 fs}fx {36 fz}fx %%Changefont: |----1Helvetica F /|----1Helvetica sbs fnt 184 am ( )aa ]es 4 4 pen 244 490 gm 220 490 lin 244 460 gm 220 460 lin 244 460 gm 244 352 lin 2 2 pen 245 350 gm 32 grlevel 245 317 lin 4 4 pen 244 250 gm 0 grlevel 244 316 lin 235 247 gm 250 247 lin 2 2 pen 707 527 gm 64 grlevel 689 527 lin 1 1 pen 690 528 gm 0 grlevel 690 546 lin 0 0 gm 510.5 672.5 546.5 708.5 360 450 0 doarc 4 4 pen 757 664 gm 757 607 lin 868 241 gm 868 178 lin 847 157 gm 796 157 lin 775 178 gm 775 199 lin 1 1 pen 0 0 gm 64 grlevel 464 638 477 651 4 doval 0 grlevel 464.5 638.5 476.5 650.5 0 doval 64 grlevel 455 647 486 666 4 dorect 0 grlevel 455.5 647.5 485.5 665.5 0 dorect 64 grlevel 465 653 475 663 4 dorect 0 grlevel 465.5 653.5 474.5 662.5 0 dorect 32 grlevel 465 650 475 654 4 dorect 0 grlevel 465.5 650.5 474.5 653.5 0 dorect 64 grlevel 434 638 447 651 4 doval 0 grlevel 434.5 638.5 446.5 650.5 0 doval 64 grlevel 425 647 456 666 4 dorect 0 grlevel 425.5 647.5 455.5 665.5 0 dorect 64 grlevel 435 653 445 663 4 dorect 0 grlevel 435.5 653.5 444.5 662.5 0 dorect 32 grlevel 435 650 445 654 4 dorect 0 grlevel 435.5 650.5 444.5 653.5 0 dorect 64 grlevel 404 638 417 651 4 doval 0 grlevel 404.5 638.5 416.5 650.5 0 doval 64 grlevel 395 647 426 666 4 dorect 0 grlevel 395.5 647.5 425.5 665.5 0 dorect 64 grlevel 405 653 415 663 4 dorect 0 grlevel 405.5 653.5 414.5 662.5 0 dorect 32 grlevel 405 650 415 654 4 dorect 0 grlevel 405.5 650.5 414.5 653.5 0 dorect 64 grlevel 374 638 387 651 4 doval 0 grlevel 374.5 638.5 386.5 650.5 0 doval 64 grlevel 365 647 396 666 4 dorect 0 grlevel 365.5 647.5 395.5 665.5 0 dorect 64 grlevel 375 653 385 663 4 dorect 0 grlevel 375.5 653.5 384.5 662.5 0 dorect 32 grlevel 375 650 385 654 4 dorect 0 grlevel 375.5 650.5 384.5 653.5 0 dorect bc 672 492 gm 32 grlevel pt 657 492 pl 657 354 pl 672 354 pl eu 0 0 gm 64 grlevel 396 594 409 607 4 doval 0 grlevel 396.5 594.5 408.5 606.5 0 doval 64 grlevel 381 585 400 616 4 dorect 0 grlevel 381.5 585.5 399.5 615.5 0 dorect 64 grlevel 384 596 394 606 4 dorect 0 grlevel 384.5 596.5 393.5 605.5 0 dorect 32 grlevel 393 596 397 606 4 dorect 0 grlevel 393.5 596.5 396.5 605.5 0 dorect 64 grlevel 354 594 367 607 4 doval 0 grlevel 354.5 594.5 366.5 606.5 0 doval 64 grlevel 363 585 382 616 4 dorect 0 grlevel 363.5 585.5 381.5 615.5 0 dorect 64 grlevel 369 596 379 606 4 dorect 0 grlevel 369.5 596.5 378.5 605.5 0 dorect 32 grlevel 366 596 370 606 4 dorect 0 grlevel 366.5 596.5 369.5 605.5 0 dorect 64 grlevel 376 558 389 571 4 doval 0 grlevel 376.5 558.5 388.5 570.5 0 doval 64 grlevel 367 567 398 586 4 dorect 0 grlevel 367.5 567.5 397.5 585.5 0 dorect 64 grlevel 377 573 387 583 4 dorect 0 grlevel 377.5 573.5 386.5 582.5 0 dorect 32 grlevel 377 570 387 574 4 dorect 0 grlevel 377.5 570.5 386.5 573.5 0 dorect 64 grlevel 372 330 381 348 4 dorect 0 grlevel 372.5 330.5 380.5 347.5 0 dorect 64 grlevel 383 302 432 375 4 dorect 0 grlevel 383.5 302.5 431.5 374.5 0 dorect 32 grlevel 389.5 308.5 425.5 344.5 0 doval 389.5 332.5 425.5 368.5 0 doval 326 404 gm 0 grlevel 326 410 lin 323 407 gm 329 407 lin 350 404 gm 350 410 lin 347 407 gm 353 407 lin 0 0 gm 64 grlevel 351 362 364 375 4 doval 0 grlevel 351.5 362.5 363.5 374.5 0 doval 64 grlevel 362 353 381 384 4 dorect 0 grlevel 362.5 353.5 380.5 383.5 0 dorect 64 grlevel 368 364 378 374 4 dorect 0 grlevel 368.5 364.5 377.5 373.5 0 dorect 32 grlevel 365 364 369 374 4 dorect 0 grlevel 365.5 364.5 368.5 373.5 0 dorect 303 364 gm 64 grlevel 356 300 367 340 2 dorect 0 grlevel 0 1 6 [tb {0 fs}fx {9 fz}fx %%Changefont: |----1Helvetica F /|----1Helvetica fnt 35 am (Arm-Eye)aa ]es 0 0 gm 64 grlevel 438 309 451 322 4 doval 0 grlevel 438.5 309.5 450.5 321.5 0 doval 64 grlevel 431 320 462 339 4 dorect 0 grlevel 431.5 320.5 461.5 338.5 0 dorect 64 grlevel 441 326 451 336 4 dorect 0 grlevel 441.5 326.5 450.5 335.5 0 dorect 32 grlevel 441 323 451 327 4 dorect 0 grlevel 441.5 323.5 450.5 326.5 0 dorect 64 grlevel 438 354 451 367 4 doval 0 grlevel 438.5 354.5 450.5 366.5 0 doval 64 grlevel 431 338 462 357 4 dorect 0 grlevel 431.5 338.5 461.5 356.5 0 dorect 64 grlevel 441 341 451 351 4 dorect 0 grlevel 441.5 341.5 450.5 350.5 0 dorect 32 grlevel 441 350 451 354 4 dorect 0 grlevel 441.5 350.5 450.5 353.5 0 dorect 64 grlevel 465 570 478 583 4 doval 0 grlevel 465.5 570.5 477.5 582.5 0 doval 64 grlevel 444 558 469 598 4 dorect 0 grlevel 444.5 558.5 468.5 597.5 0 dorect 567 459 gm 64 grlevel 451 564 462 592 2 dorect 0 grlevel 0 1 6 [tb gf 23 am (Voxel)aa ]es 4 4 pen 0 0 gm 64 grlevel 439 670 494 689 4 dorect 0 grlevel 441. 672. 492. 687. 0 dorect 64 grlevel 352 670 407 689 4 dorect 0 grlevel 354. 672. 405. 687. 0 dorect 1 1 pen 750 201 gm 750 303 lin 801 375 gm 867 375 lin 870 237 gm 750 237 lin 2 2 pen 749 215 gm 64 grlevel 749 233 lin 1 1 pen 750 234 gm 0 grlevel 768 234 lin 0 0 gm 216.5 732.5 252.5 768.5 270 360 0 doarc 870 303 gm 750 303 lin 2 2 pen 749 257 gm 64 grlevel 749 239 lin 1 1 pen 750 240 gm 0 grlevel 768 240 lin 0 0 gm 222.5 732.5 258.5 768.5 360 450 0 doarc 801 375 gm 801 303 lin 801 447 gm 801 375 lin 870 447 gm 801 447 lin 870 519 gm 720 519 lin 801 447 gm 801 519 lin 2 2 pen 800 350 gm 64 grlevel 800 368 lin 1 1 pen 801 369 gm 0 grlevel 819 369 lin 0 0 gm 351.5 783.5 387.5 819.5 270 360 0 doarc 2 2 pen 800 398 gm 64 grlevel 800 380 lin 1 1 pen 801 381 gm 0 grlevel 819 381 lin 0 0 gm 363.5 783.5 399.5 819.5 360 450 0 doarc 2 2 pen 800 494 gm 64 grlevel 800 512 lin 1 1 pen 801 513 gm 0 grlevel 819 513 lin 0 0 gm 495.5 783.5 531.5 819.5 270 360 0 doarc 2 2 pen 752 518 gm 64 grlevel 734 518 lin 1 1 pen 735 519 gm 0 grlevel 735 537 lin 0 0 gm 501.5 717.5 537.5 753.5 360 450 0 doarc 2 2 pen 719 470 gm 64 grlevel 719 452 lin 1 1 pen 720 453 gm 0 grlevel 738 453 lin 0 0 gm 435.5 702.5 471.5 738.5 360 450 0 doarc 2 2 pen 719 341 gm 64 grlevel 719 359 lin 1 1 pen 720 360 gm 0 grlevel 738 360 lin 0 0 gm 342.5 702.5 378.5 738.5 270 360 0 doarc 64 grlevel 558 819 571 832 4 doval 0 grlevel 558.5 819.5 570.5 831.5 0 doval 64 grlevel 570 807 583 820 4 doval 0 grlevel 570.5 807.5 582.5 819.5 0 doval 64 grlevel 570 789 583 802 4 doval 0 grlevel 570.5 789.5 582.5 801.5 0 doval 64 grlevel 570 771 583 784 4 doval 0 grlevel 570.5 771.5 582.5 783.5 0 doval 64 grlevel 558 759 571 772 4 doval 0 grlevel 558.5 759.5 570.5 771.5 0 doval 64 grlevel 546 771 559 784 4 doval 0 grlevel 546.5 771.5 558.5 783.5 0 doval 64 grlevel 546 789 559 802 4 doval 0 grlevel 546.5 789.5 558.5 801.5 0 doval 64 grlevel 546 807 559 820 4 doval 0 grlevel 546.5 807.5 558.5 819.5 0 doval 64 grlevel 555 768 574 787 4 dorect 0 grlevel 555.5 768.5 573.5 786.5 0 dorect 64 grlevel 555 786 574 805 4 dorect 0 grlevel 555.5 786.5 573.5 804.5 0 dorect 64 grlevel 555 804 574 823 4 dorect 0 grlevel 555.5 804.5 573.5 822.5 0 dorect 64 grlevel 375 726 394 739 4 dorect 0 grlevel 375.5 726.5 393.5 738.5 0 dorect 64 grlevel 422 728 435 738 4 dorect 0 grlevel 422.5 728.5 434.5 737.5 0 dorect 64 grlevel 417 726 421 730 4 doval 0 grlevel 417.5 726.5 420.5 729.5 0 doval 64 grlevel 414 729 418 733 4 doval 0 grlevel 414.5 729.5 417.5 732.5 0 doval 64 grlevel 417 732 421 736 4 doval 0 grlevel 417.5 732.5 420.5 735.5 0 doval 64 grlevel 521 824 537 867 4 dorect 0 grlevel 521.5 824.5 536.5 866.5 0 dorect 64 grlevel 524 827 537 840 4 dorect 0 grlevel 524.5 827.5 536.5 839.5 0 dorect 64 grlevel 524 839 537 852 4 dorect 0 grlevel 524.5 839.5 536.5 851.5 0 dorect 64 grlevel 524 851 537 864 4 dorect 0 grlevel 524.5 851.5 536.5 863.5 0 dorect 702 641 gm 64 grlevel 633 699 644 745 2 dorect 0 grlevel 0 1 6 [tb gf 41 am (Workshop)aa ]es 0 0 gm 64 grlevel 435 780 445 790 4 doval 0 grlevel 435.5 780.5 444.5 789.5 0 doval 64 grlevel 426 765 457 784 4 dorect 0 grlevel 426.5 765.5 456.5 783.5 0 dorect 64 grlevel 450 783 460 793 4 dorect 0 grlevel 450.5 783.5 459.5 792.5 0 dorect 32 grlevel 447 783 451 793 4 dorect 0 grlevel 447.5 783.5 450.5 792.5 0 dorect 64 grlevel 327 768 337 778 4 doval 0 grlevel 327.5 768.5 336.5 777.5 0 doval 64 grlevel 315 753 346 772 4 dorect 0 grlevel 315.5 753.5 345.5 771.5 0 dorect 64 grlevel 312 771 322 781 4 dorect 0 grlevel 312.5 771.5 321.5 780.5 0 dorect 32 grlevel 321 771 325 781 4 dorect 0 grlevel 321.5 771.5 324.5 780.5 0 dorect 64 grlevel 414 735 418 739 4 doval 0 grlevel 414.5 735.5 417.5 738.5 0 doval 64 grlevel 425 731 432 738 4 doval 0 grlevel 425.5 731.5 431.5 737.5 0 doval 475 681 gm 403 681 lin 475 681 gm 475 687 lin 403 681 gm 403 687 lin 439 681 gm 439 687 lin 457 681 gm 457 687 lin 421 681 gm 421 687 lin 469 681 gm 469 684 lin 463 681 gm 463 684 lin 451 681 gm 451 684 lin 445 681 gm 445 684 lin 433 681 gm 433 684 lin 427 681 gm 427 684 lin 415 681 gm 415 684 lin 409 681 gm 409 684 lin 402 696 gm 0 1 6 [tb gf 5 am (0)aa ]es 420 696 gm 0 1 6 [tb gf 5 am (3)aa ]es 438 696 gm 0 1 6 [tb gf 5 am (6)aa ]es 456 696 gm 0 1 6 [tb gf 5 am (9)aa ]es 471 696 gm 0 1 6 [tb gf 10 am (12)aa ]es 484 696 gm 0 1 5 [tb gf 16 am (feet)aa ]es 0 page cp %%Trailer end @//E*O*F trf/doc/figs/lab.ps// chmod u=rw,g=r,o=r trf/doc/figs/lab.ps echo x - trf/doc/figs/mac.pro sed 's/^@//' > "trf/doc/figs/mac.pro" <<'@//E*O*F trf/doc/figs/mac.pro//' %! % Modified slightly by Ned Batchelder, University of Pennsylvania [Ned]. % % Modified slightly for Textset. Changes are marked with "jjs". % Jim Sterken % September 20, 1985 % % ------------ % % Macintosh LaserWriter header file. % % This is a file of PostScript definitions that can be affixed to the % front of the PostScript files generated by Macintosh applications in order % that they can be printed on a LaserWriter that has not been initialized % with the "LaserPrep" package. This situation will arise if you are % trying to share a LaserWriter between Macintosh users and non-Macintosh % users. % % Macintosh applications do not normally generate straight PostScript. % They generate a file in PostScript format, but the contents of the file % is a series of calls on functions that are not part of the PostScript % language. This file defines those functions. % % This is not the official Apple header file. It is neither endorsed nor % condemned by Apple. I suspect that it probably started out its life % as a bootleg copy of a version of the Apple header file. It has been % slightly modified by me and perhaps heavily modified by various other % people. I have substantially augmented the comments so that they explain % what I think the code is doing. % % Brian Reid Reid@SU-Glacier.ARPA % Stanford {decwrl,hplabs,bellcore}!glacier!reid % % WARNING: There is no guarantee that Apple will stick to this particular % set of definitions. This header file works with the application software % that came with my LaserWriter; I make no promises that it will work with % the software on anybody else's LaserWriter. % % To convert this file back into a downloaded file instead of a header % file, uncomment all of the lines beginning with %-% %-%0000000 % Server loop exit password %-%serverdict begin exitserver %-% systemdict /statusdict known %-% {statusdict begin 9 0 3 setsccinteractive /waittimeout 300 def end} %-% if /md 200 dict def % define a working dictionary md begin % start using it /av 13 def % define apple version /mtx matrix currentmatrix def % save current transformation /s30 30 string def /s1 ( ) def /pys 1 def /pxs 1 def /pyt 760 def /pxt 29.52 def /por true def /xl {translate} def /fp {pnsh 0 ne pnsv 0 ne and} def % Define QuickDraw operators as an array of procedures. % They are {frame, paint, erase, invert, fill} % For some reason "invert" is a no-op. /vrb [ {fp {gsave 1 setlinewidth pnsh pnsv scale stroke grestore} if newpath} {eofill} {eofill} {newpath} {eofill} {initclip eoclip newpath} {newpath} % [Ned] Some figures were painting an all black page. {} {} {} ] def % convenience function for backwards def /xdf {exch def} def % get current halftone screen parameters currentscreen /spf xdf % spot function /rot xdf % rotation /freq xdf % spatial frequency % "apply" function to execute appropriate numbered operator from /vrb. /doop {vrb exch get exec} def % compute page position from portrait/landscape flag, translation, scale, % and resolution. % call: P/L-flag xtransl ytransl scale*100 xbits/inch ybits/inch psu % typical call: F 580 760 100 72 72 psu for life-size screen-resolution % image. % /psu {2 index .72 mul exch div /pys xdf % pixel y scale div .72 mul /pxs xdf % pixel x scale /pyt xdf % pixel y translation /pxt xdf % pixel x translation /por xdf % portrait flag (T=portrait) } def % argument is page y size; use this to determine legal, letter, or note % and to set up appropriate scale factors and translation/reflection % for portrait or landscape. /txpose{ dup 1680 eq % % I've disabled this because it was blanking the page (jjs) % % userdict /note known % {{legal}{note}ifelse} % {pop} % ifelse dup 1212 eq {54 32.4 xl} if 1321 eq {8.64 -.6 xl} if pxs pys scale pxt pyt xl por not {270 rotate} if 1 -1 scale } def % Compute oblique shear value for font if flag true /obl {{0.212557 mul}{pop 0} ifelse} def % set font from dictionary: make a font, set it to current, leave on stack % call: "found-font size oblique-flag dictionary sfd" /sfd { [ps 0 ps 6 -1 roll obl ps neg 0 0] makefont dup setfont } def /fnt {findfont sfd} def % bit test-- "number mask-word bt" returns boolean and unchanged number % thus, "4095 512 bt" returns "true 4095" -- the argument is a mask % and not a bit number. /bt {1 index and 0 ne exch} def % load style array with unpacked true/false flags from style word % flags are Bold, Italic, Underline, Outline, Shadow (I don't know % what the 6th one is supposed to be). /sa 6 array def /fs { 1 bt 2 bt 4 bt 8 bt 16 bt sa astore pop } def /matrix1 matrix def /matrix2 matrix def /gf{ currentfont } def % set translation center from 2 double-precision integers giving x,y /tc{ 32768 div add % compute y location 3 1 roll 32768 div add % compute x location 2t astore pop % save 'em } def /3a [0 0 0] def /2t 2 array def % store transformation params: "justify flip rotation tp" % (left/center/right/full, none/yflip,xflip, degrees) /tp{ 3a astore pop } def /ee {} def % move PostScript current position to QuickDraw current position, % and get scaling and rotation right (this is in preparation for % outputting text /tt { gsave currentpoint 2 copy 2t aload pop qa 2 copy xl 3a aload pop exch dup 0 eq {pop} {1 eq {-1 1} {1 -1}ifelse scale} ifelse rotate pop neg exch neg exch xl moveto } def /te { % text-end: undo effects of prior "tt" currentpoint currentfont grestore setfont moveto % but leave font and currentpoint set } def /tb { /tg currentgray def 3 -1 roll 3 eq {1 setgray} if /ml 0 def /al 0 def } def /am { ml add /ml xdf } def /aa { [currentgray /setgray cvx] cvx exch dup wi pop dup al add /al xdf exch } def % scale by rational value (quotient) in x and y. Set "scaleflag" to % record that we have done this. /th { 3 -1 roll div 3 1 roll exch div % not sure of "transform" in next line (BKR) 2 copy matrix1 transform scale pop scale /scaleflag true def } def % undo a "th" scaling and return to default coordinate system /tu { 1 1 matrix1 itransform scale /scaleflag false def } def /ts { 1 1 matrix1 transform scale /scaleflag true def } def % record point size (of fonts) /fz{/ps xdf} def % execute a procedure but leave it on the stack /fx{dup exec} def /st{show pop pop} def % text munger. This does the dirty work for the edit string procedure % (following) by iterating over a polymorphic array and doing the right % thing with what it finds there. /tm { {dup type dup /integertype eq exch /realtype eq or {dup ml mul} {dup type /stringtype eq {rs} {dup type /dicttype eq {setfont} {dup type /arraytype eq {exec} {pop} ifelse } ifelse } ifelse } ifelse } forall } def % edit string. Takes a font, a text mode, a justification mode, and an % array of text and font changes for that text, and does it. /es { 3 -1 roll dup sa 5 get dup type /nulltype eq {pop4 pop} {sa 1 get {/ml ml .2 ps mul sub def} if ne {fs} {pop} ifelse exch dup 1 eq % justification mode 1 is left-justify {pop al ml gt {/tv {ll} /ml ml al dup 0 ne {div}{pop} ifelse def} {/tv {st} /ml 1 def} ifelse def tm } {dup 3 eq % justification mode 3 is right-justify {pop al ml gt {/tv {ll} /ml ml al dup 0 ne {div}{pop} ifelse def} {ml al sub 0 rmoveto /tv {st} /ml 1 def} ifelse def tm} {2 eq % justification mode 3 is centered {al ml gt { /tv {ll} /ml ml al dup 0 ne {div}{pop} ifelse def} {ml al sub 2 div 0 rmoveto /tv {st} /ml 1 def} ifelse def tm} { % otherwise it is just "justified" /tv {ll} def /ml ml al dup 0 ne {div}{pop} ifelse def tm} ifelse} ifelse} ifelse} ifelse tg setgray }def /pop4 {pop pop pop pop} def % -------------------------------------------------------------------- % QuickDraw Procedures % % moveto. If a scale factor is in effect, then honor it. /gm { scaleflag {matrix1 itransform} if moveto } def %local y move % call: "x y localy ly" /ly { exch pop currentpoint exch pop sub 0 exch rmoveto } def % print n copies of page (ensures full speed for multiple copies) /page { 1 add /#copies xdf showpage } def /sk { systemdict /statusdict known } def % set job name /jn { sk {statusdict /jobname 3 -1 roll put} {pop} ifelse } def % set pen size: h v pen /pen { /pnsv xdf /pnsh xdf pnsh setlinewidth } def % draw line % (uses current pen location, pen size and graylevel) % This emulates the ugly QuickDraw pen on the LaserWriter but % preserves the same endpoint and linewidth anomalies that some applications % rely on. (Bletch). /dlin { currentpoint newpath moveto lineto currentpoint stroke grestore moveto } def /lin { currentpoint /pnlv xdf /pnlh xdf gsave newpath /@y xdf /@x xdf fp {pnlh @x lt {pnlv @y ge {pnlh pnlv moveto @x @y lineto pnsh 0 rlineto 0 pnsv rlineto pnlh pnsh add pnlv pnsv add lineto pnsh neg 0 rlineto} {pnlh pnlv moveto pnsh 0 rlineto @x pnsh add @y lineto 0 pnsv rlineto pnsh neg 0 rlineto pnlh pnlv pnsv add lineto} ifelse} {pnlv @y gt {@x @y moveto pnsh 0 rlineto pnlh pnsh add pnlv lineto 0 pnsv rlineto pnsh neg 0 rlineto @x @y pnsv add lineto} {pnlh pnlv moveto pnsh 0 rlineto 0 pnsv rlineto @x pnsh add @y pnsv add lineto pnsh neg 0 rlineto 0 pnsv neg rlineto} ifelse} ifelse closepath fill} if @x @y grestore moveto } def /dl { gsave 0 setlinewidth 0 setgray } def % Arc: top left bottom right startangle stopangle verb flag % flag true means to exclude the center of curvature in the arc /barc { /@f xdf /@op xdf /@e xdf /@s xdf /@r xdf /@b xdf /@l xdf /@t xdf gsave @r @l add 2 div @b @t add 2 div xl 0 0 moveto @r @l sub @b @t sub mtx currentmatrix pop scale @f {newpath} if 0 0 0.5 @s @e arc mtx setmatrix @op doop grestore } def /doarc {dup 0 eq barc} def % oval: top left bottom right verb /doval {0 exch 360 exch true barc} def % rectangle: top left bottom right verb /dorect { /@op xdf currentpoint 6 2 roll newpath 4 copy 4 2 roll exch moveto 6 -1 roll lineto lineto lineto closepath @op doop moveto } def /mup {dup pnsh 2 div le exch pnsv 2 div le or} def % roundrect: top left bottom right ovalwidth ovalheight operation % Warning: ovalwidth is assumed equal to ovalheight. /dorrect { /@op xdf 2. div /@h xdf 2. div /@w xdf /@r xdf /@b xdf /@l xdf /@t xdf @t @b eq @l @r eq @w mup or or {@t @l @b @r @op dorect} {@r @l sub 2. div dup @w lt {/@w xdf}{pop} ifelse @b @t sub 2. div dup @w lt {/@w xdf}{pop} ifelse @op 0 eq {/@w @w pnsh 2 div sub def} if %this helps solve overlap gap for wide line widths currentpoint newpath @r @l add 2. div @t moveto @r @t @r @b @w arcto pop4 @r @b @l @b @w arcto pop4 @l @b @l @t @w arcto pop4 @l @t @r @t @w arcto pop4 closepath @op doop moveto }ifelse } def % Polygon utility procedures /pr { gsave newpath /pl {moveto /pl {lineto} def }def } def /pl {lineto} def /ep { dup 0 eq { {moveto}{lin}{}{} pathforall %nothing but movetos and linetos should be called pop grestore } { doop grestore } ifelse } def /bs 8 string def /bd {/bs xdf} def % These following procedures are used in defining QuickDraw patterns. % (Pattern definition goes into halftone screen of PostScript) % procedure to find black bits in QuickDraw pattern (pattern in hex string bs) /bit {bs exch get exch 7 sub bitshift 1 and} def /bix {1 add 4 mul cvi} def /pp{exch bix exch bix bit}def /grlevel {64. div setgray} def % procedure to set a pattern: ratio hexstring % ratio is the total number of white bits in the QuickDraw pattern represented in hexstring /setpat { /bs xdf 9.375 0 {pp} setscreen grlevel } def /setgry { freq rot {spf} setscreen grlevel } def % standard copybits routine: % arguments: xscale yscale xloc yloc rowbytes xwidth ywidth fsmooth bitmode % This procedure is the basis for all QuickDraw bit operations. % xscale and yscale tell how much to scale the bit image in 72nds of an inch % xloc and yloc are the location of the top left corner of the bitmap % rowbytes is the total number of bytes in each scanline of hex data in the % image. % Note that rowbytes must be even. % xwidth and ywidth are the actual number of bits in the x and y coordinates % of the image. fsmooth is a flag to tell whether or not to use bit % smoothing. Bit smoothing is a % proprietary algorithm that provides smoothing of the data around a 5 by 5 % local area of each data pixel. % bitmode can be any of the QuickDraw source transfer modes excluding srcXor % and notSrcXor. % Note that this is the only QuickDraw procedure that can implement % more than the simple srcCopy transfer mode. /x4 {2 bitshift} def /d4 {-2 bitshift} def /xf {.96 mul exch 2 sub .96 mul exch} def /dobits { /bmode xdf save 9 1 roll % 2 sub fixes dxsrc offset number required for bitsmoothing, but applies % to both %Bit Smooth mode { x4 /@dy xdf 2 sub x4 /@dx xdf /@idx xdf .96 mul exch 3 index 2 sub @dx div 7.68 mul dup 6 1 roll sub exch xl 0 0 moveto xf 0 4 -1 roll 2 index 4 index 1.759 add 10 dorect clip newpath 0 0 moveto scale bmode 0 eq bmode 4 eq or{1 setgray 1 @dy div 1 @dx div 1 1 2 dorect}if bmode 3 eq bmode 7 eq or{1}{0}ifelse setgray @idx 5 bitshift @dy bmode 0 eq bmode 1 eq bmode 3 eq or or [@dx 0 0 @dy 0 0] {(%stdin)(r) file @dy d4 4 add @idx mul string readhexstring pop dup length @idx x4 sub 4 bitshift string dup 3 1 roll @dx 8 add d4 smooth} imagemask } %Non Bit Smooth mode { /@dy xdf 2 sub /@dx xdf /@idx xdf /@xs @idx string def /@f (%stdin)(r) file def /@p{@f @xs readhexstring pop}def .96 mul xl 0 0 moveto xf scale 0 0 1 1 10 dorect clip newpath 0 0 moveto bmode 0 eq bmode 4 eq or{1 setgray .25 @dy div .25 @dx div 1 1 2 dorect}if bmode 3 eq bmode 7 eq or{1}{0}ifelse setgray @p @p @idx 3 bitshift @dy bmode 0 eq bmode 1 eq bmode 3 eq or or [@dx 0 0 @dy 0 0] {@p} imagemask @p @p pop4 }ifelse restore } def % Making Mac compatible Fonts /mfont 14 dict def /wd 14 dict def /mdef {mfont wcheck not{/mfont 14 dict def}if mfont begin xdf end} def /dc {transform round .5 sub exch round .5 sub exch itransform} def % Copy a font dictionary: fontdictionary % copies a font dictionary into tmp so it may be used to define a new font % tmp must be set before cf is called /cf{{1 index /FID ne {tmp 3 1 roll put}{pop pop}ifelse}forall}def % Procedures used in defining a bit map font /mv{tmp /Encoding macvec put}def /bf{ mfont begin /FontType 3 def /FontMatrix [1 0 0 1 0 0] def /FontBBox [0 0 1 1] def /Encoding macvec def /BuildChar { wd begin /cr xdf /fd xdf fd /low get cr get 2 get -1 ne { fd begin low cr get aload pop sd low cr 1 add get 0 get sh sw end /sw xdf /sh xdf sw div /clocn xdf dup 0 ne {0 exch sh div neg dc xl}{pop}ifelse exch sw div /coff xdf exch sw div /cloc xdf /bitw clocn cloc sub def sw sh div 1 scale sw div 0 coff 0 bitw coff add 1 setcachedevice coff cloc sub 0 dc xl cloc .5 sw div add 0 dc newpath moveto bitw 0 ne {0 1 rlineto bitw .5 sw div sub 0 rlineto 0 -1 rlineto closepath clip sw sh false [sw 0 0 sh neg 0 sh]{fd /hm get}imagemask}if } if end } def end mfont definefont pop } def % stringwidth procedure which does not allow a show to occur: (string) /wi{save exch /show{pop}def stringwidth 3 -1 roll restore}def /aps {0 get 124 eq}def /apn {s30 cvs aps} def %set style in a PostScript name: AppleFontName % e.g. % /|----name sos /|---Oname % /|----name sis /|-I--name /xc{s30 cvs dup}def /xp{put cvn}def /scs{xc 3 67 put dup 0 95 xp}def /sos{xc 3 79 xp}def /sbs{xc 1 66 xp}def /sis{xc 2 73 xp}def /sob{xc 2 79 xp}def /sss{xc 4 83 xp}def /dd{exch 1 index add 3 1 roll add exch} def /smc{moveto dup show} def /kwn{dup FontDirectory exch known{findfont exch pop}}def /fb{/ps ps 1 add def}def /mb {dup sbs kwn { exch{pop}{bbc}{} mm }ifelse sfd }def /mo {dup sos kwn { exch{pop}{boc}{} mm }ifelse sfd }def /ms {dup sss kwn { exch{pop}{bsc}{} mm }ifelse sfd }def /ao {dup sos kwn { exch dup ac pop {scs findfont /df2 xdf}{aoc}{} mm }ifelse sfd }def /as {dup sss kwn { exch dup ac pop {scs findfont /df2 xdf}{asc}{} mm }ifelse sfd }def /ac { dup scs kwn {exch /ofd exch findfont def /tmp ofd maxlength 1 add dict def ofd cf mv tmp /PaintType 1 put tmp definefont}ifelse }def /mm{ /mfont 10 dict def mfont begin /FontMatrix [1 0 0 1 0 0] def /FontType 3 def /Encoding macvec def /df 4 index findfont def /FontBBox [0 0 1 1] def /xda xdf /mbc xdf /BuildChar { wd begin /cr xdf /fd xdf /cs s1 dup 0 cr put def fd /mbc get exec end } def exec end mfont definefont} def /bbc { /da .03 def fd /df get setfont gsave cs wi exch da add exch %%%% (used to be "exchd", a bug) grestore setcharwidth cs 0 0 smc da 0 smc da da smc 0 da moveto show } def /boc { /da 1 ps div def fd /df get setfont gsave cs wi exch da add exch grestore setcharwidth cs 0 0 smc da 0 smc da da smc 0 da smc 1 setgray da 2. div dup moveto show } def /bsc { /da 1 ps div def /ds .05 def %da dup .03 lt {pop .03}if def /da2 da 2. div def fd /df get setfont gsave cs wi exch ds add da2 add exch grestore setcharwidth cs ds da2 add .01 add 0 smc 0 ds da2 sub xl 0 0 smc da 0 smc da da smc 0 da smc 1 setgray da 2. div dup moveto show } def /aoc { fd /df get setfont gsave cs wi grestore setcharwidth 1 setgray cs 0 0 smc fd /df2 get setfont 0 setgray 0 0 moveto show }def /asc { /da .05 def fd /df get setfont gsave cs wi exch da add exch grestore setcharwidth cs da .01 add 0 smc 0 da xl 1 setgray 0 0 smc 0 setgray fd /df2 get setfont 0 0 moveto show }def /T true def /F false def % More Polygon stuff used in polygon comment /6a 6 array def /2a 2 array def /5a 5 array def %subtract points, first from second (reverse order): pt0 pt1 qs newpt /qs{3 -1 roll sub exch 3 -1 roll sub exch}def /qa{3 -1 roll add exch 3 -1 roll add exch}def %multiply point: pt factor qm newpt /qm{3 -1 roll 1 index mul 3 1 roll mul}def /qn{6a exch get mul}def /qA .166667 def /qB .833333 def /qC .5 def /qx{ 6a astore pop qA 0 qn qB 2 qn add qA 1 qn qB 3 qn add qB 2 qn qA 4 qn add qB 3 qn qA 5 qn add qC 2 qn qC 4 qn add qC 3 qn qC 5 qn add }def /qp{6 copy 12 -2 roll pop pop}def /qc{qp qx curveto}def /qi{{4 copy 2a astore aload pop qa .5 qm newpath moveto}{2 copy 6 -2 roll 2 qm qs 4 2 roll}ifelse}def /qq{{qc 2a aload pop qx curveto}{4 copy qs qa qx curveto}ifelse}def %start polygon comment /pt{gsave currentpoint newpath moveto}def %fill smoothed poly /qf{gsave eofill grestore}def /tr{currentgray currentscreen bs 5a astore pop /fillflag 1 def}def /bc{/fillflag 0 def}def %polyverb ec /ec{currentpoint 3 -1 roll 1 and 0 ne {currentgray currentscreen bs 5a aload pop bd setscreen setgray 0 doop bd setscreen setgray} {newpath}ifelse moveto }def /bp { currentpoint newpath 2 copy moveto currentgray currentscreen bs 5a astore pop } def /eu{ fillflag 0 ne { gsave currentgray currentscreen bs 5a aload pop bd setscreen setgray 4 ep bd setscreen setgray }if fp{0 ep}{grestore newpath}ifelse }def % Line Layout stuff used by string merging algorithm % counts spaces in string: (...) sm (...) n % returns string and number of spaces in string /sm { dup 0 exch {32 eq{1 add}if}forall } def % layout a string to length specified by desiredlength: printerlength desiredlength (...) ll % printerlength is length of string in printer space /ll { 3 1 roll exch dup .0001 lt 1 index -.0001 gt and {pop pop pop} {sub dup 0 eq { pop show } { 1 index sm dup 0 eq 3 index 0 le or { pop length div 0 3 -1 roll ashow } { % This piece does 10 percent stretching in characters and 90 percent in spaces 10 mul exch length add div dup 10 mul 0 32 4 -1 roll 0 6 -1 roll awidthshow % This piece does straight stretching in spaces only % exch pop div % 0 32 4 -1 roll widthshow }ifelse }ifelse }ifelse }def %set font to symbol and show the string: (...) ss /ss { /pft currentfont def sa aload pop pop /|----2Symbol 4 1 roll {pop{as}} {{{ao}}{{fnt}}ifelse}ifelse exch pop exec exch pop }def /pf{pft dup setfont}def % regular show does underline if ulf is true: % arguments: printerlength desiredlength string rs /rs { sa 2 get { gsave 1 index 0 currentfont dup /FontInfo known { /FontInfo get dup /UnderlinePosition known { dup /UnderlinePosition get 1000 div ps mul } { ps 10 div neg %15 makes line closer to text }ifelse exch dup /UnderlineThickness known { /UnderlineThickness get 1000 div ps mul } { pop ps 15 div %20 makes slightly narrower line }ifelse } { pop ps 10 div neg %15 makes line closer to text ps 15 div %20 makes slightly narrower line }ifelse setlinewidth 0 setgray currentpoint 3 -1 roll sub moveto sa 4 get{gsave currentlinewidth 2. div dup rmoveto currentpoint xl 2 copy rlineto stroke grestore}if sa 3 get sa 4 get or 3 1 roll 2 index{gsave 1 setgray 2 copy rlineto stroke grestore}if rlineto{strokepath 0 setlinewidth}if stroke grestore }if tv } def % More Font building stuff, specifically the Apple Encoding Vector % Font encoding vector for PostScript fonts to match Mac /macvec 256 array def macvec 0 /Times-Roman findfont /Encoding get 0 128 getinterval putinterval macvec 39 /quotesingle put /dotlessi /grave /circumflex /tilde /cedilla /registerserif /copyrightserif /trademarkserif macvec 0 8 getinterval astore pop /Adieresis /Aring /Ccedilla /Eacute /Ntilde /Odieresis /Udieresis /aacute /agrave /acircumflex /adieresis /atilde /aring /ccedilla /eacute /egrave /ecircumflex /edieresis /iacute /igrave /icircumflex /idieresis /ntilde /oacute /ograve /ocircumflex /odieresis /otilde /uacute /ugrave /ucircumflex /udieresis /dagger /ring /cent /sterling /section /bullet /paragraph /germandbls /registersans /copyrightsans /trademarksans /acute /dieresis /notequal /AE /Oslash /infinity /plusminus /lessequal /greaterequal /yen /mu /partialdiff /summation /product /pi /integral /ordfeminine /ordmasculine /Omega /ae /oslash /questiondown /exclamdown /logicalnot /radical /florin /approxequal /Delta /guillemotleft /guillemotright /ellipsis /space /Agrave /Atilde /Otilde /OE /oe /endash /emdash /quotedblleft /quotedblright /quoteleft /quoteright /divide /lozenge /ydieresis /Ydieresis /fraction /currency /guilsinglleft /guilsinglright /fi /fl /daggerdbl /periodcentered /quotesinglbase /quotedblbase /perthousand /Acircumflex /Ecircumflex /Aacute /Edieresis /Egrave /Iacute /Icircumflex /Idieresis /Igrave /Oacute /Ocircumflex /apple /Ograve /Uacute /Ucircumflex /Ugrave /dotlessi /asciicircum /asciitilde /macron /breve /dotaccent /ring /cedilla /hungarumlaut /ogonek /caron macvec 128 128 getinterval astore pop % now redefine all fonts using the MAC Encoding (except in Symbol) to make % them be Apple compatible. FontDirectory {exch dup s30 cvs /@s xdf @s aps {pop pop} {exch dup length dict /tmp xdf cf /Symbol ne {mv} if /@i false def /@o false def /@b false def mark @s (Italic) search {/@i true def} if (Oblique) search {/@o true def} if (Bold) search {/@b true def} if (Roman) search pop (-) search pop /@s xdf cleartomark @s cvn dup /Symbol eq{pop 50}{/Courier eq{51}{49}ifelse}ifelse s30 0 @s length 6 add getinterval dup 6 @s putinterval dup 0 (|-----) putinterval @b {dup 1 66 put} if @i @o or {dup 2 73 put} if % @o {dup 2 79 put} if dup 5 4 -1 roll put cvn tmp definefont pop }ifelse }forall %Make any other special fonts here, i.e. Seattle /_--C-2Symbol /Symbol findfont /tmp 1 index maxlength 1 add dict def cf tmp /PaintType 1 put tmp definefont /|----4Seattle /Helvetica findfont dup length 1 add dict /tmp xdf cf mv /mxv [/zero /one /two /three /four /five /six /seven /eight /nine /comma /period /dollar /numbersign /percent /plus /hyphen /E /parenleft /parenright /space] def tmp /Metrics 21 dict dup begin mxv{600 def}forall end put tmp begin /FontBBox FontBBox [0 0 0 0] astore def end tmp definefont pop % open document, open page and close page procedures % close document doesn't do anything currently % txpose takes the vertical page size as a parameter /od{txpose 10 fz 0 fs F /|----3Courier fnt pop}def /op{/scaleflag false def /pm save def}def /cp{pm restore}def end % % Add a pop to clean up the stack. A dictionary is left behind... (jjs) % pop @//E*O*F trf/doc/figs/mac.pro// chmod u=rwx,g=rx,o=r trf/doc/figs/mac.pro echo x - trf/doc/figs/piechart.ps sed 's/^@//' > "trf/doc/figs/piechart.ps" <<'@//E*O*F trf/doc/figs/piechart.ps//' %! %%BoundingBox: 126 246 486 546 % Cookbook Example Program from First Printing, Revised 7 Jan 1985 % Program: Drawing a Pie Chart Number: 18 %----------------------------------------------------------------------------- % /PieDict 24 dict def % Local storage for % ``DrawPieChart'' and its related % procedures. PieDict begin /DrawSlice % DrawSlice draws an outlined and { /grayshade exch def % filled-in pie slice. It takes /endangle exch def % four operands: the label for /startangle exch def % this particular pie slice, the /thelabel exch def % starting angle for the slice, % the ending angle for the slice % and the shade of gray the slice % should be. newpath % Create a path which will draw a % pie slice. 0 0 moveto 0 0 radius startangle endangle arc closepath 1.415 setmiterlimit % This guarantees that when we % outline the pie slices with a % stroke that we will not get a % spike on the interior angles. gsave grayshade setgray fill grestore % Fill the pie slice path with the stroke % appropriate gray color. By using % gsave and grestore we don't lose % the current path. Since % PostScript paints color onto the % page, it is very important that % we fill the pie slice first and % then outline it with a stroke. gsave % Draw the tick mark and place the % label: startangle endangle add 2 div % Find the center of the pie slice rotate % and rotate so that the x-axis % coincides with this center. radius 0 translate % Translate the origin out to the % circumference. newpath 0 0 moveto labelps .8 mul 0 lineto% Draw the tick-mark. stroke labelps 0 translate % Move the origin out a little % beyond the circumference. 0 0 transform % Next we wish to place the label grestore % at the current origin. If we itransform % simply draw the text on the page /y exch def /x exch def % now, it would come out rotated. x y moveto % Since this is not desired we % avoid it by returning to the % previous unrotated coordinate % system. Before returning, % though, we would like to x 0 lt % remember the position of the { thelabel stringwidth pop neg % current origin on the printed 0 rmoveto % page. We will accomplish this by } if % using the transform and % itransform operators. Performing % a transform on the origin pushes % the coordinates of the origin in % device space onto the operand % stack. Performing a grestore % returns us to the previous % unrotated coordinate system. % Next we perform an itransform on % the two device coordinates left % on the stack to determine where % we are in the current coordinate % system. y 0 lt { 0 labelps neg rmoveto } if % Make some adjustments so that thelabel show % the label text won't collide } def % with the pie slice. /findgray % Procedure findgray calculates { /i exch def /n exch def % the gray value for a slice. It i 2 mod 0 eq % takes two arguments: the total { i 2 div n 2 div round add n div } % number of slices and the current { i 1 add 2 div n div } % slice number (Given that there ifelse % are n pie slices, the slices are } def % ``numbered'' from 1 to n). The end % gray values for the pie slices % range evenly from white to black % (i.e. - the values provided to % setgray range from (n/n, n-1/n, % ..., 1/n)). Since we don't want % similar values of gray next to % each other, findgray % ``shuffles'' the possible % combinations of gray. /DrawPieChart % DrawPieChart takes seven { PieDict begin % arguments: the title of the pie /radius exch def % chart, the point size to print /ycenter exch def /xcenter exch def % the title in, the point size to /PieArray exch def % print the labels for each slice /labelps exch def /titleps exch def % in, a special array (described /title exch def % below where DrawPieChart is % called), the (x,y) center of the % pie chart and the radius of the % pie chart. gsave xcenter ycenter translate % Translate the coordinate system % origin to center of pie chart. /Helvetica findfont titleps % Print the title of the pie chart scalefont setfont % in Helvetica. title stringwidth pop 2 div neg % Center the title below the pie % chart. radius neg titleps 3 mul sub moveto title show /Helvetica findfont labelps % Print the individual pie slice scalefont setfont % labels in Helvetica /numslices PieArray length def /slicecnt 0 def /curangle 0 def % A ``loop'' variable that keeps % track of the angle of arc to % begin each pie slice at. PieArray % Repeat the following for each % element in the PieArray. { /slicearray exch def slicearray aload pop % Push the label and percentage % onto the stack. /percent exch def /label exch def /perangle percent 360 mul def % Convert the percentage into % degrees of angle. /slicecnt slicecnt 1 add def label curangle curangle perangle add numslices slicecnt findgray DrawSlice /curangle curangle perangle add % Update the current starting % angle. def } forall grestore end } def (January Pie Sales) 18 9 [ [(Blueberry) .12 ] % The pie array is an array of [(Cherry) .30 ] % arrays. Each array in the pie [(Apple) .26 ] % array contains a string denoting [(Boston Cream) .16 ] % the label to be printed next to [(Other) .04 ] % the pie slice followed by a real [(Vanilla Cream) .12 ] % number indicating the percentage ] 306 396 100 DrawPieChart % of the pie represented by this % particular slice. showpage @//E*O*F trf/doc/figs/piechart.ps// chmod u=rw,g=r,o=r trf/doc/figs/piechart.ps echo x - trf/doc/figs/pretzel.ps sed 's/^@//' > "trf/doc/figs/pretzel.ps" <<'@//E*O*F trf/doc/figs/pretzel.ps//' %! pretzel.ps -- an example for the psfig paper. %%BoundingBox: 95 100 185 160 5 setlinewidth 1 setlinecap 110 100 moveto 120 120 140 160 160 160 curveto 175 160 180 150 180 140 curveto 180 120 160 100 140 100 curveto 120 100 100 120 100 140 curveto 100 150 105 160 120 160 curveto 140 160 160 120 170 100 curveto stroke showpage @//E*O*F trf/doc/figs/pretzel.ps// chmod u=rw,g=r,o=r trf/doc/figs/pretzel.ps echo x - trf/doc/figs/rosette.ps sed 's/^@//' > "trf/doc/figs/rosette.ps" <<'@//E*O*F trf/doc/figs/rosette.ps//' %! %%BoundingBox: 155 155 457 457 % Cookbook Example Program from First Printing, Revised 7 Jan 1985 % Program: Repeated Shapes Number: 6 %----------------------------------------------------------------------------- % % This program prints a rosette % design by defining a section of % that design and printing that % section repeatedly. This program % illustrates the ``for'' and % "arc" operators, and it shows % how coordinate transformations % can be nested so as to use the % most convenient coordinate % system for each part of a % design. /inch {72 mul} def /wedge % Define an ``ice cream cone'' { newpath % shape by means of the ``arc'' 0 0 moveto % operator. This shape will have a 1 0 translate % 30 degree angle topped off with 15 rotate % a semicircle. Set the path's 0 15 sin translate % first point at the current 0 0 15 sin -90 90 arc % origin. Next, move the origin to closepath % the center of the semicircle by } def % translating to the right 1 unit, % rotating counter-clockwise by 15 % degrees, and translating ``up'' % in the rotated system by the % radius of the semicircle. The % ``arc'' operator includes a % straight line to the initial % point of the arc and a curved % section to the end of the arc. % Note that the semicircle goes % from -90 degrees to 90 degrees % in the rotated coordinate % system. gsave 4.25 inch 4.25 inch translate % Move into position for the % rosette. 1.75 inch 1.75 inch scale % Make the edges of the rosette 1 % 3/4 inches long. 0.02 setlinewidth % Use a 7/200 inch thick line. 2 1 13 % Set up the ``for'' operator to % iterate 12 times, pushing 2 onto % the stack the first time, 3 the % next time, ... , and 13 the last % time. { % The last argument for ``for'' is % the sequence of operations to be % repeated. This sequence must be % enclosed by braces. 13 div setgray % Divide the loop index by 13 to % set a gray value. gsave % Enclose the ``wedge'' operation wedge % in a ``gsave''-``grestore'' % pair, as it will mess up the % coordinate system. gsave % Save the wedge path for use % after the ``fill''. fill grestore 0 setgray stroke % Draw a black border around the % wedge. grestore % Get out of the coordinate system % left by wedge. 30 rotate % Set up for the next section. } for % Close the last argument and % execute the ``for'' operator. grestore showpage @//E*O*F trf/doc/figs/rosette.ps// chmod u=rw,g=r,o=r trf/doc/figs/rosette.ps echo x - trf/doc/figs/smiley.ps sed 's/^@//' > "trf/doc/figs/smiley.ps" <<'@//E*O*F trf/doc/figs/smiley.ps//' %! %%BoundingBox: 0 0 36 36 newpath 18 18 10 0 360 arc stroke % the head newpath 18 18 6 180 360 arc stroke % the mouth newpath 22 22 .5 0 360 arc stroke % right eye newpath 14 22 .5 0 360 arc stroke % left eye showpage % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % @//E*O*F trf/doc/figs/smiley.ps// chmod u=rw,g=r,o=r trf/doc/figs/smiley.ps echo x - trf/doc/figs/star.ps sed 's/^@//' > "trf/doc/figs/star.ps" <<'@//E*O*F trf/doc/figs/star.ps//' %! star.ps -- another cute little character for psfig.txt %%BoundingBox: 195 83 405 300 200 200 translate /points 5 def % Number of points in star /loops 2 def % Number of times around we travel. 0 0 moveto points 1 sub { 200 0 rlineto currentpoint translate 360 points div loops mul neg rotate } repeat closepath 5 setlinewidth stroke showpage @//E*O*F trf/doc/figs/star.ps// chmod u=rw,g=r,o=r trf/doc/figs/star.ps echo x - trf/doc/figs/white.ps sed 's/^@//' > "trf/doc/figs/white.ps" <<'@//E*O*F trf/doc/figs/white.ps//' %! white.ps: a unit square for erasing stuff. %%BoundingBox: 0 0 1 1 1 setgray 0 0 moveto 0 1 lineto 1 1 lineto 1 0 lineto closepath fill @//E*O*F trf/doc/figs/white.ps// chmod u=rw,g=r,o=r trf/doc/figs/white.ps echo Inspecting for damage in transit... temp=/tmp/shar$$; dtemp=/tmp/.shar$$ trap "rm -f $temp $dtemp; exit" 0 1 2 3 15 cat > $temp <<\!!! 10 26 121 black.ps 10 30 147 gray.ps 1048 3491 15162 lab.ps 1060 4439 25623 mac.pro 154 990 7264 piechart.ps 14 65 349 pretzel.ps 77 446 3415 rosette.ps 113 127 5097 smiley.ps 18 62 353 star.ps 10 29 139 white.ps 2514 9705 57670 total !!! wc trf/doc/figs/black.ps trf/doc/figs/gray.ps trf/doc/figs/lab.ps trf/doc/figs/mac.pro trf/doc/figs/piechart.ps trf/doc/figs/pretzel.ps trf/doc/figs/rosette.ps trf/doc/figs/smiley.ps trf/doc/figs/star.ps trf/doc/figs/white.ps | sed 's=[^ ]*/==' | diff -b $temp - >$dtemp if [ -s $dtemp ] then echo "Ouch [diff of wc output]:" ; cat $dtemp else echo "No problems found." fi exit 0