I need to draw the plans of a house and make them fit on a page. I would really like to have one set of dimensions/coordinates so that I can match relatively easy the dimensions/coordinates from real life with those from the TeX file (I tried in the past to have some dirty scalings, i.e. one dimension in the TeX file others in the real life, but that's not worthing).
I noticed there are some discussions regarding scaling and tikz and I don't seem to make it work. I tried FG's answer from this discussion but the drawings aren't scaled into a page (I simply added a \newpage, then my code and also my \newcommands between \makeatother and \begin{document})
Can you please give me a hand? I thank you for your time and support! (I'm using Miktex 2.9.4248)
\newpage
\noindent real size thing
\begin{center}
\begin{tikzpicture}[
xscale=2,
yscale=2,
virtual/.style={thin,dashed}
]
\squareNVSE{0.0}{0.0}
\mySquareNVSE{1001.0}{0.0}{1000.0}{1000.0}
\end{tikzpicture}
\end{center}
\newpage
\noindent scaled thing
\begin{center}
\begin{scaletikzpicturetowidth}{\textwidth}
\begin{tikzpicture}[
% xscale=2,
% yscale=2,
virtual/.style={thin,dashed}
]
\squareNVSE{0.0}{0.0}
\mySquareNVSE{1001.0}{0.0}{1000.0}{1000.0}
\end{tikzpicture}
\end{scaletikzpicturetowidth}
\end{center}
\end{document}
My newcommands simply draw 1x1 meter squares:
\newcommand*\squareNVSE[2]{
\draw [draw=gray, very thin]
( #1 mm, #2 mm)
-| ( #1 mm + 1000.00mm, #2 mm - 1000.00mm)
-| ( #1 mm, #2 mm);
}
\newcommand*\mySquareNVSE[4]{
\draw [draw=gray, very thin]
( #1 mm, #2 mm) % #1 & #2 = the coords of the starting point
-| ( #1 mm + #3 mm, #2 mm - #4 mm) % #3 & #4 = length and width
-| ( #1 mm, #2 mm);
}
