I am attempting to draw a Villard diagram (see, for example, http://retinart.net/graphic-design/secret-law-of-page-harmony/), a classic way of formatting a printed page. So far I have this:
\documentclass[tikz,border=2mm]{standalone}
\usepackage{fp}
\usetikzlibrary{calc,fpu}
%\pgfkeys{/pgf/fpu=true,/pgf/fpu/output format=fixed}
\newlength\textwd
\newlength\textht
\newlength\innerM
\newlength\botM
\newcommand{\villard}[5]{% {page width}{page height}{text block % of page area}{Verso text (not used)} {Recto text}
\begin{tikzpicture}
%\tikzset{fixed point arithmetic}%
\coordinate (c1) at (0,0);
\coordinate (c2) at (#1,0);
\coordinate (c3) at (#1,#2);
\coordinate (c4) at (0,#2);
\coordinate (c5) at ($(c1)!0.5!(c4)$);
\draw (c1) -- (c2) -- (c3) -- (c4) -- cycle;
\draw (c2) -- (c4);
\draw (c5) -- (c3);
\pgfmathsetmacro{\areapcsqr}{sqrt(#3)}%
\pgfmathsetlength{\textwd}{#1*\areapcsqr}%
\pgfmathsetlength{\textht}{#2*\areapcsqr}%
\pgfmathsetlength{\innerM}{(#1-\textwd)*.333333333333}%
\pgfmathsetlength{\botM}{2.0*(#2-\textht)*.333333333333}%
\coordinate (C) at (\innerM+\textwd*0.5,\botM+\textht*0.5);
\node[draw,text width=\textwd, minimum height=\textht,align=center] at (C) {#5};
\draw[red] ($(c4)!0.11!(c2)$) circle (18pt);
\draw[red] ($(c4)!0.78!(c2)$) circle (18pt);
\draw[red] ($(c3)!0.225!(c5)$) circle (18pt);
\end{tikzpicture}
}
\begin{document}
\villard{4.25in}{8.5in}{.45}{}{Right hand text.}
\end{document}
Which produces this:
Close, but not close enough for me. I've tried various things as you can see, but nothing seems to help. I'm using MacTeX2015, recently updated.
What am I missing?
inner sep=0pt
, the corners will fall on the diagonals. They do not, however, correspond to the centers of the red circles (hence a comment and not an answer).inner sep
-- setting that to 0pt worked perfecty. The red circles were guesstimates. Make your comment into an answer an I'll gladly accept it. Thanks.