added colored tables
This commit is contained in:
@@ -181,6 +181,22 @@ Aenean commodo ligula eget dolor.\\
|
|||||||
Aenean massa.
|
Aenean massa.
|
||||||
\end{divider}
|
\end{divider}
|
||||||
|
|
||||||
|
|
||||||
|
\begin{frame}{Tables}
|
||||||
|
|
||||||
|
% ctabular expects three arguments:
|
||||||
|
% column specifiers (LCR), row background color (purple), header text color (white).
|
||||||
|
% the new specifiers (LCR) replace the default specifiers (lcr) in order to apply the header text color.
|
||||||
|
|
||||||
|
\begin{ctabular}{LCR}{purple}{white}
|
||||||
|
Title L & Title C & Title R\\
|
||||||
|
Text & Text & Text\\
|
||||||
|
Text & Text & Text\\
|
||||||
|
Text & Text & Text\\
|
||||||
|
Text & Text & Text\\
|
||||||
|
\end{ctabular}
|
||||||
|
\end{frame}
|
||||||
|
|
||||||
\end{document}
|
\end{document}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
\DeclareOption*{\PassOptionsToClass{\CurrentOption}{beamer}}
|
\DeclareOption*{\PassOptionsToClass{\CurrentOption}{beamer}}
|
||||||
\ProcessOptions\relax
|
\ProcessOptions\relax
|
||||||
|
|
||||||
\LoadClass[final, 10pt, aspectratio=169]{beamer} % t: align columns to top
|
\LoadClass[final, 10pt, aspectratio=169, xcolor=table]{beamer} % t: align columns to top
|
||||||
\beamertemplatenavigationsymbolsempty
|
\beamertemplatenavigationsymbolsempty
|
||||||
|
|
||||||
|
|
||||||
@@ -266,3 +266,19 @@ BoldItalicFont = *-Bold-Italic
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
% colored tables
|
||||||
|
|
||||||
|
\newenvironment{ctabular}[3]{
|
||||||
|
\newcolumntype{L}{>{\ifnumequal{\rownum}{1}{\bfseries\color{#3}}}l}
|
||||||
|
\newcolumntype{C}{>{\ifnumequal{\rownum}{1}{\bfseries\color{#3}}}c}
|
||||||
|
\newcolumntype{R}{>{\ifnumequal{\rownum}{1}{\bfseries\color{#3}}}r}
|
||||||
|
|
||||||
|
\rowcolors{2}{#2!20}{#2!10}
|
||||||
|
\begin{tabular}{#1}
|
||||||
|
\rowcolor{#2}
|
||||||
|
}{
|
||||||
|
\end{tabular}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user