Tabellen in LateX


http://blog.modelworks.ch/?p=153

1. Sehr einfache Tabelle


Nicht empfehlenswert.

{|cellpadding="10"
|-valign="top"
|

||

||

|
}



2. Tabelle mit Rand


\begin{table}
    \center
    \begin{tabular}{|l|l|l|}
      \hline
      1 & 2 & 3 \\ \hline
      4 & 5 & 6 \\ \hline
      7 & 8 & 9 \\ \hline
    \end{tabular}
    \caption{Zutreffende Normen und Gesetze}
    \label{tab:ZutreffendeNormenUndGesetze}
\end{table
}



3. Tabelle mit tabularx


Bessere möglichkeiten der Textausrichtung, aber es geht noch besser mit tabulary...

\begin{table}[H]
\label{tab:RelevanteRegularien}
\tablestyle
\begin{tabularx}{\textwidth}{lXXlX
}
\tableheadcolor
   \tablehead Kurzbezeichnung &
   \tablehead Ausrührliche Bezeichnung &
   \tablehead Typ &
   \tablehead Stellt Anforderungen an \tabularnewline
%
\tablebody
   \textit{Beschreibung} & Inhalt & Inhalt & Inhalt  \tabularnewline
   \textit{Beschreibung} & Inhalt & Inhalt & Inhalt  \tabularnewline
\tableend
\end{tabularx}
\caption{Tabelle mit tabularx}
\end{table
}



4. Tabellen mit tabulary


Die besten Ergebnisse erzielte ich mit tabulary

\begin{table}[H]
\tablestyle
\begin{tabulary}{\linewidth}{LLJ
}
\tableheadcolor
   \tablehead Spaltenüberschrift 1 &
   \tablehead Spaltenüberschrift 2  &
   \tablehead Spaltenüberschrift 3 \tabularnewline
%
\tablebody
   Zeile 1; Spalte 1
   & Zeile 1; Spalte 2
   & Zeile 1; Spalte 3
   \tabularnewline \hline
   %
   Zeile 2; Spalte 1
   & Zeile 2; Spalte 2
   & Zeile 2; Spalte 3
   \tabularnewline \hline
   %
\tableend
\end{tabulary}
\caption{Tabelenbeschriftungstext}
\label{tab:ChecklisteRegAnforderungen}
\end{table
}



5. Tabelle mit alternierender Farbe


\begin{table}[H]
   \tablestyle
   \tablealtcolored
   \begin{tabular}{*{2}{v{0.45\textwidth}}
}
   \hline
   \tableheadcolor
\tablehead Tabellenkopf &
\tablehead Tabellenkopf \tabularnewline\hline
% Zwischenkopf
\multicolumn{2}{>{\columncolor{tablesubheadcolor}}l}{
   \bfseries Zwischenkopf
} \tabularnewline

\tablebody
 Inhalt  & Inhalt \tabularnewline
 Inhalt  & Inhalt \tabularnewline
 Inhalt  & Inhalt \tabularnewline
 Inhalt  & Inhalt \tabularnewline
 Inhalt  & Inhalt \tabularnewline
 Inhalt  & Inhalt \tabularnewline
\multicolumn{2}{>{\columncolor{tablesubheadcolor}}l}{
   \bfseries Zwischenkopf
} \tabularnewline
 Inhalt  & Inhalt \tabularnewline
 Inhalt  & Inhalt \tabularnewline
   \hline
   \end{tabular}
\end{table
}




6. Last used



\newcolumntype{L}[1]{>{\raggedright\let\newline\\\arraybackslash\hspace{0pt}}m{#1}}
\newcolumntype{C}[1]{>{\centering\let\newline\\\arraybackslash\hspace{0pt}}m{#1}}
\newcolumntype{R}[1]{>{\raggedleft\let\newline\\\arraybackslash\hspace{0pt}}m{#1}
}

  • here
  • bottom
  • top
  • paragraph


\begin{table}[h]
\centering
\caption{Energy portions to process one sample of data, start up time and transition time depending on core clock frequency and oscillator type (RC: resistor-capacitor; XO: crystal).}
  \begin{tabular}{|p{1.8cm}|R{1.3cm}|R{1.3cm}|R{1.3cm}|R{1.3cm}|}
  \addlinespace
 \hline
Core clock  &   Proc. time  &   Proc. energy    &   Start-up energy &   Trans. energy   \\
     \hline
1.2 MHz RC  &   253.6 $\mu$s    &   376.5 nJ    &   171.9 nJ    &   60.0 nJ \\
6.6 MHz RC  &   46.4 $\mu$s &   351.6 nJ    &   116.8 nJ    &   51.7 nJ \\
11 MHz RC   &   28.0 $\mu$s &   320.8 nJ    &   103.0 nJ    &   43.3 nJ \\
14 MHz RC   &   21.6 $\mu$s &   300.4 nJ    &   97.5 nJ &   41.3 nJ \\
21 MHz RC   &   16.8 $\mu$s &   305.1 nJ    &   92.5 nJ &   35.3 nJ \\
28 MHz RC   &   12.8 $\mu$s &   271.4 nJ    &   71.2 nJ &   33.1 nJ \\
48 MHz XO   &   4.4 $\mu$&   163.3 nJ    &   987.1 nJ    &\textless 13.2 nJ  \\


  \hline
  \end{tabular}
\label{tab:resClock}
\end{table
}






Siehe auch
Valid XHTML :: Valid CSS: :: Powered by WikkaWiki