Überarbeitungsverlauf[Zurück]
Klicke auf Einblenden/Ausblenden von Überarbeitungen 2
Kosmetische Korrekturen

24 Apr '18, 16:22

Gel%C3%B6scht's gravatar image

Gelöscht
(ausgesetzt)

Ti*k*Z hat eine Library dafür: positioning. In Deinem Code (ohne positioning) war der Abstand zwischen den Zentren der Nodes fix. Mit positioning ist die Syntax marginal anders, man muss das = vor "of" schieben. [![alt text][1]][1] text][1]][2] \documentclass{beamer} \usepackage{tikz} \begin{document} \begin{frame} \usetikzlibrary{shapes, arrows,positioning} \tikzstyle{block} = [rectangle, draw, text width=15em, text centered, rounded corners, anchor=south] \tikzstyle{line} = [draw, -latex'] \begin{tikzpicture}[node distance = 0.5cm] \node [block] (pit) {Create pit file\\ e.g. peachhter.xml}; \node [block, below=of pit] (agent) {Start agent \\peach -a tcp}; \node [block, below=of agent] (start) {Start peach \\peach peachhter.xml TestHTER}; \node [block, below=of start] (logs) {Examine logs}; \path [line] (pit) -- (agent); \path [line] (agent) -- (start); \path [line] (start) -- (logs); \end{tikzpicture} \end{frame} \end{document} **ADDENDUM**: Der obige Code funktioniert, hat aber ein paar unschöne Stellen. Es ist besser, `\usetikzlibrary` in der Preambel zu benutzen. Und anstatt `\tikzstyle` ist es evtl. besser, mit `\tikzset` zu arbeiten. Ausserdem benutze ich gerne `overlayarea`, damit die Slides nicht hüpfen. \documentclass{beamer} \usepackage{tikz} \usetikzlibrary{shapes, arrows,positioning} \tikzset{block/.style={rectangle, draw, text width=15em, text centered, rounded corners, anchor=south}, line/.style={draw, -latex'}} \begin{document} \begin{frame}{Strategy} \begin{overlayarea}{\textwidth}{8cm} \begin{tikzpicture}[node distance = 0.5cm] \node [block] (pit) {Create pit file\\ e.g. peachhter.xml}; \pause \node [block, below=of pit] (agent) {Start agent \\peach -a tcp}; \path [line] (pit) -- (agent); \pause \node [block, below=of agent] (start) {Start peach \\peach peachhter.xml TestHTER}; \path [line] (agent) -- (start); \pause \node [block, below=of start] (logs) {Examine logs}; \path [line] (start) -- (logs); \end{tikzpicture} \end{overlayarea} \end{frame} \end{document} [![alt text][3]][3] [1]: https://texwelt.de/wissen/upfiles/Screen_Shot_2018-04-24_at_1.48.40_AM.pnghttps://texwelt.de/wissen/upfiles/Screen_Shot_2018-04-24_at_1.48.40_AM.png [2]: https://texwelt.de/wissen/upfiles/Screen_Shot_2018-04-24_at_1.48.40_AM.png [3]: https://texwelt.de/wissen/upfiles/beamerani.gif
Klicke auf Einblenden/Ausblenden von Überarbeitungen 1

24 Apr '18, 11:08

Gel%C3%B6scht's gravatar image

Gelöscht
(ausgesetzt)

Ti*k*Z hat eine Library dafür: positioning. In Deinem Code (ohne positioning) war der Abstand zwischen den Zentren der Nodes fix. Mit positioning ist die Syntax marginal anders, man muss das = vor "of" schieben. [![alt text][1]][1] \documentclass{beamer} \usepackage{tikz} \begin{document} \begin{frame} \usetikzlibrary{shapes, arrows,positioning} \tikzstyle{block} = [rectangle, draw, text width=15em, text centered, rounded corners, anchor=south] \tikzstyle{line} = [draw, -latex'] \begin{tikzpicture}[node distance = 0.5cm] \node [block] (pit) {Create pit file\\ e.g. peachhter.xml}; \node [block, below=of pit] (agent) {Start agent \\peach -a tcp}; \node [block, below=of agent] (start) {Start peach \\peach peachhter.xml TestHTER}; \node [block, below=of start] (logs) {Examine logs}; \path [line] (pit) -- (agent); \path [line] (agent) -- (start); \path [line] (start) -- (logs); \end{tikzpicture} \end{frame} \end{document} [1]: https://texwelt.de/wissen/upfiles/Screen_Shot_2018-04-24_at_1.48.40_AM.png

Willkommen, erstes Mal hier? Schau mal unter FAQ!

×