# LaTeX3 and pauper's coffins

Frank Mittelbach in this answer said: "I would be interested who would attempt to do that in the plain TeX box model approach. In the MWE below is my approach which I will from now onwards call it for simplicity, the pauper's coffins approach".

On the left image above, is the finished page (scaled down, using a scalebox) and with \debug set to false. On the right you can view the boxes with a border to visualize what is happening, by setting \@debugtrue. The shaded rectangle on the top left of the second image is a strut, which I used to position the first box. There is also a rule at the bottom left. I used various methods to move the boxes around to illustrate the different ways one can skin the cat.

If one removes all the fbox, the scalebox and the first vbox that is used in order to make the scalebox work, properly, I am sure that the code can be reduced to a one line statement and here is my question: Can you produce this layout with a one line statement? or alternatively how can this code be minimized using the same number of boxes.

I have used images rather than typesetting the text, as this is trivial and did not want this question to grow to be too long. Also is XeLaTeX based in order to allow experimenting with fonts, if anyone would like to try using text rather than images.

% !TEX TS-program = xelatex
% !TEX encoding = UTF-8

\documentclass[11pt]{article}
\usepackage[top=0pt,left=1.5cm,right=1.5cm,bottom=1.5cm,showframe=flse]{geometry}
\usepackage{fontspec}
\defaultfontfeatures{Mapping=tex-text}
\usepackage{xunicode}
\usepackage{xltxtra}
\usepackage{geometry}
\usepackage{xcolor}
\usepackage{graphicx}
\makeatletter
\newif\if@debug
\@debugfalse
\if@debug\def\rulecolor{gray}\else\def\rulecolor{white}\fboxsep0pt \fboxrule0pt\fi
\makeatother
\begin{document}

\scalebox{0.5}{\vbox{\hbox{{\color{\rulecolor}\rule{2cm}{3cm}} \fbox{\includegraphics{img-01}}}

\hbox{{\color{\rulecolor}\rule{3.8cm}{1pt}} \fbox{\includegraphics{img-02}}\hskip0.8cm \raise7cm\vbox{\fbox{\includegraphics{img-03}}}}

\vspace*{-5cm}\vbox to 0cm{\hbox to 0pt{\hskip 11cm\fbox{\includegraphics{img-04}}}}

\vspace*{-11.7cm}\vbox to 0cm{\hbox to 0pt{\hskip 14.2cm\fbox{\includegraphics{img-05}}}}
}}

\end{document}


For the avoidance of doubt, I think the LaTeX3 approach in solving this type of problem is very good, but as Frank mentioned the user commands need a bit of a thought.

The block images can be downloaded at img-01, img-02, img-03, img-04 and img-05 (click view raw links).

-