quinta-feira, 1 de novembro de 2012

Latex - Tabela




//Tabela Simples
\begin{table}
    \begin{tabular}{|c|c|}
        \hline
        A & B \\ \hline
        C   & C \\
        \hline
    \end{tabular}
\end{table}

//Tabela mais kakko


\documentclass[11pt]{article}
\usepackage[table]{xcolor}
\definecolor{lightgray}{gray}{0.9}
\begin{document}
\begin{table}[ht]
\caption{default}
\begin{center}
\rowcolors{1}{}{lightgray}
\begin{tabular}{r|rrrrr}
  \hline
 & 1 & 2 & 3 & 4 & 5 \\
  \hline
  1 &  2.36 & 1.08 & -0.49 & -0.82 & -0.65 \\
  2 & -0.68 & -1.13 & -0.42 & -0.72 & 1.51 \\
  3 & -1.00 & 0.02 & -0.54 & 0.31 & 1.28 \\
  4 & -0.99 & -0.54 & 0.97 & -1.12 & 0.59 \\
  5 & -2.35 & -0.29 & -0.53 & 0.30 & -0.30 \\
  6 & -0.10 & 0.06 & -0.85 & 0.10 & -0.60 \\
  7 & 1.28 & -0.46 & 1.33 & -0.66 & -1.80 \\
  8 & 0.80 & 0.46 & 1.37 & 1.73 & 1.93 \\
  9 & -0.75 & 0.28 & 0.51 & 0.19 & 0.58 \\
  10 & -1.64 & -0.12 & -1.17 & -0.10 & -0.04 \\
   \hline
\end{tabular}
\end{center}
\end{table}
\end{document}

---------------------------------------------------------


\begin{table}[ht]
\centering
\begin{tabular}{c|ccccccc}
\hline
& col1 & col2 & col3 & col4 & col5 & col6 & col7 \\ 
\hline
\rowcolor{LightCyan}
row1& \ra & \ra & \ra & \ra & \ra & \ra & \ra \\
row2& \ra & \ra & \ra & \ra & \ra & \ra & \ra \\
\rowcolor{LightCyan}
row3& \ra & \ra & \ra & \ra & \ra & \ra & \ra \\ 
row4& \ra & \ra & \ra & \ra & \ra & \ra & \ra \\
\rowcolor{LightCyan}
row5& \ra & \ra & \ra & \ra & \ra & \ra & \ra \\
row6& \ra & \ra & \ra & \ra & \ra & \ra & \ra \\
\hline
\end{tabular}
\end{table}




Nenhum comentário: