diff --git a/pub/share/wups17a.ps b/pub/share/wups17a.ps index 09ca92d181c9a89361cf426dec4b821ac6a62f64..a3947befcfa8eac4d7e616cd0822826b79f2a6d3 100644 --- a/pub/share/wups17a.ps +++ b/pub/share/wups17a.ps @@ -24,6 +24,9 @@ WuGdict17a begin /cp { closepath } bind def /st { stroke } bind def /x { exch } bind def +/gs { gsave } bind def +/gr { grestore } bind def +/G { gsave exec grestore } bind def /F false def /T true def @@ -611,6 +614,56 @@ WuGdict17a begin langMax dup langChc sub 1 add roll langMax 1 sub { pop } repeat } def +/L { langSel } bind def + +%% Text composition shortcuts: + +/g { x grec endgr} bind def +/sb { x subsc endsc} bind def +/sp { x supsc endsc} bind def +/sbgr { x grec () subsc endsc () endgr} bind def +/spgr { x grec () supsc endsc () endgr} bind def + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%% Text macros +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +/Celsius { showif (\26x)g(C) showif } bind def +/hbar { + showif + (h) 1.2 .66 { + currentpoint fontheight .11 mul setline np mv + fontheight dup .8 mul x .3 mul rl + st () + } build + } bind def + +%% for neutron scattering: + +/hbarw { hbar () grec (w) endgr } bind def +/wbar { grec (w) endgr ( / 2) grec (p) endgr } bind def +/taumean { () (\341t\361) g } bind def +/Sqw { showif (S\(q,) grec (w) endgr (\)) showif } bind def +/Sqn { showif (S\(q,) grec (n) endgr (\)) showif } bind def +/SQw { showif (S\(Q,) grec (w) endgr (\)) showif } bind def +/Sttw { showif (S\(2) grec (q) endgr (,) grec (w) endgr (\)) showif } bind def +/Sttn { showif (S\(2) grec (q) endgr (,) grec (n) endgr (\)) showif } bind def +/Xqw { grec (c) endgr (''\(q,) grec (w) endgr (\)) showif } bind def +/Xqn { grec (c) endgr (''\(q,) grec (n) endgr (\)) showif } bind def +/ueV{ grec (m) endgr (eV) showif} bind def +/inueV { showif (\() grec (m) endgr (eV\)) showif } bind def +/inmeVr { showif (\(meV) supsc (-1) endsc (\)) showif } bind def +/inueVr { showif (\() grec (m) endgr (eV) + supsc (-1) endsc (\)) showif } bind def +/inGHzr { showif (\(GHz) (-1) sp (\)) showif } def + +/Angstr { showif (\305) showif } bind def +/Angr { showif (\305) supsc (-1) endsc } bind def +/inAngr { showif (\() Angr (\)) showif } bind def +/Angrr { showif (\305) supsc (-2) endsc } bind def +/inAngrr { showif (\() Angrr (\)) showif } bind def +/wmin {grec (w) endgr () subsc (min) endsc} def +/winpi { grec (w) endgr ( / 2) grec (p) endgr } def %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %% Coordinate Frame %% @@ -641,8 +694,6 @@ WuGdict17a begin } def /setboxbackgroundcolor { white } def - - /zValues { pop pop } def /whiteframe { 1 0 0 10 10 graybox } def @@ -651,7 +702,6 @@ WuGdict17a begin /abclab x def /abcy x def /abcx x def } def - %% Ticks: % set tick array - internal macros @@ -776,11 +826,6 @@ WuGdict17a begin xTacLen yTacLen rl st } TacExe } def -% unnecessary optimisation by specialisation: OBSOLETE since 17a -/xTacL { Tac } def -/xTacH { Tac } def -/yTacL { Tac } def -/yTacH { Tac } def % special tack routines, only for rectangular axes /xTacC { % : centered tack on x axis linsetTac @@ -900,28 +945,44 @@ WuGdict17a begin grestore } def +/knautschy { % x0 y0 y_knau y_tot knautschy - : insert an S in dived y-axis + % the total height of the generated object is y_tot + % of which y_knau(.le. y_tot) is for the real knautsch, + % the remainder is for vertical prolongations. + x ym 4 div dup /tmpy x def 5 sqrt mul /tmpx x def + /tmpa x ym tmpy 4 mul sub 2 div def + np ym x xm x mv 0 tmpa rl tmpx tmpy rl tmpx -2 mul tmpy 2 mul rl + tmpx tmpy rl 0 tmpa rl st + } def +/separy { % x0 y0 sep lng ang lin - : insert an // in dived y-axis + setline + /spang x def + /splng x def + /spsep x def + 2 copy spsep sub gsave offset spang rotate + splng -.5 mul fm 0 np mv splng fm 0 rl st grestore + spsep add gsave offset spang rotate + splng -.5 mul fm 0 np mv splng fm 0 rl st grestore + } def %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %% Data Plotting (Symbols and Curves) %% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% - %% Initializations: % asymmetric error bars? /err_asy false def % overwrite this if data are quadruples x y d- d+ - %% Presets: -% global preset [wups17a: exchanged rad<->lin to conform with pset] +% global preset /SymGSet { % sradglo slinglo serrglo | - /serrglo x def % plot error bars? 0=never, 1=always, 2=as_given_in_pset /slinglo x def % symbol linewidth multiplier /sradglo x def % symbol size multiplier } def - %% Retrieve presets from style array: /pstyle { pStyles setstyle } def @@ -938,7 +999,6 @@ WuGdict17a begin } ifelse } def - %% Set plot symbol: /pset { % styp sfill serr srad slin | - @@ -982,7 +1042,6 @@ WuGdict17a begin /tf { t black } bind def } def - %% Set curve: /lset { % lwidth dashes | - @@ -1000,7 +1059,6 @@ WuGdict17a begin } ifelse } def - %% Plot nothing: /ostyle { % - | - @@ -1012,7 +1070,6 @@ WuGdict17a begin pop pop pop err_asy { pop } if } def - %% Plot an asymmetric vertical error bar: /errorbar { % x y d- d+ | - @@ -1033,7 +1090,6 @@ WuGdict17a begin grestore } def - %% Plot a data symbol: /plot_symbol { % x y | - @@ -1059,7 +1115,6 @@ WuGdict17a begin } ifelse } def - %% The different symbols, designed for unit area (no arguments): /ps_nil { @@ -1154,8 +1209,7 @@ WuGdict17a begin 0 1.4 rl st } bind def - -%% Set column plotting (use this instead of pset) - BROKEN in 17a or earlier +%% Set column plotting (use this instead of pset) - BROKEN in 11a or earlier /setcolumn{ % shift width exec | % % usage: 0 .2 { gsave { .5 setgray fill } grestore cp } setcolumn @@ -1173,7 +1227,6 @@ WuGdict17a begin /tf { t black } bind def } def - %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %% 2D plots %% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% @@ -1188,7 +1241,6 @@ WuGdict17a begin %% List %% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% - /NewList { % xins yins size advance NewList - /nl_advance x def setown /nl_yins x def /nl_xins x def /nl_xshift fontsize xmm div .9 mul def @@ -1208,9 +1260,6 @@ WuGdict17a begin /TxCLine { % text TxLine - nl_xins nl_yins 3 -1 roll textCM newline } bind def -/infline{ % Obsolete since Frida2.1.5 - oooinfo 1 eq { TxLine } { pop } ifelse - } bind def /PtTxLine { % pstyle text | - x pstyle nl_xins nl_xshift .5 mul add nl_yins 0 t @@ -1285,25 +1334,10 @@ WuGdict17a begin /oooinfo x def } def - %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -%% Macro Collection %% +%% Boxes %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% - -%% gray areas (mainly applied with grayval=1 for blank areas) [longtime grey..] - -/graybox { % grayval x_L y_B dx dy | - %%% OBSOLETE - boxit - cp gsave setgray fill grestore - } def -/boxit { % x_L y_B dx dy | - %%% OBSOLETE - 4 2 roll - np ym x xm x mv % corner Left Bottom - ym dup 0 x rl % line up - x xm 0 rl % line right - neg 0 x rl % line down - } def /boxLLHH { % xl yl xh yh | - %%% INCOMPATIBLE with boxit, contains cp 4 copy 8 copy pop pop np mv @@ -1331,27 +1365,6 @@ WuGdict17a begin qqxl qqdr add qqyl qqdr add qqdr -90 -180 arcn cp exec grestore } def -/execOval { % OBSOLETE - x 6 2 roll - 4 2 roll % proc dr dx dy xl yl - gsave - xym translate - gsave - xym scale % BAD: now dr is scale dependent - dup neg 0 np mv - 0 1 rl - dup 0 1 3 2 roll 180 90 arcn - 1 0 rl - dup 1 1 3 2 roll 90 0 arcn - 0 -1 rl - dup 1 0 3 2 roll 0 -90 arcn - -1 0 rl - dup 0 0 3 2 roll -90 -180 arcn - pop - exec - grestore - grestore - } def /execRectangle3 { % xl xh yl yh {proc} | - 5 1 roll gsave @@ -1366,51 +1379,6 @@ WuGdict17a begin qqxl qqyh li cp exec grestore } def -/execRectangle2 { % xl xh yl yh {proc} | - OBSOLETE, BOGUS (duplicate xm|ym operations) - 5 1 roll - gsave - ym /qqyh x def - ym /qqyl x def - xm /qqxh x def - xm /qqxl x def - np - qqxl xm qqyl ym mv - qqxh xm qqyl ym li - qqxh xm qqyh ym li - qqxl xm qqyh ym li - cp exec grestore - } def -/execRectangle { % OBSOLETE - 5 1 roll - gsave - wy /qqyh x def - wy /qqyl x def - wx /qqxh x def - wx /qqxl x def - np - qqxl xm qqyl ym mv - qqxh xm qqyl ym li - qqxh xm qqyh ym li - qqxl xm qqyh ym li - cp exec grestore - } def -/execHexagon { % xl xh yl yh (all in user coords) {proc} | - - 5 1 roll - gsave - wy /qqyh x def - wy /qqyl x def - wx /qqxh x def - wx /qqxl x def - /qqdr qqyh qqyl sub 2 div def - np - qqxl qqdr add qqyl xym mv - qqxh qqdr sub qqyl xym li - qqxh qqyl qqdr add xym li - qqxh qqdr sub qqyh xym li - qqxl qqdr add qqyh xym li - qqxl qqyl qqdr add xym li - cp exec grestore - } def /coordRectangle { % xl xh yl yh (all in plot coords) {proc} | - 5 1 roll gsave @@ -1426,8 +1394,9 @@ WuGdict17a begin cp exec grestore } def - -%% special objects +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%% Arrows +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% /pfeilangle 36.87 def /pfeilspitze { % x[local] y[local] rot siz @@ -1462,52 +1431,6 @@ WuGdict17a begin 0 0 np mv 0 li st grestore } def -/pfeil { % (OBSOLETE) x[local] y[local] rot siz len[global] - fm 5 copy % not working well - pop pfeilspitze - x pop - x 4 2 roll % len rot x y - gsave - xym translate 180 add rotate - 0 0 np mv 0 li st - grestore - } def -/pfeil_arcn { % x_cent y_cent radius ang_from ang_to siz - gsave - 6 -2 roll offset - 4 copy pop 0 0 5 2 roll - np arcn st - % radius ang_from ang_to siz - 4 1 roll - gsave - rotate - pop - % siz radius - 0 -90 4 3 roll - pfeilspitze - grestore - grestore - } def - -/knautschy { % x0 y0 y_knau y_tot knautschy - : insert an S in dived y-axis - % the total height of the generated object is y_tot - % of which y_knau(.le. y_tot) is for the real knautsch, - % the remainder is for vertical prolongations. - x ym 4 div dup /tmpy x def 5 sqrt mul /tmpx x def - /tmpa x ym tmpy 4 mul sub 2 div def - np ym x xm x mv 0 tmpa rl tmpx tmpy rl tmpx -2 mul tmpy 2 mul rl - tmpx tmpy rl 0 tmpa rl st - } def -/separy { % x0 y0 sep lng ang lin - : insert an // in dived y-axis - setline - /spang x def - /splng x def - /spsep x def - 2 copy spsep sub gsave offset spang rotate - splng -.5 mul fm 0 np mv splng fm 0 rl st grestore - spsep add gsave offset spang rotate - splng -.5 mul fm 0 np mv splng fm 0 rl st grestore - } def /bemasz { % x y L ang text | - %% precede by '24 setown 1 [] lset /pfeilangle 90 def' gsave @@ -1521,60 +1444,6 @@ WuGdict17a begin grestore } def - -%% Text composition shortcuts: - -/g { x grec endgr} bind def -/sb { x subsc endsc} bind def -/sp { x supsc endsc} bind def -/sbgr { x grec () subsc endsc () endgr} bind def -/spgr { x grec () supsc endsc () endgr} bind def - - -%% Text macros for neutron scattering: - -/hbar { - showif - (h) 1.2 .66 { - currentpoint fontheight .11 mul setline np mv - fontheight dup .8 mul x .3 mul rl - st () - } build - } bind def -/hbarw { hbar () grec (w) endgr } bind def -/wbar { grec (w) endgr ( / 2) grec (p) endgr } bind def -/taumean { () (\341t\361) g } bind def -/Sqw { showif (S\(q,) grec (w) endgr (\)) showif } bind def -/Sqn { showif (S\(q,) grec (n) endgr (\)) showif } bind def -/SQw { showif (S\(Q,) grec (w) endgr (\)) showif } bind def -/Sttw { showif (S\(2) grec (q) endgr (,) grec (w) endgr (\)) showif } bind def -/Sttn { showif (S\(2) grec (q) endgr (,) grec (n) endgr (\)) showif } bind def -/Xqw { grec (c) endgr (''\(q,) grec (w) endgr (\)) showif } bind def -/Xqn { grec (c) endgr (''\(q,) grec (n) endgr (\)) showif } bind def -/ueV{ grec (m) endgr (eV) showif} bind def -/inueV { showif (\() grec (m) endgr (eV\)) showif } bind def -/inmeVr { showif (\(meV) supsc (-1) endsc (\)) showif } bind def -/inueVr { showif (\() grec (m) endgr (eV) - supsc (-1) endsc (\)) showif } bind def -/inGHzr { showif (\(GHz) (-1) sp (\)) showif } def - -/Angstr { showif (\305) showif } bind def -/Angr { showif (\305) supsc (-1) endsc } bind def -/inAngr { showif (\() Angr (\)) showif } bind def -/Angrr { showif (\305) supsc (-2) endsc } bind def -/inAngrr { showif (\() Angrr (\)) showif } bind def -/wmin {grec (w) endgr () subsc (min) endsc} def -/winpi { grec (w) endgr ( / 2) grec (p) endgr } def -/Celsius { showif (\26x)g(C) showif } bind def - - -%% More shortcuts for impatient users: - -/L { langSel } bind def -/G { gsave exec grestore } bind def -/gs { gsave } bind def -/gr { grestore } bind def - end % WuGdict... %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%