Tables in Latex. Multiline, right alignment

I used tabularx package.
Additional definitions:
\usepackage{array}
\newcolumntype{L}{>{\raggedright\arraybackslash}X} % left multiline alignment
\newcolumntype{R}{>{\raggedleft\arraybackslash}X}  % right multiline alignment

Table:
\begin{tabularx}{\textwidth}{@{}p{0.8\linewidth} R}
 Text, aligned to the left, without margin \newline
 Tex in the same cell on the next line   
 &                                          % next column delimiter
 Text aligned to the right \newline second line
\end{tabularx}

Here we have one columt with 80% width and one column with right alignment
@{} is required to suppress left margin in the first column.

Results:


No comments:

Post a Comment