rfc1131.ps
来自「RFC 的详细文档!」· PS 代码 · 共 3,971 行 · 第 1/5 页
PS
3,971 行
%!
% The following defines procedures assumed and used by program "dvi2ps"
%
% $Header: tex.ps,v 1.20 88/08/30 04:48:29 van Exp $
%
% Original By: Neal Holtz, Carleton University, Ottawa, Canada
% <holtz@cascade.carleton.cdn>
% <holtz%cascade.carleton.cdn@ubc.csnet>
% June, 1985
% Seriously hacked by Van Jacobson, LBL
% <van@lbl-csam.arpa>
/TeXDict 200 dict def % define a working dictionary
TeXDict begin
/bdef {bind def} def
/Mtrx 6 array def
%%%%%%%%%%%%%%%%%%%%% Page setup (user) options %%%%%%%%%%%%%%%%%%%%%%%%
% dvi2ps will output coordinates in the TeX system ([0,0] 1" down and in
% from top left, with y +ive downward). The default PostScript system
% is [0,0] at bottom left, y +ive up. The Many Matrix Machinations in
% the following code are an attempt to reconcile that. The intent is to
% specify the scaling as 1 and have only translations in the matrix to
% properly position the text. Caution: the default device matrices are
% *not* the same in all PostScript devices; that should not matter in most
% of the code below (except for lanscape mode -- in that, rotations of
% -90 degrees resulted in the the rotation matrix [ e 1 ]
% [ 1 e ]
% where the "e"s were almost exactly but not quite unlike zeros.
%
% The order we expect to get things from dvi2ps is:
% @start (sets default origin at 1" in, 1" down)
% (the next can appear in an order)
% @letter,@note,@legal (optional: re-init device with appro. matrix)
% @landscape (optional: rotate image 90 deg)
% @draft (optional: set up for draft printing)
% @manualfeed (optional)
% n @copies (optional)
% r @startdoc (required: sets scaling for supplied resolution,
% must be last)
%
% @start - -- start everything
/@start {
72 720 translate
} bdef
% r @startdoc -
/@startdoc {
72 exch div dup neg scale % set scaling to 1 pixel
% move coor. system to nearest pixel boundary
0 0 transform round exch round exch itransform translate
Mtrx currentmatrix pop
/@TeXSave save def
} def
/@letter
{ /letter where {pop letter initmatrix}if
} def
% note mode is like letter, except it uses less VM
/@note
{ /note where {pop note initmatrix}if
} def
/@legal
{ /legal where {pop legal initmatrix}if
0 216 translate % move up 3 more inches
} def
/@landscape
{ initmatrix
90 rotate 72 -72 translate
} def
/@manualfeed
{ statusdict /manualfeed true put
} def
% n @copies - set number of copies
/@copies
{ /#copies exch def
} def
%%%%%%%%%%%%%%%%%%%% Procedure Defintions %%%%%%%%%%%%%%%%%%%%%%%%%%
% scale id @newfont - initialize a new font dictionary
/@newfont
{ /newname exch def
newname 7 dict def % allocate new font dictionary
newname load begin
/FontType 3 def
dup neg matrix scale /FontMatrix exch def
/FontBBox [0 0 1 1] def
/BitMaps 128 array def
/BuildChar {CharBuilder} def
/Encoding 128 array def
0 1 127 {Encoding exch /.undef put} for
end
newname newname load definefont pop
} bdef
% the following is the only character builder we need. it looks up the
% char data in the BitMaps array, and paints the character if possible.
% char data -- a bitmap descriptor -- is an array of length 6, of
% which the various slots are:
/ch-image {ch-data 0 get} bdef % the hex string image
/ch-width {ch-data 1 get} bdef % the number of pixels across
/ch-height {ch-data 2 get} bdef % the number of pixels tall
/ch-xoff {ch-data 3 get} bdef % number of pixels below origin
/ch-yoff {ch-data 4 get} bdef % number of pixels to left of origin
/ch-tfmw {ch-data 5 get} bdef % spacing to next character
% fontdict ch Charbuilder - -- image one character
/CharBuilder
{ /ch-code exch def % save the char code
/font-dict exch def % and the font dict.
/ch-data font-dict /BitMaps get ch-code get def % get the bitmap
ch-data null eq not {
ch-tfmw 0 ch-xoff neg ch-yoff neg
ch-width ch-xoff sub ch-height ch-yoff sub
setcachedevice
ch-width ch-height true [1 0 0 1 ch-xoff ch-yoff]
{ch-image} imagemask
} if
} bdef
% fontdict @sf - -- make that the current font
/@sf { setfont } bdef
% in the following, the font-cacheing mechanism requires that
% a name unique in the particular font be generated
% char-data ch @dc - -- define a new character bitmap in current font
/@dc
{ /ch-code exch def
dup 0 get
length 2 lt
{ pop [ <00> 1 1 0 0 8.00 ] } % replace <> with null
if
/ch-data exch def
currentfont /BitMaps get ch-code ch-data put
% generate a unique name simply from the character code
currentfont /Encoding get ch-code dup ( ) cvs cvn put
} bdef
/@DRAFTF { gsave initmatrix newpath
/Helvetica-Bold findfont setfont
(Draft) dup stringwidth pop 8.875 exch div dup 72 mul dup scale
52.3 rotate 2.5 exch div -.35 translate
0.95 setgray
0 0 moveto show
grestore } bdef
/@DRAFTM { gsave initmatrix newpath
/Helvetica-Bold findfont 72 scalefont setfont
0.95 setgray
576 702 moveto
(Draft) stringwidth exch neg exch neg rmoveto
(Draft) show
grestore } bdef
% n @bop0 - -- begin the char def section of a new page
/@bop0 { pop } bdef
% n @bop1 - -- begin a brand new page
/@bop1 { pop Mtrx setmatrix /SaveImage save def } bdef
/@draft {
/@bop1
{ 1 le {@DRAFTF} {@DRAFTM} ifelse
Mtrx setmatrix
/SaveImage save def
} bdef
} bdef
% - @eop - -- end a page
/@eop { showpage SaveImage restore } bdef
% - @end - -- done the whole shebang
/@end { end } bdef
% x y p - -- move to position
/p { moveto } bdef
% x r - -- move right
/r { 0 rmoveto } bdef
% string s - -- show the string
/s { show } bdef
% x string m - -- move right then show string
/m { exch 0 rmoveto show } bdef
% ch c - -- show the character (code given)
/c { c-string dup 0 4 -1 roll put show } bdef
/c-string ( ) def
% dx dy ru - -- set a rule (rectangle)
/ru
{ /dy exch neg def % because dy is height up from bottom
/dx exch def
/x currentpoint /y exch def def % remember current point
newpath x y moveto
dx 0 rlineto
0 dy rlineto
dx neg 0 rlineto
closepath fill
x y moveto
} bdef
/@MacSetUp
{ userdict /md known % if md is defined
{ userdict /md get type /dicttype eq % and if it is a dictionary
{
md begin % then redefine some stuff
/letter {} def
/note {} def
/legal {} def
/od{ppr dup 0 0 put 1 0 put txpose
1 0 mtx defaultmatrix dtransform exch atan/pa exch def
newpath clippath mark
{transform{itransform moveto}}
{transform{itransform lineto}}
{ 6 -2 roll transform
6 -2 roll transform
6 -2 roll transform
{ itransform 6 2 roll
itransform 6 2 roll
itransform 6 2 roll
curveto
}
}
{{closepath}}
pathforall newpath counttomark array astore /gc xdf
pop ct 39 0 put
10 fz 0 fs 2 F/|______Courier fnt invertflag{PaintBlack}if
}def
/txpose{
pxs pys scale ppr aload pop
por {
noflips {
pop exch neg exch translate pop 1 -1 scale
}if
xflip yflip and {
pop exch neg exch translate 180 rotate 1 -1 scale
ppr 3 get ppr 1 get neg sub neg ppr 2 get
ppr 0 get neg sub neg translate
}if
xflip yflip not and {
pop exch neg exch translate pop 180 rotate
ppr 3 get ppr 1 get neg sub neg 0 translate
}if
yflip xflip not and {
ppr 1 get neg ppr 0 get neg translate
}if
}
{
noflips {
translate pop pop 270 rotate 1 -1 scale
}if
xflip yflip and {
translate pop pop 90 rotate 1 -1 scale
ppr 3 get ppr 1 get neg sub neg ppr 2 get
ppr 0 get neg sub neg translate
}if
xflip yflip not and {
translate pop pop 90 rotate ppr 3 get
ppr 1 get neg sub neg 0 translate
}if
yflip xflip not and {
translate pop pop 270 rotate ppr 2 get
ppr 0 get neg sub neg 0 exch translate
}if
}ifelse
scaleby96 {
ppr aload pop 4 -1 roll add 2 div 3 1 roll add 2 div 2 copy
translate .96 dup scale neg exch neg exch translate
}if
}def
/cp {pop pop showpage pm restore}def
end
}if
} if
} bdef
%!
% All software, documentation, and related files in this distribution of
% psfig/tex are Copyright (c) 1987 Trevor J. Darrell
%
% Permission is granted for use and non-profit distribution of psfig/tex
% providing that this notice be clearly maintained, but the right to
% distribute any portion of psfig/tex for profit or as part of any commercial
% product is specifically reserved for the author.
%
%
% psfigTeX PostScript Prolog
% $Header: tex.ps,v 1.20 88/08/30 04:48:29 van Exp $
%
/psf$TeXscale { 65536 div } def
gsave initgraphics
/DocumentInitState [ matrix currentmatrix currentlinewidth currentlinecap
currentlinejoin currentdash currentgray currentmiterlimit ] cvx def
grestore
% x y bb-llx bb-lly bb-urx bb-ury startFig -
/startTexFig {
/psf$SavedState save def
userdict maxlength dict begin
currentpoint transform
DocumentInitState setmiterlimit setgray setdash setlinejoin setlinecap
setlinewidth setmatrix
itransform moveto
/psf$ury exch psf$TeXscale def
/psf$urx exch psf$TeXscale def
/psf$lly exch psf$TeXscale def
/psf$llx exch psf$TeXscale def
/psf$y exch psf$TeXscale def
/psf$x exch psf$TeXscale def
currentpoint /psf$cy exch def /psf$cx exch def
/psf$sx psf$x psf$urx psf$llx sub div def % scaling for x
/psf$sy psf$y psf$ury psf$lly sub div def % scaling for y
psf$sx psf$sy scale % scale by (sx,sy)
psf$cx psf$sx div psf$llx sub
psf$cy psf$sy div psf$ury sub translate
/DefFigCTM matrix currentmatrix def
/initmatrix {
DefFigCTM setmatrix
} def
/defaultmatrix {
DefFigCTM exch copy
} def
/initgraphics {
DocumentInitState setmiterlimit setgray setdash
setlinejoin setlinecap setlinewidth setmatrix
DefFigCTM setmatrix
} def
/showpage {
initgraphics
} def
/erasepage {
initgraphics
} def
/copypage {
initgraphics
} def
@MacSetUp
} bdef
% - doclip -
/doclip {
llx lly urx ury
currentpoint 6 2 roll
newpath 4 copy
4 2 roll moveto
6 -1 roll exch lineto
exch lineto
exch lineto
closepath clip
newpath
moveto
} bdef
% - endTexFig -
/endTexFig { end psf$SavedState restore } def
%%%% Additions by LA Carr to reencode Adobe fonts as TeX fonts (almost)
%%%% Based on routine in LaserWriter Cookbook
/ReEncodeForTeX
{ /newfontname exch def
/basefontname exch def
/TeXstr 30 string def
/basefontdict basefontname findfont def
/newfont basefontdict maxlength dict def
basefontdict
{ exch dup /FID ne
{ dup /Encoding eq
{ exch dup length array copy
newfont 3 1 roll put }
{ exch newfont 3 1 roll put }
ifelse
}
{ pop pop }
ifelse
} forall
basefontdict /MathFontName known not
{
/TeXvec basefontname TeXstr cvs (Courier) search
{ pop pop pop TeXcourvec }
{ pop TeXnormalvec }
ifelse def
TeXvec aload pop
TeXvec length 2 idiv
{ newfont /Encoding get 3 1 roll put }
repeat
}
if
newfontname newfont definefont pop
} bdef
/TeXnormalvec
[ 8#014 /fi 8#015 /fl 8#020 /dotlessi 8#022 /grave 8#023 /acute
8#024 /caron 8#025 /breve 8#026 /macron 8#027 /ring 8#030 /cedilla
8#031 /germandbls 8#032 /ae 8#033 /oe 8#034 /oslash 8#035 /AE
8#036 /OE 8#037 /Oslash 8#042 /quotedblright 8#074 /exclamdown
8#076 /questiondown 8#134 /quotedblleft 8#136 /circumflex
8#137 /dotaccent 8#173 /endash 8#174 /emdash 8#175 /hungarumlat
8#176 /tilde 8#177 /dieresis ] def
/TeXcourvec
[ 8#016 /exclamdown 8#017 /questiondown 8#020 /dotlessi 8#022 /grave
8#023 /acute 8#024 /caron 8#025 /breve 8#026 /macron 8#027 /ring
8#030 /cedilla 8#031 /germandbls 8#032 /ae 8#033 /oe 8#034 /oslash
8#035 /AE 8#036 /OE 8#037 /Oslash 8#074 /less 8#076 /greater
8#134 /backslash 8#136 /circumflex 8#137 /underscore 8#173 /braceleft
8#174 /bar 8#175 /braceright 8#177 /dieresis ] def
/TeXPSmakefont { % defines a routine for generating PS fonts, fudged!
/TeXsize exch def findfont
[ TeXsize 0 0 TeXsize neg 0 0 ] makefont
} bdef
% fontname basefontname angle ObliqueFont -
% Create a General Oblique font
/ObliqueFont {
/ObliqueAngle exch def
/ObliqueBaseName exch def
/ObliqueFontName exch def
/ObliqueTransform [1 0 ObliqueAngle sin ObliqueAngle cos div 1 0 0] def
/basefontdict ObliqueBaseName findfont ObliqueTransform makefont def
/newfont basefontdict maxlength dict def
basefontdict
{ exch dup /FID ne
{ dup /Encoding eq
{ exch dup length array copy
newfont 3 1 roll put }
{ exch newfont 3 1 roll put }
ifelse
}
{ pop pop }
ifelse
} forall
newfont /FontName ObliqueFontName put
ObliqueFontName newfont definefont
pop
} bdef
% Palatino-ItalicUnslanted? You must be joking!
% fontname basename SmallCapsFont - Create a General SmallCaps font
/SmallCapsFont {
/SmallCapsBaseName exch def
/SmallCapsFontName exch def
/basefontdict SmallCapsBaseName findfont def
/newfont basefontdict maxlength 10 add dict def
newfont begin
/FontName SmallCapsFontName def
/FontBaseDict basefontdict 1000 scalefont def
/FontSCDict FontBaseDict .8 scalefont def
/FontType 3 def
/BuildChar {SmallCapChar} def
/FontMatrix dup basefontdict exch get def
/FontBBox dup basefontdict exch get def
/Encoding dup basefontdict exch get def
end
SmallCapsFontName newfont definefont pop
} bdef
% fontdict ch SmallCapChar -
% It shouldn't be so damn hard to do this (make one font out
% of two others) but I tried several dozen variations on this
% theme until I found something that worked. -- vj
/SmallCapChar {
/achar (A) def
achar exch 0 exch put
begin
achar 0 get dup 97 ge exch 122 le and {
% handle 'a' through 'z' specially
achar 0 achar 0 get 32 sub put
FontSCDict
} {
FontBaseDict
} ifelse
setfont achar stringwidth FontBBox setcachedevice
newpath 0 0 moveto achar show
end
} bdef
/MathEncodingVec [
/Gamma /Delta /Theta /Lambda /Xi /Pi /Sigma /Upsilon1
/Phi /Psi /Omega /alpha /beta /gamma /delta /epsilon
/zeta /nu /theta /iota /kappa /lambda /mu /nu
/xi /pi /rho /sigma /tau /upsilon /phi /chi
/psi /omega /epsilon /theta1 /omega1 /rho /sigma /phi1
/arrowleft /arrowleft /arrowright /arrowright
/suchthat /congruent /proportional /angle
/zero /one /two /three /four /five /six /seven
/eight /nine /period /comma /less /slash /greater /asteriskmath
/partialdiff /A /B /C /D /E /F /G
/H /I /J /K /L /M /N /O
/P /Q /R /S /T /U /V /W
/X /Y /Z /registerserif /copyrightserif /trademarkserif /logicalor /logicaland
/section /a /b /c /d /e /f /g
/h /i /j /k /l /m /n /o
/p /q /r /s /t /u /v /w
/x /y /z /dotlessi /j /weierstrass /macron /breve
] def
% the following gives the character codes of the above characters
% in their font. I.e., this is the character we have to hand "show"
% to image the characters above.
/MathCharVec [
71 68 81 76 88 80 83 161
70 89 87 97 98 103 100 101
122 110 113 105 107 108 109 110
120 112 114 115 116 117 102 99
121 119 101 74 118 114 115 106
172 172 174 174 39 64 181 208
48 49 50 51 52 53 54 55
56 57 46 44 60 47 62 42
182 65 66 67 68 69 70 71
72 73 74 75 76 77 78 79
80 81 82 83 84 85 86 87
88 89 90 210 211 212 218 217
167 97 98 99 100 101 102 103
104 105 106 107 108 109 110 111
112 113 114 115 116 117 118 119
120 121 122 245 106 195 197 198
] def
% this array tells which font dictionary holds each character above
% (0 = basefont, 1 = symbol (maybe slanted), 2 = symbol (unslanted)).
/MathDictVec [
1 1 1 1 1 1 1 1
1 1 1 1 1 1 1 1
1 1 1 1 1 1 1 1
1 1 1 1 1 1 1 1
1 1 1 1 1 1 1 1
2 2 2 2 2 2 2 2
0 0 0 0 0 0 0 0
0 0 0 0 2 2 2 2
2 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0
0 0 0 2 2 2 2 2
2 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0
0 0 0 0 0 2 0 0
] def
% fontname basename symbolname symbolbase angle MathOblique -
% Create a "math" font with the symbol font characters slanted
% by "angle"
/MathOblique {
3 copy ObliqueFont
pop pop MathFont
} bdef
% fontname basename symbolname MathFont - Create a math italic font
%
% We build this font out of the base font & the symbol font
% using an encoding vec as close as we can get to cmmi10 with
% standard postscript characters. An array parallel to the
% encoding vector tells which font dictionary to use for a
% particular character.
/MathFont {
/MathSymName exch def
/MathBaseName exch def
/MathFontName exch def
/basefontdict MathBaseName findfont def
/newfont basefontdict maxlength 10 add dict def
newfont begin
/FontName MathFontName def
/FontDictArray [
basefontdict 1000 scalefont
MathSymName findfont 950 scalefont
/Symbol findfont 950 scalefont
] def
/FontType 3 def
/BuildChar {MathFontChar} def
/FontMatrix dup basefontdict exch get def
/FontBBox dup basefontdict exch get def
% the encoding vector is a copy of the original font's
% encoding, modified "appropriately".
/Encoding dup basefontdict exch get dup length array copy def
/WhichFont MathDictVec def
/WhichChar MathCharVec def
MathEncodingVec Encoding copy pop
/achar (A) def
end
MathFontName newfont definefont pop
} bdef
% fontdict ch MathFontChar -
% (there's some serious magic going on here: see note on
% SmallCapChar above -- vj).
/MathFontChar {
exch begin
achar exch 0 exch put
FontDictArray WhichFont achar 0 get get get setfont
achar dup 0 get WhichChar exch get 0 exch put
achar stringwidth FontBBox setcachedevice
newpath 0 0 moveto achar show
end
} bdef
/@flushfonts { @TeXSave restore /@TeXSave save def} bdef
end % revert to previous dictionary
TeXDict begin @start
%%Title: spec-frame.dvi
%%Creator: dvi2ps
%%EndProlog
300 @startdoc
103 @bop0
/Helvetica /h-med.300 ReEncodeForTeX /h-med.300 /h-med.300 41.666629 TeXPSmakefont def
/Times-Bold /t-bol.420 ReEncodeForTeX /t-bol.420 /t-bol.420 58.333229 TeXPSmakefont def
/Times-Roman /t-rom.300 ReEncodeForTeX /t-rom.300 /t-rom.300 41.666629 TeXPSmakefont def
103 @bop1
h-med.300 @sf 0 50 p (RFC)s
12 r 49 c
-3(131)m
698(OSPF)m
699(October)m
11(1989)m
t-bol.420 @sf 0 195 p (Security)s
15(Considerations)m
t-rom.300 @sf 0 306 p (All)s
12(OSPF)m
11(protocol)m
12(exchanges)m
12(are)m
11(authenticated.)m
18(This)m
11(is)m
12(accomplished)m
12(through)m
11(authentication)m
12(\014elds)m
12(contained)m
11(in)m
12(the)m
0 356 p (OSPF)s
10(packet)m
11(header)m
-1 r 46 c
12(For)m
11(more)m
10(information,)m
11(see)m
10(Sections)m
11(8.1,)m
10(8.2,)m
10(and)m
11(Appendix)m
10(E.)m
t-bol.420 @sf 0 513 p (Author)s
1 r 39 c
-1 r 115 c
13(Addr)m
(ess)s
t-rom.300 @sf 104 623 p (John)s
10(Moy)m
104 673 p (Proteon,)s
10(Inc.)m
104 722 p 50 c
10 r 84 c
-2(echnology)m
10(Drive)m
104 772 p 87 c
-3(estborough,)m
10(MA)m
10(01581-5008)m
104 839 p (Phone:)s
14(508-898-2800)m
104 905 p (EMail:)s
14(jmoy@proteon.com)m
h-med.300 @sf 0 2723 p (Moy)s
1693(Page)m
11(103)m
@eop
102 @bop0
/Times-Bold /t-bol.360 ReEncodeForTeX /t-bol.360 /t-bol.360 49.999929 TeXPSmakefont def
102 @bop1
h-med.300 @sf 0 50 p (RFC)s
12 r 49 c
-3(131)m
698(OSPF)m
699(October)m
11(1989)m
t-bol.420 @sf 0 195 p 69 c
58(Authentication)m
t-rom.300 @sf 0 306 p (All)s
9(OSPF)m
8(protocol)m
9(exchanges)m
9(are)m
9(authenticated.)m
13(The)m
9(OSPF)m
8(packet)m
9(header)m
9(\(see)m
9(Section)m
8(A.2\))m
9(includes)m
9(an)m
9(authentication)m
0 356 p (type)s
10(\014eld,)m
11(and)m
10(64-bits)m
11(of)m
10(data)m
10(used)m
11(by)m
10(the)m
11(appropriate)m
10(authentication)m
11(scheme)m
10(\(determined)m
10(by)m
11(the)m
10(type)m
11(\014eld\).)m
0 423 p (The)s
12(authentication)m
13(type)m
12(is)m
13(con\014gurable)m
12(on)m
12 r 97 c
13(per)m
(-area)s
11(basis.)m
20(Additional)m
12(authentication)m
13(data)m
12(is)m
13(con\014gurable)m
12(on)m
12 r 97 c
13(per)m
45 c
0 473 p (interface)s
12(basis.)m
17(For)m
12(example,)m
12(if)m
11(an)m
12(area)m
11(uses)m
12 r 97 c
12(simple)m
11(password)m
12(scheme)m
12(for)m
11(authentication,)m
12 r 97 c
12(separate)m
11(password)m
12(may)m
0 523 p (be)s
10(con\014gured)m
11(for)m
10(each)m
11(network)m
10(contained)m
10(in)m
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?