I've got something like the following:
\documentclass[tikz]{standalone}% Does not support leap years.
\usepackage{tikz}
\usepackage[paperwidth=12cm, paperheight=25cm, margin=0cm]{geometry}
\newcommand{\printdots}[1]{
\begin{tikzpicture}[
x=1cm,
y=1cm,
xscale = 1,
yscale=1,
]
%Draw dots
\foreach \y in {1, 1.5, ..., 24} {
\foreach \x in {1, 1.5, ..., 11} {
\fill[color=black] (\x,\y) circle (0.05);
}
}
\end{tikzpicture}%
}
\begin{document}
\foreach \n in {1,...,2}{%
\printdots
}
\end{document}
i.e. I'd like to make a 12x15cm standalone, with 2 pages. On each page, I'd like to print dots 0.5cm apart, starting 1cm from the edge.
(Eventually, I'd like to do more complex things, so if there's an easier way to print dots, that probably won't solve my problem).
However, when I compile this, it ends up with a large space on the right and bottom, missing dots on the top and left. In other words, the tikz coordinates aren't matching the page coordinates.
Is there any way to make my Tikz coordinates exactly match the page coordinates in cm? Basically, I want to tell tikz not to automatically scale the picture at all based on what I have in it.
I've seen lots of tikz posts on attaching specific nodes to a page position, but not how to align the coordinates with the page position.
article
? fortikz
try to useoverlay
ansremember picture
for exact positioning your dots on page.