Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- |C{0.2}L{0.2}R{0.2}L{0.4}| -> C{0.2}|L{0.2}|R{0.2}|L{0.4}
- |C{0.2}|L{0.2}|R{0.2}|L{0.4}| -> C{0.2}|L{0.2}|R{0.2}|L{0.4}
- C{0.25}L{0.75} -> C{0.25}|L{0.75}
- documentclass{article}
- usepackage[table]{xcolor} % Provides coloring for tables and text
- usepackage{tabularx} % Customized table formatting
- RequirePackage{environ} % Used to define custom table environment
- % Define table related commands and properties
- definecolor{greyblue}{rgb}{0.6353,0.6863,0.7686} % Define a color used in the tables
- newcommandsetrow[1]{gdefrowmac{#1}#1ignorespaces} % Used for making a row bold
- newcommandclearrow{globalletrowmacrelax} clearrow % Used for clearing a row formatting
- newcolumntype{C}[1]{>{hsize=#1hsizerowmaccenteringarraybackslash}X} % Centered column, input is relative width of page
- newcolumntype{L}[1]{>{hsize=#1hsizerowmacraggedrightarraybackslash}X} % Left-aligned column, input is relative width of page
- newcolumntype{R}[1]{>{hsize=#1hsizerowmacraggedleftarraybackslash}X} % Left-aligned column, input is relative width of page
- % Defines an environment to create a table in the document according to
- % a common formatting. This uses the environ package.
- NewEnviron{doctable}[4]{
- begin{table}[!htbp]
- centering
- rowcolors{2}{black!5}{black!15}
- begin{tabularx}{#3linewidth}{#4<{clearrow}}%
- hline
- rowcolor{greyblue} setrow{bfseries} % Make the header row bold and colored grey-blue
- BODY
- hline
- end{tabularx}
- caption{#2}
- label{#1}
- end{table}
- }
- begin{document}
- begin{doctable}
- {tbl:label}
- {Table Caption}
- {1} { C{0.25}L{0.75} }
- Heading 1 & Heading 2 \
- Text 1 & Text 2 \
- end{doctable}
- end{document}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement