summaryrefslogtreecommitdiff
path: root/Master
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2006-12-25 00:31:15 +0000
committerKarl Berry <karl@freefriends.org>2006-12-25 00:31:15 +0000
commit70bdd05d833a7a0fce0b77bc00a3c34b797034f4 (patch)
tree6fafee091dda38cf22a820b5fe8cced16ae02cf3 /Master
parent67e67c030aec293b6ac01045a9aabd3184315fbf (diff)
new package cmarrows (with doc source from author)
git-svn-id: svn://tug.org/texlive/trunk@2890 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master')
-rw-r--r--Master/texmf-dist/doc/metapost/cmarrows/README23
-rw-r--r--Master/texmf-dist/doc/metapost/cmarrows/cmarrows.pdfbin0 -> 52267 bytes
-rw-r--r--Master/texmf-dist/doc/metapost/cmarrows/cmmanual.zipbin0 -> 136953 bytes
-rw-r--r--Master/texmf-dist/metapost/cmarrows/cmarrows.mp69
-rw-r--r--Master/texmf-dist/metapost/cmarrows/rgbx0009.mp236
-rw-r--r--Master/texmf-dist/metapost/cmarrows/rgbx0016.mp195
-rw-r--r--Master/texmf-dist/metapost/cmarrows/rgbx0020.mp196
-rw-r--r--Master/texmf-dist/metapost/cmarrows/rgbx0025.mp236
-rw-r--r--Master/texmf-dist/metapost/cmarrows/sgbx0008.mp240
-rw-r--r--Master/texmf-dist/metapost/cmarrows/sgbx0010.mp240
-rw-r--r--Master/texmf-dist/metapost/cmarrows/sgbx0011.mp242
-rw-r--r--Master/texmf-dist/metapost/cmarrows/sgbx0012.mp213
-rw-r--r--Master/texmf-dist/metapost/cmarrows/sgbx0013.mp213
-rw-r--r--Master/texmf-dist/metapost/cmarrows/sgbx0014.mp199
-rw-r--r--Master/texmf-dist/metapost/cmarrows/sgbx0015.mp141
-rw-r--r--Master/texmf-dist/metapost/cmarrows/sgbx0017.mp196
-rw-r--r--Master/texmf-dist/metapost/cmarrows/sgbx0018.mp181
-rw-r--r--Master/texmf-dist/metapost/cmarrows/sgbx0019.mp142
-rw-r--r--Master/texmf-dist/metapost/cmarrows/sgbx0021.mp174
-rw-r--r--Master/texmf-dist/metapost/cmarrows/sgbx0022.mp181
-rw-r--r--Master/texmf-dist/metapost/cmarrows/sgbx0023.mp250
-rw-r--r--Master/texmf-dist/metapost/cmarrows/sgbx0024.mp211
-rw-r--r--Master/texmf-dist/metapost/cmarrows/tgbx0000.mp100
-rw-r--r--Master/texmf-dist/metapost/cmarrows/tgbx0001.mp326
-rw-r--r--Master/texmf-dist/metapost/cmarrows/tgbx0002.mp326
-rw-r--r--Master/texmf-dist/metapost/cmarrows/tgbx0003.mp325
-rw-r--r--Master/texmf-dist/metapost/cmarrows/tgbx0004.mp325
-rw-r--r--Master/texmf-dist/metapost/cmarrows/tgbx0005.mp336
-rw-r--r--Master/texmf-dist/metapost/cmarrows/tgbx0006.mp179
-rw-r--r--Master/texmf-dist/metapost/cmarrows/tgbx0007.mp140
-rw-r--r--Master/texmf-dist/metapost/cmarrows/tgbx0027.mp216
-rw-r--r--Master/texmf-dist/tpm/SIstyle.tpm2
-rw-r--r--Master/texmf-dist/tpm/arabi.tpm10
-rw-r--r--Master/texmf-dist/tpm/cmap.tpm6
-rw-r--r--Master/texmf-dist/tpm/cmarrows.tpm53
-rw-r--r--Master/texmf-dist/tpm/context.tpm2
-rw-r--r--Master/texmf-dist/tpm/eskdx.tpm2
-rw-r--r--Master/texmf-dist/tpm/euenc.tpm36
-rw-r--r--Master/texmf-dist/tpm/fontname.tpm4
-rw-r--r--Master/texmf-dist/tpm/fontspec.tpm13
-rw-r--r--Master/texmf-dist/tpm/latex-fonts.tpm4
-rw-r--r--Master/texmf-dist/tpm/latex.tpm4
-rw-r--r--Master/texmf-dist/tpm/moreverb.tpm2
-rw-r--r--Master/texmf-dist/tpm/multicap.tpm2
-rw-r--r--Master/texmf-dist/tpm/texinfo.tpm4
-rw-r--r--Master/texmf-dist/tpm/xetex.tpm6
-rw-r--r--Master/texmf-dist/tpm/xltxtra.tpm12
-rw-r--r--Master/texmf/lists/cmarrows34
-rw-r--r--Master/texmf/tpm/collection-metapost.tpm1
49 files changed, 6212 insertions, 36 deletions
diff --git a/Master/texmf-dist/doc/metapost/cmarrows/README b/Master/texmf-dist/doc/metapost/cmarrows/README
new file mode 100644
index 00000000000..dd0d33dfb4d
--- /dev/null
+++ b/Master/texmf-dist/doc/metapost/cmarrows/README
@@ -0,0 +1,23 @@
+CMARROWS
+========
+
+This MetaPost package contains macros to draw arrows and braces in the
+Computer Modern style.
+
+See the documentation file cmarrows.pdf for more information on how to
+use the package.
+
+The files of this package consists of
+
+ README cmarrows.mp cmarrows.pdf rgbx0009.mp rgbx0016.mp
+ rgbx0020.mp rgbx0025.mp sgbx0008.mp sgbx0010.mp sgbx0011.mp
+ sgbx0012.mp sgbx0013.mp sgbx0014.mp sgbx0015.mp sgbx0017.mp
+ sgbx0018.mp sgbx0019.mp sgbx0021.mp sgbx0022.mp sgbx0023.mp
+ sgbx0024.mp tgbx0000.mp tgbx0001.mp tgbx0002.mp tgbx0003.mp
+ tgbx0004.mp tgbx0005.mp tgbx0006.mp tgbx0007.mp tgbx0027.mp
+
+This material is subject to the LaTeX Project Public License. See
+http://www.ctan.org/tex-archive/help/Catalogue/licenses.lppl.html for
+the details of that license.
+
+/Tommy Ekola <tek@kth.se> \ No newline at end of file
diff --git a/Master/texmf-dist/doc/metapost/cmarrows/cmarrows.pdf b/Master/texmf-dist/doc/metapost/cmarrows/cmarrows.pdf
new file mode 100644
index 00000000000..ffb4f351fd0
--- /dev/null
+++ b/Master/texmf-dist/doc/metapost/cmarrows/cmarrows.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/metapost/cmarrows/cmmanual.zip b/Master/texmf-dist/doc/metapost/cmarrows/cmmanual.zip
new file mode 100644
index 00000000000..e2e152c9b06
--- /dev/null
+++ b/Master/texmf-dist/doc/metapost/cmarrows/cmmanual.zip
Binary files differ
diff --git a/Master/texmf-dist/metapost/cmarrows/cmarrows.mp b/Master/texmf-dist/metapost/cmarrows/cmarrows.mp
new file mode 100644
index 00000000000..fe02d670ddc
--- /dev/null
+++ b/Master/texmf-dist/metapost/cmarrows/cmarrows.mp
@@ -0,0 +1,69 @@
+%% cmarrows.mp
+%% Copyright 2006 Tommy Ekola <tek@kth.se>
+%
+% This work may be distributed and/or modified under the conditions of
+% the LaTeX Project Public License, either version 1.3 of this license
+% or (at your option) any later version. The latest version of this
+% license is in http://www.latex-project.org/lppl.txt
+%
+% This work has the LPPL maintenance status `maintained'. The Current
+% Maintainer of this work is Tommy Ekola. The Base Interpreter is
+% MetaPost.
+
+if known cmarrows_fileversion: endinput fi;
+string cmarrows_fileversion;
+cmarrows_fileversion := "2006/12/18, v0.9";
+message "Loading cmarrows " & cmarrows_fileversion;
+
+vardef setup_cmarrows(text argument_list) =
+
+ save sfile;
+ string sfile;
+
+ save arrow_name, brace_name, parameter_file, macro_name;
+ string arrow_name, brace_name, parameter_file, macro_name;
+
+ argument_list;
+
+ if not known arrow_name:
+ arrow_name := brace_name;
+ fi
+
+ if arrow_name="Bigbrace" : sfile = "tgbx0001.mp";
+ elseif arrow_name="Biggbrace" : sfile = "tgbx0002.mp";
+ elseif arrow_name="bigbrace" : sfile = "tgbx0003.mp";
+ elseif arrow_name="biggbrace" : sfile = "tgbx0004.mp";
+ elseif arrow_name="extensiblebrace" : sfile = "tgbx0005.mp";
+ elseif arrow_name="parallelarrows" : sfile = "tgbx0006.mp";
+ elseif arrow_name="twoheadarrow" : sfile = "tgbx0007.mp";
+ elseif arrow_name="twowayoldarrow" : sfile = "sgbx0008.mp";
+ elseif arrow_name="paralleloppositearrows": sfile = "rgbx0009.mp";
+ elseif arrow_name="twowayarrow" : sfile = "sgbx0010.mp";
+ elseif arrow_name="twowaydoublearrow" : sfile = "sgbx0011.mp";
+ elseif arrow_name="hookleftarrow" : sfile = "sgbx0012.mp";
+ elseif arrow_name="hookrightarrow" : sfile = "sgbx0013.mp";
+ elseif arrow_name="doublearrow" : sfile = "sgbx0014.mp";
+ elseif arrow_name="lefthalfarrow" : sfile = "sgbx0015.mp";
+ elseif arrow_name="paralleloppositerighthalfarrows": sfile = "rgbx0016.mp";
+ elseif arrow_name="mapstoarrow" : sfile = "sgbx0017.mp";
+ elseif arrow_name="oldtexarrow" : sfile = "sgbx0018.mp";
+ elseif arrow_name="righthalfarrow" : sfile = "sgbx0019.mp";
+ elseif arrow_name="paralleloppositelefthalfarrows" : sfile = "rgbx0020.mp";
+ elseif arrow_name="shortaxisarrow" : sfile = "sgbx0021.mp";
+ elseif arrow_name="texarrow" : sfile = "sgbx0022.mp";
+ elseif arrow_name="tailarrow" : sfile = "sgbx0023.mp";
+ elseif arrow_name="tripplearrow" : sfile = "sgbx0024.mp";
+ elseif arrow_name="paralleloppositerightarrows": sfile = "rgbx0025.mp";
+ elseif arrow_name="paren" : sfile = "tgbx0027.mp";
+ else : errmessage "unknown options";
+ fi
+
+ expandafter save scantokens ("setup_" & arrow_name);
+
+ scantokens ("input " & sfile);
+
+ scantokens ("setup_" & arrow_name & "(" &
+ ditto & parameter_file & ditto & "," &
+ ditto & macro_name & ditto & ");" );
+
+enddef;
diff --git a/Master/texmf-dist/metapost/cmarrows/rgbx0009.mp b/Master/texmf-dist/metapost/cmarrows/rgbx0009.mp
new file mode 100644
index 00000000000..c206b64ed10
--- /dev/null
+++ b/Master/texmf-dist/metapost/cmarrows/rgbx0009.mp
@@ -0,0 +1,236 @@
+%% rgbx0009.mp
+%% Copyright 2006 Tommy Ekola <tek@kth.se>
+%
+% This work may be distributed and/or modified under the conditions of
+% the LaTeX Project Public License, either version 1.3 of this license
+% or (at your option) any later version. The latest version of this
+% license is in http://www.latex-project.org/lppl.txt
+%
+% This work has the LPPL maintenance status `maintained'. The Current
+% Maintainer of this work is Tommy Ekola. The Base Interpreter is
+% MetaPost.
+
+vardef setup_paralleloppositearrows (expr source_file, cmdname) =
+
+ scantokens ("input tgbx0000");
+
+ scantokens ("input " & source_file);
+
+ expandafter def scantokens cmdname expr p =
+ scantokens (cmdname & "__rgbxww")(p)
+ enddef;
+
+ expandafter vardef scantokens (cmdname & "__rgbxww " & "(expr apth) " &
+ "text text_ = " &
+
+ "save math_spread, x_height, u, rule_thickness, bar, math_axis," &
+ " asc_height, eps, fudge, crisp, hair;" &
+
+ "math_spread :=" & decimal math_spread & ";" &
+ "x_height# :=" & decimal x_height# & ";" &
+ "u# :=" & decimal u# & ";" &
+ "rule_thickness# :=" & decimal rule_thickness# & ";" &
+ "bar# :=" & decimal bar# & ";" &
+ "math_axis# :=" & decimal math_axis# & ";" &
+ "asc_height# :=" & decimal asc_height# & ";" &
+ "eps :=" & decimal eps & ";" &
+ "fudge :=" & decimal fudge & ";" &
+ "crisp# :=" & decimal crisp# & ";" &
+ "hair# :=" & decimal hair# & ";")
+
+ save prevpen;
+ prevpen:=savepen;
+
+ save x,y;
+ numeric x[], x[]', x[]l, x[]'l, x[]r, x[]'r,
+ y[], y[]', y[]l, y[]'l, y[]r, y[]'r;
+ save spread, w;
+ numeric spread, w;
+
+ if crisp#>fudge*hair#:
+ crisp#:=fudge*hair#;
+ fi
+ pickup if crisp#=0: nullpen else: pencircle scaled crisp# fi;
+
+ spread = math_spread[.45x_height#, .55x_height#];
+ w = 18u#;
+
+ penpos1(rule_thickness#, 90); penpos2(rule_thickness#, 90);
+ penpos3(bar#, 0); penpos4(bar#, 0);
+ y0=y1=y2=math_axis#; x1-.5rule_thickness#=u#; rt x0=w-u#;
+ y3-y0=y0-y4=.24asc_height#+eps;
+ x3=x4=x0-3u#-eps;
+ penpos5(bar#, angle(z4-z0)); z5l=z0;
+ penpos6(bar#, angle(z3-z0)); z6l=z0;
+ z9=.381966[.5[z3,z4],z0];
+
+ save pp; path pp; pp = z4l{z9-z4}..z6r;
+ save t; numeric t; t = xpart(pp intersectiontimes ((0,y2l)--(w,y2l)));
+ x2=xpart point t of pp;
+
+ % Path macros
+
+ save parallellineright;
+ vardef parallellineright expr pppp =
+ save s, stp;
+ numeric s, stp; stp:=(arclength pppp) div 5pt;
+ if stp=0: stp:=1; fi
+ stp:=(arclength pppp)/stp;
+
+ if stp>0:
+ for s=0 step stp until arclength pppp - stp:
+ point (arctime s of pppp) of pppp +
+ (.24asc_height#+eps)*(unitvector direction (arctime s of pppp)
+ of pppp rotated 90)
+ {direction (arctime s of pppp) of pppp}..
+ endfor
+ {direction (length pppp) of pppp}
+ point (length pppp) of pppp +
+ (.24asc_height#+eps)*(unitvector direction (length pppp)
+ of pppp rotated 90)
+ fi
+ enddef;
+
+ save parallellineleft;
+ vardef parallellineleft expr pppp =
+ save s, stp;
+ numeric s, stp; stp:=(arclength pppp) div 5pt;
+ if stp=0: stp:=1; fi
+ stp:=(arclength pppp)/stp;
+
+ if stp>0:
+ for s=0 step stp until arclength pppp - stp:
+ point (arctime s of pppp) of pppp -
+ (.24asc_height#+eps)*(unitvector direction (arctime s of pppp)
+ of pppp rotated 90)
+ {direction (arctime s of pppp) of pppp}..
+ endfor
+ {direction (length pppp) of pppp}
+ point (length pppp) of pppp -
+ (.24asc_height#+eps)*(unitvector direction (length pppp)
+ of pppp rotated 90)
+ fi
+ enddef;
+
+ save mapto, n;
+ vardef mapto(text t) =
+ hide(numeric n; n:=0;
+ numeric x,x_[],y,y_[];
+ for z=t: z_[incr n]:=z; endfor;
+ transform T;
+ z_2 = z_1 transformed T;
+ z_4 = z_3 transformed T;
+ z_6 = z_5 transformed T;)
+ T
+ enddef;
+
+ % Macros for drawing the arrow head
+
+ save pp; path pp; pp = z4l{z9-z4}..z6r;
+ save pq; path pq; pq = z0..{z4-z9}z4r;
+ save right_texarrowhead;
+ vardef right_texarrowhead(expr T,s) =
+ (subpath(0, xpart (pq intersectiontimes
+ (point s of pp -- point s of pp + (2rule_thickness#,0))))
+ of pq--subpath(s,t) of pp--z2l) transformed T
+ enddef;
+
+ save qq; path qq; qq = z3l{z9-z3}..z5r;
+ save qp; path qp; qp = z3r{z9-z3}..z0;
+ save left_texarrowhead;
+ vardef left_texarrowhead(expr T, s) =
+ (z2r--subpath(t,s) of qq
+ --subpath(xpart ( qp intersectiontimes
+ (point s of qq -- point s of qq + (2rule_thickness#,0)))
+ ,length qp) of qp) transformed T
+ enddef;
+
+ % Draw the arrows. First the left arrow and then the right arrow
+
+ save pa, pb, T, tt, ttt;
+ save f,s;
+
+ save p_left; path p_left; p_left := parallellineleft apth;
+ save p_right; path p_right; p_right := parallellineright apth;
+
+ for ppp = reverse p_left, p_right:
+ transform T;
+ numeric tt; tt := arctime(arclength ppp - (x0-x9)) of ppp;
+ numeric ttt; ttt := arctime(arclength ppp - (x0-x2)) of ppp;
+
+ % Draw the right half of the arrow head
+
+ if arclength ppp = 0:
+ T:=identity shifted (point (length ppp) of ppp - z0);
+ elseif arclength ppp < x0-x3l:
+ T:=identity rotatedaround(z0,angle (direction (length ppp) of ppp))
+ shifted (point (length ppp) of ppp - z0);
+ else:
+ T:=mapto(z0,
+ point (length ppp) of ppp,
+ z2,
+ point ttt of ppp,
+ z9-(0,3rule_thickness#),
+ point tt of ppp - 3rule_thickness#
+ *(unitvector (direction tt of ppp)
+ rotated 90));
+ fi
+
+ vardef f(expr s) =
+ length(point s of (pp transformed T) - point tt of ppp)
+ < length(point 0 of pp - z9)
+ enddef;
+
+ if f(0) or (arclength ppp < x0-x3l): s := 0;
+ else: s := solve f(length pp, 0);
+ fi
+
+ path pa;
+ pa := right_texarrowhead(T,s);
+
+ % Draw the left part of the arrow head
+
+ if arclength ppp = 0:
+ T:=identity shifted (point (length ppp) of ppp - z0);
+ elseif arclength ppp < x0-x3l:
+ T:=identity rotatedaround(z0,angle (direction (length ppp) of ppp))
+ shifted (point (length ppp) of ppp - z0);
+ else:
+ T:=mapto(z0,
+ point (length ppp) of ppp,
+ z2,
+ point ttt of ppp,
+ z9+(0,3rule_thickness#),
+ point tt of ppp + 3rule_thickness#
+ *(unitvector (direction tt of ppp)
+ rotated 90));
+ fi
+
+ vardef f(expr s) =
+ length(point s of (qq transformed T) - point tt of ppp)
+ < length(point 0 of qq - z9)
+ enddef;
+
+ if f(0) or (arclength ppp < x0-x3l): s := 0;
+ else: s := solve f(length qq, 0);
+ fi
+
+ path pb;
+ pb := left_texarrowhead(T,s);
+
+ filldraw pa--pb--cycle withpen nullpen text_;
+
+ % Draw the path
+
+ if arclength ppp > x0-x2:
+ draw subpath(0,ttt) of ppp withpen pencircle scaled rule_thickness#
+ text_;
+ fi
+
+ endfor
+
+ pickup prevpen;
+
+ enddef;
+
+enddef;
diff --git a/Master/texmf-dist/metapost/cmarrows/rgbx0016.mp b/Master/texmf-dist/metapost/cmarrows/rgbx0016.mp
new file mode 100644
index 00000000000..22186db1b3e
--- /dev/null
+++ b/Master/texmf-dist/metapost/cmarrows/rgbx0016.mp
@@ -0,0 +1,195 @@
+%% rgbx0016.mp
+%% Copyright 2006 Tommy Ekola <tek@kth.se>
+%
+% This work may be distributed and/or modified under the conditions of
+% the LaTeX Project Public License, either version 1.3 of this license
+% or (at your option) any later version. The latest version of this
+% license is in http://www.latex-project.org/lppl.txt
+%
+% This work has the LPPL maintenance status `maintained'. The Current
+% Maintainer of this work is Tommy Ekola. The Base Interpreter is
+% MetaPost.
+
+vardef setup_paralleloppositerighthalfarrows (expr source_file, cmdname) =
+
+ scantokens ("input tgbx0000");
+
+ scantokens ("input " & source_file);
+
+ expandafter def scantokens cmdname expr p =
+ scantokens (cmdname & "__rgbxww")(p)
+ enddef;
+
+ expandafter vardef scantokens (cmdname & "__rgbxww " & "(expr apth) " &
+ "text text_ = " &
+
+ "save math_spread, x_height, u, rule_thickness, bar, math_axis," &
+ " asc_height, eps, monospace, fudge, crisp, hair;" &
+ "boolean monospace;" &
+
+ "math_spread :=" & decimal math_spread & ";" &
+ "x_height# :=" & decimal x_height# & ";" &
+ "u# :=" & decimal u# & ";" &
+ "rule_thickness# :=" & decimal rule_thickness# & ";" &
+ "bar# :=" & decimal bar# & ";" &
+ "math_axis# :=" & decimal math_axis# & ";" &
+ "asc_height# :=" & decimal asc_height# & ";" &
+ "eps :=" & decimal eps & ";" &
+ "monospace :=" & if monospace: "true" else: "false" fi & ";" &
+ "fudge :=" & decimal fudge & ";" &
+ "crisp# :=" & decimal crisp# & ";" &
+ "hair# :=" & decimal hair# & ";")
+
+ save prevpen;
+ prevpen:=savepen;
+
+ save x,y;
+ numeric x[], x[]', x[]l, x[]'l, x[]r, x[]'r,
+ y[], y[]', y[]l, y[]'l, y[]r, y[]'r;
+ save spread, w;
+ numeric spread, w;
+
+ if crisp#>fudge*hair#:
+ crisp#:=fudge*hair#;
+ fi
+ pickup if crisp#=0: nullpen else: pencircle scaled crisp# fi;
+
+ spread = math_spread[.45x_height#, .55x_height#];
+ w = 18u#;
+
+ penpos1(rule_thickness#, 90); penpos2(rule_thickness#, 90);
+ penpos3(rule_thickness#, 0); penpos4(rule_thickness#, 0);
+ y0=y1=y2=math_axis#; x1-.5rule_thickness#=u#; rt x0=w-u#;
+ y3-y0=y0-y4=.36asc_height#+eps;
+ x3=x4=x0-4u#-eps;
+ penpos5(rule_thickness#, angle(z4-z0)); z5l=z0;
+ penpos6(rule_thickness#, angle(z3-z0)); z6l=z0;
+ save t; numeric t;
+ save pq; path pq; pq = z4l..{2(x0-x4),y0-y4}z6r;
+ t=xpart(pq intersectiontimes ((0,y2l)--(w,y2l))); x2=xpart point t of pq;
+ z9=.2[.5[z3,z4],z0];
+
+ save parallellineright;
+ vardef parallellineright expr pppp =
+ save s, stp;
+ numeric s, stp; stp:=(arclength pppp) div 5pt;
+ if stp=0: stp:=1; fi
+ stp:=(arclength pppp)/stp;
+
+ if stp > 0:
+ for s=0 step stp until arclength pppp - stp:
+ point (arctime s of pppp) of pppp +
+ spread/2*(unitvector direction (arctime s of pppp)
+ of pppp rotated -90)
+ {direction (arctime s of pppp) of pppp}..
+ endfor
+ {direction (length pppp) of pppp}
+ point (length pppp) of pppp +
+ spread/2*(unitvector direction (length pppp)
+ of pppp rotated -90)
+ fi
+ enddef;
+
+ save parallellineleft;
+ vardef parallellineleft expr pppp =
+ save s, stp;
+ numeric s, stp; stp:=(arclength pppp) div 5pt;
+ if stp=0: stp:=1; fi
+ stp:=(arclength pppp)/stp;
+
+ if stp>0:
+ for s=0 step stp until arclength pppp - stp:
+ point (arctime s of pppp) of pppp +
+ spread/2*(unitvector direction (arctime s of pppp)
+ of pppp rotated 90)
+ {direction (arctime s of pppp) of pppp}..
+ endfor
+ {direction (length pppp) of pppp}
+ point (length pppp) of pppp +
+ spread/2*(unitvector direction (length pppp)
+ of pppp rotated 90)
+ fi
+ enddef;
+
+ save mapto, n;
+ vardef mapto(text t) =
+ hide(numeric n; n:=0;
+ numeric x,x_[],y,y_[];
+ for z=t: z_[incr n]:=z; endfor;
+ transform T;
+ z_2 = z_1 transformed T;
+ z_4 = z_3 transformed T;
+ z_6 = z_5 transformed T;)
+ T
+ enddef;
+
+ % Macro for drawing the half arrow head
+
+ save pp; path pp; pp := (z3l..{2(x0-x3),y0-y3}z5r);
+ save pq; path pq; pq := (z3r..{2(x0-x3),y0-y3}z5l);
+
+ save halfarrowhead, pa;
+ vardef halfarrowhead(expr T, s) =
+ (z0--(x0,y2l)--z2l--z2r
+ ..subpath(t,s) of pp
+ --subpath(xpart( pq intersectiontimes
+ (point s of pp -- point s of pp +(2rule_thickness#,0))),
+ length (z3r..{2(x0-x3),y0-y3}z5l)) of pq --cycle)
+ transformed T
+ enddef;
+
+ % Draw the half arrows
+
+ save pa, pb, T, tt, ttt;
+
+ save p_left; path p_left; p_left = parallellineleft apth;
+ save p_right; path p_right; p_right = parallellineright apth;
+
+ for ppp = reverse p_left, p_right:
+
+ transform T;
+ numeric tt; tt = arctime(arclength ppp - (x0-x9)) of ppp;
+ numeric ttt; ttt = arctime(arclength ppp - (x0-x2)) of ppp;
+
+ if arclength ppp = 0:
+ T:=identity reflectedabout(z0+(-1pt,0),z0)
+ shifted (point (length ppp) of ppp - z0);
+ elseif arclength ppp < x0-x3l:
+ T:=identity reflectedabout(z0+(-1pt,0),z0)
+ rotatedaround(z0,angle (direction (length ppp) of ppp))
+ shifted (point (length ppp) of ppp -z0);
+ else:
+ T:=mapto(z0,
+ point (length ppp) of ppp,
+ z2,
+ point ttt of ppp,
+ z9+(0,3rule_thickness#),
+ point tt of ppp - 3rule_thickness#*
+ (unitvector (direction tt of ppp) rotated 90));
+ fi
+
+ save f,s;
+ vardef f(expr s) =
+ length(point s of (pp transformed T) - point tt of ppp)
+ < length(point 0 of pp - z9)
+ enddef;
+
+ if f(0) or (arclength ppp < x0-x3l): s := 0;
+ else: s := solve f(length pp, 0);
+ fi
+
+ filldraw halfarrowhead(T,s) text_;
+
+ % Draw the path
+
+ if arclength ppp > x0-x2: draw subpath(0,ttt) of ppp
+ withpen pencircle scaled rule_thickness# text_;
+ fi
+
+ endfor;
+
+ pickup prevpen;
+
+ enddef;
+
+enddef; \ No newline at end of file
diff --git a/Master/texmf-dist/metapost/cmarrows/rgbx0020.mp b/Master/texmf-dist/metapost/cmarrows/rgbx0020.mp
new file mode 100644
index 00000000000..0263156bd93
--- /dev/null
+++ b/Master/texmf-dist/metapost/cmarrows/rgbx0020.mp
@@ -0,0 +1,196 @@
+%% rgbx0020.mp
+%% Copyright 2006 Tommy Ekola <tek@kth.se>
+%
+% This work may be distributed and/or modified under the conditions of
+% the LaTeX Project Public License, either version 1.3 of this license
+% or (at your option) any later version. The latest version of this
+% license is in http://www.latex-project.org/lppl.txt
+%
+% This work has the LPPL maintenance status `maintained'. The Current
+% Maintainer of this work is Tommy Ekola. The Base Interpreter is
+% MetaPost.
+
+vardef setup_paralleloppositelefthalfarrows (expr source_file, cmdname) =
+
+ scantokens ("input tgbx0000");
+
+ scantokens ("input " & source_file);
+
+ expandafter def scantokens cmdname expr p =
+ scantokens (cmdname & "__rgbxww")(p)
+ enddef;
+
+ expandafter vardef scantokens (cmdname & "__rgbxww " & "(expr apth) " &
+ "text text_ = " &
+
+ "save math_spread, x_height, u, rule_thickness, bar, math_axis," &
+ " asc_height, eps, monospace, fudge, crisp, hair;" &
+ "boolean monospace;" &
+
+ "math_spread :=" & decimal math_spread & ";" &
+ "x_height# :=" & decimal x_height# & ";" &
+ "u# :=" & decimal u# & ";" &
+ "rule_thickness# :=" & decimal rule_thickness# & ";" &
+ "bar# :=" & decimal bar# & ";" &
+ "math_axis# :=" & decimal math_axis# & ";" &
+ "asc_height# :=" & decimal asc_height# & ";" &
+ "eps :=" & decimal eps & ";" &
+ "monospace :=" & if monospace: "true" else: "false" fi & ";" &
+ "fudge :=" & decimal fudge & ";" &
+ "crisp# :=" & decimal crisp# & ";" &
+ "hair# :=" & decimal hair# & ";")
+
+ save prevpen;
+ prevpen:=savepen;
+
+ save x,y;
+ numeric x[], x[]', x[]l, x[]'l, x[]r, x[]'r,
+ y[], y[]', y[]l, y[]'l, y[]r, y[]'r;
+ save spread, w;
+ numeric spread, w;
+
+ if crisp#>fudge*hair#:
+ crisp#:=fudge*hair#;
+ fi
+ pickup if crisp#=0: nullpen else: pencircle scaled crisp# fi;
+
+ spread = math_spread[.45x_height#, .55x_height#];
+ w = 18u#;
+
+ penpos1(rule_thickness#, 90); penpos2(rule_thickness#, 90);
+ penpos3(rule_thickness#, 0); penpos4(rule_thickness#, 0);
+ y0=y1=y2=math_axis#; x1-.5rule_thickness#=u#; rt x0=w-u#;
+ y3-y0=y0-y4=.36asc_height#+eps;
+ x3=x4=x0-4u#-eps;
+ penpos5(rule_thickness#, angle(z4-z0)); z5l=z0;
+ penpos6(rule_thickness#, angle(z3-z0)); z6l=z0;
+ save t; numeric t;
+ save pq; path pq; pq = z4l..{2(x0-x4),y0-y4}z6r;
+ t=xpart(pq intersectiontimes ((0,y2l)--(w,y2l))); x2=xpart point t of pq;
+ z9=.2[.5[z3,z4],z0];
+
+ % Path macros
+
+ save parallellineright;
+ vardef parallellineright expr pppp =
+ save s, stp;
+ numeric s, stp; stp:=(arclength pppp) div 5pt;
+ if stp=0: stp:=1; fi
+ stp:=(arclength pppp)/stp;
+
+ if stp > 0:
+ for s=0 step stp until arclength pppp - stp:
+ point (arctime s of pppp) of pppp +
+ spread/2*(unitvector direction (arctime s of pppp)
+ of pppp rotated -90)
+ {direction (arctime s of pppp) of pppp}..
+ endfor
+ {direction (length pppp) of pppp}
+ point (length pppp) of pppp +
+ spread/2*(unitvector direction (length pppp)
+ of pppp rotated -90)
+ fi
+ enddef;
+
+ save parallellineleft;
+ vardef parallellineleft expr pppp =
+ save s, stp;
+ numeric s, stp; stp:=(arclength pppp) div 5pt;
+ if stp=0: stp:=1; fi
+ stp:=(arclength pppp)/stp;
+
+ if stp > 0:
+ for s=0 step stp until arclength pppp - stp:
+ point (arctime s of pppp) of pppp +
+ spread/2*(unitvector direction (arctime s of pppp)
+ of pppp rotated 90)
+ {direction (arctime s of pppp) of pppp}..
+ endfor
+ {direction (length pppp) of pppp}
+ point (length pppp) of pppp +
+ spread/2*(unitvector direction (length pppp)
+ of pppp rotated 90)
+ fi
+ enddef;
+
+ save mapto, n;
+ vardef mapto(text t) =
+ hide(numeric n; n:=0;
+ numeric x,x_[],y,y_[];
+ for z=t: z_[incr n]:=z; endfor;
+ transform T;
+ z_2 = z_1 transformed T;
+ z_4 = z_3 transformed T;
+ z_6 = z_5 transformed T;)
+ T
+ enddef;
+
+ % Macro for drawing the half arrow head
+
+ save pp; path pp; pp := (z3l..{2(x0-x3),y0-y3}z5r);
+ save pq; path pq; pq := (z3r..{2(x0-x3),y0-y3}z5l);
+
+ save halfarrowhead;
+ vardef halfarrowhead(expr T, s) =
+ (z0--(x0,y2l)--z2l--z2r
+ ..subpath(t,s) of pp
+ --subpath(xpart( pq intersectiontimes
+ (point s of pp -- point s of pp +(2rule_thickness#,0))),
+ length (z3r..{2(x0-x3),y0-y3}z5l)) of pq --cycle)
+ transformed T
+ enddef;
+
+ % Draw the half arrows
+
+ save pa, pb, T, tt, ttt;
+
+ save p_left; path p_left; p_left = parallellineleft apth;
+ save p_right; path p_right; p_right = parallellineright apth;
+
+ for ppp = p_left, reverse p_right:
+
+ transform T;
+ numeric tt; tt = arctime(arclength ppp - (x0-x9)) of ppp;
+ numeric ttt; ttt = arctime(arclength ppp - (x0-x2)) of ppp;
+
+ if arclength ppp = 0:
+ T:=identity shifted (point (length ppp) of ppp - z0);
+ elseif arclength ppp < x0-x3l:
+ T:=identity rotatedaround(z0,angle (direction (length ppp) of ppp))
+ shifted (point (length ppp) of ppp -z0);
+ else:
+ T:=mapto(z0,
+ point (length ppp) of ppp,
+ z2,
+ point ttt of ppp,
+ z9+(0,3rule_thickness#),
+ point tt of ppp + 3rule_thickness#*
+ (unitvector (direction tt of ppp) rotated 90));
+
+ fi
+
+ save f,s;
+ vardef f(expr s) =
+ length(point s of (pp transformed T) - point tt of ppp)
+ < length(point 0 of pp - z9)
+ enddef;
+
+ if f(0) or (arclength ppp < x0-x3l): s := 0;
+ else: s := solve f(length pp, 0);
+ fi
+
+ filldraw halfarrowhead(T,s) text_;
+
+ % Draw the path
+
+ if arclength ppp > x0-x2: draw subpath(0,ttt) of ppp
+ withpen pencircle scaled rule_thickness# text_;
+ fi
+
+ endfor;
+
+ pickup prevpen;
+
+ enddef;
+
+enddef;
diff --git a/Master/texmf-dist/metapost/cmarrows/rgbx0025.mp b/Master/texmf-dist/metapost/cmarrows/rgbx0025.mp
new file mode 100644
index 00000000000..1fc45976513
--- /dev/null
+++ b/Master/texmf-dist/metapost/cmarrows/rgbx0025.mp
@@ -0,0 +1,236 @@
+%% rgbx0025.mp
+%% Copyright 2006 Tommy Ekola <tek@kth.se>
+%
+% This work may be distributed and/or modified under the conditions of
+% the LaTeX Project Public License, either version 1.3 of this license
+% or (at your option) any later version. The latest version of this
+% license is in http://www.latex-project.org/lppl.txt
+%
+% This work has the LPPL maintenance status `maintained'. The Current
+% Maintainer of this work is Tommy Ekola. The Base Interpreter is
+% MetaPost.
+
+vardef setup_paralleloppositerightarrows (expr source_file, cmdname) =
+
+ scantokens ("input tgbx0000");
+
+ scantokens ("input " & source_file);
+
+ expandafter def scantokens cmdname expr p =
+ scantokens (cmdname & "__rgbxww")(p)
+ enddef;
+
+ expandafter vardef scantokens (cmdname & "__rgbxww " & "(expr apth) " &
+ "text text_ = " &
+
+ "save math_spread, x_height, u, rule_thickness, bar, math_axis," &
+ " asc_height, eps, fudge, crisp, hair;" &
+
+ "math_spread :=" & decimal math_spread & ";" &
+ "x_height# :=" & decimal x_height# & ";" &
+ "u# :=" & decimal u# & ";" &
+ "rule_thickness# :=" & decimal rule_thickness# & ";" &
+ "bar# :=" & decimal bar# & ";" &
+ "math_axis# :=" & decimal math_axis# & ";" &
+ "asc_height# :=" & decimal asc_height# & ";" &
+ "eps :=" & decimal eps & ";" &
+ "fudge :=" & decimal fudge & ";" &
+ "crisp# :=" & decimal crisp# & ";" &
+ "hair# :=" & decimal hair# & ";")
+
+ save prevpen;
+ prevpen:=savepen;
+
+ save x,y;
+ numeric x[], x[]', x[]l, x[]'l, x[]r, x[]'r,
+ y[], y[]', y[]l, y[]'l, y[]r, y[]'r;
+ save spread, w;
+ numeric spread, w;
+
+ if crisp#>fudge*hair#:
+ crisp#:=fudge*hair#;
+ fi
+ pickup if crisp#=0: nullpen else: pencircle scaled crisp# fi;
+
+ spread = math_spread[.45x_height#, .55x_height#];
+ w = 18u#;
+
+ penpos1(rule_thickness#, 90); penpos2(rule_thickness#, 90);
+ penpos3(bar#, 0); penpos4(bar#, 0);
+ y0=y1=y2=math_axis#; x1-.5rule_thickness#=u#; rt x0=w-u#;
+ y3-y0=y0-y4=.24asc_height#+eps;
+ x3=x4=x0-3u#-eps;
+ penpos5(bar#, angle(z4-z0)); z5l=z0;
+ penpos6(bar#, angle(z3-z0)); z6l=z0;
+ z9=.381966[.5[z3,z4],z0];
+
+ save pp; path pp; pp = z4l{z9-z4}..z6r;
+ save t; numeric t; t = xpart(pp intersectiontimes ((0,y2l)--(w,y2l)));
+ x2=xpart point t of pp;
+
+ % Path macros
+
+ save parallellineright;
+ vardef parallellineright expr pppp =
+ save s, stp;
+ numeric s, stp; stp:=(arclength pppp) div 5pt;
+ if stp=0: stp:=1; fi
+ stp:=(arclength pppp)/stp;
+
+ if stp>0:
+ for s=0 step stp until arclength pppp - stp:
+ point (arctime s of pppp) of pppp +
+ (.24asc_height#+eps)*(unitvector direction (arctime s of pppp)
+ of pppp rotated 90)
+ {direction (arctime s of pppp) of pppp}..
+ endfor
+ {direction (length pppp) of pppp}
+ point (length pppp) of pppp +
+ (.24asc_height#+eps)*(unitvector direction (length pppp)
+ of pppp rotated 90)
+ fi
+ enddef;
+
+ save parallellineleft;
+ vardef parallellineleft expr pppp =
+ save s, stp;
+ numeric s, stp; stp:=(arclength pppp) div 5pt;
+ if stp=0: stp:=1; fi
+ stp:=(arclength pppp)/stp;
+
+ if stp>0:
+ for s=0 step stp until arclength pppp - stp:
+ point (arctime s of pppp) of pppp -
+ (.24asc_height#+eps)*(unitvector direction (arctime s of pppp)
+ of pppp rotated 90)
+ {direction (arctime s of pppp) of pppp}..
+ endfor
+ {direction (length pppp) of pppp}
+ point (length pppp) of pppp -
+ (.24asc_height#+eps)*(unitvector direction (length pppp)
+ of pppp rotated 90)
+ fi
+ enddef;
+
+ save mapto, n;
+ vardef mapto(text t) =
+ hide(numeric n; n:=0;
+ numeric x,x_[],y,y_[];
+ for z=t: z_[incr n]:=z; endfor;
+ transform T;
+ z_2 = z_1 transformed T;
+ z_4 = z_3 transformed T;
+ z_6 = z_5 transformed T;)
+ T
+ enddef;
+
+ % Macros for drawing the arrow head
+
+ save pp; path pp; pp = z4l{z9-z4}..z6r;
+ save pq; path pq; pq = z0..{z4-z9}z4r;
+ save right_texarrowhead;
+ vardef right_texarrowhead(expr T,s) =
+ (subpath(0, xpart (pq intersectiontimes
+ (point s of pp -- point s of pp + (2rule_thickness#,0))))
+ of pq--subpath(s,t) of pp--z2l) transformed T
+ enddef;
+
+ save qq; path qq; qq = z3l{z9-z3}..z5r;
+ save qp; path qp; qp = z3r{z9-z3}..z0;
+ save left_texarrowhead;
+ vardef left_texarrowhead(expr T, s) =
+ (z2r--subpath(t,s) of qq
+ --subpath(xpart ( qp intersectiontimes
+ (point s of qq -- point s of qq + (2rule_thickness#,0)))
+ ,length qp) of qp) transformed T
+ enddef;
+
+ % Draw the arrows. First the left arrow and then the right arrow
+
+ save pa, pb, T, tt, ttt;
+ save f,s;
+
+ save p_left; path p_left; p_left := parallellineleft apth;
+ save p_right; path p_right; p_right := parallellineright apth;
+
+ for ppp = p_left, reverse p_right:
+ transform T;
+ numeric tt; tt := arctime(arclength ppp - (x0-x9)) of ppp;
+ numeric ttt; ttt := arctime(arclength ppp - (x0-x2)) of ppp;
+
+ % Draw the right half of the arrow head
+
+ if arclength ppp = 0:
+ T:=identity shifted (point (length ppp) of ppp - z0);
+ elseif arclength ppp < x0-x3l:
+ T:=identity rotatedaround(z0,angle (direction (length ppp) of ppp))
+ shifted (point (length ppp) of ppp - z0);
+ else:
+ T:=mapto(z0,
+ point (length ppp) of ppp,
+ z2,
+ point ttt of ppp,
+ z9-(0,3rule_thickness#),
+ point tt of ppp - 3rule_thickness#
+ *(unitvector (direction tt of ppp)
+ rotated 90));
+ fi
+
+ vardef f(expr s) =
+ length(point s of (pp transformed T) - point tt of ppp)
+ < length(point 0 of pp - z9)
+ enddef;
+
+ if f(0) or (arclength ppp < x0-x3l): s := 0;
+ else: s := solve f(length pp, 0);
+ fi
+
+ path pa;
+ pa := right_texarrowhead(T,s);
+
+ % Draw the left part of the arrow head
+
+ if arclength ppp = 0:
+ T:=identity shifted (point (length ppp) of ppp - z0);
+ elseif arclength ppp < x0-x3l:
+ T:=identity rotatedaround(z0,angle (direction (length ppp) of ppp))
+ shifted (point (length ppp) of ppp - z0);
+ else:
+ T:=mapto(z0,
+ point (length ppp) of ppp,
+ z2,
+ point ttt of ppp,
+ z9+(0,3rule_thickness#),
+ point tt of ppp + 3rule_thickness#
+ *(unitvector (direction tt of ppp)
+ rotated 90));
+ fi
+
+ vardef f(expr s) =
+ length(point s of (qq transformed T) - point tt of ppp)
+ < length(point 0 of qq - z9)
+ enddef;
+
+ if f(0) or (arclength ppp < x0-x3l): s := 0;
+ else: s := solve f(length qq, 0);
+ fi
+
+ path pb;
+ pb := left_texarrowhead(T,s);
+
+ filldraw pa--pb--cycle text_;
+
+ % Draw the path
+
+ if arclength ppp > x0-x2:
+ draw subpath(0,ttt) of ppp withpen pencircle scaled rule_thickness#
+ text_;
+ fi
+
+ endfor
+
+ pickup prevpen;
+
+ enddef;
+
+enddef;
diff --git a/Master/texmf-dist/metapost/cmarrows/sgbx0008.mp b/Master/texmf-dist/metapost/cmarrows/sgbx0008.mp
new file mode 100644
index 00000000000..70d308b9877
--- /dev/null
+++ b/Master/texmf-dist/metapost/cmarrows/sgbx0008.mp
@@ -0,0 +1,240 @@
+%% sgbx0008.mp
+%% Copyright 2006 Tommy Ekola <tek@kth.se>
+%
+% This work may be distributed and/or modified under the conditions of
+% the LaTeX Project Public License, either version 1.3 of this license
+% or (at your option) any later version. The latest version of this
+% license is in http://www.latex-project.org/lppl.txt
+%
+% This work has the LPPL maintenance status `maintained'. The Current
+% Maintainer of this work is Tommy Ekola. The Base Interpreter is
+% MetaPost.
+
+vardef setup_twowayoldarrow (expr source_file, cmdname) =
+
+ scantokens ("input tgbx0000");
+
+ scantokens ("input " & source_file);
+
+ expandafter def scantokens cmdname expr p =
+ scantokens (cmdname & "__sgbxww")(p)
+ enddef;
+
+ expandafter vardef scantokens (cmdname & "__sgbxww " & "(expr apth) " &
+ "text text_ = " &
+
+ "save math_spread, x_height, u, rule_thickness, bar, math_axis," &
+ " asc_height, eps, fudge, crisp, hair;" &
+
+ "math_spread :=" & decimal math_spread & ";" &
+ "x_height# :=" & decimal x_height# & ";" &
+ "u# :=" & decimal u# & ";" &
+ "rule_thickness# :=" & decimal rule_thickness# & ";" &
+ "bar# :=" & decimal bar# & ";" &
+ "math_axis# :=" & decimal math_axis# & ";" &
+ "asc_height# :=" & decimal asc_height# & ";" &
+ "eps :=" & decimal eps & ";" &
+ "fudge :=" & decimal fudge & ";" &
+ "crisp# :=" & decimal crisp# & ";" &
+ "hair# :=" & decimal hair# & ";")
+
+ save prevpen;
+ prevpen:=savepen;
+
+ save x,y;
+ numeric x[], x[]', x[]l, x[]'l, x[]r, x[]'r,
+ y[], y[]', y[]l, y[]'l, y[]r, y[]'r;
+ save spread, w;
+ numeric spread, w;
+
+ if crisp#>fudge*hair#:
+ crisp#:=fudge*hair#;
+ fi
+ pickup if crisp#=0: nullpen else: pencircle scaled crisp# fi;
+
+ spread = math_spread[.45x_height#, .55x_height#];
+ w = 18u#;
+
+ penpos1(rule_thickness#, 90); penpos2(rule_thickness#, 90);
+ penpos3(bar#, 0); penpos4(bar#, 0);
+ y0=y1=y2=math_axis#; x1-.5rule_thickness#=u#; rt x0=w-u#;
+ y3-y0=y0-y4=.24asc_height#+eps;
+ x3=x4=x0-3u#-eps;
+ penpos5(bar#, angle(z4-z0)); z5l=z0;
+ penpos6(bar#, angle(z3-z0)); z6l=z0;
+ z9=.381966[.5[z3,z4],z0];
+
+ save pp; path pp; pp = z4l{z9-z4}..z6r;
+ save t; numeric t; t = xpart(pp intersectiontimes ((0,y2l)--(w,y2l)));
+ x2=xpart point t of pp;
+
+ save mapto, n;
+ vardef mapto(text t) =
+ hide(numeric n; n:=0;
+ numeric x,x_[],y,y_[];
+ for z=t: z_[incr n]:=z; endfor;
+ transform T;
+ z_2 = z_1 transformed T;
+ z_4 = z_3 transformed T;
+ z_6 = z_5 transformed T;)
+ T
+ enddef;
+
+ save T; transform T;
+ save tt; numeric tt; tt = arctime(arclength apth - (x0-x9)) of apth;
+ save ttt; numeric ttt; ttt = arctime(arclength apth - (x0-x2)) of apth;
+ save ss; numeric ss; ss = arctime x0-x9 of apth;
+ save sss; numeric sss; sss = arctime x0-x2 of apth;
+
+ % Draw the right half of the arrow head
+
+ save right_texarrowhead, pa;
+ vardef right_texarrowhead(expr T,s) =
+ (subpath(0, xpart ((z0..{z4-z9}z4r) intersectiontimes
+ (point s of pp -- point s of pp + (2rule_thickness#,0))))
+ of (z0..{z4-z9}z4r)--subpath(s,t) of pp--z2l) transformed T
+ enddef;
+
+ if arclength apth = 0:
+ T:=identity shifted (point (length apth) of apth - z0);
+ elseif arclength apth < x0-x3l:
+ T:=identity rotatedaround(z0,angle (direction (length apth) of apth))
+ shifted (point (length apth) of apth - z0);
+ else:
+ T:=mapto(z0,
+ point (length apth) of apth,
+ z2,
+ point ttt of apth,
+ z9-(0,3rule_thickness#),
+ point tt of apth - 3rule_thickness#
+ *(unitvector (direction tt of apth)
+ rotated 90));
+ fi
+
+ save f,s;
+ vardef f(expr s) =
+ length(point s of (pp transformed T) - point tt of apth)
+ < length(point 0 of pp - z9)
+ enddef;
+
+ if f(0) or (arclength apth < x0-x3l): s := 0;
+ else: s := solve f(length pp, 0);
+ fi
+
+ path pa;
+ pa := right_texarrowhead(T,s);
+
+ if arclength apth = 0:
+ T:=identity reflectedabout ((x0,y3),(x0,y4))
+ shifted (point (length 0) of apth -z0);
+ elseif arclength apth < x0-x3l:
+ T:=identity reflectedabout ((x0,y3),(x0,y4))
+ rotatedaround(z0, angle direction (length 0) of apth)
+ shifted (point (length 0) of apth - z0);
+ else:
+ T:=mapto(z0,
+ point 0 of apth,
+ z2,
+ point sss of apth,
+ z9-(0,3rule_thickness#),
+ point ss of apth - 3rule_thickness#
+ *(unitvector (direction ss of apth)
+ rotated 90));
+ fi
+
+ vardef f(expr s) =
+ length(point s of (pp transformed T) - point ss of apth)
+ < length(point 0 of pp - z9)
+ enddef;
+
+ if f(0) or (arclength apth < x0-x3l): s := 0;
+ else: s := solve f(length pp, 0);
+ fi
+
+ save pc; path pc;
+ pc := right_texarrowhead(T,s);
+
+ % Draw the left part of the arrow head
+
+ pp := (z3l{z9-z3}..z5r);
+ save pq; path pq; pq := (z3r{z9-z3}..z0);
+
+ save left_texarrowhead, pb;
+ vardef left_texarrowhead(expr T, s) =
+ (z2r--subpath(t,s) of pp
+ --subpath(xpart ( pq intersectiontimes
+ (point s of pp -- point s of pp + (2rule_thickness#,0)))
+ ,length pq) of pq) transformed T
+ enddef;
+
+ if arclength apth = 0:
+ T:=identity shifted (point (length apth) of apth - z0);
+ elseif arclength apth < x0-x3l:
+ T:=identity rotatedaround(z0,angle (direction (length apth) of apth))
+ shifted (point (length apth) of apth - z0);
+ else:
+ T:=mapto(z0,
+ point (length apth) of apth,
+ z2,
+ point ttt of apth,
+ z9+(0,3rule_thickness#),
+ point tt of apth + 3rule_thickness#
+ *(unitvector (direction tt of apth)
+ rotated 90));
+ fi
+
+ vardef f(expr s) =
+ length(point s of (pp transformed T) - point tt of apth)
+ < length(point 0 of pp - z9)
+ enddef;
+
+ if f(0) or (arclength apth < x0-x3l): s := 0;
+ else: s := solve f(length pp, 0);
+ fi
+
+ path pb;
+ pb := left_texarrowhead(T,s);
+
+ if arclength apth = 0:
+ T:=identity reflectedabout ((x0,y3),(x0,y4))
+ shifted (point (length 0) of apth -z0);
+ elseif arclength apth < x0-x3l:
+ T:=identity reflectedabout ((x0,y3),(x0,y4))
+ rotatedaround(z0, angle direction (length 0) of apth)
+ shifted (point (length 0) of apth - z0);
+ else:
+ T:=mapto(z0,
+ point 0 of apth,
+ z2,
+ point sss of apth,
+ z9+(0,3rule_thickness#),
+ point ss of apth + 3rule_thickness#
+ *(unitvector (direction ss of apth)
+ rotated 90));
+ fi
+
+ vardef f(expr s) =
+ length(point s of (pp transformed T) - point ss of apth)
+ < length(point 0 of pp - z9)
+ enddef;
+
+ if f(0) or (arclength apth < x0-x3l): s := 0;
+ else: s := solve f(length pp, 0);
+ fi
+
+ save pd; path pd;
+ pd := left_texarrowhead(T,s);
+
+ filldraw pa--pb--cycle text_;
+ filldraw pc--pd--cycle text_;
+
+ if arclength apth > 2(x0-x2):
+ draw subpath(sss,ttt) of apth withpen pencircle scaled rule_thickness#
+ text_;
+ fi
+
+ pickup prevpen;
+
+ enddef;
+
+enddef; \ No newline at end of file
diff --git a/Master/texmf-dist/metapost/cmarrows/sgbx0010.mp b/Master/texmf-dist/metapost/cmarrows/sgbx0010.mp
new file mode 100644
index 00000000000..e9e3cf9b490
--- /dev/null
+++ b/Master/texmf-dist/metapost/cmarrows/sgbx0010.mp
@@ -0,0 +1,240 @@
+%% sgbx0010.mp
+%% Copyright 2006 Tommy Ekola <tek@kth.se>
+%
+% This work may be distributed and/or modified under the conditions of
+% the LaTeX Project Public License, either version 1.3 of this license
+% or (at your option) any later version. The latest version of this
+% license is in http://www.latex-project.org/lppl.txt
+%
+% This work has the LPPL maintenance status `maintained'. The Current
+% Maintainer of this work is Tommy Ekola. The Base Interpreter is
+% MetaPost.
+
+vardef setup_twowayarrow (expr source_file, cmdname) =
+
+ scantokens ("input tgbx0000");
+
+ scantokens ("input " & source_file);
+
+ expandafter def scantokens cmdname expr p =
+ scantokens (cmdname & "__sgbxww")(p)
+ enddef;
+
+ expandafter vardef scantokens (cmdname & "__sgbxww " & "(expr apth) " &
+ "text text_ = " &
+
+ "save math_spread, x_height, u, rule_thickness, bar, math_axis," &
+ " asc_height, eps, fudge, crisp, hair;" &
+
+ "math_spread :=" & decimal math_spread & ";" &
+ "x_height# :=" & decimal x_height# & ";" &
+ "u# :=" & decimal u# & ";" &
+ "rule_thickness# :=" & decimal rule_thickness# & ";" &
+ "bar# :=" & decimal bar# & ";" &
+ "math_axis# :=" & decimal math_axis# & ";" &
+ "asc_height# :=" & decimal asc_height# & ";" &
+ "eps :=" & decimal eps & ";" &
+ "fudge :=" & decimal fudge & ";" &
+ "crisp# :=" & decimal crisp# & ";" &
+ "hair# :=" & decimal hair# & ";")
+
+ save prevpen;
+ prevpen:=savepen;
+
+ save x,y;
+ numeric x[], x[]', x[]l, x[]'l, x[]r, x[]'r,
+ y[], y[]', y[]l, y[]'l, y[]r, y[]'r;
+ save spread, w;
+ numeric spread, w;
+
+ if crisp#>fudge*hair#:
+ crisp#:=fudge*hair#;
+ fi
+ pickup if crisp#=0: nullpen else: pencircle scaled crisp# fi;
+
+ spread = math_spread[.45x_height#, .55x_height#];
+ w = 18u#;
+
+ penpos1(rule_thickness#, 90); penpos2(rule_thickness#, 90);
+ penpos3(rule_thickness#, 0); penpos4(rule_thickness#, 0);
+ y0=y1=y2=math_axis#; x1-.5rule_thickness#=u#; rt x0=w-u#;
+ y3-y0=y0-y4=.36asc_height#+eps;
+ x3=x4=x0-4u#-eps;
+ penpos5(rule_thickness#, angle(z4-z0)); z5l=z0;
+ penpos6(rule_thickness#, angle(z3-z0)); z6l=z0;
+ z9=.2[.5[z3,z4],z0];
+
+ save pp; path pp; pp = z4l{z9-z4}..z6r;
+ save t; numeric t; t = xpart(pp intersectiontimes ((0,y2l)--(w,y2l)));
+ x2=xpart point t of pp;
+
+ save mapto, n;
+ vardef mapto(text t) =
+ hide(numeric n; n:=0;
+ numeric x,x_[],y,y_[];
+ for z=t: z_[incr n]:=z; endfor;
+ transform T;
+ z_2 = z_1 transformed T;
+ z_4 = z_3 transformed T;
+ z_6 = z_5 transformed T;)
+ T
+ enddef;
+
+ save T; transform T;
+ save tt; numeric tt; tt = arctime(arclength apth - (x0-x9)) of apth;
+ save ttt; numeric ttt; ttt = arctime(arclength apth - (x0-x2)) of apth;
+ save ss; numeric ss; ss = arctime x0-x9 of apth;
+ save sss; numeric sss; sss = arctime x0-x2 of apth;
+
+ % Draw the right half of the arrow head
+
+ save right_texarrowhead, pa;
+ vardef right_texarrowhead(expr T,s) =
+ (subpath(0, xpart ((z0..{z4-z9}z4r) intersectiontimes
+ (point s of pp -- point s of pp + (2rule_thickness#,0))))
+ of (z0..{z4-z9}z4r)--subpath(s,t) of pp--z2l) transformed T
+ enddef;
+
+ if arclength apth = 0:
+ T:=identity shifted (point (length apth) of apth - z0);
+ elseif arclength apth < x0-x3l:
+ T:=identity rotatedaround(z0,angle (direction (length apth) of apth))
+ shifted (point (length apth) of apth - z0);
+ else:
+ T:=mapto(z0,
+ point (length apth) of apth,
+ z2,
+ point ttt of apth,
+ z9-(0,3rule_thickness#),
+ point tt of apth - 3rule_thickness#
+ *(unitvector (direction tt of apth)
+ rotated 90));
+ fi
+
+ save f,s;
+ vardef f(expr s) =
+ length(point s of (pp transformed T) - point tt of apth)
+ < length(point 0 of pp - z9)
+ enddef;
+
+ if f(0) or (arclength apth < x0-x3l): s := 0;
+ else: s := solve f(length pp, 0);
+ fi
+
+ path pa;
+ pa := right_texarrowhead(T,s);
+
+ if arclength apth = 0:
+ T:=identity reflectedabout ((x0,y3),(x0,y4))
+ shifted (point (length 0) of apth -z0);
+ elseif arclength apth < x0-x3l:
+ T:=identity reflectedabout ((x0,y3),(x0,y4))
+ rotatedaround(z0, angle direction (length 0) of apth)
+ shifted (point (length 0) of apth - z0);
+ else:
+ T:=mapto(z0,
+ point 0 of apth,
+ z2,
+ point sss of apth,
+ z9-(0,3rule_thickness#),
+ point ss of apth - 3rule_thickness#
+ *(unitvector (direction ss of apth)
+ rotated 90));
+ fi
+
+ vardef f(expr s) =
+ length(point s of (pp transformed T) - point ss of apth)
+ < length(point 0 of pp - z9)
+ enddef;
+
+ if f(0) or (arclength apth < x0-x3l): s := 0;
+ else: s := solve f(length pp, 0);
+ fi
+
+ save pc; path pc;
+ pc := right_texarrowhead(T,s);
+
+ % Draw the left part of the arrow head
+
+ pp := (z3l{z9-z3}..z5r);
+ save pq; path pq; pq := (z3r{z9-z3}..z0);
+
+ save left_texarrowhead, pb;
+ vardef left_texarrowhead(expr T, s) =
+ (z2r--subpath(t,s) of pp
+ --subpath(xpart ( pq intersectiontimes
+ (point s of pp -- point s of pp + (2rule_thickness#,0)))
+ ,length pq) of pq) transformed T
+ enddef;
+
+ if arclength apth = 0:
+ T:=identity shifted (point (length apth) of apth - z0);
+ elseif arclength apth < x0-x3l:
+ T:=identity rotatedaround(z0,angle (direction (length apth) of apth))
+ shifted (point (length apth) of apth - z0);
+ else:
+ T:=mapto(z0,
+ point (length apth) of apth,
+ z2,
+ point ttt of apth,
+ z9+(0,3rule_thickness#),
+ point tt of apth + 3rule_thickness#
+ *(unitvector (direction tt of apth)
+ rotated 90));
+ fi
+
+ vardef f(expr s) =
+ length(point s of (pp transformed T) - point tt of apth)
+ < length(point 0 of pp - z9)
+ enddef;
+
+ if f(0) or (arclength apth < x0-x3l): s := 0;
+ else: s := solve f(length pp, 0);
+ fi
+
+ path pb;
+ pb := left_texarrowhead(T,s);
+
+ if arclength apth = 0:
+ T:=identity reflectedabout ((x0,y3),(x0,y4))
+ shifted (point (length 0) of apth -z0);
+ elseif arclength apth < x0-x3l:
+ T:=identity reflectedabout ((x0,y3),(x0,y4))
+ rotatedaround(z0, angle direction (length 0) of apth)
+ shifted (point (length 0) of apth - z0);
+ else:
+ T:=mapto(z0,
+ point 0 of apth,
+ z2,
+ point sss of apth,
+ z9+(0,3rule_thickness#),
+ point ss of apth + 3rule_thickness#
+ *(unitvector (direction ss of apth)
+ rotated 90));
+ fi
+
+ vardef f(expr s) =
+ length(point s of (pp transformed T) - point ss of apth)
+ < length(point 0 of pp - z9)
+ enddef;
+
+ if f(0) or (arclength apth < x0-x3l): s := 0;
+ else: s := solve f(length pp, 0);
+ fi
+
+ save pd; path pd;
+ pd := left_texarrowhead(T,s);
+
+ filldraw pa--pb--cycle text_;
+ filldraw pc--pd--cycle text_;
+
+ if arclength apth > 2(x0-x2):
+ draw subpath(sss,ttt) of apth withpen pencircle scaled rule_thickness#
+ text_;
+ fi
+
+ pickup prevpen;
+
+ enddef;
+
+enddef; \ No newline at end of file
diff --git a/Master/texmf-dist/metapost/cmarrows/sgbx0011.mp b/Master/texmf-dist/metapost/cmarrows/sgbx0011.mp
new file mode 100644
index 00000000000..bd2659ade77
--- /dev/null
+++ b/Master/texmf-dist/metapost/cmarrows/sgbx0011.mp
@@ -0,0 +1,242 @@
+%% sgbx0011.mp
+%% Copyright 2006 Tommy Ekola <tek@kth.se>
+%
+% This work may be distributed and/or modified under the conditions of
+% the LaTeX Project Public License, either version 1.3 of this license
+% or (at your option) any later version. The latest version of this
+% license is in http://www.latex-project.org/lppl.txt
+%
+% This work has the LPPL maintenance status `maintained'. The Current
+% Maintainer of this work is Tommy Ekola. The Base Interpreter is
+% MetaPost.
+
+vardef setup_twowaydoublearrow (expr source_file, cmdname) =
+
+ scantokens ("input tgbx0000");
+
+ scantokens ("input " & source_file);
+
+ expandafter def scantokens cmdname expr p =
+ scantokens (cmdname & "__sgbxww")(p)
+ enddef;
+
+ expandafter vardef scantokens (cmdname & "__sgbxww " & "(expr apth) " &
+ "text text_ = " &
+
+ "save math_spread, x_height, u, rule_thickness, bar, math_axis," &
+ " asc_height, eps, fudge, crisp, hair;" &
+
+ "math_spread :=" & decimal math_spread & ";" &
+ "x_height# :=" & decimal x_height# & ";" &
+ "u# :=" & decimal u# & ";" &
+ "rule_thickness# :=" & decimal rule_thickness# & ";" &
+ "bar# :=" & decimal bar# & ";" &
+ "math_axis# :=" & decimal math_axis# & ";" &
+ "asc_height# :=" & decimal asc_height# & ";" &
+ "eps :=" & decimal eps & ";" &
+ "fudge :=" & decimal fudge & ";" &
+ "crisp# :=" & decimal crisp# & ";" &
+ "hair# :=" & decimal hair# & ";")
+
+ save prevpen;
+ prevpen:=savepen;
+
+ save x,y;
+ numeric x[], x[]', x[]l, x[]'l, x[]r, x[]'r,
+ y[], y[]', y[]l, y[]'l, y[]r, y[]'r;
+ save spread, w;
+ numeric spread, w;
+
+ if crisp#>fudge*hair#:
+ crisp#:=fudge*hair#;
+ fi
+ pickup if crisp#=0: nullpen else: pencircle scaled crisp# fi;
+
+ spread = math_spread[.45x_height#,.55x_height#];
+ w:=18u#;
+
+ lft x1 = u#-eps; x2=x1; x7=x8=w-x1;
+ y1=y7; y2=y8; y1-y2=spread; .5[y1,y2]=math_axis#;
+
+ rt x0 = w-u#+eps; y0 = math_axis#;
+ penpos3(rule_thickness#,0); penpos4(rule_thickness#,0);
+ y3-y1 = y2-y4 = .24asc_height#+eps; x3=x4=x0-6u#-eps;
+ penpos5(rule_thickness#, angle(z4-z0)); z5l=z0;
+ penpos6(rule_thickness#, angle(z3-z0)); z6l=z0;
+ z9 = .381966[.5[z3,z4],z0];
+
+ save pp;
+ path pp; pp = z4l{z9-z4}..z6r;
+ save t;
+ numeric t; t = xpart(pp intersectiontimes ((0,y0)--(w,y0)));
+ numeric t[]; t1 = xpart(pp intersectiontimes ( (0,y2-rule_thickness#/2)
+ --(w,y2-rule_thickness#/2)));
+ t2 = xpart(pp intersectiontimes ( (0,y2+rule_thickness#/2)
+ --(w,y2+rule_thickness#/2)));
+ save qq;
+ path qq; qq = z3l{z9-z3}..z5r;
+
+ save parallelline;
+ vardef parallelline expr ppp =
+ save s, stp;
+ numeric s, stp; stp:=(arclength ppp) div 5pt;
+ if stp=0: stp:=1; fi
+ stp:=(arclength ppp)/stp;
+
+ if arclength apth > 0:
+ draw for s=0 step stp until arclength ppp - stp:
+ point (arctime s of ppp) of ppp +
+ spread/2*(unitvector direction (arctime s of ppp)
+ of ppp rotated 90)
+ {direction (arctime s of ppp) of ppp}..
+ endfor
+ {direction (length ppp) of ppp}
+ point (length ppp) of ppp +
+ spread/2*(unitvector direction (length ppp) of ppp rotated 90)
+ withpen pencircle scaled rule_thickness#
+ text_;
+
+ draw for s=0 step stp until arclength ppp - stp:
+ point (arctime s of ppp) of ppp -
+ spread/2*(unitvector direction (arctime s of ppp)
+ of ppp rotated 90)
+ {direction (arctime s of ppp) of ppp}..
+ endfor
+ {direction (length ppp) of ppp}
+ point (length ppp) of ppp -
+ spread/2*(unitvector direction (length ppp) of ppp rotated 90)
+ withpen pencircle scaled rule_thickness#
+ text_;
+ fi
+ enddef;
+
+ save mapto, n;
+ vardef mapto(text t) =
+ hide(numeric n; n:=0;
+ numeric x,x_[],y,y_[];
+ for z=t: z_[incr n]:=z; endfor;
+ transform T;
+ z_2 = z_1 transformed T;
+ z_4 = z_3 transformed T;
+ z_6 = z_5 transformed T;)
+ T
+ enddef;
+
+ % Draw the front arrow head
+
+ save doublearrowhead;
+ vardef doublearrowhead(expr T, s, ss) =
+ (subpath(0, xpart((z0..{z4-z9}z4r) intersectiontimes
+ (point s of pp -- point s of pp + (2rule_thickness#,0))))
+ of (z0..{z4-z9}z4r)
+ --subpath(s,t1) of pp
+ --(xpart point t1 of pp, ypart point t2 of pp)
+ --subpath(t2,t) of pp
+ --subpath(t,t2) of qq
+ --(xpart point t1 of qq, ypart point t2 of qq)
+ --subpath(t1,ss) of qq
+ --subpath(xpart ((z3r{z9-z3}..z0) intersectiontimes
+ (point ss of qq -- point ss of qq + (2rule_thickness#,0))),1)
+ of (z3r{z9-z3}..z0)
+ & cycle) transformed T
+ enddef;
+
+ save T; transform T;
+ save tt; numeric tt;
+ tt = arctime (arclength apth - (x0 - xpart point t1 of pp)) of apth;
+
+ if arclength apth = 0:
+ T:=identity shifted (point (length apth) of apth - z0);
+ elseif arclength apth < x0-xpart(point t2 of pp):
+ T:=identity rotatedaround(z0,angle (direction (length apth) of apth))
+ shifted (point (length apth) of apth - z0);
+ else:
+ T := mapto(
+ z0,
+ point (length apth) of apth,
+ point t1 of pp + (0,rule_thickness#/2),
+ point tt of apth +
+ spread/2*(unitvector direction tt of apth rotated 90),
+ point t1 of qq - (0,rule_thickness#/2),
+ point tt of apth -
+ spread/2*(unitvector direction tt of apth rotated 90));
+ fi
+
+ save f,s,ss,ttt;
+ ttt = arctime(arclength apth - (x0-x9)) of apth;
+ vardef f(expr s) =
+ length(point s of (pp transformed T) - point ttt of apth)
+ < length(point 0 of pp - z9)
+ enddef;
+
+ if f(0) or (arclength apth < x0-x3l): s := 0;
+ else: s := solve f(length pp, 0);
+ fi
+
+ vardef f(expr ss) =
+ length(point ss of (qq transformed T) - point ttt of apth)
+ < length(point 0 of qq - z9)
+ enddef;
+
+ if f(0) or (arclength apth < x0-x3l): ss := 0;
+ else: ss := solve f(length qq, 0);
+ fi
+
+ filldraw doublearrowhead(T,s,ss) text_;
+
+ % Draw the back arrow head
+
+ save ttt; numeric ttt;
+ ttt = arctime (x0 - xpart point t1 of pp) of apth;
+
+ if arclength apth = 0:
+ T:=identity rotatedaround(z0, 180)
+ shifted (point (length apth) of apth - z0);
+ elseif arclength apth < x0-xpart(point t2 of pp):
+ T:=identity rotatedaround(z0,angle (direction 0 of apth)+180)
+ shifted (point 0 of apth - z0);
+ else:
+ T := mapto(
+ z0,
+ point 0 of apth,
+ point t1 of pp + (0,rule_thickness#/2),
+ point ttt of apth +
+ spread/2*(unitvector direction ttt of apth rotated 90),
+ point t1 of qq - (0,rule_thickness#/2),
+ point ttt of apth -
+ spread/2*(unitvector direction ttt of apth rotated 90));
+ fi
+
+
+ ttt := arctime(x0-x9) of apth;
+ vardef f(expr s) =
+ length(point s of (pp transformed T) - point ttt of apth)
+ < length(point 0 of pp - z9)
+ enddef;
+
+ if f(0) or (arclength apth < x0-x3l): s := 0;
+ else: s := solve f(length pp, 0);
+ fi
+
+ vardef f(expr ss) =
+ length(point ss of (qq transformed T) - point ttt of apth)
+ < length(point 0 of qq - z9)
+ enddef;
+
+ if f(0) or (arclength apth < x0-x3l): ss := 0;
+ else: ss := solve f(length qq, 0);
+ fi
+
+ filldraw doublearrowhead(T,s,ss) text_;
+
+ % Draw the path
+
+ if arclength apth > 2(x0-xpart(point t1 of pp)):
+ parallelline (subpath(ttt,tt) of apth);
+ fi
+
+ pickup prevpen;
+
+ enddef;
+
+enddef;
diff --git a/Master/texmf-dist/metapost/cmarrows/sgbx0012.mp b/Master/texmf-dist/metapost/cmarrows/sgbx0012.mp
new file mode 100644
index 00000000000..94c225afbc1
--- /dev/null
+++ b/Master/texmf-dist/metapost/cmarrows/sgbx0012.mp
@@ -0,0 +1,213 @@
+%% sgbx0012.mp
+%% Copyright 2006 Tommy Ekola <tek@kth.se>
+%
+% This work may be distributed and/or modified under the conditions of
+% the LaTeX Project Public License, either version 1.3 of this license
+% or (at your option) any later version. The latest version of this
+% license is in http://www.latex-project.org/lppl.txt
+%
+% This work has the LPPL maintenance status `maintained'. The Current
+% Maintainer of this work is Tommy Ekola. The Base Interpreter is
+% MetaPost.
+
+vardef setup_hookleftarrow (expr source_file, cmdname) =
+
+ scantokens ("input tgbx0000");
+
+ scantokens ("input " & source_file);
+
+ expandafter def scantokens cmdname expr p =
+ scantokens (cmdname & "__sgbxww")(p)
+ enddef;
+
+ expandafter vardef scantokens (cmdname & "__sgbxww " & "(expr apth) " &
+ "text text_ = " &
+
+ "save math_spread, x_height, u, rule_thickness, bar, math_axis," &
+ " asc_height, eps, monospace, fudge, crisp, hair;" &
+ "boolean monospace;" &
+
+ "math_spread :=" & decimal math_spread & ";" &
+ "x_height# :=" & decimal x_height# & ";" &
+ "u# :=" & decimal u# & ";" &
+ "rule_thickness# :=" & decimal rule_thickness# & ";" &
+ "bar# :=" & decimal bar# & ";" &
+ "math_axis# :=" & decimal math_axis# & ";" &
+ "asc_height# :=" & decimal asc_height# & ";" &
+ "eps :=" & decimal eps & ";" &
+ "monospace :=" & if monospace: "true" else: "false" fi & ";" &
+ "fudge :=" & decimal fudge & ";" &
+ "crisp# :=" & decimal crisp# & ";" &
+ "hair# :=" & decimal hair# & ";")
+
+ save prevpen;
+ prevpen:=savepen;
+
+ save x,y;
+ numeric x[], x[]', x[]l, x[]'l, x[]r, x[]'r,
+ y[], y[]', y[]l, y[]'l, y[]r, y[]'r;
+ save spread, w;
+ numeric spread, w;
+
+ if crisp#>fudge*hair#:
+ crisp#:=fudge*hair#;
+ fi
+ pickup if crisp#=0: nullpen else: pencircle scaled crisp# fi;
+
+ spread = math_spread[.45x_height#, .55x_height#];
+ w = 18u#;
+
+ penpos1(rule_thickness#, 90); penpos2(rule_thickness#, 90);
+ penpos3(rule_thickness#, 0); penpos4(rule_thickness#, 0);
+ y0=y1=y2=math_axis#; x1-.5rule_thickness#=u#; rt x0=w-u#;
+ y3-y0=y0-y4=if monospace: .24 else: .36 fi asc_height#+eps;
+ x3=x4=x0-if monospace: 3u# else: 4u# fi - eps;
+ penpos5(rule_thickness#, angle(z4-z0)); z5l=z0;
+ penpos6(rule_thickness#, angle(z3-z0)); z6l=z0;
+ z9=.2[.5[z3,z4],z0];
+
+ save pp; path pp; pp = z4l{z9-z4}..z6r;
+ save t; numeric t; t = xpart(pp intersectiontimes ((0,y2l)--(w,y2l)));
+ x2=xpart point t of pp;
+
+ % the hook
+ x12-rule_thickness#/2=u#-eps; x11=x13=5u#-x12;
+ y11-y13=spread; y12=.5[y11,y13]; y13=0;
+
+ save mapto, n;
+ vardef mapto(text t) =
+ hide(numeric n; n:=0;
+ numeric x,x_[],y,y_[];
+ for z=t: z_[incr n]:=z; endfor;
+ transform T;
+ z_2 = z_1 transformed T;
+ z_4 = z_3 transformed T;
+ z_6 = z_5 transformed T;)
+ T
+ enddef;
+
+ save T; transform T;
+ save tt; numeric tt; tt = arctime(arclength apth - (x0-x9)) of apth;
+ save ttt; numeric ttt; ttt = arctime(arclength apth - (x0-x2)) of apth;
+ save ss; numeric ss; ss = arctime x11-x12 of apth;
+
+ % Draw the right half of the arrow head
+
+ save right_texarrowhead, pa;
+ vardef right_texarrowhead(expr T,s) =
+ (subpath(0, xpart ((z0..{z4-z9}z4r) intersectiontimes
+ (point s of pp -- point s of pp + (2rule_thickness#,0))))
+ of (z0..{z4-z9}z4r)--subpath(s,t) of pp--z2l) transformed T
+ enddef;
+
+ if arclength apth = 0:
+ T:=identity shifted (point (length apth) of apth - z0);
+ elseif arclength apth < x0-x3l:
+ T:=identity rotatedaround(z0,angle (direction (length apth) of apth))
+ shifted (point (length apth) of apth - z0);
+ else:
+ T:=mapto(z0,
+ point (length apth) of apth,
+ z2,
+ point ttt of apth,
+ z9-(0,3rule_thickness#),
+ point tt of apth - 3rule_thickness#
+ *(unitvector (direction tt of apth)
+ rotated 90));
+ fi
+
+ save f,s;
+ vardef f(expr s) =
+ length(point s of (pp transformed T) - point tt of apth)
+ < length(point 0 of pp - z9)
+ enddef;
+
+ if f(0) or (arclength apth < x0-x3l): s := 0;
+ else: s := solve f(length pp, 0);
+ fi
+
+ path pa;
+ pa := right_texarrowhead(T,s);
+
+ % Draw the left part of the arrow head
+
+ pp := (z3l{z9-z3}..z5r);
+ save pq; path pq; pq := (z3r{z9-z3}..z0);
+
+ save left_texarrowhead, pb;
+ vardef left_texarrowhead(expr T, s) =
+ (z2r--subpath(t,s) of pp
+ --subpath(xpart ( pq intersectiontimes
+ (point s of pp -- point s of pp + (2rule_thickness#,0)))
+ ,length pq) of pq) transformed T
+ enddef;
+
+ if arclength apth = 0:
+ T:=identity shifted (point (length apth) of apth - z0);
+ elseif arclength apth < x0-x3l:
+ T:=identity rotatedaround(z0,angle (direction (length apth) of apth))
+ shifted (point (length apth) of apth - z0);
+ else:
+ T:=mapto(z0,
+ point (length apth) of apth,
+ z2,
+ point ttt of apth,
+ z9+(0,3rule_thickness#),
+ point tt of apth + 3rule_thickness#
+ *(unitvector (direction tt of apth)
+ rotated 90));
+ fi
+
+ vardef f(expr s) =
+ length(point s of (pp transformed T) - point tt of apth)
+ < length(point 0 of pp - z9)
+ enddef;
+
+ if f(0) or (arclength apth < x0-x3l): s := 0;
+ else: s := solve f(length pp, 0);
+ fi
+
+ path pb;
+ pb := left_texarrowhead(T,s);
+
+ filldraw pa--pb--cycle text_;
+
+ % Draw the hook
+
+ save hook;
+ vardef hook(expr T) =
+ (z11{left}...z12{down}...z13{right}) transformed T
+ enddef;
+
+ if arclength apth = 0:
+ T:=identity shifted (point (length apth) of apth - z13);
+ elseif arclength apth < x11-x12:
+ T:=identity rotatedaround(z13,angle (direction 0 of apth))
+ shifted (point 0 of apth - z13)
+ shifted ((x11-x12)*(unitvector
+ (point (length apth) of apth - point 0 of apth)));
+ else:
+ T:=mapto(z11,
+ point ss of apth,
+ z12,
+ point 0 of apth + (y11-y12)*(unitvector (direction 0 of apth)
+ rotated 90),
+ z13,
+ point ss of apth + (y11-y13)*(unitvector (direction ss of apth)
+ rotated 90));
+ fi
+
+ draw hook(T) withpen pencircle scaled rule_thickness# text_;
+
+ % Draw the path
+
+ if arclength apth > x0-x2 + x11-x12:
+ draw subpath(ss,ttt) of apth withpen pencircle scaled rule_thickness#
+ text_;
+ fi
+
+ pickup prevpen;
+
+ enddef;
+
+enddef;
diff --git a/Master/texmf-dist/metapost/cmarrows/sgbx0013.mp b/Master/texmf-dist/metapost/cmarrows/sgbx0013.mp
new file mode 100644
index 00000000000..fd5b839225e
--- /dev/null
+++ b/Master/texmf-dist/metapost/cmarrows/sgbx0013.mp
@@ -0,0 +1,213 @@
+%% sgbx0013.mp
+%% Copyright 2006 Tommy Ekola <tek@kth.se>
+%
+% This work may be distributed and/or modified under the conditions of
+% the LaTeX Project Public License, either version 1.3 of this license
+% or (at your option) any later version. The latest version of this
+% license is in http://www.latex-project.org/lppl.txt
+%
+% This work has the LPPL maintenance status `maintained'. The Current
+% Maintainer of this work is Tommy Ekola. The Base Interpreter is
+% MetaPost.
+
+vardef setup_hookrightarrow (expr source_file, cmdname) =
+
+ scantokens ("input tgbx0000");
+
+ scantokens ("input " & source_file);
+
+ expandafter def scantokens cmdname expr p =
+ scantokens (cmdname & "__sgbxww")(p)
+ enddef;
+
+ expandafter vardef scantokens (cmdname & "__sgbxww " & "(expr apth) " &
+ "text text_ = " &
+
+ "save math_spread, x_height, u, rule_thickness, bar, math_axis," &
+ " asc_height, eps, monospace, fudge, crisp, hair;" &
+ "boolean monospace;" &
+
+ "math_spread :=" & decimal math_spread & ";" &
+ "x_height# :=" & decimal x_height# & ";" &
+ "u# :=" & decimal u# & ";" &
+ "rule_thickness# :=" & decimal rule_thickness# & ";" &
+ "bar# :=" & decimal bar# & ";" &
+ "math_axis# :=" & decimal math_axis# & ";" &
+ "asc_height# :=" & decimal asc_height# & ";" &
+ "eps :=" & decimal eps & ";" &
+ "monospace :=" & if monospace: "true" else: "false" fi & ";" &
+ "fudge :=" & decimal fudge & ";" &
+ "crisp# :=" & decimal crisp# & ";" &
+ "hair# :=" & decimal hair# & ";")
+
+ save prevpen;
+ prevpen:=savepen;
+
+ save x,y;
+ numeric x[], x[]', x[]l, x[]'l, x[]r, x[]'r,
+ y[], y[]', y[]l, y[]'l, y[]r, y[]'r;
+ save spread, w;
+ numeric spread, w;
+
+ if crisp#>fudge*hair#:
+ crisp#:=fudge*hair#;
+ fi
+ pickup if crisp#=0: nullpen else: pencircle scaled crisp# fi;
+
+ spread = math_spread[.45x_height#, .55x_height#];
+ w = 18u#;
+
+ penpos1(rule_thickness#, 90); penpos2(rule_thickness#, 90);
+ penpos3(rule_thickness#, 0); penpos4(rule_thickness#, 0);
+ y0=y1=y2=math_axis#; x1-.5rule_thickness#=u#; rt x0=w-u#;
+ y3-y0=y0-y4=if monospace: .24 else: .36 fi asc_height#+eps;
+ x3=x4=x0-if monospace: 3u# else: 4u# fi - eps;
+ penpos5(rule_thickness#, angle(z4-z0)); z5l=z0;
+ penpos6(rule_thickness#, angle(z3-z0)); z6l=z0;
+ z9=.2[.5[z3,z4],z0];
+
+ save pp; path pp; pp = z4l{z9-z4}..z6r;
+ save t; numeric t; t = xpart(pp intersectiontimes ((0,y2l)--(w,y2l)));
+ x2=xpart point t of pp;
+
+ % the hook
+ x12-rule_thickness#/2=u#-eps; x11=x13=5u#-x12;
+ y11-y13=spread; y12=.5[y11,y13]; y13=0;
+
+ save mapto, n;
+ vardef mapto(text t) =
+ hide(numeric n; n:=0;
+ numeric x,x_[],y,y_[];
+ for z=t: z_[incr n]:=z; endfor;
+ transform T;
+ z_2 = z_1 transformed T;
+ z_4 = z_3 transformed T;
+ z_6 = z_5 transformed T;)
+ T
+ enddef;
+
+ save T; transform T;
+ save tt; numeric tt; tt = arctime(arclength apth - (x0-x9)) of apth;
+ save ttt; numeric ttt; ttt = arctime(arclength apth - (x0-x2)) of apth;
+ save ss; numeric ss; ss = arctime x11-x12 of apth;
+
+ % Draw the right half of the arrow head
+
+ save right_texarrowhead, pa;
+ vardef right_texarrowhead(expr T,s) =
+ (subpath(0, xpart ((z0..{z4-z9}z4r) intersectiontimes
+ (point s of pp -- point s of pp + (2rule_thickness#,0))))
+ of (z0..{z4-z9}z4r)--subpath(s,t) of pp--z2l) transformed T
+ enddef;
+
+ if arclength apth = 0:
+ T:=identity shifted (point (length apth) of apth - z0);
+ elseif arclength apth < x0-x3l:
+ T:=identity rotatedaround(z0,angle (direction (length apth) of apth))
+ shifted (point (length apth) of apth - z0);
+ else:
+ T:=mapto(z0,
+ point (length apth) of apth,
+ z2,
+ point ttt of apth,
+ z9-(0,3rule_thickness#),
+ point tt of apth - 3rule_thickness#
+ *(unitvector (direction tt of apth)
+ rotated 90));
+ fi
+
+ save f,s;
+ vardef f(expr s) =
+ length(point s of (pp transformed T) - point tt of apth)
+ < length(point 0 of pp - z9)
+ enddef;
+
+ if f(0) or (arclength apth < x0-x3l): s := 0;
+ else: s := solve f(length pp, 0);
+ fi
+
+ path pa;
+ pa := right_texarrowhead(T,s);
+
+ % Draw the left part of the arrow head
+
+ pp := (z3l{z9-z3}..z5r);
+ save pq; path pq; pq := (z3r{z9-z3}..z0);
+
+ save left_texarrowhead, pb;
+ vardef left_texarrowhead(expr T, s) =
+ (z2r--subpath(t,s) of pp
+ --subpath(xpart ( pq intersectiontimes
+ (point s of pp -- point s of pp + (2rule_thickness#,0)))
+ ,length pq) of pq) transformed T
+ enddef;
+
+ if arclength apth = 0:
+ T:=identity shifted (point (length apth) of apth - z0);
+ elseif arclength apth < x0-x3l:
+ T:=identity rotatedaround(z0,angle (direction (length apth) of apth))
+ shifted (point (length apth) of apth - z0);
+ else:
+ T:=mapto(z0,
+ point (length apth) of apth,
+ z2,
+ point ttt of apth,
+ z9+(0,3rule_thickness#),
+ point tt of apth + 3rule_thickness#
+ *(unitvector (direction tt of apth)
+ rotated 90));
+ fi
+
+ vardef f(expr s) =
+ length(point s of (pp transformed T) - point tt of apth)
+ < length(point 0 of pp - z9)
+ enddef;
+
+ if f(0) or (arclength apth < x0-x3l): s := 0;
+ else: s := solve f(length pp, 0);
+ fi
+
+ path pb;
+ pb := left_texarrowhead(T,s);
+
+ filldraw pa--pb--cycle text_;
+
+ % Draw the hook
+
+ save hook;
+ vardef hook(expr T) =
+ (z11{left}...z12{down}...z13{right}) transformed T
+ enddef;
+
+ if arclength apth = 0:
+ T:=identity shifted (point (length apth) of apth - z11);
+ elseif arclength apth < x11-x12:
+ T:=identity rotatedaround(z11,angle (direction 0 of apth))
+ shifted (point 0 of apth - z11)
+ shifted ((x11-x12)*(unitvector
+ (point (length apth) of apth - point 0 of apth)));
+ else:
+ T:=mapto(z11,
+ point ss of apth,
+ z12,
+ point 0 of apth - (y11-y12)*(unitvector (direction 0 of apth)
+ rotated 90),
+ z13,
+ point ss of apth - (y11-y13)*(unitvector (direction ss of apth)
+ rotated 90));
+ fi
+
+ draw hook(T) withpen pencircle scaled rule_thickness# text_;
+
+ % Draw the path
+
+ if arclength apth > x0-x2 + x11-x12:
+ draw subpath(ss,ttt) of apth withpen pencircle scaled rule_thickness#
+ text_;
+ fi
+
+ pickup prevpen;
+
+ enddef;
+
+enddef; \ No newline at end of file
diff --git a/Master/texmf-dist/metapost/cmarrows/sgbx0014.mp b/Master/texmf-dist/metapost/cmarrows/sgbx0014.mp
new file mode 100644
index 00000000000..2986a54c8ed
--- /dev/null
+++ b/Master/texmf-dist/metapost/cmarrows/sgbx0014.mp
@@ -0,0 +1,199 @@
+%% sgbx0014.mp
+%% Copyright 2006 Tommy Ekola <tek@kth.se>
+%
+% This work may be distributed and/or modified under the conditions of
+% the LaTeX Project Public License, either version 1.3 of this license
+% or (at your option) any later version. The latest version of this
+% license is in http://www.latex-project.org/lppl.txt
+%
+% This work has the LPPL maintenance status `maintained'. The Current
+% Maintainer of this work is Tommy Ekola. The Base Interpreter is
+% MetaPost.
+
+vardef setup_doublearrow (expr source_file, cmdname) =
+
+ scantokens ("input tgbx0000");
+
+ scantokens ("input " & source_file);
+
+ expandafter def scantokens cmdname expr p =
+ scantokens (cmdname & "__sgbxww")(p)
+ enddef;
+
+ expandafter vardef scantokens (cmdname & "__sgbxww " & "(expr apth) " &
+ "text text_ = " &
+
+ "save math_spread, x_height, u, rule_thickness, bar, math_axis," &
+ " asc_height, eps, monospace, fudge, crisp, hair;" &
+ "boolean monospace;" &
+
+ "math_spread :=" & decimal math_spread & ";" &
+ "x_height# :=" & decimal x_height# & ";" &
+ "u# :=" & decimal u# & ";" &
+ "rule_thickness# :=" & decimal rule_thickness# & ";" &
+ "bar# :=" & decimal bar# & ";" &
+ "math_axis# :=" & decimal math_axis# & ";" &
+ "asc_height# :=" & decimal asc_height# & ";" &
+ "eps :=" & decimal eps & ";" &
+ "monospace :=" & if monospace: "true" else: "false" fi & ";" &
+ "fudge :=" & decimal fudge & ";" &
+ "crisp# :=" & decimal crisp# & ";" &
+ "hair# :=" & decimal hair# & ";")
+
+ save prevpen;
+ prevpen:=savepen;
+
+ save x,y;
+ numeric x[], x[]', x[]l, x[]'l, x[]r, x[]'r,
+ y[], y[]', y[]l, y[]'l, y[]r, y[]'r;
+ save spread, w;
+ numeric spread, w;
+
+ if crisp#>fudge*hair#:
+ crisp#:=fudge*hair#;
+ fi
+ pickup if crisp#=0: nullpen else: pencircle scaled crisp# fi;
+
+ spread = math_spread[.45x_height#,.55x_height#];
+ w:=18u#;
+
+ lft x1 = u#-eps; x2=x1; x7=x8=w-x1;
+ y1=y7; y2=y8; y1-y2=spread; .5[y1,y2]=math_axis#;
+
+ rt x0 = w-u#+eps; y0 = math_axis#;
+ penpos3(rule_thickness#,0); penpos4(rule_thickness#,0);
+ y3-y1 = y2-y4 = .24asc_height#+eps; x3=x4=x0-6u#-eps;
+ penpos5(rule_thickness#, angle(z4-z0)); z5l=z0;
+ penpos6(rule_thickness#, angle(z3-z0)); z6l=z0;
+ z9 = .381966[.5[z3,z4],z0];
+
+ save pp;
+ path pp; pp = z4l{z9-z4}..z6r;
+ save t;
+ numeric t; t = xpart(pp intersectiontimes ((0,y0)--(w,y0)));
+ numeric t[]; t1 = xpart(pp intersectiontimes ( (0,y2-rule_thickness#/2)
+ --(w,y2-rule_thickness#/2)));
+ t2 = xpart(pp intersectiontimes ( (0,y2+rule_thickness#/2)
+ --(w,y2+rule_thickness#/2)));
+ save qq;
+ path qq; qq = z3l{z9-z3}..z5r;
+
+ save parallelline;
+ vardef parallelline expr ppp =
+ save s, stp;
+ numeric s, stp; stp:=(arclength ppp) div 5pt;
+ if stp=0: stp:=1; fi
+ stp:=(arclength ppp)/stp;
+
+ if stp > 0:
+ draw for s=0 step stp until arclength ppp - stp:
+ point (arctime s of ppp) of ppp +
+ spread/2*
+ (unitvector direction (arctime s of ppp) of ppp rotated 90)
+ {direction (arctime s of ppp) of ppp}..
+ endfor
+ {direction (length ppp) of ppp}
+ point (length ppp) of ppp +
+ spread/2*
+ (unitvector direction (length ppp) of ppp rotated 90)
+ withpen pencircle scaled rule_thickness# text_;
+
+ draw for s=0 step stp until arclength ppp - stp:
+ point (arctime s of ppp) of ppp -
+ spread/2*
+ (unitvector direction (arctime s of ppp) of ppp rotated 90)
+ {direction (arctime s of ppp) of ppp}..
+ endfor
+ {direction (length ppp) of ppp}
+ point (length ppp) of ppp -
+ spread/2*
+ (unitvector direction (length ppp) of ppp rotated 90)
+ withpen pencircle scaled rule_thickness# text_;
+ fi
+ enddef;
+
+ save mapto, n;
+ vardef mapto(text t) =
+ hide(numeric n; n:=0;
+ numeric x,x_[],y,y_[];
+ for z=t: z_[incr n]:=z; endfor;
+ transform T;
+ z_2 = z_1 transformed T;
+ z_4 = z_3 transformed T;
+ z_6 = z_5 transformed T;)
+ T
+ enddef;
+
+ % Draw the arrow head
+
+ save doublearrowhead;
+ vardef doublearrowhead(expr T, s, ss) =
+ (subpath(0, xpart((z0..{z4-z9}z4r) intersectiontimes
+ (point s of pp -- point s of pp + (2rule_thickness#,0))))
+ of (z0..{z4-z9}z4r)
+ --subpath(s,t1) of pp
+ --(xpart point t1 of pp, ypart point t2 of pp)
+ --subpath(t2,t) of pp
+ --subpath(t,t2) of qq
+ --(xpart point t1 of qq, ypart point t2 of qq)
+ --subpath(t1,ss) of qq
+ --subpath(xpart ((z3r{z9-z3}..z0) intersectiontimes
+ (point ss of qq -- point ss of qq + (2rule_thickness#,0))),1)
+ of (z3r{z9-z3}..z0)
+ & cycle) transformed T
+ enddef;
+
+ save T; transform T;
+ save tt;
+ tt = arctime (arclength apth - (x0 - xpart point t1 of pp)) of apth;
+
+ if arclength apth = 0:
+ T:=identity shifted (point (length apth) of apth - z0);
+ elseif arclength apth < x0-xpart(point t2 of pp):
+ T:=identity rotatedaround(z0,angle (direction (length apth) of apth))
+ shifted (point (length apth) of apth - z0);
+ else:
+ T := mapto(
+ z0,
+ point (length apth) of apth,
+ point t1 of pp + (0,rule_thickness#/2),
+ point tt of apth +
+ spread/2*(unitvector direction tt of apth rotated 90),
+ point t1 of qq - (0,rule_thickness#/2),
+ point tt of apth -
+ spread/2*(unitvector direction tt of apth rotated 90));
+ fi
+
+ save f,s,ss,ttt;
+ ttt = arctime(arclength apth - (x0-x9)) of apth;
+ vardef f(expr s) =
+ length(point s of (pp transformed T) - point ttt of apth)
+ < length(point 0 of pp - z9)
+ enddef;
+
+ if f(0) or (arclength apth < x0-x3l): s := 0;
+ else: s := solve f(length pp, 0);
+ fi
+
+ vardef f(expr ss) =
+ length(point ss of (qq transformed T) - point ttt of apth)
+ < length(point 0 of qq - z9)
+ enddef;
+
+ if f(0) or (arclength apth < x0-x3l): ss := 0;
+ else: ss := solve f(length qq, 0);
+ fi
+
+ filldraw doublearrowhead(T,s,ss) text_;
+
+ % Draw the path
+
+ if arclength apth > (x0-xpart(point t1 of pp)):
+ parallelline (subpath(0,tt) of apth);
+ fi
+
+ pickup prevpen;
+
+ enddef;
+
+enddef;
diff --git a/Master/texmf-dist/metapost/cmarrows/sgbx0015.mp b/Master/texmf-dist/metapost/cmarrows/sgbx0015.mp
new file mode 100644
index 00000000000..838219b64e2
--- /dev/null
+++ b/Master/texmf-dist/metapost/cmarrows/sgbx0015.mp
@@ -0,0 +1,141 @@
+%% sgbx0015.mp
+%% Copyright 2006 Tommy Ekola <tek@kth.se>
+%
+% This work may be distributed and/or modified under the conditions of
+% the LaTeX Project Public License, either version 1.3 of this license
+% or (at your option) any later version. The latest version of this
+% license is in http://www.latex-project.org/lppl.txt
+%
+% This work has the LPPL maintenance status `maintained'. The Current
+% Maintainer of this work is Tommy Ekola. The Base Interpreter is
+% MetaPost.
+
+vardef setup_lefthalfarrow (expr source_file, cmdname) =
+
+ scantokens ("input tgbx0000");
+
+ scantokens ("input " & source_file);
+
+ expandafter def scantokens cmdname expr p =
+ scantokens (cmdname & "__sgbxww")(p)
+ enddef;
+
+ expandafter vardef scantokens (cmdname & "__sgbxww " & "(expr apth) " &
+ "text text_ = " &
+
+ "save math_spread, x_height, u, rule_thickness, bar, math_axis," &
+ " asc_height, eps, monospace, fudge, crisp, hair;" &
+ "boolean monospace;" &
+
+ "math_spread :=" & decimal math_spread & ";" &
+ "x_height# :=" & decimal x_height# & ";" &
+ "u# :=" & decimal u# & ";" &
+ "rule_thickness# :=" & decimal rule_thickness# & ";" &
+ "bar# :=" & decimal bar# & ";" &
+ "math_axis# :=" & decimal math_axis# & ";" &
+ "asc_height# :=" & decimal asc_height# & ";" &
+ "eps :=" & decimal eps & ";" &
+ "monospace :=" & if monospace: "true" else: "false" fi & ";" &
+ "fudge :=" & decimal fudge & ";" &
+ "crisp# :=" & decimal crisp# & ";" &
+ "hair# :=" & decimal hair# & ";")
+
+ save prevpen;
+ prevpen:=savepen;
+
+ save x,y;
+ numeric x[], x[]', x[]l, x[]'l, x[]r, x[]'r,
+ y[], y[]', y[]l, y[]'l, y[]r, y[]'r;
+ save spread, w;
+ numeric spread, w;
+
+ if crisp#>fudge*hair#:
+ crisp#:=fudge*hair#;
+ fi
+ pickup if crisp#=0: nullpen else: pencircle scaled crisp# fi;
+
+ spread = math_spread[.45x_height#, .55x_height#];
+ w = 18u#;
+
+ penpos1(rule_thickness#, 90); penpos2(rule_thickness#, 90);
+ penpos3(rule_thickness#, 0); penpos4(rule_thickness#, 0);
+ y0=y1=y2=math_axis#; x1-.5rule_thickness#=u#; rt x0=w-u#;
+ y3-y0=y0-y4=.36asc_height#+eps;
+ x3=x4=x0-4u#-eps;
+ penpos5(rule_thickness#, angle(z4-z0)); z5l=z0;
+ penpos6(rule_thickness#, angle(z3-z0)); z6l=z0;
+ save t; numeric t;
+ save pq; path pq; pq = z4l..{2(x0-x4),y0-y4}z6r;
+ t=xpart(pq intersectiontimes ((0,y2l)--(w,y2l))); x2=xpart point t of pq;
+ z9=.2[.5[z3,z4],z0];
+
+ save mapto, n;
+ vardef mapto(text t) =
+ hide(numeric n; n:=0;
+ numeric x,x_[],y,y_[];
+ for z=t: z_[incr n]:=z; endfor;
+ transform T;
+ z_2 = z_1 transformed T;
+ z_4 = z_3 transformed T;
+ z_6 = z_5 transformed T;)
+ T
+ enddef;
+
+ save T; transform T;
+ save tt; numeric tt; tt = arctime(arclength apth - (x0-x9)) of apth;
+ save ttt; numeric ttt; ttt = arctime(arclength apth - (x0-x2)) of apth;
+
+ % Draw the arrow head
+
+ save pp; path pp; pp := (z3l..{2(x0-x3),y0-y3}z5r);
+ save pq; path pq; pq := (z3r..{2(x0-x3),y0-y3}z5l);
+
+ save halfarrowhead, pa;
+ vardef halfarrowhead(expr T, s) =
+ (z0--(x0,y2l)--z2l--z2r
+ ..subpath(t,s) of pp
+ --subpath(xpart( pq intersectiontimes
+ (point s of pp -- point s of pp +(2rule_thickness#,0))),
+ length (z3r..{2(x0-x3),y0-y3}z5l)) of pq --cycle)
+ transformed T
+ enddef;
+
+ if arclength apth = 0:
+ T:=identity shifted (point (length apth) of apth - z0);
+ elseif arclength apth < x0-x3l:
+ T:=identity rotatedaround(z0,angle (direction (length apth) of apth))
+ shifted (point (length apth) of apth -z0);
+ else:
+ T:=mapto(z0,
+ point (length apth) of apth,
+ z2,
+ point ttt of apth,
+ z9+(0,3rule_thickness#),
+ point tt of apth + 3rule_thickness#*
+ (unitvector (direction tt of apth) rotated 90));
+
+ fi
+
+ save f,s;
+ vardef f(expr s) =
+ length(point s of (pp transformed T) - point tt of apth)
+ < length(point 0 of pp - z9)
+ enddef;
+
+ if f(0) or (arclength apth < x0-x3l): s := 0;
+ else: s := solve f(length pp, 0);
+ fi
+
+ filldraw halfarrowhead(T,s) text_;
+
+ % Draw the path
+
+ if arclength apth > x0-x2: draw subpath(0,ttt) of apth
+ withpen pencircle scaled rule_thickness# text_;
+ fi
+
+ pickup prevpen;
+
+ enddef;
+
+enddef; \ No newline at end of file
diff --git a/Master/texmf-dist/metapost/cmarrows/sgbx0017.mp b/Master/texmf-dist/metapost/cmarrows/sgbx0017.mp
new file mode 100644
index 00000000000..9a1ac779709
--- /dev/null
+++ b/Master/texmf-dist/metapost/cmarrows/sgbx0017.mp
@@ -0,0 +1,196 @@
+%% sgbx0017.mp
+%% Copyright 2006 Tommy Ekola <tek@kth.se>
+%
+% This work may be distributed and/or modified under the conditions of
+% the LaTeX Project Public License, either version 1.3 of this license
+% or (at your option) any later version. The latest version of this
+% license is in http://www.latex-project.org/lppl.txt
+%
+% This work has the LPPL maintenance status `maintained'. The Current
+% Maintainer of this work is Tommy Ekola. The Base Interpreter is
+% MetaPost.
+
+vardef setup_mapstoarrow (expr source_file, cmdname) =
+
+ scantokens ("input tgbx0000");
+
+ scantokens ("input " & source_file);
+
+ expandafter def scantokens cmdname expr p =
+ scantokens (cmdname & "__sgbxww")(p)
+ enddef;
+
+ expandafter vardef scantokens (cmdname & "__sgbxww " & "(expr apth) " &
+ "text text_ = " &
+
+ "save math_spread, x_height, u, rule_thickness, bar, math_axis," &
+ " asc_height, eps, monospace, fudge, crisp, hair;" &
+ "boolean monospace;" &
+
+ "math_spread :=" & decimal math_spread & ";" &
+ "x_height# :=" & decimal x_height# & ";" &
+ "u# :=" & decimal u# & ";" &
+ "rule_thickness# :=" & decimal rule_thickness# & ";" &
+ "bar# :=" & decimal bar# & ";" &
+ "math_axis# :=" & decimal math_axis# & ";" &
+ "asc_height# :=" & decimal asc_height# & ";" &
+ "eps :=" & decimal eps & ";" &
+ "monospace :=" & if monospace: "true" else: "false" fi & ";" &
+ "fudge :=" & decimal fudge & ";" &
+ "crisp# :=" & decimal crisp# & ";" &
+ "hair# :=" & decimal hair# & ";")
+
+ save prevpen;
+ prevpen:=savepen;
+
+ save x,y;
+ numeric x[], x[]', x[]l, x[]'l, x[]r, x[]'r,
+ y[], y[]', y[]l, y[]'l, y[]r, y[]'r;
+ save spread, w;
+ numeric spread, w;
+
+ if crisp#>fudge*hair#:
+ crisp#:=fudge*hair#;
+ fi
+ pickup if crisp#=0: nullpen else: pencircle scaled crisp# fi;
+
+ spread = math_spread[.45x_height#, .55x_height#];
+ w = 18u#;
+
+ penpos1(rule_thickness#, 90); penpos2(rule_thickness#, 90);
+ penpos3(rule_thickness#, 0); penpos4(rule_thickness#, 0);
+ y0=y1=y2=math_axis#; x1-.5rule_thickness#=u#; rt x0=w-u#;
+ y3-y0=y0-y4=.36asc_height#+eps;
+ x3=x4=x0-4u#-eps;
+ penpos5(rule_thickness#, angle(z4-z0)); z5l=z0;
+ penpos6(rule_thickness#, angle(z3-z0)); z6l=z0;
+ z9=.2[.5[z3,z4],z0];
+
+ save pp; path pp; pp = z4l{z9-z4}..z6r;
+ save t; numeric t; t = xpart(pp intersectiontimes ((0,y2l)--(w,y2l)));
+ x2=xpart point t of pp;
+
+ save mapto, n;
+ vardef mapto(text t) =
+ hide(numeric n; n:=0;
+ numeric x,x_[],y,y_[];
+ for z=t: z_[incr n]:=z; endfor;
+ transform T;
+ z_2 = z_1 transformed T;
+ z_4 = z_3 transformed T;
+ z_6 = z_5 transformed T;)
+ T
+ enddef;
+
+ save T; transform T;
+ save tt; numeric tt; tt = arctime(arclength apth - (x0-x9)) of apth;
+ save ttt; numeric ttt; ttt = arctime(arclength apth - (x0-x2)) of apth;
+
+ % Draw the right half of the arrow head
+
+ save right_texarrowhead, pa;
+ vardef right_texarrowhead(expr T, s) =
+ (subpath(0, xpart ((z0..{z4-z9}z4r) intersectiontimes
+ (point s of pp -- point s of pp + (2rule_thickness#,0))))
+ of (z0..{z4-z9}z4r)--subpath(s,t) of pp--z2l) transformed T
+ enddef;
+
+ if arclength apth = 0:
+ T:=identity shifted (point (length apth) of apth - z0);
+ elseif arclength apth < x0-x3l:
+ T:=identity rotatedaround(z0,angle (direction (length apth) of apth))
+ shifted (point (length apth) of apth -z0);
+ else:
+ T:=mapto(z0,
+ point (length apth) of apth,
+ z2,
+ point ttt of apth,
+ z9+(0,3rule_thickness#),
+ point tt of apth + 3rule_thickness#
+ *(unitvector (direction tt of apth)
+ rotated 90));
+ fi
+
+ save f,s;
+ vardef f(expr s) =
+ length(point s of (pp transformed T) - point tt of apth)
+ < length(point 0 of pp - z9)
+ enddef;
+
+ if f(0) or (arclength apth < x0-x3l): s := 0;
+ else: s := solve f(length pp, 0);
+ fi
+
+ path pa;
+ pa := right_texarrowhead(T,s);
+
+ % Draw the left part of the arrow head
+
+ pp := (z3l{z9-z3}..z5r);
+ save pq; path pq; pq := (z3r{z9-z3}..z0);
+
+ save left_texarrowhead, pb;
+ vardef left_texarrowhead(expr T, s) =
+ (z2r--subpath(t,s) of pp
+ --subpath(xpart ( pq intersectiontimes
+ (point s of pp -- point s of pp + (2rule_thickness#,0)))
+ ,length pq) of pq) transformed T
+ enddef;
+
+ if arclength apth = 0:
+ T:=identity shifted (point (length apth) of apth - z0);
+ elseif arclength apth < x0-x3l:
+ T:=identity rotatedaround(z0,angle (direction (length apth) of apth))
+ shifted (point (length apth) of apth - z0);
+ else:
+ T:=mapto(z0,
+ point (length apth) of apth,
+ z2,
+ point ttt of apth,
+ z9+(0,3rule_thickness#),
+ point tt of apth + 3rule_thickness#
+ *(unitvector (direction tt of apth)
+ rotated 90));
+ fi
+
+ vardef f(expr s) =
+ length(point s of (pp transformed T) - point tt of apth)
+ < length(point 0 of pp - z9)
+ enddef;
+
+ if f(0) or (arclength apth < x0-x3l): s := 0;
+ else: s := solve f(length pp, 0);
+ fi
+
+ path pb;
+ pb := left_texarrowhead(T,s);
+
+ filldraw pa--pb--cycle text_;
+
+ % Draw the tail
+
+ if arclength apth > x0-x2:
+ draw point 0 of apth + (.24asc_height#+eps)*
+ (unitvector (direction 0 of apth) rotated 90)--
+ point 0 of apth - (.24asc_height#+eps)*
+ (unitvector (direction 0 of apth) rotated 90)
+ withpen pencircle scaled rule_thickness#
+ text_;
+ fi
+
+ % Draw the path
+
+ if arclength apth > x0-x2:
+ draw subpath(0,ttt) of apth withpen pencircle scaled rule_thickness#
+ text_;
+ fi
+
+ pickup prevpen;
+
+ enddef;
+
+enddef;
+
+
+
+
diff --git a/Master/texmf-dist/metapost/cmarrows/sgbx0018.mp b/Master/texmf-dist/metapost/cmarrows/sgbx0018.mp
new file mode 100644
index 00000000000..60f4561d16c
--- /dev/null
+++ b/Master/texmf-dist/metapost/cmarrows/sgbx0018.mp
@@ -0,0 +1,181 @@
+%% sgbx0018.mp
+%% Copyright 2006 Tommy Ekola <tek@kth.se>
+%
+% This work may be distributed and/or modified under the conditions of
+% the LaTeX Project Public License, either version 1.3 of this license
+% or (at your option) any later version. The latest version of this
+% license is in http://www.latex-project.org/lppl.txt
+%
+% This work has the LPPL maintenance status `maintained'. The Current
+% Maintainer of this work is Tommy Ekola. The Base Interpreter is
+% MetaPost.
+
+vardef setup_oldtexarrow (expr source_file, cmdname) =
+
+ scantokens ("input tgbx0000");
+
+ scantokens ("input " & source_file);
+
+ expandafter def scantokens cmdname expr p =
+ scantokens (cmdname & "__sgbxww")(p)
+ enddef;
+
+ expandafter vardef scantokens (cmdname & "__sgbxww " & "(expr apth) " &
+ "text text_ = " &
+
+ "save math_spread, x_height, u, rule_thickness, bar, math_axis," &
+ " asc_height, eps, monospace, fudge, crisp, hair;" &
+ "boolean monospace;" &
+
+ "math_spread :=" & decimal math_spread & ";" &
+ "x_height# :=" & decimal x_height# & ";" &
+ "u# :=" & decimal u# & ";" &
+ "rule_thickness# :=" & decimal rule_thickness# & ";" &
+ "bar# :=" & decimal bar# & ";" &
+ "math_axis# :=" & decimal math_axis# & ";" &
+ "asc_height# :=" & decimal asc_height# & ";" &
+ "eps :=" & decimal eps & ";" &
+ "monospace :=" & if monospace: "true" else: "false" fi & ";" &
+ "fudge :=" & decimal fudge & ";" &
+ "crisp# :=" & decimal crisp# & ";" &
+ "hair# :=" & decimal hair# & ";")
+
+ save prevpen;
+ prevpen:=savepen;
+
+ save x,y;
+ numeric x[], x[]', x[]l, x[]'l, x[]r, x[]'r,
+ y[], y[]', y[]l, y[]'l, y[]r, y[]'r;
+ save spread, w;
+ numeric spread, w;
+
+ if crisp#>fudge*hair#:
+ crisp#:=fudge*hair#;
+ fi
+ pickup if crisp#=0: nullpen else: pencircle scaled crisp# fi;
+
+ spread = math_spread[.45x_height#, .55x_height#];
+ w = 18u#;
+
+ penpos1(rule_thickness#, 90); penpos2(rule_thickness#, 90);
+ penpos3(bar#, 0); penpos4(bar#, 0);
+ y0=y1=y2=math_axis#; x1-.5rule_thickness#=u#; rt x0=w-u#;
+ y3-y0=y0-y4=.24asc_height#+eps;
+ x3=x4=x0-3u#-eps;
+ penpos5(bar#, angle(z4-z0)); z5l=z0;
+ penpos6(bar#, angle(z3-z0)); z6l=z0;
+ z9=.381966[.5[z3,z4],z0];
+
+ save pp; path pp; pp = z4l{z9-z4}..z6r;
+ save t; numeric t; t = xpart(pp intersectiontimes ((0,y2l)--(w,y2l)));
+ x2=xpart point t of pp;
+
+ save mapto, n;
+ vardef mapto(text t) =
+ hide(numeric n; n:=0;
+ numeric x,x_[],y,y_[];
+ for z=t: z_[incr n]:=z; endfor;
+ transform T;
+ z_2 = z_1 transformed T;
+ z_4 = z_3 transformed T;
+ z_6 = z_5 transformed T;)
+ T
+ enddef;
+
+ save T; transform T;
+ save tt; numeric tt; tt = arctime(arclength apth - (x0-x9)) of apth;
+ save ttt; numeric ttt; ttt = arctime(arclength apth - (x0-x2)) of apth;
+
+ % Draw the right half of the arrow head
+
+ save right_texarrowhead, pa;
+ vardef right_texarrowhead(expr T,s) =
+ (subpath(0, xpart ((z0..{z4-z9}z4r) intersectiontimes
+ (point s of pp -- point s of pp + (2rule_thickness#,0))))
+ of (z0..{z4-z9}z4r)--subpath(s,t) of pp--z2l) transformed T
+ enddef;
+
+ if arclength apth = 0:
+ T:=identity shifted (point (length apth) of apth - z0);
+ elseif arclength apth < x0-x3l:
+ T:=identity rotatedaround(z0,angle (direction (length apth) of apth))
+ shifted (point (length apth) of apth - z0);
+ else:
+ T:=mapto(z0,
+ point (length apth) of apth,
+ z2,
+ point ttt of apth,
+ z9+(0,3rule_thickness#),
+ point tt of apth +
+ 3rule_thickness#*(unitvector (direction tt of apth)
+ rotated 90));
+ fi
+
+ save f,s;
+ vardef f(expr s) =
+ length(point s of (pp transformed T) - point tt of apth)
+ < length(point 0 of pp - z9)
+ enddef;
+
+ if f(0) or (arclength apth < x0-x3l): s := 0;
+ else: s := solve f(length pp, 0);
+ fi
+
+ path pa;
+ pa := right_texarrowhead(T,s);
+
+ % Draw the left half of the arrow head
+
+ pp := (z3l{z9-z3}..z5r);
+ save pq; path pq; pq := (z3r{z9-z3}..z0);
+
+ save left_texarrowhead, pb;
+ vardef left_texarrowhead(expr T, s) =
+ (z2r--subpath(t,s) of pp
+ --subpath(xpart ( pq intersectiontimes
+ (point s of pp -- point s of pp + (2rule_thickness#,0)))
+ ,length pq) of pq) transformed T
+ enddef;
+
+ if arclength apth = 0:
+ T:=identity shifted (point (length apth) of apth - z0);
+ elseif arclength apth < x0-x3l:
+ T:=identity rotatedaround(z0,angle (direction (length apth) of apth))
+ shifted (point (length apth) of apth - z0);
+ else:
+ T:=mapto(z0,
+ point (length apth) of apth,
+ z2,
+ point ttt of apth,
+ z9+(0,3rule_thickness#),
+ point tt of apth + 3rule_thickness#
+ *(unitvector (direction tt of apth)
+ rotated 90));
+ fi
+
+ vardef f(expr s) =
+ length(point s of (pp transformed T) - point tt of apth)
+ < length(point 0 of pp - z9)
+ enddef;
+
+ if f(0) or (arclength apth < x0-x3l): s := 0;
+ else: s := solve f(length pp, 0);
+ fi
+
+ path pb;
+ pb := left_texarrowhead(T,s);
+
+ filldraw pa--pb--cycle text_;
+
+ % Draw the path
+
+ if arclength apth > x0-x2:
+ draw subpath(0,ttt) of apth withpen pencircle scaled rule_thickness#
+ text_;
+ fi
+
+ pickup prevpen;
+
+ enddef;
+
+enddef; \ No newline at end of file
diff --git a/Master/texmf-dist/metapost/cmarrows/sgbx0019.mp b/Master/texmf-dist/metapost/cmarrows/sgbx0019.mp
new file mode 100644
index 00000000000..7cb9b29dbc2
--- /dev/null
+++ b/Master/texmf-dist/metapost/cmarrows/sgbx0019.mp
@@ -0,0 +1,142 @@
+%% sgbx0019.mp
+%% Copyright 2006 Tommy Ekola <tek@kth.se>
+%
+% This work may be distributed and/or modified under the conditions of
+% the LaTeX Project Public License, either version 1.3 of this license
+% or (at your option) any later version. The latest version of this
+% license is in http://www.latex-project.org/lppl.txt
+%
+% This work has the LPPL maintenance status `maintained'. The Current
+% Maintainer of this work is Tommy Ekola. The Base Interpreter is
+% MetaPost.
+
+vardef setup_righthalfarrow (expr source_file, cmdname) =
+
+ scantokens ("input tgbx0000");
+
+ scantokens ("input " & source_file);
+
+ expandafter def scantokens cmdname expr p =
+ scantokens (cmdname & "__sgbxww")(p)
+ enddef;
+
+ expandafter vardef scantokens (cmdname & "__sgbxww " & "(expr apth) " &
+ "text text_ = " &
+
+ "save math_spread, x_height, u, rule_thickness, bar, math_axis," &
+ " asc_height, eps, monospace, fudge, crisp, hair;" &
+ "boolean monospace;" &
+
+ "math_spread :=" & decimal math_spread & ";" &
+ "x_height# :=" & decimal x_height# & ";" &
+ "u# :=" & decimal u# & ";" &
+ "rule_thickness# :=" & decimal rule_thickness# & ";" &
+ "bar# :=" & decimal bar# & ";" &
+ "math_axis# :=" & decimal math_axis# & ";" &
+ "asc_height# :=" & decimal asc_height# & ";" &
+ "eps :=" & decimal eps & ";" &
+ "monospace :=" & if monospace: "true" else: "false" fi & ";" &
+ "fudge :=" & decimal fudge & ";" &
+ "crisp# :=" & decimal crisp# & ";" &
+ "hair# :=" & decimal hair# & ";")
+
+ save prevpen;
+ prevpen:=savepen;
+
+ save x,y;
+ numeric x[], x[]', x[]l, x[]'l, x[]r, x[]'r,
+ y[], y[]', y[]l, y[]'l, y[]r, y[]'r;
+ save spread, w;
+ numeric spread, w;
+
+ if crisp#>fudge*hair#:
+ crisp#:=fudge*hair#;
+ fi
+ pickup if crisp#=0: nullpen else: pencircle scaled crisp# fi;
+
+ spread = math_spread[.45x_height#, .55x_height#];
+ w = 18u#;
+
+ penpos1(rule_thickness#, 90); penpos2(rule_thickness#, 90);
+ penpos3(rule_thickness#, 0); penpos4(rule_thickness#, 0);
+ y0=y1=y2=math_axis#; x1-.5rule_thickness#=u#; rt x0=w-u#;
+ y3-y0=y0-y4=.36asc_height#+eps;
+ x3=x4=x0-4u#-eps;
+ penpos5(rule_thickness#, angle(z4-z0)); z5l=z0;
+ penpos6(rule_thickness#, angle(z3-z0)); z6l=z0;
+ save t; numeric t;
+ save pq; path pq; pq = z4l..{2(x0-x4),y0-y4}z6r;
+ t=xpart(pq intersectiontimes ((0,y2l)--(w,y2l))); x2=xpart point t of pq;
+ z9=.2[.5[z3,z4],z0];
+
+ save mapto, n;
+ vardef mapto(text t) =
+ hide(numeric n; n:=0;
+ numeric x,x_[],y,y_[];
+ for z=t: z_[incr n]:=z; endfor;
+ transform T;
+ z_2 = z_1 transformed T;
+ z_4 = z_3 transformed T;
+ z_6 = z_5 transformed T;)
+ T
+ enddef;
+
+ save T; transform T;
+ save tt; numeric tt; tt = arctime(arclength apth - (x0-x9)) of apth;
+ save ttt; numeric ttt; ttt = arctime(arclength apth - (x0-x2)) of apth;
+
+ % Draw the arrow head
+
+ save pp; path pp; pp := (z3l..{2(x0-x3),y0-y3}z5r);
+ save pq; path pq; pq := (z3r..{2(x0-x3),y0-y3}z5l);
+
+ save halfarrowhead, pa;
+ vardef halfarrowhead(expr T, s) =
+ (z0--(x0,y2l)--z2l--z2r
+ ..subpath(t,s) of pp
+ --subpath(xpart( pq intersectiontimes
+ (point s of pp -- point s of pp +(2rule_thickness#,0))),
+ length (z3r..{2(x0-x3),y0-y3}z5l)) of pq --cycle)
+ transformed T
+ enddef;
+
+ if arclength apth = 0:
+ T:=identity reflectedabout(z0+(-1pt,0),z0)
+ shifted (point (length apth) of apth - z0);
+ elseif arclength apth < x0-x3l:
+ T:=identity reflectedabout(z0+(-1pt,0),z0)
+ rotatedaround(z0,angle (direction (length apth) of apth))
+ shifted (point (length apth) of apth -z0);
+ else:
+ T:=mapto(z0,
+ point (length apth) of apth,
+ z2,
+ point ttt of apth,
+ z9+(0,3rule_thickness#),
+ point tt of apth - 3rule_thickness#*
+ (unitvector (direction tt of apth) rotated 90));
+ fi
+
+ save f,s;
+ vardef f(expr s) =
+ length(point s of (pp transformed T) - point tt of apth)
+ < length(point 0 of pp - z9)
+ enddef;
+
+ if f(0) or (arclength apth < x0-x3l): s := 0;
+ else: s := solve f(length pp, 0);
+ fi
+
+ filldraw halfarrowhead(T,s) text_;
+
+ % Draw the path
+
+ if arclength apth > x0-x2: draw subpath(0,ttt) of apth
+ withpen pencircle scaled rule_thickness# text_;
+ fi
+
+ pickup prevpen;
+
+ enddef;
+
+enddef; \ No newline at end of file
diff --git a/Master/texmf-dist/metapost/cmarrows/sgbx0021.mp b/Master/texmf-dist/metapost/cmarrows/sgbx0021.mp
new file mode 100644
index 00000000000..8597e69b133
--- /dev/null
+++ b/Master/texmf-dist/metapost/cmarrows/sgbx0021.mp
@@ -0,0 +1,174 @@
+%% sgbx0021.mp
+%% Copyright 2006 Tommy Ekola <tek@kth.se>
+%
+% This work may be distributed and/or modified under the conditions of
+% the LaTeX Project Public License, either version 1.3 of this license
+% or (at your option) any later version. The latest version of this
+% license is in http://www.latex-project.org/lppl.txt
+%
+% This work has the LPPL maintenance status `maintained'. The Current
+% Maintainer of this work is Tommy Ekola. The Base Interpreter is
+% MetaPost.
+
+vardef setup_shortaxisarrow(expr source_file, cmdname) =
+
+ scantokens ("input tgbx0000");
+
+ scantokens ("input " & source_file);
+
+ expandafter def scantokens cmdname expr p =
+ scantokens (cmdname & "__sgbxww")(p)
+ enddef;
+
+ expandafter vardef scantokens (cmdname & "__sgbxww " & "(expr apth) " &
+ "text text_ = " &
+
+ "save math_spread, x_height, u, rule_thickness, bar, math_axis," &
+ " asc_height, eps, monospace;" &
+ "boolean monospace;" &
+
+ "math_spread :=" & decimal math_spread & ";" &
+ "x_height# :=" & decimal x_height# & ";" &
+ "u# :=" & decimal u# & ";" &
+ "rule_thickness# :=" & decimal rule_thickness# & ";" &
+ "bar# :=" & decimal bar# & ";" &
+ "math_axis# :=" & decimal math_axis# & ";" &
+ "asc_height# :=" & decimal asc_height# & ";" &
+ "eps :=" & decimal eps & ";" &
+ "monospace :=" & if monospace: "true" else: "false" fi & ";")
+
+ save prevpen;
+ prevpen:=savepen;
+
+ save x,y;
+ numeric x[], x[]', x[]l, x[]'l, x[]r, x[]'r,
+ y[], y[]', y[]l, y[]'l, y[]r, y[]'r;
+ save spread, w;
+ numeric spread, w;
+
+ pickup pencircle scaled rule_thickness#;
+
+ spread = math_spread[.45x_height#, .55x_height#];
+ w = 9u#;
+
+ penpos1(.25rule_thickness#, 90); penpos2(.25rule_thickness#, 90);
+ penpos3(bar#, 0); penpos4(bar#, 0);
+ y0=y1=y2=math_axis#;
+ x1=1.5u#-eps;
+ rt x0=w-x1;
+ y3-y0=y0-y4=.24asc_height#+eps; x3=x4=x0-3u#-eps;
+ penpos5(bar#, angle(z4-z0)); z5l=z0; penpos6(bar#, angle(z3-z0)); z6l=z0;
+ z9=.381966[.5[z3,z4],z0];
+ save pp; path pp; pp=z4l{z9-z4}..z6r;
+ save t; numeric t;
+ t=xpart(pp intersectiontimes ((0,y2l)--(w,y2l))); x2=xpart point t of pp;
+
+ save mapto, n;
+ vardef mapto(text t) =
+ hide(numeric n; n:=0;
+ numeric x,x_[],y,y_[];
+ for z=t: z_[incr n]:=z; endfor;
+ transform T;
+ z_2 = z_1 transformed T;
+ z_4 = z_3 transformed T;
+ z_6 = z_5 transformed T;)
+ T
+ enddef;
+
+ save T; transform T;
+ save tt; numeric tt; tt = arctime(arclength apth - (x5l-x2)) of apth;
+ save ttt; numeric ttt; ttt = arctime(arclength apth - (x5l-x3)) of apth;
+
+ % Draw the right half of the arrow head
+
+ save right_arrowhead, pa;
+ vardef right_arrowhead(expr T,s) =
+ (subpath(0, xpart ((z0..{z4-z9}z4r) intersectiontimes
+ (point s of pp -- point s of pp + (2rule_thickness#,0))))
+ of (z0..{z4-z9}z4r)--subpath(s,t) of pp--z2l) transformed T
+ enddef;
+
+ if arclength apth = 0:
+ T:=identity shifted (point (length apth) of apth - z0);
+ elseif arclength apth < x0-x3l:
+ T:=identity rotatedaround(z0,angle (direction (length apth) of apth))
+ shifted (point (length apth) of apth - z0);
+ else:
+ T:=mapto(z0,
+ point (length apth) of apth,
+ z2,
+ point tt of apth,
+ (x3,y9)-(0,3rule_thickness#),
+ point ttt of apth -
+ 3rule_thickness#*(unitvector (direction tt of apth)
+ rotated 90));
+ fi
+
+ save f,s;
+ vardef f(expr s) =
+ length(point s of (pp transformed T) - point tt of apth)
+ < length(point 0 of pp - z2)
+ enddef;
+
+ if f(0) or (arclength apth < x0-x3l): s := 0;
+ else: s := solve f(length pp, 0);
+ fi
+
+ path pa;
+ pa := right_arrowhead(T,s);
+
+ % Draw the left part of the arrow head
+
+ pp := (z3l{z9-z3}..z5r);
+ save pq; path pq; pq := (z3r{z9-z3}..z0);
+
+ save left_texarrowhead, pb;
+ vardef left_texarrowhead(expr T, s) =
+ (z2r--subpath(t,s) of pp
+ --subpath(xpart ( pq intersectiontimes
+ (point s of pp -- point s of pp + (2rule_thickness#,0)))
+ ,length pq) of pq) transformed T
+ enddef;
+
+ if arclength apth = 0:
+ T:=identity shifted (point (length apth) of apth - z0);
+ elseif arclength apth < x0-x3l:
+ T:=identity rotatedaround(z0,angle (direction (length apth) of apth))
+ shifted (point (length apth) of apth - z0);
+ else:
+ T:=mapto(z0,
+ point (length apth) of apth,
+ z2,
+ point tt of apth,
+ (x3,y9)+(0,3rule_thickness#),
+ point ttt of apth +
+ 3rule_thickness#*(unitvector (direction tt of apth)
+ rotated 90));
+ fi
+
+ vardef f(expr s) =
+ length(point s of (pp transformed T) - point tt of apth)
+ < length(point 0 of pp - z2)
+ enddef;
+
+ if f(0) or (arclength apth < x0-x3l): s := 0;
+ else: s := solve f(length pp, 0);
+ fi
+
+ path pb;
+ pb := left_texarrowhead(T,s);
+
+ filldraw pa--pb--cycle text_;
+
+ % Draw the path
+
+ if arclength apth > x0-x2:
+ draw subpath(0,tt) of apth withpen pencircle scaled 1.25rule_thickness#
+ text_;
+ fi
+
+ pickup prevpen;
+
+ enddef;
+
+enddef; \ No newline at end of file
diff --git a/Master/texmf-dist/metapost/cmarrows/sgbx0022.mp b/Master/texmf-dist/metapost/cmarrows/sgbx0022.mp
new file mode 100644
index 00000000000..f5091b73d07
--- /dev/null
+++ b/Master/texmf-dist/metapost/cmarrows/sgbx0022.mp
@@ -0,0 +1,181 @@
+%% sgbx0022.mp
+%% Copyright 2006 Tommy Ekola <tek@kth.se>
+%
+% This work may be distributed and/or modified under the conditions of
+% the LaTeX Project Public License, either version 1.3 of this license
+% or (at your option) any later version. The latest version of this
+% license is in http://www.latex-project.org/lppl.txt
+%
+% This work has the LPPL maintenance status `maintained'. The Current
+% Maintainer of this work is Tommy Ekola. The Base Interpreter is
+% MetaPost.
+
+vardef setup_texarrow (expr source_file, cmdname) =
+
+ scantokens ("input tgbx0000");
+
+ scantokens ("input " & source_file);
+
+ expandafter def scantokens cmdname expr p =
+ scantokens (cmdname & "__sgbxww")(p)
+ enddef;
+
+ expandafter vardef scantokens (cmdname & "__sgbxww " & "(expr apth) " &
+ "text text_ = " &
+
+ "save math_spread, x_height, u, rule_thickness, math_axis," &
+ " monospace,asc_height,eps, fudge, crisp, hair;" &
+ "boolean monospace;" &
+
+ "u# := " & decimal u# & ";" &
+ "math_spread := " & decimal math_spread & ";" &
+ "x_height# := " & decimal x_height# & ";" &
+ "rule_thickness# := " & decimal rule_thickness# & ";" &
+ "math_axis# := " & decimal math_axis# & ";" &
+ "monospace := " & if monospace : "true" else: "false" fi & ";" &
+ "asc_height# := " & decimal asc_height# & ";" &
+ "eps := " & decimal eps & ";" &
+ "fudge := " & decimal fudge & ";" &
+ "crisp# := " & decimal crisp# & ";" &
+ "hair# := " & decimal hair# & ";")
+
+ save prevpen;
+ prevpen:=savepen;
+
+ save x,y;
+ numeric x[], x[]', x[]l, x[]'l, x[]r, x[]'r,
+ y[], y[]', y[]l, y[]'l, y[]r, y[]'r;
+
+ save spread, w;
+ numeric spread, w;
+
+ if crisp#>fudge*hair#:
+ crisp#:=fudge*hair#;
+ fi
+ pickup if crisp#=0: nullpen else: pencircle scaled crisp# fi;
+
+ spread = math_spread[.45x_height#, .55x_height#];
+ w = 18u#;
+
+ penpos1(rule_thickness#, 90); penpos2(rule_thickness#, 90);
+ penpos3(rule_thickness#, 0); penpos4(rule_thickness#, 0);
+ y0=y1=y2=math_axis#; x1-.5rule_thickness#=u#; rt x0=w-u#;
+ y3-y0=y0-y4=if monospace: .24 else: .36 fi asc_height#+eps;
+ x3=x4=x0-if monospace: 3u# else: 4u# fi - eps;
+ penpos5(rule_thickness#, angle(z4-z0)); z5l=z0;
+ penpos6(rule_thickness#, angle(z3-z0)); z6l=z0;
+ z9=.2[.5[z3,z4],z0];
+
+ save pp; path pp; pp = z4l{z9-z4}..z6r;
+ save t; numeric t; t = xpart(pp intersectiontimes ((0,y2l)--(w,y2l)));
+ x2=xpart point t of pp;
+
+ save mapto, n;
+ vardef mapto(text t) =
+ hide(numeric n; n:=0;
+ numeric x,x_[],y,y_[];
+ for z=t: z_[incr n]:=z; endfor;
+ transform T;
+ z_2 = z_1 transformed T;
+ z_4 = z_3 transformed T;
+ z_6 = z_5 transformed T;)
+ T
+ enddef;
+
+ save T; transform T;
+ save tt; numeric tt; tt = arctime(arclength apth - (x0-x9)) of apth;
+ save ttt; numeric ttt; ttt = arctime(arclength apth - (x0-x2)) of apth;
+
+ % Draw the right half of the arrow head
+
+ save right_texarrowhead, pa;
+ vardef right_texarrowhead(expr T,s) =
+ (subpath(0, xpart ((z0..{z4-z9}z4r) intersectiontimes
+ (point s of pp -- point s of pp + (2rule_thickness#,0))))
+ of (z0..{z4-z9}z4r)--subpath(s,t) of pp--z2l) transformed T
+ enddef;
+
+ if arclength apth = 0:
+ T:=identity shifted (point (length apth) of apth - z0);
+ elseif arclength apth < x0-x3l:
+ T:=identity rotatedaround(z0,angle (direction (length apth) of apth))
+ shifted (point (length apth) of apth - z0);
+ else:
+ T:=mapto(z0,
+ point (length apth) of apth,
+ z2,
+ point ttt of apth,
+ z9-(0,3rule_thickness#),
+ point tt of apth - 3rule_thickness#
+ *(unitvector (direction tt of apth)
+ rotated 90));
+ fi
+
+ save f,s;
+ vardef f(expr s) =
+ length(point s of (pp transformed T) - point tt of apth)
+ < length(point 0 of pp - z9)
+ enddef;
+
+ if f(0) or (arclength apth < x0-x3l): s := 0;
+ else: s := solve f(length pp, 0);
+ fi
+
+ path pa;
+ pa := right_texarrowhead(T,s);
+
+ % Draw the left part of the arrow head
+
+ pp := (z3l{z9-z3}..z5r);
+ save pq; path pq; pq := (z3r{z9-z3}..z0);
+
+ save left_texarrowhead, pb;
+ vardef left_texarrowhead(expr T, s) =
+ (z2r--subpath(t,s) of pp
+ --subpath(xpart ( pq intersectiontimes
+ (point s of pp -- point s of pp + (2rule_thickness#,0)))
+ ,length pq) of pq) transformed T
+ enddef;
+
+ if arclength apth = 0:
+ T:=identity shifted (point (length apth) of apth - z0);
+ elseif arclength apth < x0-x3l:
+ T:=identity rotatedaround(z0,angle (direction (length apth) of apth))
+ shifted (point (length apth) of apth - z0);
+ else:
+ T:=mapto(z0,
+ point (length apth) of apth,
+ z2,
+ point ttt of apth,
+ z9+(0,3rule_thickness#),
+ point tt of apth + 3rule_thickness#
+ *(unitvector (direction tt of apth)
+ rotated 90));
+ fi
+
+ vardef f(expr s) =
+ length(point s of (pp transformed T) - point tt of apth)
+ < length(point 0 of pp - z9)
+ enddef;
+
+ if f(0) or (arclength apth < x0-x3l): s := 0;
+ else: s := solve f(length pp, 0);
+ fi
+
+ path pb;
+ pb := left_texarrowhead(T,s);
+
+ filldraw pa--pb--cycle text_;
+
+ % Draw the path
+
+ if arclength apth > x0-x2:
+ draw subpath(0,ttt) of apth withpen pencircle scaled rule_thickness#
+ text_;
+ fi
+
+ pickup prevpen;
+
+ enddef;
+
+enddef; \ No newline at end of file
diff --git a/Master/texmf-dist/metapost/cmarrows/sgbx0023.mp b/Master/texmf-dist/metapost/cmarrows/sgbx0023.mp
new file mode 100644
index 00000000000..89fd897b033
--- /dev/null
+++ b/Master/texmf-dist/metapost/cmarrows/sgbx0023.mp
@@ -0,0 +1,250 @@
+%% sgbx0023.mp
+%% Copyright 2006 Tommy Ekola <tek@kth.se>
+%
+% This work may be distributed and/or modified under the conditions of
+% the LaTeX Project Public License, either version 1.3 of this license
+% or (at your option) any later version. The latest version of this
+% license is in http://www.latex-project.org/lppl.txt
+%
+% This work has the LPPL maintenance status `maintained'. The Current
+% Maintainer of this work is Tommy Ekola. The Base Interpreter is
+% MetaPost.
+
+vardef setup_tailarrow (expr source_file, cmdname) =
+
+ scantokens ("input tgbx0000");
+
+ scantokens ("input " & source_file);
+
+ expandafter def scantokens cmdname expr p =
+ scantokens (cmdname & "__sgbxww")(p)
+ enddef;
+
+ expandafter vardef scantokens (cmdname & "__sgbxww " & "(expr apth) " &
+ "text text_ = " &
+
+ "save math_spread, x_height, u, rule_thickness, bar, math_axis," &
+ " asc_height, eps, monospace, fudge, crisp, hair;" &
+ "boolean monospace;" &
+
+ "math_spread :=" & decimal math_spread & ";" &
+ "x_height# :=" & decimal x_height# & ";" &
+ "u# :=" & decimal u# & ";" &
+ "rule_thickness# :=" & decimal rule_thickness# & ";" &
+ "bar# :=" & decimal bar# & ";" &
+ "math_axis# :=" & decimal math_axis# & ";" &
+ "asc_height# :=" & decimal asc_height# & ";" &
+ "eps :=" & decimal eps & ";" &
+ "monospace :=" & if monospace: "true" else: "false" fi & ";" &
+ "fudge :=" & decimal fudge & ";" &
+ "crisp# :=" & decimal crisp# & ";" &
+ "hair# :=" & decimal hair# & ";")
+
+ save prevpen;
+ prevpen:=savepen;
+
+ save x,y;
+ numeric x[], x[]', x[]l, x[]'l, x[]r, x[]'r,
+ y[], y[]', y[]l, y[]'l, y[]r, y[]'r;
+ save spread, w;
+ numeric spread, w;
+
+ if crisp#>fudge*hair#:
+ crisp#:=fudge*hair#;
+ fi
+ pickup if crisp#=0: nullpen else: pencircle scaled crisp# fi;
+
+ spread = math_spread[.45x_height#, .55x_height#];
+ w = 18u#;
+
+ penpos1(rule_thickness#, 90); penpos2(rule_thickness#, 90);
+ penpos3(bar#, 0); penpos4(bar#, 0);
+ y0=y1=y2=math_axis#; x1-.5rule_thickness#=u#; rt x0=w-u#;
+ y3-y0=y0-y4=.24asc_height#+eps;
+ x3=x4=x0-3u#-eps;
+ penpos5(bar#, angle(z4-z0)); z5l=z0;
+ penpos6(bar#, angle(z3-z0)); z6l=z0;
+ z9=.381966[.5[z3,z4],z0];
+
+ save pp; path pp; pp = z4l{z9-z4}..z6r;
+ save t; numeric t; t = xpart(pp intersectiontimes ((0,y2l)--(w,y2l)));
+ x2=xpart point t of pp;
+
+ save mapto, n;
+ vardef mapto(text t) =
+ hide(numeric n; n:=0;
+ numeric x,x_[],y,y_[];
+ for z=t: z_[incr n]:=z; endfor;
+ transform T;
+ z_2 = z_1 transformed T;
+ z_4 = z_3 transformed T;
+ z_6 = z_5 transformed T;)
+ T
+ enddef;
+
+ save T; transform T;
+ save tt; numeric tt; tt = arctime(arclength apth - (x0-x9)) of apth;
+ save ttt; numeric ttt; ttt = arctime(arclength apth - (x0-x2)) of apth;
+ save ssss; numeric ssss; ssss = arctime(x0-x3l) of apth;
+
+ % Draw the right half of the arrowhead
+
+ save right_texarrowhead, pa;
+ vardef right_texarrowhead(expr T,s) =
+ (subpath(0, xpart ((z0..{z4-z9}z4r) intersectiontimes
+ (point s of pp -- point s of pp + (2rule_thickness#,0))))
+ of (z0..{z4-z9}z4r)--subpath(s,t) of pp--z2l) transformed T
+ enddef;
+
+ if arclength apth = 0:
+ T:=identity shifted (point (length apth) of apth - z0);
+ elseif arclength apth < x0-x3l:
+ T:=identity rotatedaround(z0,angle (direction (length apth) of apth))
+ shifted (point (length apth) of apth -z0);
+ else:
+ T:=mapto(z0,
+ point (length apth) of apth,
+ z2,
+ point ttt of apth,
+ z9+(0,3rule_thickness#),
+ point tt of apth +
+ 3rule_thickness#*(unitvector (direction tt of apth)
+ rotated 90));
+ fi
+
+ save f,s;
+ vardef f(expr s) =
+ length(point s of (pp transformed T) - point tt of apth)
+ < length(point 0 of pp - z9)
+ enddef;
+
+ if f(0) or (arclength apth < x0-x3l): s := 0;
+ else: s := solve f(length pp, 0);
+ fi
+
+ path pa;
+ pa := right_texarrowhead(T,s);
+
+ % Draw the left half of the arrow head
+
+ pp := (z3l{z9-z3}..z5r);
+ save pq; path pq; pq := (z3r{z9-z3}..z0);
+
+ save left_texarrowhead, pb;
+ vardef left_texarrowhead(expr T, s) =
+ (z2r--subpath(t,s) of pp
+ --subpath(xpart ( pq intersectiontimes
+ (point s of pp -- point s of pp + (2rule_thickness#,0)))
+ ,length pq) of pq) transformed T
+ enddef;
+
+ if arclength apth = 0:
+ T:=identity shifted (point (length apth) of apth - z0);
+ elseif arclength apth < x0-x3l:
+ T:=identity rotatedaround(z0,angle (direction (length apth) of apth))
+ shifted (point (length apth) of apth - z0);
+ else:
+ T:=mapto(z0,
+ point (length apth) of apth,
+ z2,
+ point ttt of apth,
+ z9+(0,3rule_thickness#),
+ point tt of apth + 3rule_thickness#
+ *(unitvector (direction tt of apth)
+ rotated 90));
+ fi
+
+ vardef f(expr s) =
+ length(point s of (pp transformed T) - point tt of apth)
+ < length(point 0 of pp - z9)
+ enddef;
+
+ if f(0) or (arclength apth < x0-x3l): s := 0;
+ else: s := solve f(length pp, 0);
+ fi
+
+ path pb;
+ pb := left_texarrowhead(T,s);
+
+ filldraw pa--pb--cycle text_;
+
+ % Draw the right half of the tail
+
+ save ss; ss := arctime(x9-x3l) of apth;
+ save sss; sss := arctime(x2-x3l) of apth;
+
+ if arclength apth = 0:
+ T:=identity shifted (point 0 of apth - z0);
+ elseif arclength apth < x0-x3l:
+ T:=identity rotatedaround(z0,angle (direction 0 of apth))
+ shifted (point 0 of apth - z0);
+ else:
+ T:=mapto(z0,
+ point ssss of apth,
+ z2,
+ point sss of apth,
+ z9+(0,3rule_thickness#),
+ point ss of apth +
+ 3rule_thickness#*(unitvector (direction ss of apth)
+ rotated 90));
+ fi
+
+ pp := z4l{z9-z4}..z6r;
+ vardef f(expr s) =
+ length(point s of (pp transformed T) - point ss of apth)
+ < length(point 0 of pp - z9)
+ enddef;
+
+ if f(0) or (arclength apth < x0-x3l): s := 0;
+ else: s := solve f(length pp, 0);
+ fi
+
+ pa := right_texarrowhead(T,s);
+
+ % Draw the left half of the tail
+
+ if arclength apth = 0:
+ T:=identity shifted (point 0 of apth - z0);
+ elseif arclength apth < x0-x3l:
+ T:=identity rotatedaround(z0,angle (direction 0 of apth))
+ shifted (point 0 of apth - z0);
+ else:
+ T:=mapto(z0,
+ point ssss of apth,
+ z2,
+ point sss of apth,
+ z9-(0,3rule_thickness#),
+ point ss of apth -
+ 3rule_thickness#*(unitvector (direction ss of apth)
+ rotated 90));
+ fi
+
+ pp := (z3l{z9-z3}..z5r);
+ pq := (z3r{z9-z3}..z0);
+
+ vardef f(expr s) =
+ length(point s of (pp transformed T) - point ss of apth)
+ < length(point 0 of pp - z9)
+ enddef;
+
+ if f(0) or (arclength apth < x0-x3l): s := 0;
+ else: s := solve f(length pp, 0);
+ fi
+
+ pb := left_texarrowhead(T,s);
+
+ filldraw pa--pb--cycle text_;
+
+ % Draw the path
+
+ if arclength apth > 2(x0-x2):
+ save stt; stt := arctime(.5(x0+x2)-x3l) of apth;
+ draw subpath(stt,ttt) of apth withpen pencircle scaled rule_thickness#
+ text_;
+ fi
+
+ pickup prevpen;
+
+ enddef;
+
+enddef; \ No newline at end of file
diff --git a/Master/texmf-dist/metapost/cmarrows/sgbx0024.mp b/Master/texmf-dist/metapost/cmarrows/sgbx0024.mp
new file mode 100644
index 00000000000..72fe6a0adec
--- /dev/null
+++ b/Master/texmf-dist/metapost/cmarrows/sgbx0024.mp
@@ -0,0 +1,211 @@
+%% sgbx0024.mp
+%% Copyright 2006 Tommy Ekola <tek@kth.se>
+%
+% This work may be distributed and/or modified under the conditions of
+% the LaTeX Project Public License, either version 1.3 of this license
+% or (at your option) any later version. The latest version of this
+% license is in http://www.latex-project.org/lppl.txt
+%
+% This work has the LPPL maintenance status `maintained'. The Current
+% Maintainer of this work is Tommy Ekola. The Base Interpreter is
+% MetaPost.
+
+vardef setup_tripplearrow (expr source_file, cmdname) =
+
+ scantokens ("input tgbx0000");
+
+ scantokens ("input " & source_file);
+
+ expandafter def scantokens cmdname expr p =
+ scantokens (cmdname & "__sgbxww")(p)
+ enddef;
+
+ expandafter vardef scantokens (cmdname & "__sgbxww " & "(expr apth) " &
+ "text text_ = " &
+
+ "save math_spread, x_height, u, rule_thickness, bar, math_axis," &
+ " asc_height, eps, monospace, fudge, crisp, hair;" &
+ "boolean monospace;" &
+
+ "math_spread :=" & decimal math_spread & ";" &
+ "x_height# :=" & decimal x_height# & ";" &
+ "u# :=" & decimal u# & ";" &
+ "rule_thickness# :=" & decimal rule_thickness# & ";" &
+ "bar# :=" & decimal bar# & ";" &
+ "math_axis# :=" & decimal math_axis# & ";" &
+ "asc_height# :=" & decimal asc_height# & ";" &
+ "eps :=" & decimal eps & ";" &
+ "monospace :=" & if monospace: "true" else: "false" fi & ";" &
+ "fudge :=" & decimal fudge & ";" &
+ "crisp# :=" & decimal crisp# & ";" &
+ "hair# :=" & decimal hair# & ";")
+
+ save prevpen;
+ prevpen:=savepen;
+
+ save x,y;
+ numeric x[], x[]', x[]l, x[]'l, x[]r, x[]'r,
+ y[], y[]', y[]l, y[]'l, y[]r, y[]'r;
+ save spread, w;
+ numeric spread, w;
+
+ if crisp#>fudge*hair#:
+ crisp#:=fudge*hair#;
+ fi
+ pickup if crisp#=0: nullpen else: pencircle scaled crisp# fi;
+
+ spread = math_spread[.45x_height#,.55x_height#];
+ w:=18u#;
+
+ penpos1(rule_thickness#, 90); penpos2(rule_thickness#, 90);
+ penpos3(1.5bar#, 0); penpos4(1.5bar#, 0);
+ y0=y1=y2=math_axis#; x1-.5rule_thickness#=u#; rt x0 = w-u#;
+ x0'=x0''=x0; x1'=x1''=x1;
+ y1'=y1+spread; y1''=y1-spread; y0'=y1'; y0''=y1'';
+
+ y3-y0'=y0''-y4=.24asc_height#+eps; x3=x4=x0-6u#-eps;
+ penpos5(bar#,angle(z0-z4)); z5r=z0; penpos6(bar#,angle(z0-z3));
+ z6r=z0; z9=.381966[.5[z3,z4],z0];
+ save pp;
+ path pp; pp = z4l{z9-z4}..z6l;
+ save ss;
+ numeric ss; ss = xpart(pp intersectiontimes ((0,y2l)--(w,y2l)));
+ x2 = xpart point ss of pp;
+ save t;
+ numeric t; t = xpart(pp intersectiontimes ((0,y0'')--(w,y0'')));
+ numeric t[]; t1 = xpart(pp intersectiontimes ((0,y0''-rule_thickness#/2)
+ --(w,y0''-rule_thickness#/2)));
+ t2 = xpart(pp intersectiontimes ((0,y0''+rule_thickness#/2)
+ --(w,y0''+rule_thickness#/2)));
+ t3 = xpart(pp intersectiontimes ((x2,y4)--(x2,y3)));
+ save qq;
+ path qq; qq = z3l{z9-z3}..z5l;
+
+ save parallelline;
+ vardef parallelline expr ppp =
+ save s, stp;
+ numeric s, stp; stp:=(arclength ppp) div 5pt;
+ if stp=0: stp:=1; fi
+ stp:=(arclength ppp)/stp;
+
+ if stp > 0:
+ draw for s=0 step stp until arclength ppp - stp:
+ point (arctime s of ppp) of ppp +
+ spread*(unitvector direction (arctime s of ppp) of ppp rotated 90)
+ {direction (arctime s of ppp) of ppp}..
+ endfor
+ {direction (length ppp) of ppp}
+ point (length ppp) of ppp +
+ spread*(unitvector direction (length ppp) of ppp rotated 90)
+ withpen pencircle scaled rule_thickness#
+ text_;
+
+ draw for s=0 step stp until arclength ppp - stp:
+ point (arctime s of ppp) of ppp -
+ spread*(unitvector direction (arctime s of ppp) of ppp rotated 90)
+ {direction (arctime s of ppp) of ppp}..
+ endfor
+ {direction (length ppp) of ppp}
+ point (length ppp) of ppp -
+ spread*(unitvector direction (length ppp) of ppp rotated 90)
+ withpen pencircle scaled rule_thickness#
+ text_;
+ fi
+ enddef;
+
+ save mapto, n;
+ vardef mapto(text t) =
+ hide(numeric n; n:=0;
+ numeric x,x_[],y,y_[];
+ for z=t: z_[incr n]:=z; endfor;
+ transform T;
+ z_2 = z_1 transformed T;
+ z_4 = z_3 transformed T;
+ z_6 = z_5 transformed T;)
+ T
+ enddef;
+
+ % Draw the arrow head
+
+ save tripplearrowhead;
+ vardef tripplearrowhead(expr T,s,ss) =
+ (subpath(0,xpart((z0..{z4-z9}z4r) intersectiontimes
+ (point s of pp -- point s of pp + (2rule_thickness#,0))))
+ of (z0..{z4-z9}z4r)
+ --subpath(s,t1) of pp
+ --(xpart point t1 of pp, ypart point t2 of pp)
+ --subpath(t2,t3) of pp
+ --subpath(t3,t2) of qq
+ --(xpart point t1 of qq, ypart point t2 of qq)
+ --subpath(t1,ss) of qq
+ --subpath(xpart((z3r{z9-z3}..z0) intersectiontimes
+ (point ss of qq -- point ss of qq + (2rule_thickness#,0))),1)
+ of (z3r{z9-z3}..z0)
+ & cycle) transformed T
+ enddef;
+
+ save T; transform T;
+ save tt;
+ tt = arctime (arclength apth - (x0 - xpart point t1 of pp)) of apth;
+ save ttt;
+ ttt = arctime (arclength apth - (x0 - x2)) of apth;
+
+ if arclength apth = 0:
+ T:=identity shifted (point (length apth) of apth - z0);
+ elseif arclength apth < x0-xpart(point t1 of pp):
+ T:=identity rotatedaround(z0, angle (direction (length apth) of apth))
+ shifted (point (length apth) of apth - z0);
+ else:
+ T := mapto(z2,
+ point ttt of apth,
+ point t1 of pp + (0,rule_thickness#/2),
+ point tt of apth +
+ spread*(unitvector direction tt of apth rotated 90),
+ point t1 of qq - (0,rule_thickness#/2),
+ point tt of apth -
+ spread*(unitvector direction tt of apth rotated 90));
+ fi
+
+ save f,s,ss;
+ ttt := arctime(arclength apth - (x0-x9)) of apth;
+ vardef f(expr s) =
+ length(point s of (pp transformed T) - point ttt of apth)
+ < length(point 0 of pp - z9)
+ enddef;
+
+ if f(0) or (arclength apth < x0-x3l): s := 0;
+ else: s := solve f(length pp, 0);
+ fi
+
+ vardef f(expr ss) =
+ length(point ss of (qq transformed T) - point ttt of apth)
+ < length(point 0 of qq - z9)
+ enddef;
+
+ if f(0) or (arclength apth < x0-x3l): ss := 0;
+ else: ss := solve f(length qq, 0);
+ fi
+
+ filldraw tripplearrowhead(T,s,ss) text_;
+
+ % Draw the path
+
+ ttt := arctime (arclength apth - (x0 - x2)) of apth;
+ if arclength apth > x0 - xpart(point t1 of pp):
+ parallelline (subpath(0,tt) of apth);
+ fi
+
+ if arclength apth > x0 - x2:
+ draw subpath(0,ttt) of apth withpen pencircle scaled rule_thickness#
+ text_;
+ fi
+
+ pickup prevpen;
+
+ enddef;
+
+enddef;
+
+
+
+
diff --git a/Master/texmf-dist/metapost/cmarrows/tgbx0000.mp b/Master/texmf-dist/metapost/cmarrows/tgbx0000.mp
new file mode 100644
index 00000000000..0993553a7d7
--- /dev/null
+++ b/Master/texmf-dist/metapost/cmarrows/tgbx0000.mp
@@ -0,0 +1,100 @@
+%% tgbx0000.mp
+%% Copyright 2006 Tommy Ekola <tek@kth.se>
+%
+% This work may be distributed and/or modified under the conditions of
+% the LaTeX Project Public License, either version 1.3 of this license
+% or (at your option) any later version. The latest version of this
+% license is in http://www.latex-project.org/lppl.txt
+%
+% This work has the LPPL maintenance status `maintained'. The Current
+% Maintainer of this work is Tommy Ekola. The Base Interpreter is
+% MetaPost.
+
+save
+font_identifier,
+cmbase,
+font_size,
+
+u,
+width_adj,
+serif_fit,
+cap_serif_fit,
+letter_fit,
+
+body_height,
+asc_height,
+cap_height,
+fig_height,
+x_height,
+math_axis,
+bar_height,
+comma_depth,
+desc_depth,
+
+crisp,
+tiny,
+fine,
+thin_join,
+hair,
+stem,
+curve,
+ess,
+flare,
+dot_size,
+cap_hair,
+cap_stem,
+cap_curve,
+cap_ess,
+rule_thickness,
+
+dish,
+bracket,
+jut,
+cap_jut,
+beak_jut,
+beak,
+vair,
+notch_cut,
+bar,
+slab,
+cap_bar,
+cap_band,
+cap_notch_cut,
+serif_drop,
+stem_corr,
+vair_corr,
+apex_corr,
+
+o,
+apex_o,
+
+slant,
+fudge,
+math_spread,
+superness,
+superpull,
+beak_darkness,
+ligs,
+
+square_dots,
+hefty,
+serifs,
+monospace,
+variant_g,
+low_asterisk,
+math_fitting,
+
+designsize,
+
+generate;
+
+vardef generate suffix g = enddef;
+numeric cmbase; cmbase = 0;
+string font_identifier;
+vardef font_size expr g = designsize = g enddef;
+boolean square_dots, hefty, serifs, monospace, variant_g, low_asterisk,
+ math_fitting;
+pt#:=1pt;
+
+
+
diff --git a/Master/texmf-dist/metapost/cmarrows/tgbx0001.mp b/Master/texmf-dist/metapost/cmarrows/tgbx0001.mp
new file mode 100644
index 00000000000..e8c80c03a74
--- /dev/null
+++ b/Master/texmf-dist/metapost/cmarrows/tgbx0001.mp
@@ -0,0 +1,326 @@
+%% tgbx0001.mp
+%% Copyright 2006 Tommy Ekola <tek@kth.se>
+%
+% This work may be distributed and/or modified under the conditions of
+% the LaTeX Project Public License, either version 1.3 of this license
+% or (at your option) any later version. The latest version of this
+% license is in http://www.latex-project.org/lppl.txt
+%
+% This work has the LPPL maintenance status `maintained'. The Current
+% Maintainer of this work is Tommy Ekola. The Base Interpreter is
+% MetaPost.
+
+vardef setup_Bigbrace (expr source_file, cmdname) =
+
+ scantokens ("input tgbx0000");
+
+ scantokens ("input " & source_file);
+
+ expandafter def scantokens cmdname expr p =
+ scantokens (cmdname & "__tgbxww")(p)
+ enddef;
+
+ expandafter vardef scantokens (cmdname & "__tgbxww " & "(expr apth) " &
+ "text text_ = " &
+
+ "save u, designsize, curve, stem, hair, rule_thickness, eps, fine, " &
+ "fudge;" &
+
+ "u# := " & decimal u# & ";" &
+ "designsize := " & decimal designsize & ";" &
+ "curve# := " & decimal curve# & ";" &
+ "stem# := " & decimal stem# & ";" &
+ "hair# := " & decimal hair# & ";" &
+ "rule_thickness# := " & decimal rule_thickness# & ";" &
+ "eps := " & decimal eps & ";" &
+ "fine# := " & decimal fine# & ";" &
+ "fudge := " & decimal fudge & ";" &
+
+ % Time for middle piece
+
+ "save st; numeric st;" &
+ "if unknown " & cmdname & "_middle_time:" &
+ " st := arctime (arclength apth)/2 of apth;" &
+ "else: st:=" & cmdname & "_middle_time; fi")
+
+ save prevpen;
+ prevpen:=savepen;
+
+ save w; numeric w; w:=10u#;
+ save h; numeric h; h:=rule_thickness#;
+ save dh; numeric dh; dh:=0.6designsize;
+ save dw; numeric dw; dw:=curve#-stem#;
+ save d; numeric d; d :=3dh-rule_thickness#;
+ save bold; numeric bold; bold:=curve#;
+ save min_breadth; numeric min_breadth;
+ min_breadth:=rule_thickness#;
+ save max_breadth; numeric max_breadth;
+ max_breadth:=.5[stem#,bold];
+
+ save x,y;
+ numeric x[],x[]',x[]l,x[]'l,x[]r,x[]'r,
+ y[],y[]',y[]l,y[]'l,y[]r,y[]'r;
+
+ if fine#>fudge*hair#:
+ fine# := fudge*hair#;
+ fi
+ pickup if fine#=0: nullpen else: pencircle scaled fine# fi;
+
+ forsuffixes $ = 1,1',4,4',7,7': penpos$(min_breadth,0); endfor
+ forsuffixes $ = 2,3,5,6: penpos$(max_breadth,0); endfor
+ x2=x3=x5=x6; x1=x1'=x7=x7'=w-x4=w-x4';
+ lft x4l=1.5u#-.5min_breadth; lft x2l=.5w-.5max_breadth;
+ top y1=h; bot y7=1-d; .5[y4,y4']=.5[y1,y7]=.5[y2,y6]=.5[y3,y5];
+ y1-y2=y3-y4=(y1-y4)/4;
+ y1-y1'=y4-y4'=y7'-y7=min_breadth-fine#;
+
+ save mapto, n;
+ vardef mapto(text t) =
+ hide(numeric n; n:=0;
+ numeric x,x_[],y,y_[];
+ for z=t: z_[incr n]:=z; endfor;
+ transform T;
+ z_2 = z_1 transformed T;
+ z_4 = z_3 transformed T;
+ z_6 = z_5 transformed T;)
+ T
+ enddef;
+
+ % The bottom part of the brace
+
+ save bottom_part;
+ vardef bottom_part(expr T) =
+ filldraw (z6l{down}...{3(x7l-x6l),y7-y6}z7l
+ --z7r--z7'r{3(x6r-x7r),y6-y7'}...{up}z6r--z6l & cycle)
+ transformed T text_;
+ enddef;
+
+ save f;
+ vardef f(expr s) =
+ abs(point 0 of apth - (point s of apth + abs(x7-x6)
+ *(unitvector (direction s of apth) rotated 90)))
+ < abs(z7 - z6)
+ enddef;
+
+ save tolerence; tolerence := epsilon;
+ save s; numeric s;
+
+ save T; transform T; % transform for the bottom part
+ if arclength apth = 0:
+ T:=identity shifted (point (length apth) of apth - z7r);
+ elseif arclength apth < y1-y2+y3-y5+y6-y7:
+ T:=mapto(z6l,
+ .25[point 0 of apth, point (length apth) of apth]+
+ +abs(x7r-x6l)*(unitvector (point (length apth) of apth -
+ point 0 of apth) rotated 90),
+ z6r,
+ .25[point 0 of apth, point (length apth) of apth]+
+ +abs(x7r-x6r)*(unitvector (point (length apth) of apth -
+ point 0 of apth) rotated 90),
+ z7r,
+ point 0 of apth);
+ else:
+ s := solve f(0,length apth);
+ T := mapto(z6l,
+ point s of apth
+ +abs(x7r-x6l)
+ *(unitvector (direction s of apth) rotated 90),
+ z6r,
+ point s of apth
+ +abs(x7r-x6r)
+ *(unitvector (direction s of apth) rotated 90),
+ z7r,
+ point 0 of apth);
+ fi
+ bottom_part(T);
+
+ % The top part of the brace
+
+ save top_part;
+ vardef top_part(expr T) =
+ filldraw (z1l{3(x2l-x1l),y2-y1}...{down}z2l
+ --z2r{up}...{3(x1r-x2r),y1'-y2}z1'r--z1r--cycle)
+ transformed T text_;
+ enddef;
+
+ save g;
+ vardef g(expr t) =
+ abs(point (length apth) of apth
+ - (point t of apth + abs(x1r-x2)
+ *(unitvector (direction t of apth) rotated 90)))
+ < abs(z1r-z2)
+ enddef;
+
+ save t; numeric t;
+
+ transform T; % transform the top part
+ if arclength apth = 0:
+ T:=identity shifted (point (length apth) of apth - z1r);
+ elseif arclength apth < y1-y2+y3-y5+y6-y7:
+ T := mapto(z2l,
+ .75[point 0 of apth, point (length apth) of apth] +
+ abs(x1r-x2l)*(unitvector (point (length apth) of apth -
+ point 0 of apth) rotated 90),
+ z2r,
+ .75[point 0 of apth, point (length apth) of apth] +
+ abs(x1r-x2r)*(unitvector (point (length apth) of apth -
+ point 0 of apth) rotated 90),
+ z1r,
+ point (length apth) of apth);
+ else:
+ t := solve g(length apth,0);
+ T := mapto(z2l,
+ point t of apth
+ +abs(x1r-x2l)
+ *(unitvector (direction t of apth) rotated 90),
+ z2r,
+ point t of apth
+ +abs(x1r-x2r)
+ *(unitvector (direction t of apth) rotated 90),
+ z1r,
+ point (length apth) of apth);
+ fi
+ top_part(T);
+
+ % The lower part of the middle piece
+
+ save middle_part_bottom;
+ vardef middle_part_bottom(expr T) =
+ (.5[z4r,z4'r]{3(x5r-x4r),y5-.5[y4,y4']}...{down}z5r
+ --z5l{up}...{3(x4l-x5l),y4'-y5}z4'l) transformed T
+ enddef;
+
+ save ff;
+ vardef ff(expr ss) =
+ abs(point st of apth
+ +abs(x7r-x4)*(unitvector (direction st of apth) rotated 90)
+ -(point ss of apth + abs(x7r-x5)
+ *(unitvector (direction ss of apth) rotated 90)))
+ > abs(z4-z5)
+ enddef;
+
+ save ss; numeric ss;
+
+ if arclength apth = 0:
+ T:=identity shifted (point (length apth) of apth - z4'l);
+ elseif arclength apth < y1-y2+y3-y5+y6-y7:
+ T:=mapto(.5[z4r,z4'r],
+ .5[point 0 of apth, point (length apth) of apth]+
+ abs(x1r-.5[x4r,x4'r])
+ *(unitvector (point (length apth) of apth -
+ point 0 of apth) rotated 90),
+ z5l,
+ .25[point 0 of apth, point (length apth) of apth]+
+ abs(x1r-x5l)*(unitvector (point (length apth) of apth -
+ point 0 of apth) rotated 90),
+ z5r,
+ .25[point 0 of apth, point (length apth) of apth]+
+ abs(x1r-x5r)*(unitvector (point (length apth) of apth -
+ point 0 of apth) rotated 90));
+ else:
+ ss := solve ff(0,st);
+ T:=mapto(.5[z4r,z4'r],
+ point st of apth
+ +abs(x1r-.5[x4r,x4'r])
+ *(unitvector (direction st of apth) rotated 90),
+ z5l,
+ point ss of apth
+ +abs(x1r-x5l)
+ *(unitvector (direction ss of apth) rotated 90),
+ z5r,
+ point ss of apth
+ +abs(x1r-x5r)
+ *(unitvector (direction ss of apth) rotated 90));
+ fi
+
+ save pb; path pb;
+ pb:=middle_part_bottom(T);
+
+ % The upper part of the middle piece
+
+ save middle_part_top;
+ vardef middle_part_top(expr T) =
+ (z4l{3(x3l-x4l),y3-y4}...{up}z3l--z3r{down}
+ ...{3(x4r-x3r),.5[y4,y4']-y3}.5[z4r,z4'r]) transformed T
+ enddef;
+
+ save gg;
+ vardef gg(expr tt) =
+ abs(point st of apth
+ +abs(x1r-x4)*(unitvector (direction st of apth) rotated 90)
+ -(point tt of apth + abs(x1r-x3)
+ *(unitvector (direction tt of apth) rotated 90)))
+ > abs(z3-z4)
+ enddef;
+
+ save tt; numeric tt;
+
+ if arclength apth = 0:
+ T:=identity shifted (point (length apth) of apth - z4l);
+ elseif arclength apth < y1-y2+y3-y5+y6-y7:
+ T:=mapto(.5[z4r,z4'r],
+ .5[point 0 of apth, point (length apth) of apth]+
+ abs(x1r-.5[x4r,x4'r])
+ *(unitvector (point (length apth) of apth -
+ point 0 of apth) rotated 90),
+ z3l,
+ .75[point 0 of apth, point (length apth) of apth]+
+ abs(x1r-x3l)*(unitvector (point (length apth) of apth -
+ point 0 of apth) rotated 90),
+ z3r,
+ .75[point 0 of apth, point (length apth) of apth]+
+ abs(x1r-x3r)*(unitvector (point (length apth) of apth -
+ point 0 of apth) rotated 90));
+ else:
+ tt := solve gg(length apth, st);
+ T := mapto(.5[z4r,z4'r],
+ point st of apth
+ +abs(x1r-.5[x4r,x4'r])
+ *(unitvector (direction st of apth) rotated 90),
+ z3l,
+ point tt of apth
+ +abs(x1r-x3l)
+ *(unitvector (direction tt of apth) rotated 90),
+ z3r,
+ point tt of apth
+ +abs(x1r-x3r)
+ *(unitvector (direction tt of apth) rotated 90));
+ fi
+
+ save ptt; path ptt;
+ ptt:=middle_part_top(T);
+
+ filldraw pb--ptt--cycle text_;
+
+ % The extension parts
+
+ save extension_part, stp;
+ vardef extension_part(expr ss,tt) =
+ numeric stp; stp:=(ss-tt) div 5pt;
+ if stp=0: stp:=1; fi
+ stp:=(ss-tt)/stp;
+
+ pickup pencircle scaled (x5r-x5l+fine#);
+
+ if stp > 0:
+ draw for uu=ss step stp until tt-stp:
+ point uu of apth + abs(x1r-x6)
+ *(unitvector (direction uu of apth) rotated 90)
+ {direction uu of apth} ..
+ endfor
+ {direction tt of apth}
+ point tt of apth + abs(x1r-x6)
+ *(unitvector (direction tt of apth) rotated 90) text_;
+ fi
+ enddef;
+
+ if arclength apth > y1-y2+y3-y5+y6-y7:
+ extension_part(s,ss); extension_part(tt,t);
+ fi
+
+ pickup prevpen;
+
+ enddef;
+
+enddef;
+
diff --git a/Master/texmf-dist/metapost/cmarrows/tgbx0002.mp b/Master/texmf-dist/metapost/cmarrows/tgbx0002.mp
new file mode 100644
index 00000000000..a554e467478
--- /dev/null
+++ b/Master/texmf-dist/metapost/cmarrows/tgbx0002.mp
@@ -0,0 +1,326 @@
+%% tgbx0000.mp
+%% Copyright 2006 Tommy Ekola <tek@kth.se>
+%
+% This work may be distributed and/or modified under the conditions of
+% the LaTeX Project Public License, either version 1.3 of this license
+% or (at your option) any later version. The latest version of this
+% license is in http://www.latex-project.org/lppl.txt
+%
+% This work has the LPPL maintenance status `maintained'. The Current
+% Maintainer of this work is Tommy Ekola. The Base Interpreter is
+% MetaPost.
+
+vardef setup_Biggbrace (expr source_file, cmdname) =
+
+ scantokens ("input tgbx0000");
+
+ scantokens ("input " & source_file);
+
+ expandafter def scantokens cmdname expr p =
+ scantokens (cmdname & "__tgbxww")(p)
+ enddef;
+
+ expandafter vardef scantokens (cmdname & "__tgbxww " & "(expr apth) " &
+ "text text_ = " &
+
+ "save u, designsize, curve, stem, hair, rule_thickness, eps, fine, " &
+ "fudge;" &
+
+ "u# := " & decimal u# & ";" &
+ "designsize := " & decimal designsize & ";" &
+ "curve# := " & decimal curve# & ";" &
+ "stem# := " & decimal stem# & ";" &
+ "hair# := " & decimal hair# & ";" &
+ "rule_thickness# := " & decimal rule_thickness# & ";" &
+ "eps := " & decimal eps & ";" &
+ "fine# := " & decimal fine# & ";" &
+ "fudge := " & decimal fudge & ";" &
+
+ % Time for middle piece
+
+ "save st; numeric st; " &
+ "if unknown " & cmdname & "_middle_time:" &
+ " st := arctime (arclength apth)/2 of apth;" &
+ "else: st:=" & cmdname & "_middle_time; fi")
+
+ save prevpen;
+ prevpen:=savepen;
+
+ save w; numeric w; w:=11.5u#;
+ save h; numeric h; h:=rule_thickness#;
+ save dh; numeric dh; dh:=0.6designsize;
+ save dw; numeric dw; dw:=curve#-stem#;
+ save d; numeric d; d :=5dh-rule_thickness#;
+ save bold; numeric bold; bold:=curve#;
+ save min_breadth; numeric min_breadth;
+ min_breadth:=rule_thickness#+.4dw;
+ save max_breadth; numeric max_breadth;
+ max_breadth:=bold+dw;
+
+ save x,y;
+ numeric x[],x[]',x[]l,x[]'l,x[]r,x[]'r,
+ y[],y[]',y[]l,y[]'l,y[]r,y[]'r;
+
+ if fine#>fudge*hair#:
+ fine#:=fudge*hair#;
+ fi
+ pickup if fine#=0: nullpen else: pencircle scaled fine# fi;
+
+ forsuffixes $ = 1,1',4,4',7,7': penpos$(min_breadth,0); endfor
+ forsuffixes $ = 2,3,5,6: penpos$(max_breadth,0); endfor
+ x2=x3=x5=x6; x1=x1'=x7=x7'=w-x4=w-x4';
+ lft x4l=1.5u#-.5min_breadth; lft x2l=.5w-.5max_breadth;
+ top y1=h; bot y7=1-d; .5[y4,y4']=.5[y1,y7]=.5[y2,y6]=.5[y3,y5];
+ y1-y2=y3-y4=(y1-y4)/4;
+ y1-y1'=y4-y4'=y7'-y7=min_breadth-fine#;
+
+ save mapto, n;
+ vardef mapto(text t) =
+ hide(numeric n; n:=0;
+ numeric x,x_[],y,y_[];
+ for z=t: z_[incr n]:=z; endfor;
+ transform T;
+ z_2 = z_1 transformed T;
+ z_4 = z_3 transformed T;
+ z_6 = z_5 transformed T;)
+ T
+ enddef;
+
+ % The bottom part of the brace
+
+ save bottom_part;
+ vardef bottom_part(expr T) =
+ filldraw (z6l{down}...{3(x7l-x6l),y7-y6}z7l
+ --z7r--z7'r{3(x6r-x7r),y6-y7'}...{up}z6r--z6l & cycle)
+ transformed T text_;
+ enddef;
+
+ save f;
+ vardef f(expr s) =
+ abs(point 0 of apth - (point s of apth + abs(x7-x6)
+ *(unitvector (direction s of apth) rotated 90)))
+ < abs(z7 - z6)
+ enddef;
+
+ save tolerence; tolerence := epsilon;
+ save s; numeric s;
+
+ save T; transform T; % transform for the bottom part
+ if arclength apth = 0:
+ T:=identity shifted (point (length apth) of apth - z7r);
+ elseif arclength apth < y1-y2+y3-y5+y6-y7:
+ T:=mapto(z6l,
+ .25[point 0 of apth, point (length apth) of apth]+
+ +abs(x7r-x6l)*(unitvector (point (length apth) of apth -
+ point 0 of apth) rotated 90),
+ z6r,
+ .25[point 0 of apth, point (length apth) of apth]+
+ +abs(x7r-x6r)*(unitvector (point (length apth) of apth -
+ point 0 of apth) rotated 90),
+ z7r,
+ point 0 of apth);
+ else:
+ s := solve f(0,length apth);
+ T := mapto(z6l,
+ point s of apth
+ +abs(x7r-x6l)
+ *(unitvector (direction s of apth) rotated 90),
+ z6r,
+ point s of apth
+ +abs(x7r-x6r)
+ *(unitvector (direction s of apth) rotated 90),
+ z7r,
+ point 0 of apth);
+ fi
+ bottom_part(T);
+
+ % The top part of the brace
+
+ save top_part;
+ vardef top_part(expr T) =
+ filldraw (z1l{3(x2l-x1l),y2-y1}...{down}z2l
+ --z2r{up}...{3(x1r-x2r),y1'-y2}z1'r--z1r--cycle)
+ transformed T text_;
+ enddef;
+
+ save g;
+ vardef g(expr t) =
+ abs(point (length apth) of apth
+ - (point t of apth + abs(x1r-x2)
+ *(unitvector (direction t of apth) rotated 90)))
+ < abs(z1r-z2)
+ enddef;
+
+ save t; numeric t;
+
+ transform T; % transform the top part
+ if arclength apth = 0:
+ T:=identity shifted (point (length apth) of apth - z1r);
+ elseif arclength apth < y1-y2+y3-y5+y6-y7:
+ T := mapto(z2l,
+ .75[point 0 of apth, point (length apth) of apth] +
+ abs(x1r-x2l)*(unitvector (point (length apth) of apth -
+ point 0 of apth) rotated 90),
+ z2r,
+ .75[point 0 of apth, point (length apth) of apth] +
+ abs(x1r-x2r)*(unitvector (point (length apth) of apth -
+ point 0 of apth) rotated 90),
+ z1r,
+ point (length apth) of apth);
+ else:
+ t := solve g(length apth,0);
+ T := mapto(z2l,
+ point t of apth
+ +abs(x1r-x2l)
+ *(unitvector (direction t of apth) rotated 90),
+ z2r,
+ point t of apth
+ +abs(x1r-x2r)
+ *(unitvector (direction t of apth) rotated 90),
+ z1r,
+ point (length apth) of apth);
+ fi
+ top_part(T);
+
+ % The lower part of the middle piece
+
+ save middle_part_bottom;
+ vardef middle_part_bottom(expr T) =
+ (.5[z4r,z4'r]{3(x5r-x4r),y5-.5[y4,y4']}...{down}z5r
+ --z5l{up}...{3(x4l-x5l),y4'-y5}z4'l) transformed T
+ enddef;
+
+ save ff;
+ vardef ff(expr ss) =
+ abs(point st of apth
+ +abs(x7r-x4)*(unitvector (direction st of apth) rotated 90)
+ -(point ss of apth + abs(x7r-x5)
+ *(unitvector (direction ss of apth) rotated 90)))
+ > abs(z4-z5)
+ enddef;
+
+ save ss; numeric ss;
+
+ if arclength apth = 0:
+ T:=identity shifted (point (length apth) of apth - z4'l);
+ elseif arclength apth < y1-y2+y3-y5+y6-y7:
+ T:=mapto(.5[z4r,z4'r],
+ .5[point 0 of apth, point (length apth) of apth]+
+ abs(x1r-.5[x4r,x4'r])
+ *(unitvector (point (length apth) of apth -
+ point 0 of apth) rotated 90),
+ z5l,
+ .25[point 0 of apth, point (length apth) of apth]+
+ abs(x1r-x5l)*(unitvector (point (length apth) of apth -
+ point 0 of apth) rotated 90),
+ z5r,
+ .25[point 0 of apth, point (length apth) of apth]+
+ abs(x1r-x5r)*(unitvector (point (length apth) of apth -
+ point 0 of apth) rotated 90));
+ else:
+ ss := solve ff(0,st);
+ T:=mapto(.5[z4r,z4'r],
+ point st of apth
+ +abs(x1r-.5[x4r,x4'r])
+ *(unitvector (direction st of apth) rotated 90),
+ z5l,
+ point ss of apth
+ +abs(x1r-x5l)
+ *(unitvector (direction ss of apth) rotated 90),
+ z5r,
+ point ss of apth
+ +abs(x1r-x5r)
+ *(unitvector (direction ss of apth) rotated 90));
+ fi
+
+ save pb; path pb;
+ pb:=middle_part_bottom(T);
+
+ % The upper part of the middle piece
+
+ save middle_part_top;
+ vardef middle_part_top(expr T) =
+ (z4l{3(x3l-x4l),y3-y4}...{up}z3l--z3r{down}
+ ...{3(x4r-x3r),.5[y4,y4']-y3}.5[z4r,z4'r]) transformed T
+ enddef;
+
+ save gg;
+ vardef gg(expr tt) =
+ abs(point st of apth
+ +abs(x1r-x4)*(unitvector (direction st of apth) rotated 90)
+ -(point tt of apth + abs(x1r-x3)
+ *(unitvector (direction tt of apth) rotated 90)))
+ > abs(z3-z4)
+ enddef;
+
+ save tt; numeric tt;
+
+ if arclength apth = 0:
+ T:=identity shifted (point (length apth) of apth - z4l);
+ elseif arclength apth < y1-y2+y3-y5+y6-y7:
+ T:=mapto(.5[z4r,z4'r],
+ .5[point 0 of apth, point (length apth) of apth]+
+ abs(x1r-.5[x4r,x4'r])
+ *(unitvector (point (length apth) of apth -
+ point 0 of apth) rotated 90),
+ z3l,
+ .75[point 0 of apth, point (length apth) of apth]+
+ abs(x1r-x3l)*(unitvector (point (length apth) of apth -
+ point 0 of apth) rotated 90),
+ z3r,
+ .75[point 0 of apth, point (length apth) of apth]+
+ abs(x1r-x3r)*(unitvector (point (length apth) of apth -
+ point 0 of apth) rotated 90));
+ else:
+ tt := solve gg(length apth, st);
+ T := mapto(.5[z4r,z4'r],
+ point st of apth
+ +abs(x1r-.5[x4r,x4'r])
+ *(unitvector (direction st of apth) rotated 90),
+ z3l,
+ point tt of apth
+ +abs(x1r-x3l)
+ *(unitvector (direction tt of apth) rotated 90),
+ z3r,
+ point tt of apth
+ +abs(x1r-x3r)
+ *(unitvector (direction tt of apth) rotated 90));
+ fi
+
+ save ptt; path ptt;
+ ptt:=middle_part_top(T);
+
+ filldraw pb--ptt--cycle text_;
+
+ % The extension parts
+
+ save extension_part, stp;
+ vardef extension_part(expr ss,tt) =
+ numeric stp; stp:=(ss-tt) div 5pt;
+ if stp=0: stp:=1; fi
+ stp:=(ss-tt)/stp;
+
+ pickup pencircle scaled (x5r-x5l+fine#);
+
+ if stp>0:
+ draw for uu=ss step stp until tt-stp:
+ point uu of apth + abs(x1r-x6)
+ *(unitvector (direction uu of apth) rotated 90)
+ {direction uu of apth} ..
+ endfor
+ {direction tt of apth}
+ point tt of apth + abs(x1r-x6)
+ *(unitvector (direction tt of apth) rotated 90) text_;
+ fi
+ enddef;
+
+ if arclength apth > y1-y2+y3-y5+y6-y7:
+ extension_part(s,ss); extension_part(tt,t);
+ fi
+
+ pickup prevpen;
+
+ enddef;
+
+enddef;
+
diff --git a/Master/texmf-dist/metapost/cmarrows/tgbx0003.mp b/Master/texmf-dist/metapost/cmarrows/tgbx0003.mp
new file mode 100644
index 00000000000..92ca1954130
--- /dev/null
+++ b/Master/texmf-dist/metapost/cmarrows/tgbx0003.mp
@@ -0,0 +1,325 @@
+%% tgbx0003.mp
+%% Copyright 2006 Tommy Ekola <tek@kth.se>
+%
+% This work may be distributed and/or modified under the conditions of
+% the LaTeX Project Public License, either version 1.3 of this license
+% or (at your option) any later version. The latest version of this
+% license is in http://www.latex-project.org/lppl.txt
+%
+% This work has the LPPL maintenance status `maintained'. The Current
+% Maintainer of this work is Tommy Ekola. The Base Interpreter is
+% MetaPost.
+
+vardef setup_bigbrace (expr source_file, cmdname) =
+
+ scantokens ("input tgbx0000");
+
+ scantokens ("input " & source_file);
+
+ expandafter def scantokens cmdname expr p =
+ scantokens (cmdname & "__tgbxww")(p)
+ enddef;
+
+ expandafter vardef scantokens (cmdname & "__tgbxww " & "(expr apth) " &
+ "text text_ = " &
+
+ "save u, designsize, curve, stem, hair, rule_thickness, eps, fine, " &
+ "fudge;" &
+
+ "u# := " & decimal u# & ";" &
+ "designsize := " & decimal designsize & ";" &
+ "curve# := " & decimal curve# & ";" &
+ "stem# := " & decimal stem# & ";" &
+ "hair# := " & decimal hair# & ";" &
+ "rule_thickness# := " & decimal rule_thickness# & ";" &
+ "eps := " & decimal eps & ";" &
+ "fine# := " & decimal fine# & ";" &
+ "fudge := " & decimal fudge & ";" &
+
+ % Time for middle piece
+
+ "save st; numeric st;" &
+ "if unknown " & cmdname & "_middle_time:" &
+ " st := arctime (arclength apth)/2 of apth;" &
+ "else: st:=" & cmdname & "_middle_time; fi")
+
+ save prevpen;
+ prevpen:=savepen;
+
+ save w; numeric w; w:=9u#;
+ save h; numeric h; h:=rule_thickness#;
+ save dh; numeric dh; dh:=0.6designsize;
+ save dw; numeric dw; dw:=curve#-stem#;
+ save d; numeric d; d :=2dh-rule_thickness#;
+ save min_breadth; numeric min_breadth;
+ min_breadth:=hair#;
+ save max_breadth; numeric max_breadth;
+ max_breadth:=stem#;
+
+ save x,y;
+ numeric x[],x[]',x[]l,x[]'l,x[]r,x[]'r,
+ y[],y[]',y[]l,y[]'l,y[]r,y[]'r;
+
+ if fine#>fudge*hair#:
+ fine# := fudge*hair#;
+ fi
+ pickup if fine#=0: nullpen else: pencircle scaled fine# fi;
+
+ forsuffixes $ = 1,1',4,4',7,7': penpos$(min_breadth,0); endfor
+ forsuffixes $ = 2,3,5,6: penpos$(max_breadth,0); endfor
+ x2=x3=x5=x6; x1=x1'=x7=x7'=w-x4=w-x4';
+ lft x4l=1.5u#-.5min_breadth; lft x2l=.5w-.5max_breadth;
+ top y1=h; bot y7=1-d; .5[y4,y4']=.5[y1,y7]=.5[y2,y6]=.5[y3,y5];
+ y1-y2=y3-y4=(y1-y4)/4;
+ y1-y1'=y4-y4'=y7'-y7=min_breadth-fine#;
+
+ save mapto, n;
+ vardef mapto(text t) =
+ hide(numeric n; n:=0;
+ numeric x,x_[],y,y_[];
+ for z=t: z_[incr n]:=z; endfor;
+ transform T;
+ z_2 = z_1 transformed T;
+ z_4 = z_3 transformed T;
+ z_6 = z_5 transformed T;)
+ T
+ enddef;
+
+ % The bottom part of the brace
+
+ save bottom_part;
+ vardef bottom_part(expr T) =
+ filldraw (z6l{down}...{3(x7l-x6l),y7-y6}z7l
+ --z7r--z7'r{3(x6r-x7r),y6-y7'}...{up}z6r--z6l & cycle)
+ transformed T text_;
+ enddef;
+
+ save f;
+ vardef f(expr s) =
+ abs(point 0 of apth - (point s of apth + abs(x7-x6)
+ *(unitvector (direction s of apth) rotated 90)))
+ < abs(z7 - z6)
+ enddef;
+
+ save tolerence; tolerence := epsilon;
+ save s; numeric s;
+
+ save T; transform T; % transform for the bottom part
+ if arclength apth = 0:
+ T:=identity shifted (point (length apth) of apth - z7r);
+ elseif arclength apth < y1-y2+y3-y5+y6-y7:
+ T:=mapto(z6l,
+ .25[point 0 of apth, point (length apth) of apth]+
+ +abs(x7r-x6l)*(unitvector (point (length apth) of apth -
+ point 0 of apth) rotated 90),
+ z6r,
+ .25[point 0 of apth, point (length apth) of apth]+
+ +abs(x7r-x6r)*(unitvector (point (length apth) of apth -
+ point 0 of apth) rotated 90),
+ z7r,
+ point 0 of apth);
+ else:
+ s := solve f(0,length apth);
+ T := mapto(z6l,
+ point s of apth
+ +abs(x7r-x6l)
+ *(unitvector (direction s of apth) rotated 90),
+ z6r,
+ point s of apth
+ +abs(x7r-x6r)
+ *(unitvector (direction s of apth) rotated 90),
+ z7r,
+ point 0 of apth);
+ fi
+ bottom_part(T);
+
+ % The top part of the brace
+
+ save top_part;
+ vardef top_part(expr T) =
+ filldraw (z1l{3(x2l-x1l),y2-y1}...{down}z2l
+ --z2r{up}...{3(x1r-x2r),y1'-y2}z1'r--z1r--cycle)
+ transformed T text_;
+ enddef;
+
+ save g;
+ vardef g(expr t) =
+ abs(point (length apth) of apth
+ - (point t of apth + abs(x1r-x2)
+ *(unitvector (direction t of apth) rotated 90)))
+ < abs(z1r-z2)
+ enddef;
+
+ save t; numeric t;
+
+ transform T; % transform the top part
+ if arclength apth = 0:
+ T:=identity shifted (point (length apth) of apth - z1r);
+ elseif arclength apth < y1-y2+y3-y5+y6-y7:
+ T := mapto(z2l,
+ .75[point 0 of apth, point (length apth) of apth] +
+ abs(x1r-x2l)*(unitvector (point (length apth) of apth -
+ point 0 of apth) rotated 90),
+ z2r,
+ .75[point 0 of apth, point (length apth) of apth] +
+ abs(x1r-x2r)*(unitvector (point (length apth) of apth -
+ point 0 of apth) rotated 90),
+ z1r,
+ point (length apth) of apth);
+ else:
+ t := solve g(length apth,0);
+ T := mapto(z2l,
+ point t of apth
+ +abs(x1r-x2l)
+ *(unitvector (direction t of apth) rotated 90),
+ z2r,
+ point t of apth
+ +abs(x1r-x2r)
+ *(unitvector (direction t of apth) rotated 90),
+ z1r,
+ point (length apth) of apth);
+ fi
+ top_part(T);
+
+ % The lower part of the middle piece
+
+ save middle_part_bottom;
+ vardef middle_part_bottom(expr T) =
+ (.5[z4r,z4'r]{3(x5r-x4r),y5-.5[y4,y4']}...{down}z5r
+ --z5l{up}...{3(x4l-x5l),y4'-y5}z4'l) transformed T
+ enddef;
+
+ save ff;
+ vardef ff(expr ss) =
+ abs(point st of apth
+ +abs(x7r-x4)*(unitvector (direction st of apth) rotated 90)
+ -(point ss of apth + abs(x7r-x5)
+ *(unitvector (direction ss of apth) rotated 90)))
+ > abs(z4-z5)
+ enddef;
+
+ save ss; numeric ss;
+
+ if arclength apth = 0:
+ T:=identity shifted (point (length apth) of apth - z4'l);
+ elseif arclength apth < y1-y2+y3-y5+y6-y7:
+ T:=mapto(.5[z4r,z4'r],
+ .5[point 0 of apth, point (length apth) of apth]+
+ abs(x1r-.5[x4r,x4'r])
+ *(unitvector (point (length apth) of apth -
+ point 0 of apth) rotated 90),
+ z5l,
+ .25[point 0 of apth, point (length apth) of apth]+
+ abs(x1r-x5l)*(unitvector (point (length apth) of apth -
+ point 0 of apth) rotated 90),
+ z5r,
+ .25[point 0 of apth, point (length apth) of apth]+
+ abs(x1r-x5r)*(unitvector (point (length apth) of apth -
+ point 0 of apth) rotated 90));
+ else:
+ ss := solve ff(0,st);
+ T:=mapto(.5[z4r,z4'r],
+ point st of apth
+ +abs(x1r-.5[x4r,x4'r])
+ *(unitvector (direction st of apth) rotated 90),
+ z5l,
+ point ss of apth
+ +abs(x1r-x5l)
+ *(unitvector (direction ss of apth) rotated 90),
+ z5r,
+ point ss of apth
+ +abs(x1r-x5r)
+ *(unitvector (direction ss of apth) rotated 90));
+ fi
+
+ save pb; path pb;
+ pb:=middle_part_bottom(T);
+
+ % The upper part of the middle piece
+
+ save middle_part_top;
+ vardef middle_part_top(expr T) =
+ (z4l{3(x3l-x4l),y3-y4}...{up}z3l--z3r{down}
+ ...{3(x4r-x3r),.5[y4,y4']-y3}.5[z4r,z4'r]) transformed T
+ enddef;
+
+ save gg;
+ vardef gg(expr tt) =
+ abs(point st of apth
+ +abs(x1r-x4)*(unitvector (direction st of apth) rotated 90)
+ -(point tt of apth + abs(x1r-x3)
+ *(unitvector (direction tt of apth) rotated 90)))
+ > abs(z3-z4)
+ enddef;
+
+ save tt; numeric tt;
+
+ if arclength apth = 0:
+ T:=identity shifted (point (length apth) of apth - z4l);
+ elseif arclength apth < y1-y2+y3-y5+y6-y7:
+ T:=mapto(.5[z4r,z4'r],
+ .5[point 0 of apth, point (length apth) of apth]+
+ abs(x1r-.5[x4r,x4'r])
+ *(unitvector (point (length apth) of apth -
+ point 0 of apth) rotated 90),
+ z3l,
+ .75[point 0 of apth, point (length apth) of apth]+
+ abs(x1r-x3l)*(unitvector (point (length apth) of apth -
+ point 0 of apth) rotated 90),
+ z3r,
+ .75[point 0 of apth, point (length apth) of apth]+
+ abs(x1r-x3r)*(unitvector (point (length apth) of apth -
+ point 0 of apth) rotated 90));
+ else:
+ tt := solve gg(length apth, st);
+ T := mapto(.5[z4r,z4'r],
+ point st of apth
+ +abs(x1r-.5[x4r,x4'r])
+ *(unitvector (direction st of apth) rotated 90),
+ z3l,
+ point tt of apth
+ +abs(x1r-x3l)
+ *(unitvector (direction tt of apth) rotated 90),
+ z3r,
+ point tt of apth
+ +abs(x1r-x3r)
+ *(unitvector (direction tt of apth) rotated 90));
+ fi
+
+ save ptt; path ptt;
+ ptt:=middle_part_top(T);
+
+ filldraw pb--ptt--cycle text_;
+
+ % The extension parts
+
+ save extension_part, stp;
+ vardef extension_part(expr ss,tt) =
+ numeric stp; stp:=(ss-tt) div 5pt;
+ if stp=0: stp:=1; fi
+ stp:=(ss-tt)/stp;
+
+ pickup pencircle scaled (x5r-x5l+fine#);
+
+ if stp > 0:
+ draw for uu=ss step stp until tt-stp:
+ point uu of apth + abs(x1r-x6)
+ *(unitvector (direction uu of apth) rotated 90)
+ {direction uu of apth} ..
+ endfor
+ {direction tt of apth}
+ point tt of apth + abs(x1r-x6)
+ *(unitvector (direction tt of apth) rotated 90) text_;
+ fi
+ enddef;
+
+ if arclength apth > y1-y2+y3-y5+y6-y7:
+ extension_part(s,ss); extension_part(tt,t);
+ fi
+
+ pickup prevpen;
+
+ enddef;
+
+enddef;
+
diff --git a/Master/texmf-dist/metapost/cmarrows/tgbx0004.mp b/Master/texmf-dist/metapost/cmarrows/tgbx0004.mp
new file mode 100644
index 00000000000..ec0b4d7d700
--- /dev/null
+++ b/Master/texmf-dist/metapost/cmarrows/tgbx0004.mp
@@ -0,0 +1,325 @@
+%% tgbx0004.mp
+%% Copyright 2006 Tommy Ekola <tek@kth.se>
+%
+% This work may be distributed and/or modified under the conditions of
+% the LaTeX Project Public License, either version 1.3 of this license
+% or (at your option) any later version. The latest version of this
+% license is in http://www.latex-project.org/lppl.txt
+%
+% This work has the LPPL maintenance status `maintained'. The Current
+% Maintainer of this work is Tommy Ekola. The Base Interpreter is
+% MetaPost.
+
+vardef setup_biggbrace (expr source_file, cmdname) =
+
+ scantokens ("input tgbx0000");
+
+ scantokens ("input " & source_file);
+
+ expandafter def scantokens cmdname expr p =
+ scantokens (cmdname & "__tgbxww")(p)
+ enddef;
+
+ expandafter vardef scantokens (cmdname & "__tgbxww " & "(expr apth) " &
+ "text text_ = " &
+
+ "save u, designsize, curve, stem, hair, rule_thickness, eps, fine, " &
+ "fudge;" &
+
+ "u# := " & decimal u# & ";" &
+ "designsize := " & decimal designsize & ";" &
+ "curve# := " & decimal curve# & ";" &
+ "stem# := " & decimal stem# & ";" &
+ "hair# := " & decimal hair# & ";" &
+ "rule_thickness# := " & decimal rule_thickness# & ";" &
+ "eps := " & decimal eps & ";" &
+ "fine# := " & decimal fine# & ";" &
+ "fudge := " & decimal fudge & ";" &
+
+ % Time for middle piece
+
+ "save st; numeric st;" &
+ "if unknown " & cmdname & "_middle_time:" &
+ " st := arctime (arclength apth)/2 of apth;" &
+ "else: st:=" & cmdname & "_middle_time; fi")
+
+ save prevpen;
+ prevpen:=savepen;
+
+ save w; numeric w; w:=11u#;
+ save h; numeric h; h:=rule_thickness#;
+ save dh; numeric dh; dh:=0.6designsize;
+ save dw; numeric dw; dw:=curve#-stem#;
+ save d; numeric d; d :=4dh-rule_thickness#;
+ save bold; numeric bold; bold:=curve#;
+ save min_breadth; numeric min_breadth;
+ min_breadth:=rule_thickness#+.2dw;
+ save max_breadth; numeric max_breadth;
+ max_breadth:=bold;
+
+ save x,y;
+ numeric x[],x[]',x[]l,x[]'l,x[]r,x[]'r,
+ y[],y[]',y[]l,y[]'l,y[]r,y[]'r;
+
+ if fine#>fudge*hair#:
+ fine#:=fudge*hair#;
+ fi
+ pickup if fine#=0: nullpen else: pencircle scaled fine# fi;
+
+ forsuffixes $ = 1,1',4,4',7,7': penpos$(min_breadth,0); endfor
+ forsuffixes $ = 2,3,5,6: penpos$(max_breadth,0); endfor
+ x2=x3=x5=x6; x1=x1'=x7=x7'=w-x4=w-x4';
+ lft x4l=1.5u#-.5min_breadth; lft x2l=.5w-.5max_breadth;
+ top y1=h; bot y7=1-d; .5[y4,y4']=.5[y1,y7]=.5[y2,y6]=.5[y3,y5];
+ y1-y2=y3-y4=(y1-y4)/4;
+ y1-y1'=y4-y4'=y7'-y7=min_breadth-fine#;
+
+ save mapto, n;
+ vardef mapto(text t) =
+ hide(numeric n; n:=0;
+ numeric x,x_[],y,y_[];
+ for z=t: z_[incr n]:=z; endfor;
+ transform T;
+ z_2 = z_1 transformed T;
+ z_4 = z_3 transformed T;
+ z_6 = z_5 transformed T;)
+ T
+ enddef;
+
+ % The bottom part of the brace
+
+ save bottom_part;
+ vardef bottom_part(expr T) =
+ filldraw (z6l{down}...{3(x7l-x6l),y7-y6}z7l
+ --z7r--z7'r{3(x6r-x7r),y6-y7'}...{up}z6r--z6l & cycle)
+ transformed T text_;
+ enddef;
+
+ save f;
+ vardef f(expr s) =
+ abs(point 0 of apth - (point s of apth + abs(x7-x6)
+ *(unitvector (direction s of apth) rotated 90)))
+ < abs(z7 - z6)
+ enddef;
+
+ save tolerence; tolerence := epsilon;
+ save s; numeric s;
+
+ save T; transform T; % transform for the bottom part
+ if arclength apth = 0:
+ T:=identity shifted (point (length apth) of apth - z7r);
+ elseif arclength apth < y1-y2+y3-y5+y6-y7:
+ T:=mapto(z6l,
+ .25[point 0 of apth, point (length apth) of apth]+
+ +abs(x7r-x6l)*(unitvector (point (length apth) of apth -
+ point 0 of apth) rotated 90),
+ z6r,
+ .25[point 0 of apth, point (length apth) of apth]+
+ +abs(x7r-x6r)*(unitvector (point (length apth) of apth -
+ point 0 of apth) rotated 90),
+ z7r,
+ point 0 of apth);
+ else:
+ s := solve f(0,length apth);
+ T := mapto(z6l,
+ point s of apth
+ +abs(x7r-x6l)
+ *(unitvector (direction s of apth) rotated 90),
+ z6r,
+ point s of apth
+ +abs(x7r-x6r)
+ *(unitvector (direction s of apth) rotated 90),
+ z7r,
+ point 0 of apth);
+ fi
+ bottom_part(T);
+
+ % The top part of the brace
+
+ save top_part;
+ vardef top_part(expr T) =
+ filldraw (z1l{3(x2l-x1l),y2-y1}...{down}z2l
+ --z2r{up}...{3(x1r-x2r),y1'-y2}z1'r--z1r--cycle)
+ transformed T text_;
+ enddef;
+
+ save g;
+ vardef g(expr t) =
+ abs(point (length apth) of apth
+ - (point t of apth + abs(x1r-x2)
+ *(unitvector (direction t of apth) rotated 90)))
+ < abs(z1r-z2)
+ enddef;
+
+ save t; numeric t;
+
+ transform T; % transform the top part
+ if arclength apth = 0:
+ T:=identity shifted (point (length apth) of apth - z1r);
+ elseif arclength apth < y1-y2+y3-y5+y6-y7:
+ T := mapto(z2l,
+ .75[point 0 of apth, point (length apth) of apth] +
+ abs(x1r-x2l)*(unitvector (point (length apth) of apth -
+ point 0 of apth) rotated 90),
+ z2r,
+ .75[point 0 of apth, point (length apth) of apth] +
+ abs(x1r-x2r)*(unitvector (point (length apth) of apth -
+ point 0 of apth) rotated 90),
+ z1r,
+ point (length apth) of apth);
+ else:
+ t := solve g(length apth,0);
+ T := mapto(z2l,
+ point t of apth
+ +abs(x1r-x2l)
+ *(unitvector (direction t of apth) rotated 90),
+ z2r,
+ point t of apth
+ +abs(x1r-x2r)
+ *(unitvector (direction t of apth) rotated 90),
+ z1r,
+ point (length apth) of apth);
+ fi
+ top_part(T);
+
+ % The lower part of the middle piece
+
+ save middle_part_bottom;
+ vardef middle_part_bottom(expr T) =
+ (.5[z4r,z4'r]{3(x5r-x4r),y5-.5[y4,y4']}...{down}z5r
+ --z5l{up}...{3(x4l-x5l),y4'-y5}z4'l) transformed T
+ enddef;
+
+ save ff;
+ vardef ff(expr ss) =
+ abs(point st of apth
+ +abs(x7r-x4)*(unitvector (direction st of apth) rotated 90)
+ -(point ss of apth + abs(x7r-x5)
+ *(unitvector (direction ss of apth) rotated 90)))
+ > abs(z4-z5)
+ enddef;
+
+ save ss; numeric ss;
+
+ if arclength apth = 0:
+ T:=identity shifted (point (length apth) of apth - z4'l);
+ elseif arclength apth < y1-y2+y3-y5+y6-y7:
+ T:=mapto(.5[z4r,z4'r],
+ .5[point 0 of apth, point (length apth) of apth]+
+ abs(x1r-.5[x4r,x4'r])
+ *(unitvector (point (length apth) of apth -
+ point 0 of apth) rotated 90),
+ z5l,
+ .25[point 0 of apth, point (length apth) of apth]+
+ abs(x1r-x5l)*(unitvector (point (length apth) of apth -
+ point 0 of apth) rotated 90),
+ z5r,
+ .25[point 0 of apth, point (length apth) of apth]+
+ abs(x1r-x5r)*(unitvector (point (length apth) of apth -
+ point 0 of apth) rotated 90));
+ else:
+ ss := solve ff(0,st);
+ T:=mapto(.5[z4r,z4'r],
+ point st of apth
+ +abs(x1r-.5[x4r,x4'r])
+ *(unitvector (direction st of apth) rotated 90),
+ z5l,
+ point ss of apth
+ +abs(x1r-x5l)
+ *(unitvector (direction ss of apth) rotated 90),
+ z5r,
+ point ss of apth
+ +abs(x1r-x5r)
+ *(unitvector (direction ss of apth) rotated 90));
+ fi
+
+ save pb; path pb;
+ pb:=middle_part_bottom(T);
+
+ % The upper part of the middle piece
+
+ save middle_part_top;
+ vardef middle_part_top(expr T) =
+ (z4l{3(x3l-x4l),y3-y4}...{up}z3l--z3r{down}
+ ...{3(x4r-x3r),.5[y4,y4']-y3}.5[z4r,z4'r]) transformed T
+ enddef;
+
+ save gg;
+ vardef gg(expr tt) =
+ abs(point st of apth
+ +abs(x1r-x4)*(unitvector (direction st of apth) rotated 90)
+ -(point tt of apth + abs(x1r-x3)
+ *(unitvector (direction tt of apth) rotated 90)))
+ > abs(z3-z4)
+ enddef;
+
+ save tt; numeric tt;
+ if arclength apth = 0:
+ T:=identity shifted (point (length apth) of apth - z4l);
+ elseif arclength apth < y1-y2+y3-y5+y6-y7:
+ T:=mapto(.5[z4r,z4'r],
+ .5[point 0 of apth, point (length apth) of apth]+
+ abs(x1r-.5[x4r,x4'r])
+ *(unitvector (point (length apth) of apth -
+ point 0 of apth) rotated 90),
+ z3l,
+ .75[point 0 of apth, point (length apth) of apth]+
+ abs(x1r-x3l)*(unitvector (point (length apth) of apth -
+ point 0 of apth) rotated 90),
+ z3r,
+ .75[point 0 of apth, point (length apth) of apth]+
+ abs(x1r-x3r)*(unitvector (point (length apth) of apth -
+ point 0 of apth) rotated 90));
+ else:
+ tt := solve gg(length apth, st);
+ T := mapto(.5[z4r,z4'r],
+ point st of apth
+ +abs(x1r-.5[x4r,x4'r])
+ *(unitvector (direction st of apth) rotated 90),
+ z3l,
+ point tt of apth
+ +abs(x1r-x3l)
+ *(unitvector (direction tt of apth) rotated 90),
+ z3r,
+ point tt of apth
+ +abs(x1r-x3r)
+ *(unitvector (direction tt of apth) rotated 90));
+ fi
+
+ save ptt; path ptt;
+ ptt:=middle_part_top(T);
+
+ filldraw pb--ptt--cycle text_;
+
+ % The extension parts
+
+ save extension_part, stp;
+ vardef extension_part(expr ss,tt) =
+ numeric stp; stp:=(ss-tt) div 5pt;
+ if stp=0: stp:=1; fi
+ stp:=(ss-tt)/stp;
+
+ pickup pencircle scaled (x5r-x5l+fine#);
+
+ if stp > 0:
+ draw for uu=ss step stp until tt-stp:
+ point uu of apth + abs(x1r-x6)
+ *(unitvector (direction uu of apth) rotated 90)
+ {direction uu of apth} ..
+ endfor
+ {direction tt of apth}
+ point tt of apth + abs(x1r-x6)
+ *(unitvector (direction tt of apth) rotated 90) text_;
+ fi
+ enddef;
+
+ if arclength apth > y1-y2+y3-y5+y6-y7:
+ extension_part(s,ss); extension_part(tt,t);
+ fi
+
+ pickup prevpen;
+
+ enddef;
+
+enddef;
+
diff --git a/Master/texmf-dist/metapost/cmarrows/tgbx0005.mp b/Master/texmf-dist/metapost/cmarrows/tgbx0005.mp
new file mode 100644
index 00000000000..6e5c14634c7
--- /dev/null
+++ b/Master/texmf-dist/metapost/cmarrows/tgbx0005.mp
@@ -0,0 +1,336 @@
+%% tgbx0005.mp
+%% Copyright 2006 Tommy Ekola <tek@kth.se>
+%
+% This work may be distributed and/or modified under the conditions of
+% the LaTeX Project Public License, either version 1.3 of this license
+% or (at your option) any later version. The latest version of this
+% license is in http://www.latex-project.org/lppl.txt
+%
+% This work has the LPPL maintenance status `maintained'. The Current
+% Maintainer of this work is Tommy Ekola. The Base Interpreter is
+% MetaPost.
+
+vardef setup_extensiblebrace (expr source_file, cmdname) =
+
+ scantokens ("input tgbx0000");
+
+ scantokens ("input " & source_file);
+
+ expandafter def scantokens cmdname expr p =
+ scantokens (cmdname & "__tgbxww")(p)
+ enddef;
+
+ expandafter vardef scantokens (cmdname & "__tgbxww " & "(expr apth) " &
+ "text text_ = " &
+
+ "save u, designsize, curve, stem, hair, rule_thickness, eps, fine, " &
+ "fudge;" &
+
+ "u# := " & decimal u# & ";" &
+ "designsize := " & decimal designsize & ";" &
+ "curve# := " & decimal curve# & ";" &
+ "stem# := " & decimal stem# & ";" &
+ "hair# := " & decimal hair# & ";" &
+ "rule_thickness# := " & decimal rule_thickness# & ";" &
+ "eps := " & decimal eps & ";" &
+ "fine# := " & decimal fine# & ";" &
+ "fudge := " & decimal fudge & ";" &
+
+ % Time for middle piece
+
+ "save st; numeric st;" &
+ "if unknown " & cmdname & "_middle_time:" &
+ " st := arctime (arclength apth)/2 of apth;" &
+ "else: st:=" & cmdname & "_middle_time; fi")
+
+ save prevpen;
+ prevpen:=savepen;
+
+ save w; numeric w; w :=12u#;
+ save h; numeric h; h :=0;
+ save dh; numeric dh; dh:=0.6designsize;
+ save dw; numeric dw; dw:=curve#-stem#;
+ save d; numeric d; d :=1.5dh;
+ save min_breadth; numeric min_breadth#;
+ min_breadth#:=rule_thickness#+0.6dw;
+ save heavy_rule_thickness; numeric heavy_rule_thickness#;
+ heavy_rule_thickness#:=3rule_thickness#;
+
+ save x,y;
+ numeric x[],x[]',x[]l,x[]'l,x[]r,x[]'r,
+ y[],y[]',y[]l,y[]'l,y[]r,y[]'r;
+
+ if fine#>fudge*hair#:
+ fine#:=fudge*hair#;
+ fi
+ pickup if fine#=0: nullpen else: pencircle scaled fine# fi;
+
+ penpos7(min_breadth#,0); penpos7'(min_breadth#,0);
+ penpos6(heavy_rule_thickness#,0);
+ rt x7r = rt x7'r = w-1.5u#+.5min_breadth#;
+ lft x6l = .5w-.5heavy_rule_thickness#;
+ bot y7 = -d; y6 = .5[h+eps,y7]; y7'-y7 = min_breadth#-fine#;
+
+ penpos1(min_breadth#,0); penpos1'(min_breadth#,0);
+ penpos2(heavy_rule_thickness#,0);
+ rt x1r = rt x1'r = w-1.5u#+.5min_breadth#;
+ lft x2 = .5w;
+ top y1 = h; y2 = .5[y1,-d-eps]; y1-y1' = min_breadth#-fine#;
+
+ penpos4'(min_breadth#,0); penpos4(min_breadth#,0);
+ penpos5(heavy_rule_thickness#,0);
+ penpos3(heavy_rule_thickness#,0);
+ lft x4l=lft x4'l=1.5u#-.5min_breadth#;
+ lft x5l=.5w-.5heavy_rule_thickness#;
+ y4'-y5=(h+2d+2eps)/4;
+ y4-y4'=min_breadth#-fine#; y4=0;
+ lft x3l = .5w-.5heavy_rule_thickness#;
+ y3-y4 = (h+2d+2eps)/4;
+
+ save mapto, n;
+ vardef mapto(text t) =
+ hide(numeric n; n:=0;
+ numeric x,x_[],y,y_[];
+ for z=t: z_[incr n]:=z; endfor;
+ transform T;
+ z_2 = z_1 transformed T;
+ z_4 = z_3 transformed T;
+ z_6 = z_5 transformed T;)
+ T
+ enddef;
+
+ % The bottom part of the brace
+
+ save bottom_part;
+ vardef bottom_part(expr T) =
+ filldraw (z6l{down}...{3(x7l-x6l),y7-y6}z7l
+ --z7r--z7'r{3(x6r-x7r),y6-y7'}...{up}z6r--z6l & cycle)
+ transformed T text_;
+ enddef;
+
+ save f;
+ vardef f(expr s) =
+ abs(point 0 of apth - (point s of apth + (.5w-1.5u#+.5min_breadth#)
+ *(unitvector (direction s of apth) rotated 90)))
+ < ((d/2) ++ (.5w-1.5u#+.5min_breadth#))
+ enddef;
+
+ save tolerence; tolerence := epsilon;
+ save s; numeric s;
+
+ save T; transform T; % transform for the bottom part
+ if arclength apth = 0:
+ T:=identity shifted (point (length apth) of apth - z7r);
+ elseif arclength apth < y1-y2+y3-y5+y6-y7:
+ T:=mapto(z6l,
+ .25[point 0 of apth, point (length apth) of apth]+
+ +abs(x7r-x6l)*(unitvector (point (length apth) of apth -
+ point 0 of apth) rotated 90),
+ z6r,
+ .25[point 0 of apth, point (length apth) of apth]+
+ +abs(x7r-x6r)*(unitvector (point (length apth) of apth -
+ point 0 of apth) rotated 90),
+ z7r,
+ point 0 of apth);
+ else:
+ s := solve f(0,length apth);
+ T := mapto(z6l,
+ point s of apth
+ +(.5w-1.5u#+.5min_breadth#+.5heavy_rule_thickness#)
+ *(unitvector (direction s of apth) rotated 90),
+ z6r,
+ point s of apth
+ +(.5w-1.5u#+.5min_breadth#-.5heavy_rule_thickness#)
+ *(unitvector (direction s of apth) rotated 90),
+ z7r,
+ point 0 of apth);
+ fi
+ bottom_part(T);
+
+ % The top part of the brace
+
+ save top_part;
+ vardef top_part(expr T) =
+ filldraw (z1l{3(x2l-x1l),y2-y1}...{down}z2l
+ --z2r{up}...{3(x1r-x2r),y1'-y2}z1'r--z1r--cycle)
+ transformed T text_;
+ enddef;
+
+ save g;
+ vardef g(expr t) =
+ abs(point (length apth) of apth
+ - (point t of apth + (.5w-1.5u#+.5min_breadth#)
+ *(unitvector (direction t of apth) rotated 90)))
+ < ((d/2) ++ (.5w-1.5u#+.5min_breadth#))
+ enddef;
+
+ save t; numeric t;
+
+ transform T; % transform the top part
+ if arclength apth = 0:
+ T:=identity shifted (point (length apth) of apth - z1r);
+ elseif arclength apth < y1-y2+y3-y5+y6-y7:
+ T := mapto(z2l,
+ .75[point 0 of apth, point (length apth) of apth] +
+ abs(x1r-x2l)*(unitvector (point (length apth) of apth -
+ point 0 of apth) rotated 90),
+ z2r,
+ .75[point 0 of apth, point (length apth) of apth] +
+ abs(x1r-x2r)*(unitvector (point (length apth) of apth -
+ point 0 of apth) rotated 90),
+ z1r,
+ point (length apth) of apth);
+ else:
+ t := solve g(length apth,0);
+ T := mapto(z2l,
+ point t of apth
+ +(.5w-1.5u#+.5min_breadth#+.5heavy_rule_thickness#)
+ *(unitvector (direction t of apth) rotated 90),
+ z2r,
+ point t of apth
+ +(.5w-1.5u#+.5min_breadth#-.5heavy_rule_thickness#)
+ *(unitvector (direction t of apth) rotated 90),
+ z1r,
+ point (length apth) of apth);
+ fi
+ top_part(T);
+
+ % The lower part of the middle piece
+
+ save middle_part_bottom;
+ vardef middle_part_bottom(expr T) =
+ (.5[z4r,z4'r]{3(x5r-x4r),y5-.5[y4,y4']}...{down}z5r
+ --z5l{up}...{3(x4l-x5l),y4'-y5}z4'l) transformed T
+ enddef;
+
+ save ff;
+ vardef ff(expr ss) =
+ abs(point st of apth
+ +(w-3u#)*(unitvector (direction st of apth) rotated 90)
+ -(point ss of apth + (.5w-1.5u#+.5min_breadth#)
+ *(unitvector (direction ss of apth) rotated 90)))
+ > ((h+2d+2eps)/4+(min_breadth#-fine#)/2) ++ (.5w-1.5u#-.5min_breadth#)
+ enddef;
+
+ save ss; numeric ss;
+
+ if arclength apth = 0:
+ T:=identity shifted (point (length apth) of apth - z4'l);
+ elseif arclength apth < y1-y2+y3-y5+y6-y7:
+ T:=mapto(.5[z4r,z4'r],
+ .5[point 0 of apth, point (length apth) of apth]+
+ abs(x1r-.5[x4r,x4'r])
+ *(unitvector (point (length apth) of apth -
+ point 0 of apth) rotated 90),
+ z5l,
+ .25[point 0 of apth, point (length apth) of apth]+
+ abs(x1r-x5l)*(unitvector (point (length apth) of apth -
+ point 0 of apth) rotated 90),
+ z5r,
+ .25[point 0 of apth, point (length apth) of apth]+
+ abs(x1r-x5r)*(unitvector (point (length apth) of apth -
+ point 0 of apth) rotated 90));
+ else:
+ ss := solve ff(0,st);
+ T:=mapto(.5[z4r,z4'r],
+ point st of apth
+ +(w-3u#)*(unitvector (direction st of apth) rotated 90),
+ z5l,
+ point ss of apth
+ +(.5w-1.5u#+.5min_breadth#+.5heavy_rule_thickness#)
+ *(unitvector (direction ss of apth) rotated 90),
+ z5r,
+ point ss of apth
+ +(.5w-1.5u#+.5min_breadth#-.5heavy_rule_thickness#)
+ *(unitvector (direction ss of apth) rotated 90));
+ fi
+
+ save pb; path pb;
+ pb:=middle_part_bottom(T);
+
+ % The upper part of the middle piece
+
+ save middle_part_top;
+ vardef middle_part_top(expr T) =
+ (z4l{3(x3l-x4l),y3-y4}...{up}z3l--z3r{down}
+ ...{3(x4r-x3r),.5[y4,y4']-y3}.5[z4r,z4'r]) transformed T
+ enddef;
+
+ save gg;
+ vardef gg(expr tt) =
+ abs(point st of apth
+ +(w-3u#)*(unitvector (direction st of apth) rotated 90)
+ -(point tt of apth + (.5w-1.5u#+.5min_breadth#)
+ *(unitvector (direction tt of apth) rotated 90)))
+ > ((h+2d+2eps)/4+(min_breadth#-fine#)/2) ++ (.5w-1.5u#-.5min_breadth#)
+ enddef;
+
+ save tt; numeric tt;
+
+ if arclength apth = 0:
+ T:=identity shifted (point (length apth) of apth - z4l);
+ elseif arclength apth < y1-y2+y3-y5+y6-y7:
+ T:=mapto(.5[z4r,z4'r],
+ .5[point 0 of apth, point (length apth) of apth]+
+ abs(x1r-.5[x4r,x4'r])
+ *(unitvector (point (length apth) of apth -
+ point 0 of apth) rotated 90),
+ z3l,
+ .75[point 0 of apth, point (length apth) of apth]+
+ abs(x1r-x3l)*(unitvector (point (length apth) of apth -
+ point 0 of apth) rotated 90),
+ z3r,
+ .75[point 0 of apth, point (length apth) of apth]+
+ abs(x1r-x3r)*(unitvector (point (length apth) of apth -
+ point 0 of apth) rotated 90));
+ else:
+ tt := solve gg(length apth, st);
+ T := mapto(.5[z4r,z4'r],
+ point st of apth
+ +(w-3u#)*(unitvector (direction st of apth) rotated 90),
+ z3l,
+ point tt of apth
+ +(.5w-1.5u#+.5min_breadth#+.5heavy_rule_thickness#)
+ *(unitvector (direction tt of apth) rotated 90),
+ z3r,
+ point tt of apth
+ +(.5w-1.5u#+.5min_breadth#-.5heavy_rule_thickness#)
+ *(unitvector (direction tt of apth) rotated 90));
+ fi
+
+ save ptt; path ptt;
+ ptt:=middle_part_top(T);
+
+ filldraw pb--ptt--cycle text_;
+
+ % The extension parts
+
+ save extension_part;
+ vardef extension_part(expr ss,tt) =
+ numeric stp; stp:=(ss-tt) div 5pt;
+ if stp=0: stp:=1; fi
+ stp:=(ss-tt)/stp;
+
+ pickup pencircle scaled (heavy_rule_thickness#+fine#);
+
+ if stp>0:
+ draw for uu=ss step stp until tt-stp:
+ point uu of apth + (.5w-1.5u#+.5min_breadth#)
+ *(unitvector (direction uu of apth) rotated 90)
+ {direction uu of apth} ..
+ endfor
+ {direction tt of apth}
+ point tt of apth + (.5w-1.5u#+.5min_breadth#)
+ *(unitvector (direction tt of apth) rotated 90) text_;
+ fi
+ enddef;
+
+ if arclength apth > y1-y2+y3-y5+y6-y7:
+ extension_part(s,ss); extension_part(tt,t);
+ fi
+
+ pickup prevpen;
+
+ enddef;
+
+enddef;
diff --git a/Master/texmf-dist/metapost/cmarrows/tgbx0006.mp b/Master/texmf-dist/metapost/cmarrows/tgbx0006.mp
new file mode 100644
index 00000000000..fb135522d85
--- /dev/null
+++ b/Master/texmf-dist/metapost/cmarrows/tgbx0006.mp
@@ -0,0 +1,179 @@
+%% tgbx0006.mp
+%% Copyright 2006 Tommy Ekola <tek@kth.se>
+%
+% This work may be distributed and/or modified under the conditions of
+% the LaTeX Project Public License, either version 1.3 of this license
+% or (at your option) any later version. The latest version of this
+% license is in http://www.latex-project.org/lppl.txt
+%
+% This work has the LPPL maintenance status `maintained'. The Current
+% Maintainer of this work is Tommy Ekola. The Base Interpreter is
+% MetaPost.
+
+vardef setup_parallelarrows (expr source_file, cmdname) =
+
+ scantokens ("input tgbx0000");
+
+ scantokens ("input " & source_file);
+
+ expandafter def scantokens cmdname expr p =
+ scantokens (cmdname & "__tgbxww")(p)
+ enddef;
+
+ expandafter vardef scantokens (cmdname & "__tgbxww " & "(expr apth) " &
+ "text text_ = " &
+
+ "save math_spread, x_height, u, rule_thickness, bar, math_axis," &
+ " asc_height, eps, fudge, crisp, hair;" &
+
+ "math_spread :=" & decimal math_spread & ";" &
+ "x_height# :=" & decimal x_height# & ";" &
+ "u# :=" & decimal u# & ";" &
+ "rule_thickness# :=" & decimal rule_thickness# & ";" &
+ "bar# :=" & decimal bar# & ";" &
+ "math_axis# :=" & decimal math_axis# & ";" &
+ "asc_height# :=" & decimal asc_height# & ";" &
+ "eps :=" & decimal eps & ";" &
+ "fudge :=" & decimal fudge & ";" &
+ "crisp# :=" & decimal crisp# & ";" &
+ "hair# :=" & decimal hair# & ";")
+
+ save prevpen;
+ prevpen:=savepen;
+
+ save x,y;
+ numeric x[], x[]', x[]l, x[]'l, x[]r, x[]'r,
+ y[], y[]', y[]l, y[]'l, y[]r, y[]'r;
+
+ save spread, w;
+ numeric spread, w;
+
+ if crisp#>fudge*hair#:
+ crisp#:=fudge*hair#;
+ fi
+ pickup if crisp#=0: nullpen else: pencircle scaled crisp# fi;
+
+ spread = math_spread[.45x_height#, .55x_height#];
+ w = 18u#;
+
+ penpos1(rule_thickness#, 90); penpos2(rule_thickness#, 90);
+ penpos3(bar#, 0); penpos4(bar#, 0);
+ y0=y1=y2=math_axis#; x1-.5rule_thickness#=u#; rt x0=w-u#;
+ y3-y0=y0-y4=.24asc_height#+eps;
+ x3=x4=x0-3u#-eps;
+ penpos5(bar#, angle(z4-z0)); z5l=z0;
+ penpos6(bar#, angle(z3-z0)); z6l=z0;
+ z9=.381966[.5[z3,z4],z0];
+
+ save pp; path pp; pp = z4l{z9-z4}..z6r;
+ save t; numeric t; t = xpart(pp intersectiontimes ((0,y2l)--(w,y2l)));
+ x2=xpart point t of pp;
+
+ save texarrowhead;
+ vardef texarrowhead(expr T) =
+ filldraw (z0..{z4-z9}z4r--subpath(0,t) of pp
+ --z2l--z2r--subpath(t,0) of (z3l{z9-z3}..z5r)
+ --z3r{z9-z3}..z0 & cycle) transformed T text_;
+ enddef;
+
+ save mapto, n;
+ vardef mapto(text t) =
+ hide(numeric n; n:=0;
+ numeric x,x_[],y,y_[];
+ for z=t: z_[incr n]:=z; endfor;
+ transform T;
+ z_2 = z_1 transformed T;
+ z_4 = z_3 transformed T;
+ z_6 = z_5 transformed T;)
+ T
+ enddef;
+
+ save tt; numeric tt; tt = arctime(arclength apth - (x0-x3l)) of apth;
+ save ttt; numeric ttt; ttt = arctime(arclength apth - (x0-x2)) of apth;
+
+ save parallelline;
+ vardef parallelline expr ppp =
+ save s, stp;
+ numeric s, stp; stp:=(arclength ppp) div 5pt;
+ if stp=0: stp:=1; fi
+ stp:=(arclength ppp)/stp;
+
+ if stp>0:
+ draw for s=0 step stp until arclength ppp - stp:
+ point (arctime s of ppp) of ppp +
+ (.24asc_height#+eps)*(unitvector direction (arctime s of ppp)
+ of ppp rotated 90)
+ {direction (arctime s of ppp) of ppp}..
+ endfor
+ {direction (length ppp) of ppp}
+ point (length ppp) of ppp +
+ (.24asc_height#+eps)*(unitvector direction (length ppp)
+ of ppp rotated 90)
+ withpen pencircle scaled rule_thickness# text_;
+
+ draw for s=0 step stp until arclength ppp - stp:
+ point (arctime s of ppp) of ppp -
+ (.24asc_height#+eps)*(unitvector direction (arctime s of ppp)
+ of ppp rotated 90)
+ {direction (arctime s of ppp) of ppp}..
+ endfor
+ {direction (length ppp) of ppp}
+ point (length ppp) of ppp -
+ (.24asc_height#+eps)*(unitvector direction (length ppp)
+ of ppp rotated 90)
+ withpen pencircle scaled rule_thickness# text_;
+ fi
+ enddef;
+
+ if arclength apth > x0-x2: parallelline subpath(0,ttt) of apth; fi
+
+ save T; transform T;
+ if arclength apth = 0:
+ T:=identity shifted (point (length apth) of apth - z0)
+ shifted (0,.24asc_height#+eps);
+ elseif arclength apth < x0-x3l:
+ T:=identity rotatedaround(z0,angle (direction (length apth) of apth))
+ shifted (point (length apth) of apth - z0)
+ shifted ((.24asc_height#+eps)*
+ (unitvector (direction (length apth) of apth) rotated 90));
+ else:
+ T:=mapto(z0,
+ point (length apth) of apth +
+ (.24asc_height#+eps)*
+ (unitvector (direction (length apth) of apth) rotated 90),
+ z2,
+ point ttt of apth +
+ (.24asc_height#+eps)*
+ (unitvector (direction (length apth) of apth) rotated 90),
+ z3l,
+ point tt of apth);
+ fi
+ texarrowhead(T);
+
+ if arclength apth = 0:
+ T:=identity shifted (point (length apth) of apth - z0)
+ shifted (0,-.24asc_height#+eps);
+ elseif arclength apth < x0-x3l:
+ T:=identity rotatedaround(z0,angle (direction (length apth) of apth))
+ shifted (point (length apth) of apth - z0)
+ shifted ((.24asc_height#+eps)*
+ (unitvector (direction (length apth) of apth) rotated -90));
+ else:
+ T:=mapto(z0,
+ point (length apth) of apth -
+ (.24asc_height#+eps)*
+ (unitvector (direction (length apth) of apth) rotated 90),
+ z2,
+ point ttt of apth -
+ (.24asc_height#+eps)*
+ (unitvector (direction (length apth) of apth) rotated 90),
+ z4l,
+ point tt of apth);
+ fi
+ texarrowhead(T);
+
+ pickup prevpen;
+
+ enddef;
+
+enddef; \ No newline at end of file
diff --git a/Master/texmf-dist/metapost/cmarrows/tgbx0007.mp b/Master/texmf-dist/metapost/cmarrows/tgbx0007.mp
new file mode 100644
index 00000000000..27218cfff5a
--- /dev/null
+++ b/Master/texmf-dist/metapost/cmarrows/tgbx0007.mp
@@ -0,0 +1,140 @@
+%% tgbx0007.mp
+%% Copyright 2006 Tommy Ekola <tek@kth.se>
+%
+% This work may be distributed and/or modified under the conditions of
+% the LaTeX Project Public License, either version 1.3 of this license
+% or (at your option) any later version. The latest version of this
+% license is in http://www.latex-project.org/lppl.txt
+%
+% This work has the LPPL maintenance status `maintained'. The Current
+% Maintainer of this work is Tommy Ekola. The Base Interpreter is
+% MetaPost.
+
+vardef setup_twoheadarrow (expr source_file, cmdname) =
+
+ scantokens ("input tgbx0000");
+
+ scantokens ("input " & source_file);
+
+ expandafter def scantokens cmdname expr p =
+ scantokens (cmdname & "__tgbxww")(p)
+ enddef;
+
+ expandafter vardef scantokens (cmdname & "__tgbxww " & "(expr apth) " &
+ "text text_ = " &
+
+ "save math_spread, x_height, u, rule_thickness, bar, math_axis," &
+ " asc_height, eps, fudge, crisp, hair;" &
+
+ "math_spread :=" & decimal math_spread & ";" &
+ "x_height# :=" & decimal x_height# & ";" &
+ "u# :=" & decimal u# & ";" &
+ "rule_thickness# :=" & decimal rule_thickness# & ";" &
+ "bar# :=" & decimal bar# & ";" &
+ "math_axis# :=" & decimal math_axis# & ";" &
+ "asc_height# :=" & decimal asc_height# & ";" &
+ "eps :=" & decimal eps & ";" &
+ "fudge :=" & decimal fudge & ";" &
+ "crisp# :=" & decimal crisp# & ";" &
+ "hair# :=" & decimal hair# & ";")
+
+ save prevpen;
+ prevpen:=savepen;
+
+ save x,y;
+ numeric x[], x[]', x[]l, x[]'l, x[]r, x[]'r,
+ y[], y[]', y[]l, y[]'l, y[]r, y[]'r;
+ save spread, w;
+ numeric spread, w;
+
+ if crisp#>fudge*hair#:
+ crisp#:=fudge*hair#;
+ fi
+ pickup if crisp#=0: nullpen else: pencircle scaled crisp# fi;
+
+ spread = math_spread[.45x_height#, .55x_height#];
+ w = 18u#;
+
+ penpos1(rule_thickness#, 90); penpos2(rule_thickness#, 90);
+ penpos3(bar#, 0); penpos4(bar#, 0);
+ y0=y1=y2=math_axis#; x1-.5rule_thickness#=u#; rt x0=w-u#;
+ y3-y0=y0-y4=.24asc_height#+eps;
+ x3=x4=x0-3u#-eps;
+ penpos5(bar#, angle(z4-z0)); z5l=z0;
+ penpos6(bar#, angle(z3-z0)); z6l=z0;
+ z9=.381966[.5[z3,z4],z0];
+
+ save pp; path pp; pp = z4l{z9-z4}..z6r;
+ save t; numeric t; t = xpart(pp intersectiontimes ((0,y2l)--(w,y2l)));
+ x2=xpart point t of pp;
+
+ save texarrowhead;
+ vardef texarrowhead(expr T) =
+ filldraw (z0..{z4-z9}z4r--subpath(0,t) of pp
+ --z2l--z2r--subpath(t,0) of (z3l{z9-z3}..z5r)
+ --z3r{z9-z3}..z0 & cycle) transformed T text_;
+ enddef;
+
+ save mapto, n;
+ vardef mapto(text t) =
+ hide(numeric n; n:=0;
+ numeric x,x_[],y,y_[];
+ for z=t: z_[incr n]:=z; endfor;
+ transform T;
+ z_2 = z_1 transformed T;
+ z_4 = z_3 transformed T;
+ z_6 = z_5 transformed T;)
+ T
+ enddef;
+
+ save T; transform T;
+ save tt; numeric tt; tt = arctime(arclength apth - (x0-x9)) of apth;
+ save ttt; numeric ttt; ttt = arctime(arclength apth - (x0-x2)) of apth;
+
+ if arclength apth > x0-x2:
+ draw subpath(0,ttt) of apth
+ withpen pencircle scaled rule_thickness# text_;
+ fi
+
+ if arclength apth = 0:
+ T:=identity shifted (point (length apth) of apth - z0);
+ elseif arclength apth < x0-x3l:
+ T:=identity rotatedaround(z0,angle (direction (length apth) of apth))
+ shifted (point (length apth) of apth - z0);
+ else:
+ T:=mapto(z0,
+ point (length apth) of apth,
+ z2,
+ point ttt of apth,
+ z9+(0,3rule_thickness#),
+ point tt of apth + 3rule_thickness#*
+ (unitvector (direction tt of apth) rotated 90));
+ fi
+ texarrowhead(T);
+
+ tt :=arctime(arclength apth - (x0-x9) + (x3l-x0)) of apth;
+ ttt:=arctime(arclength apth - (x0-x2) + (x3l-x0)) of apth;
+ if arclength apth = 0:
+ T:=identity shifted (point 0 of apth - z0)
+ shifted (x3l-x0,0);
+ elseif arclength apth < x0-x3l+x0-x9:
+ T:=identity rotatedaround(z0,angle direction 0 of apth)
+ shifted ((x0-x3l)*
+ unitvector (point 0 of apth - point (length apth) of apth))
+ shifted ((point (length apth) of apth) - z0);
+ else:
+ T:=mapto(z0,
+ point (arctime((arclength apth)+(x3l-x0)) of apth) of apth,
+ z2,
+ point ttt of apth,
+ z9+(0,3rule_thickness#),
+ point tt of apth + 3rule_thickness#*
+ (unitvector (direction tt of apth) rotated 90));
+ fi
+ texarrowhead(T);
+
+ pickup prevpen;
+
+ enddef;
+
+enddef; \ No newline at end of file
diff --git a/Master/texmf-dist/metapost/cmarrows/tgbx0027.mp b/Master/texmf-dist/metapost/cmarrows/tgbx0027.mp
new file mode 100644
index 00000000000..6e024dc85d5
--- /dev/null
+++ b/Master/texmf-dist/metapost/cmarrows/tgbx0027.mp
@@ -0,0 +1,216 @@
+%% tgbx0027.mp
+%% Copyright 2006 Tommy Ekola <tek@kth.se>
+%
+% This work may be distributed and/or modified under the conditions of
+% the LaTeX Project Public License, either version 1.3 of this license
+% or (at your option) any later version. The latest version of this
+% license is in http://www.latex-project.org/lppl.txt
+%
+% This work has the LPPL maintenance status `maintained'. The Current
+% Maintainer of this work is Tommy Ekola. The Base Interpreter is
+% MetaPost.
+
+vardef setup_paren (expr source_file, cmdname) =
+
+ scantokens ("input tgbx0000");
+
+ scantokens ("input " & source_file);
+
+ expandafter def scantokens cmdname expr p =
+ scantokens (cmdname & "__tgbxww")(p)
+ enddef;
+
+ expandafter vardef scantokens (cmdname & "__tgbxww " & "(expr apth) " &
+ "text text_ = " &
+
+ "save u, designsize, curve, stem, rule_thickness, eps, fine, " &
+ " fudge, hair;" &
+
+ "u# := " & decimal u# & ";" &
+ "designsize := " & decimal designsize & ";" &
+ "curve# := " & decimal curve# & ";" &
+ "stem# := " & decimal stem# & ";" &
+ "rule_thickness# := " & decimal rule_thickness# & ";" &
+ "eps := " & decimal eps & ";" &
+ "fine# := " & decimal fine# & ";" &
+ "fudge := " & decimal fudge & ";" &
+ "hair# := " & decimal hair# & ";" &
+
+ % Time for middle piece
+
+ "save st; numeric st;" &
+ "if unknown " & cmdname & "_middle_time:" &
+ " st := arctime (arclength apth)/2 of apth;" &
+ "else: st:=" & cmdname & "_middle_time; fi")
+
+ save prevpen;
+ prevpen:=savepen;
+
+ save w; numeric w; w :=12u#;
+ save h; numeric h; h :=0;
+ save dh; numeric dh; dh:=0.6designsize;
+ save dw; numeric dw; dw:=curve#-stem#;
+ save d; numeric d; d :=1.5dh;
+ save bold; numeric bold; bold := curve#;
+ save min_breadth; numeric min_breadth;
+ min_breadth:=rule_thickness#+0.6dw;
+ save max_breadth; numeric max_breadth;
+ max_breadth:=bold+2dw;
+ save heavy_rule_thickness; numeric heavy_rule_thickness#;
+ heavy_rule_thickness#:=3rule_thickness#;
+
+ save x,y;
+ numeric x[],x[]',x[]l,x[]'l,x[]r,x[]'r,
+ y[],y[]',y[]l,y[]'l,y[]r,y[]'r;
+
+ if fine#>fudge*hair#:
+ fine# := fudge*hair#;
+ fi
+ pickup if fine#=0: nullpen else: pencircle scaled fine# fi;
+
+ penpos3(min_breadth,0); penpos4(max_breadth,0);
+ rt x3r = w-1.25u#+0.5min_breadth; lft x4l = 1.25u#;
+ bot y3=-d; y4=h;
+
+ penpos1(min_breadth,0); penpos2(max_breadth,0);
+ rt x1r = w-1.25u#+0.5min_breadth; lft x2l = 1.25u#;
+ top y1 = h; y2=-d;
+
+ save mapto, n;
+ vardef mapto(text t) =
+ hide(numeric n; n:=0;
+ numeric x,x_[],y,y_[];
+ for z=t: z_[incr n]:=z; endfor;
+ transform T;
+ z_2 = z_1 transformed T;
+ z_4 = z_3 transformed T;
+ z_6 = z_5 transformed T;)
+ T
+ enddef;
+
+ % The bottom part of the parenthesis
+
+ save bottom_part;
+ vardef bottom_part(expr T) =
+ filldraw (z3l{3(x4l-x3l),y4-y3}..{up}z4l
+ --reverse(z3r{3(x4r-x3r),y4-y3}..{up}z4r)
+ --cycle) transformed T text_;
+ enddef;
+
+ save f;
+ vardef f(expr s) =
+ abs(point 0 of apth - (point s of apth +
+ (w-2.5u#+0.5min_breadth+0.5*max_breadth)
+ *(unitvector (direction s of apth) rotated 90)))
+ < ((h+d) ++ (w-2.5u#+0.5min_breadth+0.5*max_breadth))
+ enddef;
+
+ save tolerence; tolerence:=epsilon;
+ save s; numeric s;
+
+ save T; transform T; % transform the bottom part
+ if arclength apth=0:
+ T := identity shifted (point (length apth) of apth - z3r);
+ elseif arclength apth < y1-y2+y4-y3:
+ T := mapto(z4l,
+ 0.5[point 0 of apth, point (length apth) of apth]
+ + abs(x3r-x4l)*(unitvector (point (length apth) of apth -
+ point 0 of apth) rotated 90),
+ z4r,
+ 0.5[point 0 of apth, point (length apth) of apth]
+ + abs(x3r-x4r)*(unitvector (point (length apth) of apth -
+ point 0 of apth) rotated 90),
+ z3r,
+ point 0 of apth);
+ else:
+ s := solve f(0,length apth);
+ T := mapto(z4l,
+ point s of apth + (w-2.5u#+0.5min_breadth+0.5max_breadth)
+ *(unitvector (direction s of apth) rotated 90),
+ z4r,
+ point s of apth + (w-2.5u#+0.5min_breadth-0.5max_breadth)
+ *(unitvector (direction s of apth) rotated 90),
+ z3r,
+ point 0 of apth);
+ fi;
+
+ bottom_part(T);
+
+ % The top part of the parenthesis
+
+ save top_part;
+ vardef top_part(expr T) =
+ filldraw (z1l{3(x2l-x1l),y2-y1}..{down}z2l
+ --reverse(z1r{3(x2r-x1r),y2-y1}..{down}z2r)
+ --cycle) transformed T text_;
+ enddef;
+
+ save g;
+ vardef g(expr t) =
+ abs(point (length apth) of apth - (point t of apth +
+ (w-2.5u#+0.5min_breadth+0.5max_breadth)
+ *(unitvector (direction s of apth) rotated 90)))
+ < ((h+d) ++ (w-2.5u#+0.5min_breadth+0.5max_breadth))
+ enddef;
+
+ save t; numeric t;
+ transform T; % transform the top part
+ if arclength apth = 0:
+ T := identity shifted (point (length apth) of apth - z1r);
+ elseif arclength apth < y1-y2+y4-y3:
+ T := mapto(z2l,
+ 0.5[point 0 of apth, point (length apth) of apth]
+ +abs(x1r-x2l)*(unitvector (point (length apth) of apth
+ - point 0 of apth) rotated 90),
+ z2r,
+ 0.5[point 0 of apth, point (length apth) of apth]
+ +abs(x1r-x2r)*(unitvector (point (length apth) of apth
+ - point 0 of apth) rotated 90),
+ z1r,
+ point (length apth) of apth);
+ else:
+ t := solve g(length apth, 0);
+ T := mapto(z2l,
+ point t of apth + (w-2.5u#+0.5min_breadth+0.5max_breadth)
+ *(unitvector (direction t of apth) rotated 90),
+ z2r,
+ point t of apth + (w-2.5u#+0.5min_breadth-0.5max_breadth)
+ *(unitvector (direction t of apth) rotated 90),
+ z1r,
+ point (length apth) of apth);
+ fi;
+
+ top_part(T);
+
+ % The extension part
+
+ save extension_part;
+ vardef extension_part(expr ss,tt) =
+ numeric stp; stp:=(ss-tt) div 5pt;
+ if stp=0: stp:=1; fi
+ stp:=(ss-tt)/stp;
+
+ pickup pencircle scaled heavy_rule_thickness#;
+
+ if stp>0:
+ draw for uu=ss step stp until tt-stp:
+ point uu of apth + (w-2.5u#+.5min_breadth)
+ *(unitvector (direction uu of apth) rotated 90)
+ {direction uu of apth} ..
+ endfor
+ {direction tt of apth}
+ point tt of apth + (w-2.5u#+.5min_breadth)
+ *(unitvector (direction tt of apth) rotated 90) text_;
+ fi
+ enddef;
+
+ if arclength apth > y1-y2+y4-y3:
+ extension_part(s,t);
+ fi
+
+ pickup prevpen;
+
+ enddef;
+
+enddef;
+ \ No newline at end of file
diff --git a/Master/texmf-dist/tpm/SIstyle.tpm b/Master/texmf-dist/tpm/SIstyle.tpm
index 4d518b6ae52..5cda2d53e06 100644
--- a/Master/texmf-dist/tpm/SIstyle.tpm
+++ b/Master/texmf-dist/tpm/SIstyle.tpm
@@ -9,7 +9,7 @@
<TPM:Title>The SIstyle package.</TPM:Title>
<TPM:Description></TPM:Description>
<TPM:Author></TPM:Author>
- <TPM:Size>1024507</TPM:Size>
+ <TPM:Size>1024508</TPM:Size>
<TPM:License></TPM:License>
<TPM:Build/>
<TPM:RunFiles size="13248">
diff --git a/Master/texmf-dist/tpm/arabi.tpm b/Master/texmf-dist/tpm/arabi.tpm
index cfc12877aed..975af464e3f 100644
--- a/Master/texmf-dist/tpm/arabi.tpm
+++ b/Master/texmf-dist/tpm/arabi.tpm
@@ -3,16 +3,16 @@
<rdf:Description about="http://texlive.dante.de/texlive/Package/arabi.zip">
<TPM:Name>arabi</TPM:Name>
<TPM:Type>Package</TPM:Type>
- <TPM:Date>2006/12/20 01:35:19</TPM:Date>
+ <TPM:Date>2006/12/23 23:41:15</TPM:Date>
<TPM:Version></TPM:Version>
<TPM:Creator>karl</TPM:Creator>
<TPM:Title>The arabi package.</TPM:Title>
<TPM:Description></TPM:Description>
<TPM:Author></TPM:Author>
- <TPM:Size>9688177</TPM:Size>
+ <TPM:Size>9688223</TPM:Size>
<TPM:License></TPM:License>
<TPM:Build/>
- <TPM:RunFiles size="3686156">
+ <TPM:RunFiles size="3685295">
texmf-dist/fonts/afm/arabi/arabeyes/ae_almohanad_boldItalitalic.afm
texmf-dist/fonts/afm/arabi/arabeyes/ae_almohanad_thin.afm
texmf-dist/fonts/afm/arabi/arabeyes/ae_almohanad_xxbold.afm
@@ -119,7 +119,6 @@ texmf-dist/tex/latex/arabi/arabicore.sty
texmf-dist/tex/latex/arabi/arabiftoday.sty
texmf-dist/tex/latex/arabi/arabnovowel.sty
texmf-dist/tex/latex/arabi/arfonts.sty
-texmf-dist/tex/latex/arabi/bblopts.cfg
texmf-dist/tex/latex/arabi/calendrierfpar.sty
texmf-dist/tex/latex/arabi/calendrierfpmodified.sty
texmf-dist/tex/latex/arabi/cp1256.def
@@ -206,8 +205,9 @@ texmf-dist/tex/latex/arabi/transcmr.fd
texmf-dist/tex/latex/arabi/translit.sty
texmf-dist/tpm/arabi.tpm
</TPM:RunFiles>
- <TPM:DocFiles size="6002067">
+ <TPM:DocFiles size="6002928">
texmf-dist/doc/latex/arabi/README
+texmf-dist/doc/latex/arabi/bblopts.cfg
texmf-dist/doc/latex/arabi/big2.pdf
texmf-dist/doc/latex/arabi/big2.tex
texmf-dist/doc/latex/arabi/fontchart_arabic.pdf
diff --git a/Master/texmf-dist/tpm/cmap.tpm b/Master/texmf-dist/tpm/cmap.tpm
index 00c67e6a9af..f76cddb4c8d 100644
--- a/Master/texmf-dist/tpm/cmap.tpm
+++ b/Master/texmf-dist/tpm/cmap.tpm
@@ -17,11 +17,13 @@ resolved in a future version of pdftex.
[description copied from TeX Catalogue]
</TPM:Description>
<TPM:Author></TPM:Author>
- <TPM:Size>15196</TPM:Size>
+ <TPM:Size>22168</TPM:Size>
<TPM:License></TPM:License>
<TPM:Build/>
- <TPM:RunFiles size="14031">
+ <TPM:RunFiles size="21003">
texmf-dist/tex/latex/cmap/cmap.sty
+texmf-dist/tex/latex/cmap/lae.cmap
+texmf-dist/tex/latex/cmap/lfe.cmap
texmf-dist/tex/latex/cmap/t1.cmap
texmf-dist/tex/latex/cmap/t2a.cmap
texmf-dist/tex/latex/cmap/t2b.cmap
diff --git a/Master/texmf-dist/tpm/cmarrows.tpm b/Master/texmf-dist/tpm/cmarrows.tpm
new file mode 100644
index 00000000000..4b39b1688b8
--- /dev/null
+++ b/Master/texmf-dist/tpm/cmarrows.tpm
@@ -0,0 +1,53 @@
+<!DOCTYPE rdf:RDF SYSTEM "../../support/tpm.dtd">
+<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:TPM="http://texlive.dante.de/">
+ <rdf:Description about="http://texlive.dante.de/texlive/Package/cmarrows.zip">
+ <TPM:Name>cmarrows</TPM:Name>
+ <TPM:Type>Package</TPM:Type>
+ <TPM:Date>2006/12/19 08:05:00</TPM:Date>
+ <TPM:Version></TPM:Version>
+ <TPM:Creator>karl</TPM:Creator>
+ <TPM:Title>The cmarrows package.</TPM:Title>
+ <TPM:Description></TPM:Description>
+ <TPM:Author></TPM:Author>
+ <TPM:Size>251621</TPM:Size>
+ <TPM:License></TPM:License>
+ <TPM:Build/>
+ <TPM:RunFiles size="200557">
+texmf-dist/metapost/cmarrows/cmarrows.mp
+texmf-dist/metapost/cmarrows/rgbx0009.mp
+texmf-dist/metapost/cmarrows/rgbx0016.mp
+texmf-dist/metapost/cmarrows/rgbx0020.mp
+texmf-dist/metapost/cmarrows/rgbx0025.mp
+texmf-dist/metapost/cmarrows/sgbx0008.mp
+texmf-dist/metapost/cmarrows/sgbx0010.mp
+texmf-dist/metapost/cmarrows/sgbx0011.mp
+texmf-dist/metapost/cmarrows/sgbx0012.mp
+texmf-dist/metapost/cmarrows/sgbx0013.mp
+texmf-dist/metapost/cmarrows/sgbx0014.mp
+texmf-dist/metapost/cmarrows/sgbx0015.mp
+texmf-dist/metapost/cmarrows/sgbx0017.mp
+texmf-dist/metapost/cmarrows/sgbx0018.mp
+texmf-dist/metapost/cmarrows/sgbx0019.mp
+texmf-dist/metapost/cmarrows/sgbx0021.mp
+texmf-dist/metapost/cmarrows/sgbx0022.mp
+texmf-dist/metapost/cmarrows/sgbx0023.mp
+texmf-dist/metapost/cmarrows/sgbx0024.mp
+texmf-dist/metapost/cmarrows/tgbx0000.mp
+texmf-dist/metapost/cmarrows/tgbx0001.mp
+texmf-dist/metapost/cmarrows/tgbx0002.mp
+texmf-dist/metapost/cmarrows/tgbx0003.mp
+texmf-dist/metapost/cmarrows/tgbx0004.mp
+texmf-dist/metapost/cmarrows/tgbx0005.mp
+texmf-dist/metapost/cmarrows/tgbx0006.mp
+texmf-dist/metapost/cmarrows/tgbx0007.mp
+texmf-dist/metapost/cmarrows/tgbx0027.mp
+texmf-dist/tpm/cmarrows.tpm
+ </TPM:RunFiles>
+ <TPM:DocFiles size="53097">
+texmf-dist/doc/metapost/cmarrows/README
+texmf-dist/doc/metapost/cmarrows/cmarrows.pdf
+ </TPM:DocFiles>
+ <TPM:Provides>Package/cmarrows</TPM:Provides>
+ </rdf:Description>
+</rdf:RDF>
+
diff --git a/Master/texmf-dist/tpm/context.tpm b/Master/texmf-dist/tpm/context.tpm
index 037b29d8899..8ac8ca38ccd 100644
--- a/Master/texmf-dist/tpm/context.tpm
+++ b/Master/texmf-dist/tpm/context.tpm
@@ -14,7 +14,7 @@ typeset chemical formulas.
[description copied from TeX Catalogue]
</TPM:Description>
<TPM:Author>Hans Hagen</TPM:Author>
- <TPM:Size>15025237</TPM:Size>
+ <TPM:Size>15025423</TPM:Size>
<TPM:License></TPM:License>
<TPM:Build/>
<TPM:RunFiles size="14552931">
diff --git a/Master/texmf-dist/tpm/eskdx.tpm b/Master/texmf-dist/tpm/eskdx.tpm
index dfe603cea04..c65fa723808 100644
--- a/Master/texmf-dist/tpm/eskdx.tpm
+++ b/Master/texmf-dist/tpm/eskdx.tpm
@@ -9,7 +9,7 @@
<TPM:Title>The eskdx package.</TPM:Title>
<TPM:Description></TPM:Description>
<TPM:Author></TPM:Author>
- <TPM:Size>1850702</TPM:Size>
+ <TPM:Size>1850703</TPM:Size>
<TPM:License></TPM:License>
<TPM:Build/>
<TPM:RunFiles size="119949">
diff --git a/Master/texmf-dist/tpm/euenc.tpm b/Master/texmf-dist/tpm/euenc.tpm
new file mode 100644
index 00000000000..9c0640c6a48
--- /dev/null
+++ b/Master/texmf-dist/tpm/euenc.tpm
@@ -0,0 +1,36 @@
+<!DOCTYPE rdf:RDF SYSTEM "../../support/tpm.dtd">
+<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:TPM="http://texlive.dante.de/">
+ <rdf:Description about="http://texlive.dante.de/texlive/Package/euenc.zip">
+ <TPM:Name>euenc</TPM:Name>
+ <TPM:Type>Package</TPM:Type>
+ <TPM:Date>2006/12/24 16:19:15</TPM:Date>
+ <TPM:Version></TPM:Version>
+ <TPM:Creator>karl</TPM:Creator>
+ <TPM:Title>The euenc package.</TPM:Title>
+ <TPM:Description></TPM:Description>
+ <TPM:Author></TPM:Author>
+ <TPM:Size>158968</TPM:Size>
+ <TPM:License></TPM:License>
+ <TPM:Build/>
+ <TPM:RunFiles size="7772">
+texmf-dist/tex/xelatex/euenc/eu1enc.def
+texmf-dist/tex/xelatex/euenc/lm/eu1lmr.fd
+texmf-dist/tex/xelatex/euenc/lm/eu1lmss.fd
+texmf-dist/tex/xelatex/euenc/lm/eu1lmssq.fd
+texmf-dist/tex/xelatex/euenc/lm/eu1lmtt.fd
+texmf-dist/tex/xelatex/euenc/lm/eu1lmvtt.fd
+texmf-dist/tpm/euenc.tpm
+ </TPM:RunFiles>
+ <TPM:DocFiles size="131155">
+texmf-dist/doc/xelatex/euenc/README
+texmf-dist/doc/xelatex/euenc/euenc.pdf
+texmf-dist/doc/xelatex/euenc/test-eu1lm.ltx
+ </TPM:DocFiles>
+ <TPM:SourceFiles size="20069">
+texmf-dist/source/xelatex/euenc/euenc.dtx
+texmf-dist/source/xelatex/euenc/euenc.ins
+ </TPM:SourceFiles>
+ <TPM:Provides>Package/euenc</TPM:Provides>
+ </rdf:Description>
+</rdf:RDF>
+
diff --git a/Master/texmf-dist/tpm/fontname.tpm b/Master/texmf-dist/tpm/fontname.tpm
index ee75bb9558d..271d137a400 100644
--- a/Master/texmf-dist/tpm/fontname.tpm
+++ b/Master/texmf-dist/tpm/fontname.tpm
@@ -12,10 +12,10 @@ The package contains files regarding a naming scheme for fonts to be
used with TeX. Mail comments and bug reports to tex-fonts@tug.org.
</TPM:Description>
<TPM:Author>Karl Berry</TPM:Author>
- <TPM:Size>3900023</TPM:Size>
+ <TPM:Size>3900077</TPM:Size>
<TPM:License></TPM:License>
<TPM:Build/>
- <TPM:RunFiles size="1503515">
+ <TPM:RunFiles size="1503569">
texmf-dist/fonts/map/fontname/adobe.map
texmf-dist/fonts/map/fontname/apple.map
texmf-dist/fonts/map/fontname/bitstrea.map
diff --git a/Master/texmf-dist/tpm/fontspec.tpm b/Master/texmf-dist/tpm/fontspec.tpm
index 5971cb13ec3..1121edd899b 100644
--- a/Master/texmf-dist/tpm/fontspec.tpm
+++ b/Master/texmf-dist/tpm/fontspec.tpm
@@ -3,7 +3,7 @@
<rdf:Description about="http://texlive.dante.de/texlive/Package/fontspec.zip">
<TPM:Name>fontspec</TPM:Name>
<TPM:Type>Package</TPM:Type>
- <TPM:Date>2006/06/19 22:49:18</TPM:Date>
+ <TPM:Date>2006/12/24 16:19:15</TPM:Date>
<TPM:Version></TPM:Version>
<TPM:Creator>karl</TPM:Creator>
<TPM:Title>
@@ -19,22 +19,21 @@ and can access system fonts directly.
[description copied from TeX Catalogue]
</TPM:Description>
<TPM:Author>Will Robertson</TPM:Author>
- <TPM:Size>2193127</TPM:Size>
+ <TPM:Size>1884541</TPM:Size>
<TPM:License></TPM:License>
<TPM:Build/>
- <TPM:RunFiles size="49765">
+ <TPM:RunFiles size="54379">
texmf-dist/tex/xelatex/fontspec/fontspec.cfg
texmf-dist/tex/xelatex/fontspec/fontspec.sty
texmf-dist/tpm/fontspec.tpm
</TPM:RunFiles>
- <TPM:DocFiles size="1976543">
+ <TPM:DocFiles size="1644972">
texmf-dist/doc/xelatex/fontspec/README
-texmf-dist/doc/xelatex/fontspec/fontspec-example.tex
+texmf-dist/doc/xelatex/fontspec/fontspec-example.ltx
texmf-dist/doc/xelatex/fontspec/fontspec.pdf
</TPM:DocFiles>
- <TPM:SourceFiles size="166819">
+ <TPM:SourceFiles size="185190">
texmf-dist/source/xelatex/fontspec/fontspec.dtx
-texmf-dist/source/xelatex/fontspec/fontspec.ins
</TPM:SourceFiles>
<TPM:Provides>Package/fontspec</TPM:Provides>
</rdf:Description>
diff --git a/Master/texmf-dist/tpm/latex-fonts.tpm b/Master/texmf-dist/tpm/latex-fonts.tpm
index d5e7b050b6e..222c6a2c7d9 100644
--- a/Master/texmf-dist/tpm/latex-fonts.tpm
+++ b/Master/texmf-dist/tpm/latex-fonts.tpm
@@ -9,10 +9,10 @@
<TPM:Title>The latex-fonts package.</TPM:Title>
<TPM:Description></TPM:Description>
<TPM:Author></TPM:Author>
- <TPM:Size>343494</TPM:Size>
+ <TPM:Size>343619</TPM:Size>
<TPM:License></TPM:License>
<TPM:Build/>
- <TPM:RunFiles size="343494">
+ <TPM:RunFiles size="343619">
texmf-dist/fonts/afm/bluesky/latex-fonts/lasy10.afm
texmf-dist/fonts/afm/bluesky/latex-fonts/lasy5.afm
texmf-dist/fonts/afm/bluesky/latex-fonts/lasy6.afm
diff --git a/Master/texmf-dist/tpm/latex.tpm b/Master/texmf-dist/tpm/latex.tpm
index f04e22b809c..99511112ad5 100644
--- a/Master/texmf-dist/tpm/latex.tpm
+++ b/Master/texmf-dist/tpm/latex.tpm
@@ -21,10 +21,10 @@ modification of LaTeX.
[description copied from TeX Catalogue]
</TPM:Description>
<TPM:Author>Leslie Lamport</TPM:Author>
- <TPM:Size>16970701</TPM:Size>
+ <TPM:Size>16970576</TPM:Size>
<TPM:License></TPM:License>
<TPM:Build/>
- <TPM:RunFiles size="1196414">
+ <TPM:RunFiles size="1196289">
texmf-dist/makeindex/latex/gglo.ist
texmf-dist/makeindex/latex/gind.ist
texmf-dist/tex/latex/base/alltt.sty
diff --git a/Master/texmf-dist/tpm/moreverb.tpm b/Master/texmf-dist/tpm/moreverb.tpm
index c85cc280070..aab00f26563 100644
--- a/Master/texmf-dist/tpm/moreverb.tpm
+++ b/Master/texmf-dist/tpm/moreverb.tpm
@@ -16,7 +16,7 @@ boxed verbatims, etc.
<TPM:Author>
Robin Fairbairns and Angus Duggan and Rainer Schopf and Victor Eijkhout
</TPM:Author>
- <TPM:Size>134579</TPM:Size>
+ <TPM:Size>134580</TPM:Size>
<TPM:License></TPM:License>
<TPM:Build/>
<TPM:RunFiles size="7181">
diff --git a/Master/texmf-dist/tpm/multicap.tpm b/Master/texmf-dist/tpm/multicap.tpm
index bde2a386f4d..a19e6681fd2 100644
--- a/Master/texmf-dist/tpm/multicap.tpm
+++ b/Master/texmf-dist/tpm/multicap.tpm
@@ -16,7 +16,7 @@ captions, whether they be in multicols or not.
[description copied from TeX Catalogue]
</TPM:Description>
<TPM:Author>John Vassilogiorgakis</TPM:Author>
- <TPM:Size>139725</TPM:Size>
+ <TPM:Size>139726</TPM:Size>
<TPM:License></TPM:License>
<TPM:Build/>
<TPM:RunFiles size="5066">
diff --git a/Master/texmf-dist/tpm/texinfo.tpm b/Master/texmf-dist/tpm/texinfo.tpm
index 44b4cf95803..cd6451b1d03 100644
--- a/Master/texmf-dist/tpm/texinfo.tpm
+++ b/Master/texmf-dist/tpm/texinfo.tpm
@@ -12,10 +12,10 @@ Produces online or printed output from a single source.
[description copied from TeX Catalogue]
</TPM:Description>
<TPM:Author>Free Software Foundation</TPM:Author>
- <TPM:Size>274711</TPM:Size>
+ <TPM:Size>275013</TPM:Size>
<TPM:License></TPM:License>
<TPM:Build/>
- <TPM:RunFiles size="274733">
+ <TPM:RunFiles size="275013">
texmf-dist/tex/texinfo/texinfo.ini
texmf-dist/tex/texinfo/texinfo.tex
texmf-dist/tex/texinfo/txi-cs.tex
diff --git a/Master/texmf-dist/tpm/xetex.tpm b/Master/texmf-dist/tpm/xetex.tpm
index f15132c93ee..0f845895979 100644
--- a/Master/texmf-dist/tpm/xetex.tpm
+++ b/Master/texmf-dist/tpm/xetex.tpm
@@ -9,10 +9,12 @@
<TPM:Title>The xetex package.</TPM:Title>
<TPM:Description></TPM:Description>
<TPM:Author></TPM:Author>
- <TPM:Size>203539</TPM:Size>
+ <TPM:Size>204657</TPM:Size>
<TPM:License></TPM:License>
<TPM:Build/>
- <TPM:RunFiles size="203539">
+ <TPM:RunFiles size="204657">
+texmf-dist/fonts/misc/xetex/fontmapping/tex-text.map
+texmf-dist/fonts/misc/xetex/fontmapping/tex-text.tec
texmf-dist/scripts/xetex/perl/lib/PDF/Reuse.pm
texmf-dist/scripts/xetex/perl/lib/PDF/Reuse/Util.pm
texmf-dist/scripts/xetex/perl/xdv2pdf_mergemarks
diff --git a/Master/texmf-dist/tpm/xltxtra.tpm b/Master/texmf-dist/tpm/xltxtra.tpm
index 3ab56dee9bc..d8dab23bf3d 100644
--- a/Master/texmf-dist/tpm/xltxtra.tpm
+++ b/Master/texmf-dist/tpm/xltxtra.tpm
@@ -3,27 +3,25 @@
<rdf:Description about="http://texlive.dante.de/texlive/Package/xltxtra.zip">
<TPM:Name>xltxtra</TPM:Name>
<TPM:Type>Package</TPM:Type>
- <TPM:Date>2006/06/19 22:30:32</TPM:Date>
+ <TPM:Date>2006/12/24 16:19:15</TPM:Date>
<TPM:Version></TPM:Version>
<TPM:Creator>karl</TPM:Creator>
<TPM:Title>The xltxtra package.</TPM:Title>
<TPM:Description></TPM:Description>
<TPM:Author></TPM:Author>
- <TPM:Size>245116</TPM:Size>
+ <TPM:Size>312693</TPM:Size>
<TPM:License></TPM:License>
<TPM:Build/>
- <TPM:RunFiles size="5711">
+ <TPM:RunFiles size="7145">
texmf-dist/tex/xelatex/xltxtra/xltxtra.sty
texmf-dist/tpm/xltxtra.tpm
</TPM:RunFiles>
- <TPM:DocFiles size="222130">
+ <TPM:DocFiles size="285388">
texmf-dist/doc/xelatex/xltxtra/README
-texmf-dist/doc/xelatex/xltxtra/README.txt
texmf-dist/doc/xelatex/xltxtra/xltxtra.pdf
</TPM:DocFiles>
- <TPM:SourceFiles size="17275">
+ <TPM:SourceFiles size="20160">
texmf-dist/source/xelatex/xltxtra/xltxtra.dtx
-texmf-dist/source/xelatex/xltxtra/xltxtra.ins
</TPM:SourceFiles>
<TPM:Provides>Package/xltxtra</TPM:Provides>
</rdf:Description>
diff --git a/Master/texmf/lists/cmarrows b/Master/texmf/lists/cmarrows
new file mode 100644
index 00000000000..fc4324d9e74
--- /dev/null
+++ b/Master/texmf/lists/cmarrows
@@ -0,0 +1,34 @@
+texmf-dist/doc/metapost/cmarrows/README
+texmf-dist/doc/metapost/cmarrows/cmarrows.pdf
+
+texmf-dist/metapost/cmarrows/cmarrows.mp
+texmf-dist/metapost/cmarrows/rgbx0009.mp
+texmf-dist/metapost/cmarrows/rgbx0016.mp
+texmf-dist/metapost/cmarrows/rgbx0020.mp
+texmf-dist/metapost/cmarrows/rgbx0025.mp
+texmf-dist/metapost/cmarrows/sgbx0008.mp
+texmf-dist/metapost/cmarrows/sgbx0010.mp
+texmf-dist/metapost/cmarrows/sgbx0011.mp
+texmf-dist/metapost/cmarrows/sgbx0012.mp
+texmf-dist/metapost/cmarrows/sgbx0013.mp
+texmf-dist/metapost/cmarrows/sgbx0014.mp
+texmf-dist/metapost/cmarrows/sgbx0015.mp
+texmf-dist/metapost/cmarrows/sgbx0017.mp
+texmf-dist/metapost/cmarrows/sgbx0018.mp
+texmf-dist/metapost/cmarrows/sgbx0019.mp
+texmf-dist/metapost/cmarrows/sgbx0021.mp
+texmf-dist/metapost/cmarrows/sgbx0022.mp
+texmf-dist/metapost/cmarrows/sgbx0023.mp
+texmf-dist/metapost/cmarrows/sgbx0024.mp
+texmf-dist/metapost/cmarrows/tgbx0000.mp
+texmf-dist/metapost/cmarrows/tgbx0001.mp
+texmf-dist/metapost/cmarrows/tgbx0002.mp
+texmf-dist/metapost/cmarrows/tgbx0003.mp
+texmf-dist/metapost/cmarrows/tgbx0004.mp
+texmf-dist/metapost/cmarrows/tgbx0005.mp
+texmf-dist/metapost/cmarrows/tgbx0006.mp
+texmf-dist/metapost/cmarrows/tgbx0007.mp
+texmf-dist/metapost/cmarrows/tgbx0027.mp
+texmf-dist/tpm/cmarrows.tpm
+
+texmf/lists/cmarrows
diff --git a/Master/texmf/tpm/collection-metapost.tpm b/Master/texmf/tpm/collection-metapost.tpm
index 7fc8e3ec726..09e942be94a 100644
--- a/Master/texmf/tpm/collection-metapost.tpm
+++ b/Master/texmf/tpm/collection-metapost.tpm
@@ -16,6 +16,7 @@
</TPM:Build>
<TPM:RunFiles size="1761">texmf/tpm/collection-metapost.tpm</TPM:RunFiles>
<TPM:Requires>
+ <TPM:Package name="cmarrows"/>
<TPM:Package name="emp"/>
<TPM:Package name="expressg"/>
<TPM:Package name="exteps"/>