Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I'm in \documentaclass[landscape]{article} and I'm trying to figure out how I can put together a bunch of figures I've created (with the generous help of TSE users) on this document.

What I'm trying to do is this

Diagram

I've tried using help grid to at least get the arrows in place, but the grid keeps shifting every time I add something.

\PassOptionsToPackage{dvipsnames}{xcolor} 
\documentclass[landscape]{article}
\usepackage{tikz}
\usepackage{pgf}
\usetikzlibrary{shapes.geometric}
\usepgflibrary{decorations.shapes}
\usetikzlibrary{decorations.shapes, arrows, decorations.markings, shapes, fit, arrows, positioning, trees, mindmap, calc}
\begin{document}
\begin{tikzpicture}
% figures

% text

% figures

% text

% and last time down 

\end{tikzpicture}
\end{document}

Since I don't have a minimal working code, I don't expect to magically work this out for me, but any advice or examples would be helpful.

share|improve this question
3  
Have you tried using includegraphic in nodes? –  Raphael Apr 6 '13 at 10:18
    
@Raphael Do you mean to literally import a tikz figure into a node, like a circle node? –  AlanH Apr 6 '13 at 19:24

1 Answer 1

up vote 3 down vote accepted

If you have figures as some kind of image file (including PDF and somesuch), you can simply use includegraphics in node texts. For example:

\documentclass{article}
\usepackage{tikz,graphicx}
\usetikzlibrary{positioning,arrows}
\begin{document}
  \begin{tikzpicture}[auto]
    \node (center) {some text here};

    \node[above left=of center]  (fig1) {\includegraphics{smile.pdf}};
    \node[below left=of center]  (fig2) {\includegraphics{smile.pdf}};
    \node[above right=of center] (fig3) {\includegraphics{smile.pdf}};
    \node[below right=of center] (fig4) {\includegraphics{smile.pdf}};
    \node[above=of fig4,align=center] (rcenter) {some more \\ text};


    \draw[double] (fig1) -- (center)
                  (fig3) -- (center)
                  (fig4) -- (rcenter);
    \draw[double,-stealth]  (center) -- (fig2);
    \draw[double,-stealth]  (center) -- (fig4);
    \draw[double,-stealth]  (rcenter) -- (fig3);
  \end{tikzpicture}
\end{document}

This code compiles to:

enter image description here

As you can see, the arrows line up automatically since regular paths always anchor at the center anchor by default. If your figures resp. their spacing is not as regular, you might want to look into layers, draw the arrows first and then the text nodes over them.

In order to get PDFs out of TikZ code, you can use standalone:

\documentclass{standalone}
\usepackage{tikz,wasysym}
\begin{document}
  \begin{tikzpicture}
    \node {\smiley};
  \end{tikzpicture}
\end{document}

This compiles to the smiley image seen above, that is in particular without superfluous whitespace.

share|improve this answer
    
Do I need to include the file location in includegraphics? I keep getting an error. (Of course, I replaced smile.pdf with my own pdf). –  AlanH Apr 6 '13 at 22:25
    
@AlanH Yes, you need to give a path to the file. –  Raphael Apr 7 '13 at 0:12

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.