Page LayoutProblems with \savebox designing a postcard

Information and discussion about page layout specific issues (e.g. header and footer lines, page formats, page numbers).
Post Reply
jocom
Posts: 25
Joined: Fri May 07, 2010 4:28 pm

Problems with \savebox designing a postcard

Post by jocom »

Hi,

I am having some problems with \savebox.
My girlfriend likes to make postcards (those folded ones with nifty edges and layers and such).
Now we wanted to design a postcard which we would print and then fold etc...
Check the attachment to get an idea for the design.

So I came up with this draft.

Code: Select all

\documentclass[10pt]{article}
\usepackage[utf8x]{inputenc}

\usepackage{calc}

\def\totalheight{13cm} % Height of the unfolded card
\def\totalwidth{29.73cm} % Width of the unfolded card

\def\cardheight{13cm} % Height of the folded card
\def\cardwidth{13cm} % Width of the folded card
\def\flapwidth{\totalwidth-2\cardwidth} % Width of the flap

\usepackage[	papersize={\totalwidth,\totalheight},
		body={\totalwidth,\totalheight}
]{geometry}

% Declaration of the boxes
\newsavebox{\frontside}
\newsavebox{\backside}
\newsavebox{\innerleft}
\newsavebox{\innerright}
\newsavebox{\flapinner}
\newsavebox{\flapouter}
% Text in the boxes
\savebox{\frontside}[\cardwidth][l]{The frontside text}
\savebox{\backside}[\cardwidth][l]{The backside text}
\savebox{\innerleft}[\cardwidth][c]{The text on the inside, left.}
\savebox{\innerright}[\cardwidth][c]{The text on the inside, right.}
\savebox{\flapinner}[\flapwidth][l]{Flap inner text}
\savebox{\flapouter}[\flapwidth][l]{Flap outer text}

\begin{document}
% Placement of the boxes
\usebox{\flapouter}
\usebox{\backside}
\usebox{\frontside}
% \newlength{\myboxlen}
% \settowidth{\myboxlen}{\usebox{\flapouter}}
% \noindent
% \rule{\myboxlen}{1pt}\\
% box size: \the\myboxlen
\newpage
\usebox{\innerleft}
\usebox{\innerright}
\usebox{\flapinner}
\end{document}
But in the PDF the \backside and \frontside are vanished. Moreover when uncommenting the 5 commented lines between the \usebox commands, it shows up that all the \savebox'es have width 0.0pt.

Does anyone know what I'm doing wrong? I really need such fixed width boxes (I think).

Greetings,
jocom
Attachments
GIF showing the idea of the design.
GIF showing the idea of the design.
design.gif (7.7 KiB) Viewed 2128 times

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

jocom
Posts: 25
Joined: Fri May 07, 2010 4:28 pm

Problems with \savebox designing a postcard

Post by jocom »

Hi everybody,

I've been looking around for a solution. Partly by trying to solve my problem with the use of columns (see the thread http://www.latex-community.org/forum/vi ... =47&t=8822). But that did not succeed.

I'm sure there must be a solution to this by using boxes. But I'm not familiar enough with boxes to see how. Can someone point to a solution, give some hints, or thoughts.

In some sense I would live something analogue to the "<div>" in html. But of course I can't design this in html, because it lacks all the typographic features that TeX supports.

Thanks in advance for any tips or solutions,

jocom
Post Reply