Does TikZ have a copy
command? the copy command means, e.g.,
I draw a rectangle first, then I draw whatever e.g., circle, writing text etc. in the rectangle. let me define a source object
that includes all objects in the rectangle and the rectangle itself. Now I want to copy
the source object
based on the lower left corner of rectangle to a new position.
@Martin @Jan @Caramdir, following is an example, but it has some error. please also refer to my comment.
\documentclass[titlepage,a4paper]{article}
\usepackage[english]{babel}
\usepackage{TikZ} %Create PostScript and PDF graphics in TeX
\begin{document}
\begin{tikzpicture}[scale=0.962661,thick]
\foreach \xbase/\ybase in {0mm/0mm,46.700000mm/0mm}
{
%grid line
\draw[xstep=11.200000mm,ystep=12.051000mm] (\xbase,\ybase) grid (\xbase + 44.800000mm,\ybase + 36.153000mm);
}
\end{tikzpicture}
\end{document}
@Martin @Jan @Caramdir, i updated the above example. it is better except that the most left vertical line of right grid is missing.
\documentclass[titlepage,a4paper]{article}
\usepackage[english]{babel}
\usepackage{TikZ} %Create PostScript and PDF graphics in TeX
\begin{document}
\begin{tikzpicture}[scale=0.962661,thick]
\foreach \xbase/\ybase/\xoffset in {0mm/0mm/0mm,44.800000mm/0mm/1.9mm}
{
%grid line
\draw[xstep=11.200000mm,ystep=12.051000mm,xshift=\xoffset] (\xbase,\ybase) grid (\xbase + 44.800000mm,\ybase + 36.153000mm);
}
\end{tikzpicture}
\end{document}
it seemed that grid
always uses the origin (0,0) as its reference. my way is to add shift to the base point and cares about the coordinates by myself. but the most left vertical line of right grid is missing. i don't know why. it looked like that the line should be in the range of the grid.
is there a rationale for this? i mean make grid
use (x,y) instead of (0,0) as the reference point.
foreach
loop seems a solution. define the base point and new position points in loop variable, then draw everything in loop body.pic
syntax to define repeatable "units" of TikZ code.