[texhax] alignment of parbox and fbox
Uwe Lück
uwe.lueck at web.de
Tue Sep 8 16:28:47 CEST 2009
Put \vphantom{p} into the first line of the first and third \parbox -- Uwe.
At 15:39 08.09.09, bill lam wrote:
>Hi,
>
>I got some troubles in aligning bill-to and delivery-to box in a
>invoice heading. I attach a sample source and the pdf output. My
>problems are
>
>1. I guess the letter 'p' in "Ship" has a descender that make the
> frame lower than that of the left because "To" got no descenders.
>
>2. When the content is empty such as the last fbox, its height is
> smaller than that of the first two box. I also tried specified a
> height for fbox but no avail.
>
>I want to known how to make all these 3 fbox to be exact the same
>height and aligns to each other. Thanks in advance.
>
>
>% papersize, size of letters
>\documentclass[a4paper]{article}
>\usepackage[english]{babel}
>\usepackage[utf8]{inputenc}
>\usepackage{geometry}
>\geometry{left=1cm,top=1.5cm}
>% do not set pagenumbers
>\usepackage{nopageno}
>
>\begin{document}
>\begin{minipage}[t]{\textwidth}
> \parbox[t]{.31\textwidth}{%
> \bf To:\\
> \fbox{\parbox{.3\textwidth}{%
> Mr. No Name \\
> Door No. \\
> Street \\
> City}}}
> \parbox[t]{.31\textwidth}{%
> \bf Ship To:\\
> \fbox{\parbox{.3\textwidth}{%
> Mr. No Name \\
> Door No. \\
> Street \\
> City}}}
> \parbox[t]{.31\textwidth}{%
> \bf ~ \\
> \fbox{\parbox{.3\textwidth}{%
> ~ \\
> ~ \\
> ~ \\
> ~ }}}
>\end{minipage}
>
>\end{document}
>
>
>--
>regards,
>====================================================
>GPG key 1024D/4434BAB3 2008-08-24
>gpg --keyserver subkeys.pgp.net --recv-keys 4434BAB3
>
>_______________________________________________
>TeX FAQ: http://www.tex.ac.uk/faq
>Mailing list archives: http://tug.org/pipermail/texhax/
>More links: http://tug.org/begin.html
>
>Automated subscription management: http://tug.org/mailman/listinfo/texhax
>Human mailing list managers: postmaster at tug.org
More information about the texhax
mailing list