I need to create a document in which pages are horizontal and each of them contains eight rectangles that take exactly and all the paper size. After some tries I came up with a code like this MWE:
\documentclass[a4paper]{article}
\usepackage[landscape,margin=0mm]{geometry}
\usepackage{parskip}
\usepackage{tikz}
\begin{document}
\pgfmathsetmacro{\myWidth}{74}
\pgfmathsetmacro{\myHeight}{105}
\begin{tikzpicture} % #1
\draw (0,0) rectangle (\myWidth mm,\myHeight mm);
\end{tikzpicture}
\begin{tikzpicture} % #2
\draw (0,0) rectangle (\myWidth mm,\myHeight mm);
\end{tikzpicture}
\begin{tikzpicture} % #3
\draw (0,0) rectangle (\myWidth mm,\myHeight mm);
\end{tikzpicture}
\begin{tikzpicture} % #4
\draw (0,0) rectangle (\myWidth mm,\myHeight mm);
\end{tikzpicture}
\begin{tikzpicture} % #5
\draw (0,0) rectangle (\myWidth mm,\myHeight mm);
\end{tikzpicture}
\begin{tikzpicture} % #6
\draw (0,0) rectangle (\myWidth mm,\myHeight mm);
\end{tikzpicture}
\begin{tikzpicture} % #7
\draw (0,0) rectangle (\myWidth mm,\myHeight mm);
\end{tikzpicture}
\begin{tikzpicture} % #8
\draw (0,0) rectangle (\myWidth mm,\myHeight mm);
\end{tikzpicture}
\end{document}
It nearly does what I need, but it leaves some space between the rectangles:
It's only 0,8 mm large, but I need to remove it and make the rectangles touch each other. I also suppose that there is some space below the rectangles because tikzpicture
s 5 to 8 are put on a second page instead of below the 1 to 4 set.
How can I remove the space around the tikzpicture
environments?
Note 1: I can't draw all the rectangles in the same tikzpicture
because in my real document the rectangles are automatically filled with datas from a CSV file (thanks @Schrödinger's cat; I forgot to specify that!). Well, I could draw the document with a "per page" code, but I would prefer to keep it simpler and use a "per rectangle" approach.
\end{tikzpicture}%
then newline and then\begin{tikzpicture}
....%
has to be placed just after\end{tikzpicture}
to remove this unwanted spacetikzpicture
#4 the other ones appear in another page.