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 using tikz (tikzpicture to be precise) to make some "drawings" (trees). The problem is that my "drawing" is too long to fit on one single page (it's too long). I was wondering what was the best way to display it on two (or more) pages :

  • crop the picture and display it twice, first half on one page and second on second

  • use some option that would allow to display the image on the first page and continue on the second page if the picture is too long... (but how?)

  • ?

Thanks,

share|improve this question

1 Answer 1

up vote 14 down vote accepted

In my proposed solution, the picture is put into a macro \mypicture which takes rectangle coordinates as parameters. These are used to set the bounding box and clip the picture. This macro is used twice for displaying the picture. Here, I used some overlap between the two parts of the long picture but this can be adjusted easily.

\documentclass{article}
\usepackage{tikz}
\begin{document}

\newcommand*{\mypicture}[2]{%
  \begin{tikzpicture}
  \path[draw=red,use as bounding box] (#1) rectangle ++(#2);% remove 'draw=red' if you don't want a frame
  \clip (#1) rectangle ++(#2);
  % Here comes the actual picture:
  \foreach \n in {1,...,10}
  {
    \path[fill=red!\the\numexpr10*\n\relax!blue,draw=black]
      (0,\the\numexpr3*\n\relax) circle (2cm) node {\Huge\n};
  }
  \end{tikzpicture}
}

\mypicture{-5,15}{10,18}
\clearpage
\mypicture{-5,0}{10,18}

\end{document}

enter image description here

share|improve this answer
    
Thanks for your quick response ! –  mwoua Jul 30 at 15:11

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.