Hi all, I'm having an annoying minor issue with latex that I just can't
seem to get past and was hoping to tap the collective wisdom of slug
once more for a Clue.

I'm writing a template for an invoice that we will send to the customer.
It's in landscape format and has a lefthand section (with all the
details fo the order and price etc - which the customer keeps) and a
righthand section (which is a summary section that is torn off by the
customer and sent in with their payment).

Each side has some complicated stuff in it for layout, so I decided to
write two \minipage sections and then use a tabular for left/right
layout. I've put each \minipage into its own \newcommand just to make
layout look simpler so at its simplest form I have:

\begin{tabular}{l|r}
  \makeleftpage & \makerightpage \\
\end{tabular}


Now when the leftpage function has just, say, some text in it - there's
no problem. They display nicely to the left/right of each other - no
matter how complicated the right-hand page is. However, the moment that
I added the \minipage to the left-hand side it all broke. the left and
right-hand side overlap one another (the text printing over the top of
the other text).


\newcommand{\makerightpage}{
    \begin{minipage}{0.25\textwidth}
       whatever\\
       whatever\\
       whatever\\
    \end{minipage}
}

so this works:

\newcommand{\makeleftpage}{
    some text here
}

and this doesn't:

\newcommand{\makeleftpage}{
    \begin{minipage}{0.75\textwidth}
       whatever\\
       whatever\\
       whatever\\
    \end{minipage}
}


though it's hard to see as the line doesn't expand across the whole
page. A more complete example is given at the bottom of this email so
you can compile it and see what it looks like.




is there something that I have misunderstood in how these things work?

Does anybody know of the way that it should be done instead?


Cheers and thanks,
Taryn


\documentclass[10pt]{article}
\usepackage{a4}
\begin{document}

\newcommand{\makerightpage}{
    \begin{minipage}{0.25\textwidth}
       whatever\\
       whatever\\
       whatever\\
    \end{minipage}
}

\newcommand{\makeleftpage}{
    \begin{minipage}{0.75\textwidth}
        %%% Header section %%%
        \begin{tabular}{lcr} 
           \parbox{5cm}{ % customer details and address
               Insured Name here\\
               Customer name here\\
               Street address here\\
               Suburb, State PCD}
            &
            Logo here
            &
            \begin{tabular}{ll} % policy identifiers
               Date:       & policy date here\\
               Invoice No: & 0510abcdef\\
               Policy No:  & NSW 0510 ghijkl \\
               Amount:     & \$ AAA.aa\\
            \end{tabular}
            \\ %%% end of header section row %%%
        \end{tabular}
    \end{minipage}
}

\begin{tabular}{l|r}
  \makeleftpage & \makerightpage \\
\end{tabular}

\end{document}








-- 
This .sig temporarily out-of-order.
We apologise for any inconvenience
                    - The Management
-- 
SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/
Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html

Reply via email to