PostScriptは年賀状を書くための言語です
— keiichirou shikano (@golden_lucky) December 31, 2013
@golden_luckyさんのPostScript年賀状を勝手にまとめた。2012, 2008が好きです。
PostScriptは年賀状を書くための言語です
— keiichirou shikano (@golden_lucky) December 31, 2013
@golden_luckyさんのPostScript年賀状を勝手にまとめた。2012, 2008が好きです。
;; ps-mode ;; C-c C-v : ps-run-boundingbox ;; C-c C-u : ps-mode-uncomment-region ;; C-c C-t : ps-mode-epsf-rich ;; C-c C-s : ps-run-start ;; C-c C-r : ps-run-region ;; C-c C-q : ps-run-quit ;; C-c C-p : ps-mode-print-buffer ;; C-c C-o : ps-mode-comment-out-region ;; C-c C-k : ps-run-kill ;; C-c C-j : ps-mode-other-newline ;; C-c C-l : ps-run-clear ;; C-c C-b : ps-run-buffer (load "ps-mode") (setq ps-run-x `(,(expand-file-name "~/gs-path")))
%!OPS-1.0 %%Creator: HAYAKAWA,Takashi |
%!PS-Adobe-3.0
% factorial
/fact {
1 dict begin
/n exch def
n 1 eq n 0 eq or {
1
} {
n 1 sub fact n mul
} ifelse
end
} def
5 fact % 120 |
%!PS-Adobe-3.0
%%BoundingBox: 0 0 100 20
%%Title: orz.ps
%%Creator: @aka
%%CreationDate: Thu May 19 23:06:30 2005
%%EndComments
64 dict begin
/dots 14 def
/Helvetica-Bold findfont 18 scalefont setfont
/orz {
0 1 dots {
/head exch def
0 0 moveto
dots head sub { (.) show } repeat
(o) show
head { (.) show } repeat
(rz) show
showpage
} for
} def
orz
end
showpage
%%EOF |
LispとPostScriptさえあれば私はハッピーになれる。
| PostScript(R) Language Program Design (APL) posted with amazlet at 09.12.02 Adobe Systems Inc. Addison-Wesley Professional 売り上げランキング: 59322 |
BlueBook, Thinking in PostScript 他はこちら
| %!PS-Adobe-3.0 % PostScript実習マニュアル % %%Title % P.71 page.ps %%Page: (first page) 1 |
そうそう、2ページ目以降ってどうやるんだろうって思ってたんだった。この方法だけなのかな。
| %!PS-Adobe-3.0 /square { /specialsquare { 0 0.4 0.8 setrgbcolor |
| %!PS-Adobe-3.0 % clip /star { /polkadot { /polkadotstar { /polkadotstarbyeo { 1 0 0.4 setrgbcolor |
| %!PS-Adobe-3.0 % P.58 3.7.1 ベジェ曲線の基礎 140 450 100 650 500 750 300 450 bezier |
| %!PS-Adobe-3.0 % P59 3.7.3 ベジェ曲線の連結 150 600 100 750 350 700 250 600 300 450 500 400 400 600 bezbez |
PostScript実習マニュアル
P.63 3.8.10 日本語のフォント
Ryumin-Light-RKSJ-H 明朝体の横組み。
Ryumin-Light-RKSJ-V 明朝体の縦組み。
GothicBBB-Medium-RKSJ-H ゴシック体の横組み。
GothicBBB-Medium-RKSJ-V ゴシック体の縦組み。ちなみに、これらのフォント名を持つフォント辞書は、文字コードとしてShift JIS を使っています。これらのフォント名に含まれているRKSJ という部分をEUC に置き換えると、文字コードとしてEUC-JP を使うフォント辞書の名前になります。
| % P.50 3.4 色 3.4.2 加法混色 % rgb /hundredlines { |
| % P.51 3.4.3 減法混色 /hline { /hundredlines { |
| % setgray /hline { /elevenlines { dline |
| % cap 650 0 hline |
| % join 600 0 harpoon |
| % join 600 0 harpoon |
| % dash /hline { vline |
| % roudash |
access string
| % P.40 2.13 ファイル 2.13.2 ファイルのオープン % access string |
| % P.43 2.13.8 標準入出力のファイルオブジェクト |
IO関連オペレータ
| % file |
読み込み
| /cat { (c:/test.txt) cat % c:/test.txt |
コピー
| /copy { (c:/test.txt) (c:/test1.txt) copy |
| % P.50 3.3.6 領域の内部性の判定 /star { 0 0.4 0 setrgbcolor |
| %!PS-Adobe-3.0 /fib { 20 fib % 6765 |
%!PS-Adobe-3.0
% factorial
/fact {
1 dict begin
/n exch def
n 1 eq n 0 eq or {
1
} {
n 1 sub fact n mul
} ifelse
end
} def
5 fact % 120
GS>(abcdefghijk) 3 4 getinterval ==
(defg)
GS>/s (abcdefghijk) def
GS>s 3 (WXYZ) putinterval
GS>s ==
(abcWXYZhijk)
GS>(437) cvi ==
437
GS>(3.14) cvr ==
3.14
GS>(kpf) cvn ==
/kpf
GS>437 3 string cvs ==
(437)
GS>(kpf) (9LISP) 123 5
GS<4>pstack
5
123
(9LISP)
(kpf)
GS<4>stack
5
123
9LISP
kpf
GS<4>
GS>(kpf) (9LISP) (hoge)
GS<3>pop
GS<2>stack
9LISP
kpf
GS<2>count ==
2
GS<2>countGS<3>stack
2
9LISP
kpf
GS<3>pop
GS<2>count ==
2
GS<2>clear
GS>stack
GS>
GS>398 dup
GS<2>pstack
398
398
GS<2>(a) (b) (c) 2 index
GS<6>pstack
(a)
(c)
(b)
(a)
398
398
GS<6>(a) (b) (c) 3 copy
GS<12>pstack
(c)
(b)
(a)
(c)
(b)
(a)
(a)
(c)
(b)
(a)
398
398
GS<12>clear
GS>(a) (b) (c) exch
GS<3>pstack
(b)
(c)
(a)
GS<3>(9) (L) (I) (S) (P) 4 3 roll
GS<8>pstack
(L)
(P)
(S)
(I)
(9)
(b)
(c)
(a)
GS<8>
GS>100 mark 1 2 3 4 5
GS<7>pstack
5
4
3
2
1
-mark-
100
GS<7>counttomark
GS<8>==
5
GS<7>counttomark ==
5
GS<7>cleartomark
GS<1>pstack
100
GS<1>
| %!PS-Adobe-3.0 /reverse { [1 2 3 4 5] reverse == |
| %!PS-Adobe-3.0 /suma { [1 2 3 4 5 6 7 8 9 10] suma == % 55 |
| %!PS-Adobe-3.0 /amap { [1 2 3 4 5] { 10 mul } amap == |
| %!PS-Adobe-3.0 2 30 hmtom == |
| %!PS-Adobe-3.0 |
| %!PS-Adobe-3.0 /Times-Roman findfont 100 scalefont setfont |