summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/metapost/metauml/metauml_manual
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2010-09-12 23:03:48 +0000
committerKarl Berry <karl@freefriends.org>2010-09-12 23:03:48 +0000
commit14889c6d7bd31fd163f9cb123c8ba772769d176b (patch)
tree87daf844b7fc365e2a328b7f6b39632e5aa68f94 /Master/texmf-dist/doc/metapost/metauml/metauml_manual
parent2468fdd0a97481e170ef878e0839faf948be681a (diff)
metauml 0.2.5 (31jul10)
git-svn-id: svn://tug.org/texlive/trunk@19692 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/doc/metapost/metauml/metauml_manual')
-rw-r--r--Master/texmf-dist/doc/metapost/metauml/metauml_manual/fig/appetizer.mp21
-rw-r--r--Master/texmf-dist/doc/metapost/metauml/metauml_manual/fig/class.mp24
-rw-r--r--Master/texmf-dist/doc/metapost/metauml/metauml_manual/fig/class_diagrams.mp13
-rw-r--r--Master/texmf-dist/doc/metapost/metauml/metauml_manual/fig/component.mp61
-rw-r--r--Master/texmf-dist/doc/metapost/metauml/metauml_manual/fig/mptextmp.mp1
-rw-r--r--Master/texmf-dist/doc/metapost/metauml/metauml_manual/fig/mptrace.tmp40
-rw-r--r--Master/texmf-dist/doc/metapost/metauml/metauml_manual/fig/note.mp18
-rw-r--r--Master/texmf-dist/doc/metapost/metauml/metauml_manual/fig/package.mp2
-rw-r--r--Master/texmf-dist/doc/metapost/metauml/metauml_manual/fig/picture_info.mp33
-rw-r--r--Master/texmf-dist/doc/metapost/metauml/metauml_manual/fig/test_class.mp20
-rw-r--r--Master/texmf-dist/doc/metapost/metauml/metauml_manual/fig/test_component.mp45
-rw-r--r--Master/texmf-dist/doc/metapost/metauml/metauml_manual/fig/test_package.mp2
-rw-r--r--Master/texmf-dist/doc/metapost/metauml/metauml_manual/fig/test_paths.mp62
-rw-r--r--Master/texmf-dist/doc/metapost/metauml/metauml_manual/fig/test_picture.mp78
-rw-r--r--Master/texmf-dist/doc/metapost/metauml/metauml_manual/fig/test_picture_tex_rendering.mp43
-rw-r--r--Master/texmf-dist/doc/metapost/metauml/metauml_manual/fig/test_positioning.mp12
-rw-r--r--Master/texmf-dist/doc/metapost/metauml/metauml_manual/metauml_manual.tex217
-rw-r--r--Master/texmf-dist/doc/metapost/metauml/metauml_manual/test.mp9
-rw-r--r--Master/texmf-dist/doc/metapost/metauml/metauml_manual/test_suite.tex91
19 files changed, 693 insertions, 99 deletions
diff --git a/Master/texmf-dist/doc/metapost/metauml/metauml_manual/fig/appetizer.mp b/Master/texmf-dist/doc/metapost/metauml/metauml_manual/fig/appetizer.mp
index 6f3e794ff32..9842b23d9df 100644
--- a/Master/texmf-dist/doc/metapost/metauml/metauml_manual/fig/appetizer.mp
+++ b/Master/texmf-dist/doc/metapost/metauml/metauml_manual/fig/appetizer.mp
@@ -15,32 +15,31 @@
% along with this program; if not, write to the Free Software
% Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-
input metauml;
beginfig(1);
Class.Client("Client")()();
- Class.Component("Component")()
- ("+Operation()", "+Add(Component)", "+Remove(Component)", "+GetChild(int)");
- classStereotype.Component("<<interface>>");
+ Class._Component("Component")()();
+ %("+Operation()", "+Add(Component)", "+Remove(Component)", "+GetChild(int)");
+ classStereotype._Component("<<interface>>");
Class.Leaf("Leaf")()("+Operation()");
Class.Composite("Composite")()();
%("+Operation()", "+Add(Component)", "+Remove(Component)", "+GetChild(int)");
- leftToRight.top(30)(Client, Component);
+ leftToRight.top(30)(Client, _Component);
leftToRight.top(20)(Leaf, Composite);
- .5[Leaf.ne, Composite.nw] = below(Component.s, 45);
+ .5[Leaf.ne, Composite.nw] = below(_Component.s, 45);
- drawObjects(Client, Component, Leaf, Composite);
+ drawObjects(Client, _Component, Leaf, Composite);
- link(associationUni)(pathHorizontal(Client.e, Component.left));
- link(inheritance)(pathStepY(Leaf.n, Component.s, 20));
- link(inheritance)(pathStepY(Composite.n, Component.s, 20));
+ link(associationUni)(pathHorizontal(Client.e, _Component.left));
+ link(inheritance)(pathStepY(Leaf.n, _Component.s, 20));
+ link(inheritance)(pathStepY(Composite.n, _Component.s, 20));
- link(aggregationUni)(pathStepX(Component.e, Composite.e, 55));
+ link(aggregationUni)(pathStepX(_Component.e, Composite.e, 55));
endfig;
beginfig(2);
diff --git a/Master/texmf-dist/doc/metapost/metauml/metauml_manual/fig/class.mp b/Master/texmf-dist/doc/metapost/metauml/metauml_manual/fig/class.mp
index 8997e86295d..7b910f31fc8 100644
--- a/Master/texmf-dist/doc/metapost/metauml/metauml_manual/fig/class.mp
+++ b/Master/texmf-dist/doc/metapost/metauml/metauml_manual/fig/class.mp
@@ -92,4 +92,28 @@ beginfig(12);
drawObject(A);
endfig;
+beginfig(13)
+ save A;
+
+ Class.A("MyModel")()();
+ A.info.iAttributeStack.top := 0;
+ A.info.iAttributeStack.bottom := 0;
+ A.info.iMethodStack.top := 0;
+ A.info.iMethodStack.bottom := 0;
+
+ drawObject(A);
+endfig;
+
+beginfig(14)
+ save A, B;
+
+ EClass.A(iClassNameOnly)("MyModel")()();
+ ClassName.B("AnotherModel");
+ classStereotypes.B("<<smart>>");
+
+ topToBottom(20)(A, B);
+
+ drawObjects(A, B);
+endfig;
+
end
diff --git a/Master/texmf-dist/doc/metapost/metauml/metauml_manual/fig/class_diagrams.mp b/Master/texmf-dist/doc/metapost/metauml/metauml_manual/fig/class_diagrams.mp
index 0505e3af5ef..614cdbeca60 100644
--- a/Master/texmf-dist/doc/metapost/metauml/metauml_manual/fig/class_diagrams.mp
+++ b/Master/texmf-dist/doc/metapost/metauml/metauml_manual/fig/class_diagrams.mp
@@ -196,4 +196,17 @@ beginfig(11);
drawRelation(dependency)(X.e -- Y.w);
endfig;
+beginfig(12);
+ save X, Y;
+ Class.X("X")()();
+ Class.Y("Y")()();
+
+ X.nw = (0,0);
+ Y.w = X.e + (50,0);
+ Class_draw.X;
+ Class_draw.Y;
+
+ drawRelation(realization)(X.e -- Y.w);
+endfig;
+
end
diff --git a/Master/texmf-dist/doc/metapost/metauml/metauml_manual/fig/component.mp b/Master/texmf-dist/doc/metapost/metauml/metauml_manual/fig/component.mp
new file mode 100644
index 00000000000..2601d54c263
--- /dev/null
+++ b/Master/texmf-dist/doc/metapost/metauml/metauml_manual/fig/component.mp
@@ -0,0 +1,61 @@
+input metauml;
+
+beginfig(1);
+ Component.C("Business Logic")();
+ drawObject(C);
+endfig;
+
+beginfig(2);
+ save A, B, C, BigC;
+
+ Class.A("A")()();
+ Package.B("B")();
+ Component.C("C")();
+
+ Component.BigC("Big Component")(A, B, C);
+
+ leftToRight(10)(A, B);
+ topToBottom(10)(A, C);
+
+ drawObject(BigC);
+endfig;
+
+beginfig(3);
+ save A, B;
+ Component.A("A")();
+ Component.B("B")();
+
+ leftToRight(80)(A, B);
+
+ drawObjects(A, B);
+
+ link(providedInterface)( A.e -- .5[A.e, B.w] );
+endfig;
+
+beginfig(4);
+ save A, B;
+ Component.A("A")();
+ Component.B("B")();
+
+ leftToRight(80)(A, B);
+
+ drawObjects(A, B);
+
+ link(requiredInterface)( B.w -- .5[A.e, B.w]);
+endfig;
+
+beginfig(5);
+ save A, B;
+ Component.A("A")();
+ Component.B("B")();
+
+ leftToRight(80)(A, B);
+
+ drawObjects(A, B);
+
+ link(providedInterface)( A.e -- .5[A.e, B.w] );
+ link(requiredInterface)( B.w -- .5[A.e, B.w] );
+endfig;
+
+
+end \ No newline at end of file
diff --git a/Master/texmf-dist/doc/metapost/metauml/metauml_manual/fig/mptextmp.mp b/Master/texmf-dist/doc/metapost/metauml/metauml_manual/fig/mptextmp.mp
new file mode 100644
index 00000000000..c4752be8c71
--- /dev/null
+++ b/Master/texmf-dist/doc/metapost/metauml/metauml_manual/fig/mptextmp.mp
@@ -0,0 +1 @@
+btex $\sum_1^n f(x) \cdot dx \over \sum_1^m g(y) \cdot dy$ etex
diff --git a/Master/texmf-dist/doc/metapost/metauml/metauml_manual/fig/mptrace.tmp b/Master/texmf-dist/doc/metapost/metauml/metauml_manual/fig/mptrace.tmp
index 95b723d1b3a..041bb2d0e52 100644
--- a/Master/texmf-dist/doc/metapost/metauml/metauml_manual/fig/mptrace.tmp
+++ b/Master/texmf-dist/doc/metapost/metauml/metauml_manual/fig/mptrace.tmp
@@ -1,23 +1,35 @@
-input metauml_note;
-input metauml_base;
-input metauml_paths;
-input metauml_links;
-input metauml_class_relations;
+input metauml;
+
+iPict.boxed := 1;
beginfig(1);
- Note.foo("Antananarivo", "Machupichu");
- drawObject(foo);
+ iClass.shade := 3;
+ Class.F("Foo")("a: int","b: int")();
+ Class.B("Bar")()();
+ B.nw = F.ne + (20,-20);
+
+ drawObjects(B, F);
+
+ link(association)(B.nw -- F.ne);
+
+ draw objectBorder(B) withcolor red;
+ draw objectBorder(F) withcolor blue;
+
+ link(association)(pathCut(B,F)(B.c--F.c));
endfig;
beginfig(2);
- save foo;
- Note.foo("Please disregard this note");
- Note.bar("Please take the other note", "very seriously");
-
- bar.s = foo.n + (10,20);
- drawObjects(foo, bar);
- clink(dashedLink)(foo, bar);
+ save A, B;
+
+ Picture.A("A");
+ Picture.B("Blue");
+
+ B.sw = A.ne + (20,20);
+
+ drawObjects(A, B);
+
+ link(associationUni)(pathManhattanX(A.e, B));
endfig;
end
diff --git a/Master/texmf-dist/doc/metapost/metauml/metauml_manual/fig/note.mp b/Master/texmf-dist/doc/metapost/metauml/metauml_manual/fig/note.mp
index 52b5a1541bb..f04a5b5e4fe 100644
--- a/Master/texmf-dist/doc/metapost/metauml/metauml_manual/fig/note.mp
+++ b/Master/texmf-dist/doc/metapost/metauml/metauml_manual/fig/note.mp
@@ -16,6 +16,7 @@
% Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
input metauml;
+input TEX;
beginfig(1);
Note.A("This note", "has two lines.");
@@ -53,4 +54,21 @@ beginfig(3);
clink(dashedLink)(C.methodStack.pict[1], nC);
endfig;
+beginfig(4);
+ save A;
+ Note.A("This class implements the formula:",
+ TEX("$\sum_1^n f(x)\cdot dx$"));
+ drawObjects(A);
+endfig;
+
+beginfig(5);
+ save A;
+ Note.A("Can you do it?",
+ TEX("$\sum_1^n f(x) \cdot dx " &
+ "\over \sum_1^m g(y) \cdot dy$"));
+ A.stack.info.spacing := 30;
+ A.stack.pict[1].info.ignoreNegativeBase := 0;
+ drawObjects(A);
+endfig;
+
end
diff --git a/Master/texmf-dist/doc/metapost/metauml/metauml_manual/fig/package.mp b/Master/texmf-dist/doc/metapost/metauml/metauml_manual/fig/package.mp
index fbf59ddbf26..88653b5fee0 100644
--- a/Master/texmf-dist/doc/metapost/metauml/metauml_manual/fig/package.mp
+++ b/Master/texmf-dist/doc/metapost/metauml/metauml_manual/fig/package.mp
@@ -63,7 +63,7 @@ beginfig(8);
multiPackage.top = oneClassPackage.top;
multiPackage.left = oneClassPackage.right + 20;
- centered_allign_top(oneState, oneActivity)(10, below(oneInstance.s, 20));
+ centered_align_top(oneState, oneActivity)(10, below(oneInstance.s, 20));
drawObjects(allPackage);
endfig;
diff --git a/Master/texmf-dist/doc/metapost/metauml/metauml_manual/fig/picture_info.mp b/Master/texmf-dist/doc/metapost/metauml/metauml_manual/fig/picture_info.mp
index ec8ecdc3f8f..df3b10145f2 100644
--- a/Master/texmf-dist/doc/metapost/metauml/metauml_manual/fig/picture_info.mp
+++ b/Master/texmf-dist/doc/metapost/metauml/metauml_manual/fig/picture_info.mp
@@ -19,6 +19,7 @@ input boxes;
input util_commons;
input util_object;
input util_picture;
+input util_positioning;
PictureInfoCopy.iBig(iPict);
iBig.left := iBig.right := 20;
@@ -46,10 +47,40 @@ beginfig(1);
endfig;
beginfig(2);
+ save a, b, c, myFixed;
+ PictureInfoCopy.myFixed(iPict);
+ myFixed.ignoreNegativeBase := 1;
+ myFixed.fixedWidth := 15;
+ myFixed.fixedHeight := 20;
+ myFixed.boxed := 1;
+
+ EPicture.a(myFixed)("a");
+ EPicture.b(myFixed)(".-.");
+ EPicture.c(myFixed)("toolong");
+
+ leftToRight.bottom(10)(a, b, c);
+
+ drawObjects(a, b, c);
endfig;
beginfig(3);
+ save a, b, c, myFixed;
+ PictureInfoCopy.myFixed(iPict);
+ myFixed.ignoreNegativeBase := 1;
+ myFixed.bottom := 4.5;
+ myFixed.valign := "bottom";
+ myFixed.halign := "center";
+ myFixed.fixedWidth := 25;
+ myFixed.fixedHeight := 15;
+ myFixed.boxed := 1;
+
+ EPicture.a(myFixed)("a");
+ EPicture.b(myFixed)("yum");
+ EPicture.c(myFixed)("b");
+
+ leftToRight.bottom(10)(a, b, c);
+
+ drawObjects(a, b, c);
endfig;
-
end
diff --git a/Master/texmf-dist/doc/metapost/metauml/metauml_manual/fig/test_class.mp b/Master/texmf-dist/doc/metapost/metauml/metauml_manual/fig/test_class.mp
index b807e970b57..79dbb37133b 100644
--- a/Master/texmf-dist/doc/metapost/metauml/metauml_manual/fig/test_class.mp
+++ b/Master/texmf-dist/doc/metapost/metauml/metauml_manual/fig/test_class.mp
@@ -122,4 +122,24 @@ beginfig(11)
drawObjects(A);
endfig;
+beginfig(12)
+ save A;
+ EClass.A(iClassNameOnly)("AClassWithNoCompartments")()();
+ drawObjects(A);
+endfig;
+
+beginfig(13)
+ save A;
+ ClassName.A("AnotherClass");
+ drawObjects(A);
+endfig;
+
+beginfig(14)
+ save A;
+ ClassName.A("AnotherClass");
+ classStereotypes.A("<<interface>>","<<remote>>");
+
+ drawObjects(A);
+endfig;
+
end
diff --git a/Master/texmf-dist/doc/metapost/metauml/metauml_manual/fig/test_component.mp b/Master/texmf-dist/doc/metapost/metauml/metauml_manual/fig/test_component.mp
new file mode 100644
index 00000000000..3668a548f21
--- /dev/null
+++ b/Master/texmf-dist/doc/metapost/metauml/metauml_manual/fig/test_component.mp
@@ -0,0 +1,45 @@
+input metauml;
+input metauml_component;
+input metauml_component_relations;
+
+beginfig(1);
+ Class.classA("Class A")()();
+
+ Class.classB("Class B")()();
+
+ Component.compA("Component A")();
+
+ Component.compB("Component B")();
+
+ Component.compC("Component C")(compA, compB, classA, classB);
+
+
+
+ compB.w = compA.e + (40, 0);
+
+ classA.w = compB.e + (20, 0);
+
+ classB.w = classA.e + (20, 0);
+
+
+
+ drawObjects(compC);
+
+
+
+ path open;
+
+ open := compA.e .. compA.e + (20, 0);
+
+
+
+ path close;
+
+ close := compA.e + (20, 0) .. compB.w;
+
+ link(requiredInterface)(open);
+
+ link(providedInterface)(close);
+endfig;
+
+end \ No newline at end of file
diff --git a/Master/texmf-dist/doc/metapost/metauml/metauml_manual/fig/test_package.mp b/Master/texmf-dist/doc/metapost/metauml/metauml_manual/fig/test_package.mp
index 990391f4f7a..8b6cad579a3 100644
--- a/Master/texmf-dist/doc/metapost/metauml/metauml_manual/fig/test_package.mp
+++ b/Master/texmf-dist/doc/metapost/metauml/metauml_manual/fig/test_package.mp
@@ -24,7 +24,7 @@ beginfig(1);
multiPackage.top = oneClassPackage.top;
multiPackage.left = oneClassPackage.right + 20;
- centered_allign_top(oneState, oneActivity)(10, below(oneInstance.s, 20));
+ centered_align_top(oneState, oneActivity)(10, below(oneInstance.s, 20));
drawObjects(allPackage);
endfig;
diff --git a/Master/texmf-dist/doc/metapost/metauml/metauml_manual/fig/test_paths.mp b/Master/texmf-dist/doc/metapost/metauml/metauml_manual/fig/test_paths.mp
index 141b3efdb1c..9de403b86af 100644
--- a/Master/texmf-dist/doc/metapost/metauml/metauml_manual/fig/test_paths.mp
+++ b/Master/texmf-dist/doc/metapost/metauml/metauml_manual/fig/test_paths.mp
@@ -17,6 +17,8 @@
input metauml;
+iPict.boxed := 1;
+
beginfig(1);
iClass.shade := 3;
Class.F("Foo")("a: int","b: int")();
@@ -34,5 +36,65 @@ beginfig(1);
link(association)(pathCut(B,F)(B.c--F.c));
endfig;
+beginfig(2);
+ save A, B;
+
+ Picture.A("A");
+ Picture.B("Blue");
+
+ B.sw = A.ne + (20,20);
+
+ drawObjects(A, B);
+
+ link(associationUni)(pathManhattanX(A.e, B));
+endfig;
+
+beginfig(3);
+ save A, B, C, D, O;
+
+ Picture.A("Alpha");
+ Picture.B("Beta");
+ Picture.C("Gamma");
+ Picture.D("Detla");
+ Picture.O("Omega");
+
+ A.c = O.c + (-50,50);
+ B.c = O.c + (50,50);
+ C.c = O.c + (-50,-50);
+ D.c = O.c + (50,-50);
+
+ drawObjects(O, A, B, C, D);
+
+ link(associationUni)(pathManhattanX(O, A));
+ link(associationUni)(pathManhattanX(O, B));
+ link(associationUni)(pathManhattanX(O, C));
+ link(associationUni)(pathManhattanX(O, D));
+endfig;
+
+beginfig(3);
+ show "";
+ show "";
+ show " FIGURE 3";
+
+ save A, B, C, D, O;
+
+ Picture.A("Alpha");
+ Picture.B("Beta");
+ Picture.C("Gamma");
+ Picture.D("Detla");
+ Picture.O("Omega");
+
+ A.c = O.c + (-50,50);
+ B.c = O.c + (50,50);
+ C.c = O.c + (-50,-50);
+ D.c = O.c + (50,-50);
+
+ drawObjects(O, A, B, C, D);
+
+ link(associationUni)(pathManhattanX(O, A));
+ link(associationUni)(pathManhattanX(O, B));
+ link(associationUni)(pathManhattanX(O, C));
+ link(associationUni)(pathManhattanX(O, D));
+endfig;
end
diff --git a/Master/texmf-dist/doc/metapost/metauml/metauml_manual/fig/test_picture.mp b/Master/texmf-dist/doc/metapost/metauml/metauml_manual/fig/test_picture.mp
index db78bb1a742..5207a7c07e3 100644
--- a/Master/texmf-dist/doc/metapost/metauml/metauml_manual/fig/test_picture.mp
+++ b/Master/texmf-dist/doc/metapost/metauml/metauml_manual/fig/test_picture.mp
@@ -189,4 +189,82 @@ beginfig(6);
aitem(iPictBoxed)("an anounymous item")(obj.nw = (40,10));
endfig;
+beginfig(7);
+ save a, b, c, d, e, myFixed;
+ PictureInfoCopy.myFixed(iPict);
+ myFixed.ignoreNegativeBase := 1;
+ myFixed.fixedWidth := 20;
+ myFixed.boxed := 1;
+
+ EPicture.a(myFixed)("a");
+ EPicture.b(myFixed)("yummy");
+ EPicture.c(myFixed)(".-.");
+ EPicture.d(myFixed)("job");
+ EPicture.e(myFixed)("football");
+
+ leftToRight.bottom(20)(a, b, c, d, e);
+
+ drawObjects(a, b, c, d, e);
+endfig;
+
+beginfig(8);
+ save a, b, c, d, e, myFixed;
+ PictureInfoCopy.myFixed(iPict);
+ myFixed.halign := "center";
+ myFixed.ignoreNegativeBase := 1;
+ myFixed.fixedWidth := 20;
+ myFixed.boxed := 1;
+
+ EPicture.a(myFixed)("a");
+ EPicture.b(myFixed)("yummy");
+ EPicture.c(myFixed)(".-.");
+ EPicture.d(myFixed)("job");
+ EPicture.e(myFixed)("football");
+
+ leftToRight.bottom(20)(a, b, c, d, e);
+
+ drawObjects(a, b, c, d, e);
+endfig;
+
+beginfig(9);
+ save a, b, c, d, e, myFixed;
+ PictureInfoCopy.myFixed(iPict);
+ myFixed.halign := "center";
+ myFixed.ignoreNegativeBase := 1;
+ myFixed.fixedWidth := 20;
+ myFixed.fixedHeight := 30;
+ myFixed.boxed := 1;
+
+ EPicture.a(myFixed)("a");
+ EPicture.b(myFixed)("yummy");
+ EPicture.c(myFixed)(".-.");
+ EPicture.d(myFixed)("job");
+ EPicture.e(myFixed)("football");
+
+ leftToRight.bottom(20)(a, b, c, d, e);
+
+ drawObjects(a, b, c, d, e);
+endfig;
+
+beginfig(10);
+ save a, b, c, d, e, myFixed;
+ PictureInfoCopy.myFixed(iPict);
+ myFixed.halign := "center";
+ myFixed.valign := "center";
+ myFixed.ignoreNegativeBase := 1;
+ myFixed.fixedWidth := 20;
+ myFixed.fixedHeight := 30;
+ myFixed.boxed := 1;
+
+ EPicture.a(myFixed)("a");
+ EPicture.b(myFixed)("yummy");
+ EPicture.c(myFixed)(".-.");
+ EPicture.d(myFixed)("job");
+ EPicture.e(myFixed)("football");
+
+ leftToRight.bottom(20)(a, b, c, d, e);
+
+ drawObjects(a, b, c, d, e);
+endfig;
+
end
diff --git a/Master/texmf-dist/doc/metapost/metauml/metauml_manual/fig/test_picture_tex_rendering.mp b/Master/texmf-dist/doc/metapost/metauml/metauml_manual/fig/test_picture_tex_rendering.mp
new file mode 100644
index 00000000000..3c041298699
--- /dev/null
+++ b/Master/texmf-dist/doc/metapost/metauml/metauml_manual/fig/test_picture_tex_rendering.mp
@@ -0,0 +1,43 @@
+% Part of the MetaUML manual.
+% Copyright (C) 2005 Ovidiu Gheorghies
+%
+% This program is free software; you can redistribute it and/or
+% modify it under the terms of the GNU General Public License
+% as published by the Free Software Foundation; either version 2
+% of the License, or (at your option) any later version.
+%
+% This program is distributed in the hope that it will be useful,
+% but WITHOUT ANY WARRANTY; without even the implied warranty of
+% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+% GNU General Public License for more details.
+%
+% You should have received a copy of the GNU General Public License
+% along with this program; if not, write to the Free Software
+% Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+
+input metauml;
+
+input TEX;
+
+beginfig(1);
+ PictureInfoCopy.myP(iPict);
+ myP.boxed := 1;
+ myP.ignoreNegativeBase := 1;
+
+ EPicture.p(myP)( TEX("Hello, world $x=7$") );
+
+ PictureStackInfoCopy.myPS(iStack);
+ myPS.boxed := 1;
+ myPS.iPict.boxed := 1;
+ myPS.iPict.ignoreNegativeBase := 1;
+
+ EPictureStack.ps(myPS)("Hello, world!",
+ TEX("This is cool: $x=y$."),
+ TEX("But this is insane: $\sum_1^3 f(x) \over x$!") ) ("vleft");
+
+ leftToRight(20)(p, ps);
+
+ drawObjects(p, ps);
+endfig;
+
+end
diff --git a/Master/texmf-dist/doc/metapost/metauml/metauml_manual/fig/test_positioning.mp b/Master/texmf-dist/doc/metapost/metauml/metauml_manual/fig/test_positioning.mp
index 5e2a855539c..66034767716 100644
--- a/Master/texmf-dist/doc/metapost/metauml/metauml_manual/fig/test_positioning.mp
+++ b/Master/texmf-dist/doc/metapost/metauml/metauml_manual/fig/test_positioning.mp
@@ -31,7 +31,7 @@ beginfig(1);
Picture.B(strB);
Picture.C(strC);
- allign(top, left, right)(spacing)("+")(A, B, C);
+ align(top, left, right)(spacing)("+")(A, B, C);
drawObjects(A, B, C);
@@ -59,7 +59,7 @@ beginfig(2);
Picture.B(strB);
Picture.C(strC);
- allign(midy, left, right)(spacing)("+")(A, B, C);
+ align(midy, left, right)(spacing)("+")(A, B, C);
drawObjects(A, B, C);
@@ -87,7 +87,7 @@ beginfig(3);
Picture.B(strB);
Picture.C(strC);
- allign(bottom, left, right)(spacing)("+")(A, B, C);
+ align(bottom, left, right)(spacing)("+")(A, B, C);
drawObjects(A, B, C);
@@ -115,7 +115,7 @@ beginfig(4);
Picture.B(strB);
Picture.C(strC);
- allign(left, top, bottom)(spacing)("-")(A, B, C);
+ align(left, top, bottom)(spacing)("-")(A, B, C);
drawObjects(A, B, C);
@@ -143,7 +143,7 @@ beginfig(5);
Picture.B(strB);
Picture.C(strC);
- allign(midx, top, bottom)(spacing)("-")(A, B, C);
+ align(midx, top, bottom)(spacing)("-")(A, B, C);
drawObjects(A, B, C);
@@ -171,7 +171,7 @@ beginfig(6);
Picture.B(strB);
Picture.C(strC);
- allign(right, top, bottom)(spacing)("-")(A, B, C);
+ align(right, top, bottom)(spacing)("-")(A, B, C);
drawObjects(A, B, C);
diff --git a/Master/texmf-dist/doc/metapost/metauml/metauml_manual/metauml_manual.tex b/Master/texmf-dist/doc/metapost/metauml/metauml_manual/metauml_manual.tex
index 21c133eb342..498960cf761 100644
--- a/Master/texmf-dist/doc/metapost/metauml/metauml_manual/metauml_manual.tex
+++ b/Master/texmf-dist/doc/metapost/metauml/metauml_manual/metauml_manual.tex
@@ -12,6 +12,7 @@
\usepackage[pdftex,colorlinks=true]{hyperref}
\usepackage{multicol}
+\usepackage{multido}
\ifx\pdftexversion\undefined
\usepackage[dvips]{graphicx}
@@ -40,7 +41,7 @@
\end{quote}
\pagebreak
-This page is left intentionally blank.
+This page is intentionally left blank.
\pagebreak
\title{\metauml: Tutorial, Reference and Test Suite}
@@ -286,6 +287,42 @@ AbstractClass.A("Observable")
"+notify()");
\end{verbatim}
+\subsection{Displaying Class Name Only}
+
+If you want the empty methods and attributes compartments in a class not being displayed, one way is to set the spacing at their top and the bottom to {\code 0}:
+
+\begin{multicols}{2}
+\begin{verbatim}
+Class.A("MyModel")()();
+A.info.iAttributeStack.top := 0;
+A.info.iAttributeStack.bottom := 0;
+A.info.iMethodStack.top := 0;
+A.info.iMethodStack.bottom := 0;
+
+drawObject(A);
+\end{verbatim}
+\columnbreak
+\hspace{1cm}\includegraphics{fig/class.13}
+\end{multicols}
+
+There are also specific formating macros defined for this usage scenarios, the formatting information object {\code iClassNameOnly} and the syntactic sugar macro {\code ClassName}:
+
+\begin{multicols}{2}
+\begin{verbatim}
+EClass.A(iClassNameOnly)("MyModel")()();
+ClassName.B("AnotherModel");
+classStereotypes.B("<<smart>>");
+
+topToBottom(20)(A, B);
+
+drawObjects(A, B);
+\end{verbatim}
+\columnbreak
+\hspace{2cm}\includegraphics{fig/class.14}
+\end{multicols}
+
+To customize the space around the class name globally, you can set the values of {\code iClassNameOnly.iName.top} and {\code iClassNameOnly.iName.bottom}. Individually, for a given object, say {\code B}, the attributes {\code B.info.iName.top} and {\code B.info.iName.bottom} can be used.
+
\subsection{Objects (or Class Instances)}
An UML object (or class instance) is created as follows:
@@ -362,9 +399,11 @@ B = (50,0);
\hline
{\code link(inheritance)(X.e -- Y.w)} & \includegraphics{fig/class_diagrams.6} \\
\hline
+{\code link(realization)(X.e -- Y.w)} & \includegraphics{fig/class_diagrams.12} \\
+\hline
{\code link(aggregation)(X.e -- Y.w)} & \includegraphics{fig/class_diagrams.7} \\
\hline
-{\code link(associationUni)(X.e -- Y.w)} & \includegraphics{fig/class_diagrams.8} \\
+{\code link(aggregationUni)(X.e -- Y.w)} & \includegraphics{fig/class_diagrams.8} \\
\hline
{\code link(composition)(X.e -- Y.w)} & \includegraphics{fig/class_diagrams.9} \\
\hline
@@ -504,6 +543,45 @@ clink(dashedLink)(C.methodStack.pict[1], nC);
Macros like {\code leftToRight} and {\code topToBottom} are presented in section \ref{section:positioning}.
+\subsection{Using mathematical formulae}
+
+MetaUML notes can contain mathematical formulae typeset in TeX (and {\bf not} LaTeX). This feature is considered experimental, as it is not always straightforward to use it. Below is a full-code example, note the import of MetaPost package {\code TEX}.
+
+\begin{multicols}{2}
+\begin{verbatim}
+input metauml;
+input TEX;
+
+beginfig(1);
+ Note.A("This class implements the formula:",
+ TEX("$\sum_1^n f(x) \cdot dx$"));
+ drawObjects(A);
+endfig;
+
+end
+\end{verbatim}
+\columnbreak
+\hspace{0.5cm}\includegraphics{fig/note.4}
+\end{multicols}
+
+If you have a taller formula, you must be prepared to do some advanced stunts. Remark: {\code "aaa" \& "bbb"} is MetaPost's way to concatenate the strings into {\code "aaabbb"}. The formula's string was split in two for space reasons.
+
+\begin{multicols}{2}
+\begin{verbatim}
+Note.A("Can you do it?",
+ TEX("$\sum_1^n f(x) \cdot dx " &
+ "\over \sum_1^m g(y) \cdot dy$"));
+A.stack.info.spacing := 30;
+A.stack.pict[1].info.ignoreNegativeBase := 0;
+
+drawObject(A);
+\end{verbatim}
+\columnbreak
+\hspace{3cm}\includegraphics{fig/note.5}
+\end{multicols}
+
+Alas, this trick does not entirely solve the problem: a third line in the note would be badly aligned. Therefore, until MetaUML's {\code Note} class is upgraded to better support this scenario, you may want to limit yourself to two lines per note --- at least when tall formulae are involved.
+
\section{Packages}
MetaUML allows for the creation of packages in various forms. Firstly, we have the option of writing the package name in the middle of the main box. Secondly, we can write the name on the tiny box above the main box, leaving the main box empty. Lastly, we can write the package name as in the second case, but the main box can have an arbitrary contents: classes, other packages, or even other UML items.
@@ -582,6 +660,76 @@ The nesting relation between packages is created by using the {\code nest} link
\hline
\end{tabular}
+\section{Component Diagrams}
+
+A component is created by the macro {\code Component}:
+
+\begin{verbatim}
+Component.name(component-name)
+ (subitems-list)
+\end{verbatim}
+
+The parameter {\code component-name} is a string representing the component's name. The {\code subitems-list} parameter is used to specify the subitems of this component (possibly classes, packages or other components); its form is as a comma separated list of objects, which can be void.
+
+\begin{multicols}{2}
+\begin{verbatim}
+Component.C("Business Logic")();
+drawObject(C);
+\end{verbatim}
+\columnbreak
+\hspace{3cm}\includegraphics{fig/component.1}
+\end{multicols}
+
+Here is an example involving subitems in a component:
+
+\begin{multicols}{2}
+\begin{verbatim}
+Class.A("A")()();
+Package.B("B")();
+Component.C("C")();
+
+Component.BigC("Big Component")(A, B, C);
+
+leftToRight(10)(A, B);
+topToBottom(10)(A, C);
+
+drawObject(BigC);
+\end{verbatim}
+\columnbreak
+\hspace{3cm}\includegraphics{fig/component.2}
+\end{multicols}
+
+\subsection{Types of Links}
+
+\begin{tabular}{||l|c||}
+\hline
+{\code link(requiredInterface)( A.e -- .5[A.e, B.w] );} & \includegraphics{fig/component.3} \\
+\hline
+{\code link(providedInterface)( .5[A.e, B.w] -- B.w );} & \includegraphics{fig/component.4} \\
+\hline
+\end{tabular}
+
+\vspace{0.5cm}
+
+The {\code requiredInterface} and {\code providedInterface} visual constructs can be easily combined, as shown in the following example:
+
+\begin{multicols}{2}
+\begin{verbatim}
+Component.A("A")();
+Component.B("B")();
+
+leftToRight(80)(A, B);
+
+drawObjects(A, B);
+
+link(providedInterface)( A.e -- .5[A.e, B.w] );
+link(requiredInterface)( B.w -- .5[A.e, B.w] );
+\end{verbatim}
+\columnbreak
+\hspace{-1cm}\includegraphics{fig/component.5}
+\end{multicols}
+
+
\section{Use Case Diagrams}
\subsection{Use Cases}
@@ -1305,6 +1453,70 @@ drawObjects(a, b);
\hspace{1cm}\includegraphics{fig/picture_info.1}
\end{multicols}
+\subsubsection{Fixed Sizes}
+
+By default, the size of a {\code Picture} object is set by its contents. However,
+it is possible to specify fixed dimensions both the width and the height, independently.
+This can be done by setting the {\code info}'s attributes {\code fixedWidth} and {\code fixedHeight} to values
+greater than 0. If any of these attributes is left to its default value, {\code -1}, then for the corresponding
+axis the dimension is set according to the dimension of the content. Nevertheless, the fixed dimensions are enforced, even though the contained object would have needed additional space.
+
+\begin{multicols}{2}
+\begin{verbatim}
+PictureInfoCopy.myFixed(iPict);
+myFixed.ignoreNegativeBase := 1;
+myFixed.fixedWidth := 15;
+myFixed.fixedHeight := 20;
+myFixed.boxed := 1;
+
+EPicture.a(myFixed)("a");
+EPicture.b(myFixed)(".-.");
+EPicture.c(myFixed)("toolong");
+
+leftToRight.bottom(10)(a, b, c);
+
+drawObjects(a, b, c);
+\end{verbatim}
+\columnbreak
+\hspace{1cm}\includegraphics{fig/picture_info.2}
+\end{multicols}
+
+\subsubsection{Content alignment}
+
+When fixed dimensions are used, one most likely would prefer a centered alignement of the contents in the
+{\code Picture} box. This option can be expressed independently for each of the axes,
+by setting the {\code info}'s attributes {\code valign} and {\code halign} to descriptive string values.
+For horizontal alignement, {\code halign} can be set to {\code "left"} or {\code "center"}, and for
+vertical alignement, {\code valign} can be set to {\code "bottom} or {\code "center"}. The default
+values for these attributes are {\code "left"} and {\code "bottom"}, respectively.
+
+The next example uses horizontal centered alignement and a bottom alignement with a {\code 4.5} base offset, for
+vertical alignement. This vertical alignement gives a better visual result than the centered one, at
+least for the situations in which there are texts to be placed horizontally.
+
+\begin{multicols}{2}
+\begin{verbatim}
+PictureInfoCopy.myFixed(iPict);
+myFixed.ignoreNegativeBase := 1;
+myFixed.bottom := 4.5;
+myFixed.valign := "bottom";
+myFixed.halign := "center";
+myFixed.fixedWidth := 25;
+myFixed.fixedHeight := 15;
+myFixed.boxed := 1;
+
+EPicture.a(myFixed)("a");
+EPicture.b(myFixed)("yum");
+EPicture.c(myFixed)("b");
+
+leftToRight.bottom(10)(a, b, c);
+
+drawObjects(a, b, c);
+\end{verbatim}
+\columnbreak
+\hspace{1cm}\includegraphics{fig/picture_info.3}
+\end{multicols}
+
\subsection{Stacking Objects}
It is possible to stack objects, much in the style of {\code setboxjoin}
@@ -1334,6 +1546,7 @@ code which does not know beforehand the number of elements to be drawn.
Having to write the {\code scantokens} keyword is admittedly a nuisance, but
this is required.
+
\subsection{The Group Macro}
It is possible to group objects in \metauml. This feature is the cornerstone
diff --git a/Master/texmf-dist/doc/metapost/metauml/metauml_manual/test.mp b/Master/texmf-dist/doc/metapost/metauml/metauml_manual/test.mp
new file mode 100644
index 00000000000..b7f60eadca0
--- /dev/null
+++ b/Master/texmf-dist/doc/metapost/metauml/metauml_manual/test.mp
@@ -0,0 +1,9 @@
+input metauml;
+
+beginfig(1);
+ Class.X("X")()();
+ drawObjects(X);
+endfig;
+
+end
+
diff --git a/Master/texmf-dist/doc/metapost/metauml/metauml_manual/test_suite.tex b/Master/texmf-dist/doc/metapost/metauml/metauml_manual/test_suite.tex
index 18b47231436..05f19ad2459 100644
--- a/Master/texmf-dist/doc/metapost/metauml/metauml_manual/test_suite.tex
+++ b/Master/texmf-dist/doc/metapost/metauml/metauml_manual/test_suite.tex
@@ -9,113 +9,78 @@
% Free Documentation License".
\newcommand{\metaumltest}[2]{Test #2 --- \\ \includegraphics{fig/test_#1.#2} \\ }
+\newcommand{\metaumltests}[2]{\multido{\iA=1+1}{#2}{\metaumltest{#1}{\iA}}}
\section{Test suite}
\subsection{Low-level}
- \metaumltest{lowlevel}{1}
- \metaumltest{lowlevel}{2}
+ \metaumltests{lowlevel}{2}
\subsection{Fonts}
- \metaumltest{font}{1}
- \metaumltest{font}{2}
- \metaumltest{font}{3}
+ \metaumltests{font}{3}
\subsection{Cliparts}
+ %\metaumltests{cliparts}{1}
Locks ---\\
\includegraphics{fig/cliparts.1}
\subsection{Util library}
\subsubsection{Picture tests}
- \metaumltest{picture}{1}
- \metaumltest{picture}{2}
- \metaumltest{picture}{3}
- \metaumltest{picture}{4}
- \metaumltest{picture}{5}
- \metaumltest{picture}{6}
+ \metaumltests{picture}{10}
+
+ \subsubsection{Picture tests - TeX rendering}
+ \metaumltests{picture_tex_rendering}{1}
\subsubsection{Group tests}
- \metaumltest{group}{1}
- \metaumltest{group}{2}
+ \metaumltests{group}{2}
\subsubsection{PictureStack tests}
- \metaumltest{picture_stack}{1}
- \metaumltest{picture_stack}{2}
- \metaumltest{picture_stack}{3}
+ \metaumltests{picture_stack}{3}
\subsubsection{Positioning tests}
- \metaumltest{positioning}{1}
- \metaumltest{positioning}{2}
- \metaumltest{positioning}{3}
- \metaumltest{positioning}{4}
- \metaumltest{positioning}{5}
- \metaumltest{positioning}{6}
+ \metaumltests{positioning}{6}
\subsection{Class diagram}
\subsubsection{Class tests}
- \metaumltest{class}{1}
- \metaumltest{class}{2}
- \metaumltest{class}{3}
- \metaumltest{class}{4}
- \metaumltest{class}{5}
- \metaumltest{class}{6}
- \metaumltest{class}{7}
- \metaumltest{class}{8}
- \metaumltest{class}{9}
- \metaumltest{class}{10}
- \metaumltest{class}{11}
-
+ \metaumltests{class}{14}
+
\subsubsection{Class template tests}
- \metaumltest{class_templates}{1}
- \metaumltest{class_templates}{2}
- \metaumltest{class_templates}{3}
+ \metaumltests{class_templates}{3}
\subsubsection{Qualified Association tests}
- \metaumltest{class_qual_assoc}{1}
- \metaumltest{class_qual_assoc}{2}
+ \metaumltests{class_qual_assoc}{2}
\subsection{Package diagram}
\subsubsection{Package tests}
- \metaumltest{package}{1}
- \metaumltest{package}{2}
+ \metaumltests{package}{2}
+
+\subsection{Component diagram}
+\subsubsection{Component tests}
+ \metaumltests{component}{1}
\subsection{Paths}
- \metaumltest{paths}{1}
+ \metaumltests{paths}{3}
\subsection{Behavioral diagrams}
\subsubsection{Activity tests}
- \metaumltest{activity}{1}
- \metaumltest{activity}{2}
+ \metaumltests{activity}{2}
\subsubsection{State Machine tests}
- \metaumltest{state}{1}
- \metaumltest{state}{2}
- \metaumltest{state}{3}
- \metaumltest{state}{4}
- \metaumltest{state}{5}
+ \metaumltests{state}{5}
\subsubsection{Usecase tests}
- \metaumltest{usecase}{1}
- \metaumltest{usecase}{2}
- \metaumltest{usecase}{3}
- \metaumltest{usecase}{4}
- \metaumltest{usecase}{5}
- \metaumltest{usecase}{6}
- \metaumltest{usecase}{7}
- \metaumltest{usecase}{8}
- \metaumltest{usecase}{9}
+ \metaumltests{usecase}{9}
\subsection{Miscelaneous}
\subsubsection{Notes}
- \metaumltest{note}{1}
- \metaumltest{note}{2}
+ \metaumltests{note}{2}
\subsubsection{Objects (Class Instances)}
- \metaumltest{instance}{1}
+ \metaumltests{instance}{1}
\subsection{User requests}
Test 1 --- \\ \includegraphics[scale=.2]{fig/test_lars_issues.1} \\
\metaumltest{lars_issues}{2}
\subsection{Skins}
- \metaumltest{skins}{1}
- \metaumltest{skins_global_defaults}{1}
+ \metaumltests{skins}{1}
+ \metaumltests{skins_global_defaults}{1}