Search code examples
latextabularpdflatex

Triangle with Latex


How can I reproduce this table with Latex?

table

Some help would be appreciated.


Solution

  • My suggestion for this table:

    \documentclass{article}
    
    \begin{document}
    
    Text.
    
    \begin{table}[h]
    \sffamily
    \begin{tabular}{r|*{12}{r}}
     & \multicolumn{12}{l}{Development year}\\
    U/W year & 1 & 2 & 3 & 4 & 5 & 6 & 7 & 8 & 9 & 10 & 11 & 12 \\
    \hline
    2001 & n & n & n & n & n & n & n & n & n & n & n & n\\
    2002 & n & n & n & n & n & n & n & n & n & n & n & \\
    2003 & n & n & n & n & n & n & n & n & n & n & & \\
    2004 & n & n & n & n & n & n & n & n & n & & & \\
    2005 & n & n & n & n & n & n & n & n & & & & \\
    2006 & n & n & n & n & n & n & n & & & & & \\
    2007 & n & n & n & n & n & n & & & & & & \\
    2008 & n & n & n & n & n & & & & & & & \\
    2009 & n & n & n & n & & & & & & & & \\
    2010 & n & n & n & & & & & & & & & \\
    2011 & n & n & & & & & & & & & & \\
    2012 & n & & & & & & & & & & & \\
     & & & & & & & & & & & & \\
    \hline
    link ratios: & a & b & c & d & e & f & g & h & i & j & k & %l
    \end{tabular}
    \end{table}
    
    Text.
    
    \end{document}
    

    Within the "fine tuning", I noticed that cells in lines 2 and 3-16 are both right-aligned, but with different right margins: write a comment if you wish to reproduce that effect precisely.