PDA

Archiv verlassen und diese Seite im Standarddesign anzeigen : metauml und tex



florian2
05-07-2008, 16:06
hallo
Ich versuche mich gerade an diesem metauml zeug zur erzeugung von UML diagrammen. Ich benoetige allerdings latex zeichen wie z.b. summe u.ae... ich habe dazu folgendes gefunden



input metauml;
input TEX;

beginfig(5);
Note.A("This class implements the formula:",
TEX("n"));
drawObjects(A);
endfig;

end


das war auch das einzige was ich im internet finden konnte, und leider funktioniert es bei mir nicht, ich bekomme folgende Fehlermeldung

>> unknown string A.lines1
>> picture
! Equation cannot be performed (unknown string=picture).
<to be read again>
;
<for(picture)> A.lines[A.nLines]:=(EXPR0);
A.nLines:=A.nLines+1; ENDFOR
ENote->...SUFFIX2)nLines:=(SUFFIX2)nLines+1;endfor
;EPictureStack(SUFFIX2)sta...

Note->begingroup.ENote(SUFFIX2)(iNote)((TEXT3))
;endgroup
l.6 TEX("$\sum_1^n f(x)\cdot dx$"))
;
?

kann mir da irgendjemand helfen?
gruesse
florian2

localghost
06-07-2008, 12:59
Du könntest alternativ auch Grafik-Pakete wie pgf/tikZ (http://dante.ctan.org/CTAN/help/Catalogue/entries/pgf.html) oder PSTricks (http://tug.org/PSTricks) nehmen. Beispiele gibt es dafür auch [1,2]. Könnte dir eine Menge Zeit und Ärger sparen.

[1] PGF/TikZ examples - block diagrams | fauskes.net (http://www.fauskes.net/pgftikzexamples/tag/block-diagrams)
[2] /PSTricks/examples/uml (http://tug.org/PSTricks/main.cgi?file=Examples/uml)


MfG
Thorsten¹

florian2
09-07-2008, 10:20
danke fuer den link... das ist wirklich besser geeignet als metaUML... allerdings habe ich ein paar probleme beim einbinden von

\usetikzlibrary{trees}
\usetikzlibrary{decorations.pathmorphing}
\usetikzlibrary{decorations.markings}

fuer feynman diagramme
die erreomassage heisst



[PDFLaTeX] test3.tex => test3.pdf (pdflatex)
[PDFLaTeX] finished with exit status 1
./test3.tex:6:I can't find file `pgflibrarytikzdecorations.pathmorphing.code.tex'. \usetikzlibrary{decorations.pathmorphing}
./test3.tex:6:Emergency stop. \usetikzlibrary{decorations.pathmorphing}
[PDFLaTeX] 2 errors, 0 warnings, 0 badboxes


das minimalbeispiel ist



\documentclass{article}

\usepackage[latin1]{inputenc}
\usepackage{tikz}
\usetikzlibrary{trees}
\usetikzlibrary{decorations.pathmorphing}
\usetikzlibrary{decorations.markings}
\begin{document}

% Define styles for the different kind of edges in a Feynman diagram
\tikzset{
photon/.style={decorate, decoration={snake}, draw=red},
electron/.style={draw=blue, postaction={decorate},
decoration={markings,mark=at position .55 with {\arrow[draw=blue]{>}}}},
gluon/.style={decorate, draw=magenta,
decoration={coil,amplitude=4pt, segment length=5pt}}
}

\begin{tikzpicture}[
thick,
% Set the overall layout of the tree
level/.style={level distance=1.5cm},
level 2/.style={sibling distance=2.6cm},
level 3/.style={sibling distance=2cm}
]
\coordinate
child[grow=left]{
child {
node {$g$}
% The 'edge from parent' is actually not needed because it is
% implicitly added.
edge from parent [gluon]
}
child {
node {$g$}
edge from parent [gluon]
}
edge from parent [gluon] node [above=3pt] {$g$}
}
% I have to insert a dummy child to get the tree to grow
% correctly to the right.
child[grow=right, level distance=0pt] {
child {
child {
child {
node {$\bar{d}$}
edge from parent [electron]
}
child {
node {$u$}
edge from parent [electron]
}
edge from parent [photon]
}
child {
node {$b$}
edge from parent [electron]
}
edge from parent [electron]
node [below] {$t$}
}
child {
child {
node {$\bar{b}$}
edge from parent [electron]
}
child {
child {
node {$\bar{v}$}
edge from parent [electron]
}
child {
node {$e^{-}$}
edge from parent [electron]
}
edge from parent [photon]
}
edge from parent [electron]
node [above] {$\bar{t}$}
}
};
\end{tikzpicture}


\end{document}


viele gruesse
und danke fuer jede hilfe
florian