Advertisement
Guest User

Untitled

a guest
May 26th, 2016
58
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.77 KB | None | 0 0
  1. usepackage{tabularx} %% tables with auto size
  2. usepackage{array} %% tables content alignment
  3. newcolumntype{L}[1]{>{raggedrightletnewline\arraybackslashhspace{0pt}}m{#1}}
  4. newcolumntype{C}[1]{>{centeringletnewline\arraybackslashhspace{0pt}}m{#1}}
  5. newcolumntype{R}[1]{>{raggedleftletnewline\arraybackslashhspace{0pt}}m{#1}}
  6.  
  7. begin{document}
  8.  
  9. begin{center}
  10. begin{tabularx}{textwidth}{| X | X | R{2cm} | R{2cm} |}
  11. Column1 & Column2 & Column3 & Column4 \ hline
  12. a & Some Value & This is a very long right-aligned text that should break automatically & This is a very long right-aligned text that should break automatically \ hline
  13. b & Some Value & Shorter right-aligned text & Shorter right-aligned text \ hline
  14. end{tabularx}
  15. end{center}
  16.  
  17. end{document}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement