separate xmpp arch figure from text for reusablility
authorRoland Hieber <rohieb@rohieb.name>
Thu, 6 Feb 2014 06:01:05 +0000 (07:01 +0100)
committerRoland Hieber <rohieb@rohieb.name>
Sun, 9 Feb 2014 16:21:41 +0000 (17:21 +0100)
fig-xmpparch.tex [new file with mode: 0644]
sec-xmpp.tex

diff --git a/fig-xmpparch.tex b/fig-xmpparch.tex
new file mode 100644 (file)
index 0000000..248db21
--- /dev/null
@@ -0,0 +1,14 @@
+\def\nodelist{
+       juliet/{(-1,-1)}/XMPP client \code{juliet@example.net}/below/computer,
+       examplenet/{(-1,1)}/XMPP server \code{example.net}/above/server,
+       imexampleorg/{(1,1)}/XMPP server \code{im.example.org}/above/server,
+       romeo/{(1,-1)}/XMPP client \code{romeo@im.example.org}/below/computer%
+}
+\foreach \name/\pos/\text/\tpos/\icon in \nodelist {
+       \node (\name) at \pos { \includegraphics[width=2em]{icon-\icon.pdf} };
+       \node[\tpos=of \name,iconlabel] (\name text) { \text };
+}
+\draw[<->,dashed] (juliet) -- node[anchor=east,label]{s2c} (examplenet);
+\draw[<->] (examplenet) -- node[anchor=south,label]{s2s} (imexampleorg);
+\draw[<->,dashed] (imexampleorg) -- node[anchor=west,label]{s2c} (romeo);
+
index 213f3c2..15321bc 100644 (file)
@@ -24,19 +24,7 @@ client and server.
   \tikzstyle{iconlabel}=[text width=3cm, align=center, font=\footnotesize]
   \tikzstyle{label}=[font=\footnotesize]
   \begin{tikzpicture}[node distance=0pt,scale=1.5,>=stealth,thick]
   \tikzstyle{iconlabel}=[text width=3cm, align=center, font=\footnotesize]
   \tikzstyle{label}=[font=\footnotesize]
   \begin{tikzpicture}[node distance=0pt,scale=1.5,>=stealth,thick]
-    \def\nodelist{
-      juliet/{(-1,-1)}/XMPP client \code{juliet@example.net}/below/computer,
-      examplenet/{(-1,1)}/XMPP server \code{example.net}/above/server,
-      imexampleorg/{(1,1)}/XMPP server \code{im.example.org}/above/server,
-      romeo/{(1,-1)}/XMPP client \code{romeo@im.example.org}/below/computer%
-    }
-    \foreach \name/\pos/\text/\tpos/\icon in \nodelist {
-      \node (\name) at \pos { \includegraphics[width=1cm]{icon-\icon.pdf} };
-      \node[\tpos=of \name,iconlabel] (\name text) { \text };
-    }
-    \draw[<->,dashed] (juliet) -- node[anchor=east,label]{s2c} (examplenet);
-    \draw[<->] (examplenet) -- node[anchor=south,label]{s2s} (imexampleorg);
-    \draw[<->,dashed] (imexampleorg) -- node[anchor=west,label]{s2c} (romeo);
+    \input{fig-xmpparch.tex}
   \end{tikzpicture}
   \centering
   \caption{XMPP architecture, showing server-to-server (s2s) and
   \end{tikzpicture}
   \centering
   \caption{XMPP architecture, showing server-to-server (s2s) and
This page took 0.032308 seconds and 4 git commands to generate.