Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- documentclass{article}
- usepackage{lipsum}
- usepackage{calc}
- usepackage[table]{xcolor}
- usepackage[
- left=3cm,
- right=3cm,
- top=3cm,
- bottom=3cm,
- ]{geometry}
- RequirePackage{makecell}
- RequirePackage{tabu}
- RequirePackage{longtable}
- RequirePackage[table]{xcolor}
- providecolor{mainColor}{RGB}{211, 47, 47}
- %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
- % Default Table Configuration
- %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
- % Row will alternate color
- definecolor{tableLineOne}{RGB}{245, 245, 245}
- definecolor{tableLineTwo}{RGB}{224, 224, 224}
- taburowcolors[2] 2{tableLineOne .. tableLineTwo}
- % Add a thin white line between all lines
- AtBeginDocument{everyrow{tabucline[.4mm white]{}}}
- % Redefine line sep to make the table more spaced
- tabulinesep = ^2.5mm_2mm
- % Provide a command to style the headers of the tables
- newcommand{tableHeaderStyle}{
- rowfont{bfseriesleavevmodecolor{white}}
- rowcolor{mainColor}
- Gape[3.5mm][1.5mm]{}
- }
- title{yFlatTable Example}
- author{Harvey Sheppard}
- begin{document}
- maketitle
- begin{tabu}{ l l l }
- tableHeaderStyle
- Class & Grade & Professor\
- French & 10 & Pr. Bonvin\
- Math & 12 & Pr. Squarero-Ots\
- English & 8 & Pr. Shakespeare\
- end{tabu}
- end{document}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement