2

I would like if possible using array environment, to align the last column of my array to the right and at the end of the page. Something like that:

\begin{array}{\textwidth}{l r}
   first column & second column
\end{array}

But of course this does not work. Does anyone know how to achieve this ? Thanks in advance.

  • Why do you need the environment array? You can use the environment tabularx provided by the package tabularx. – Marco Daniel Apr 2 '12 at 12:36
  • Usually I only write math in my array, so I find it annoying to have to put some '$' in each case of my array. But this is right that I don't absolutly need the array package. – Archimondain Apr 2 '12 at 12:44
6
\usepackage{array}

then

\noindent
\begin{tabular*}{\textwidth}{>{$}l<{$}@{\extracolsep{\fill}}>{$}r<{$}@{}}
...

.

will push the last column over to the right, and use math mode as for an array environmen.

  • It does flush the array to the right, but I would like only the last column to be flushed on the right – Archimondain Apr 2 '12 at 12:46
  • answer updated for this case – David Carlisle Apr 2 '12 at 12:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.