Advertisement
Guest User

Untitled

a guest
Jun 18th, 2019
109
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.32 KB | None | 0 0
  1. documentclass{article}
  2.  
  3.  
  4. usepackage{lipsum}
  5. usepackage{calc}
  6. usepackage[table]{xcolor}
  7. usepackage[
  8. left=3cm,
  9. right=3cm,
  10. top=3cm,
  11. bottom=3cm,
  12. ]{geometry}
  13. RequirePackage{makecell}
  14. RequirePackage{tabu}
  15. RequirePackage{longtable}
  16. RequirePackage[table]{xcolor}
  17.  
  18.  
  19. providecolor{mainColor}{RGB}{211, 47, 47}
  20.  
  21. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  22. % Default Table Configuration
  23. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  24.  
  25. % Row will alternate color
  26. definecolor{tableLineOne}{RGB}{245, 245, 245}
  27. definecolor{tableLineTwo}{RGB}{224, 224, 224}
  28. taburowcolors[2] 2{tableLineOne .. tableLineTwo}
  29.  
  30. % Add a thin white line between all lines
  31. AtBeginDocument{everyrow{tabucline[.4mm white]{}}}
  32.  
  33. % Redefine line sep to make the table more spaced
  34. tabulinesep = ^2.5mm_2mm
  35.  
  36. % Provide a command to style the headers of the tables
  37. newcommand{tableHeaderStyle}{
  38. rowfont{bfseriesleavevmodecolor{white}}
  39. rowcolor{mainColor}
  40. Gape[3.5mm][1.5mm]{}
  41. }
  42.  
  43.  
  44. title{yFlatTable Example}
  45. author{Harvey Sheppard}
  46.  
  47.  
  48.  
  49. begin{document}
  50.  
  51. maketitle
  52.  
  53. begin{tabu}{ l l l }
  54. tableHeaderStyle
  55. Class & Grade & Professor\
  56. French & 10 & Pr. Bonvin\
  57. Math & 12 & Pr. Squarero-Ots\
  58. English & 8 & Pr. Shakespeare\
  59. end{tabu}
  60.  
  61. end{document}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement