I'm interested in learning about some nice-looking table samples. Colors can make a huge difference, and just providing some color to headers, background, or borders can dramatically change presentation. Any samples you're proud to share?
(BTW here's a sample I like, but unfortunately, not TeX...)
There seems to be a general consensus that
booktabs
[1] is the way to go, if you want to have a beautifully typeset table. The result is really elegant, but to some it might appear somewhat... Spartan.
Here are a few examples I gathered from the web:
Some contributions from our very own site:
And just for completeness' sake, there is the
tabu
[4] package. I only list it because I subscribe to the opinion that 'beauty is in the eye of the beholder'. Keep in mind, though, that I neither like the results in the documentation (and the documentation itself is IMHO an eye-sore) nor do I recommend using it - it's been
reported to be buggy
[5].
(EDIT: A little pun: Using tabu
is taboo. :)
)
Finally, a little example (from a homework on Fourier series and transformation):
\documentclass{article}
\usepackage{amsfonts}
\usepackage{booktabs}
\usepackage{siunitx}
\begin{document}
\begin{tabular}{SSSSSSSS} \toprule
{$m$} & {$\Re\{\underline{\mathfrak{X}}(m)\}$} & {$-\Im\{\underline{\mathfrak{X}}(m)\}$} & {$\mathfrak{X}(m)$} & {$\frac{\mathfrak{X}(m)}{23}$} & {$A_m$} & {$\varphi(m)\ /\ ^{\circ}$} & {$\varphi_m\ /\ ^{\circ}$} \\ \midrule
1 & 16.128 & +8.872 & 16.128 & 1.402 & 1.373 & -146.6 & -137.6 \\
2 & 3.442 & -2.509 & 3.442 & 0.299 & 0.343 & 133.2 & 152.4 \\
3 & 1.826 & -0.363 & 1.826 & 0.159 & 0.119 & 168.5 & -161.1 \\
4 & 0.993 & -0.429 & 0.993 & 0.086 & 0.08 & 25.6 & 90 \\ \midrule
5 & 1.29 & +0.099 & 1.29 & 0.112 & 0.097 & -175.6 & -114.7 \\
6 & 0.483 & -0.183 & 0.483 & 0.042 & 0.063 & 22.3 & 122.5 \\
7 & 0.766 & -0.475 & 0.766 & 0.067 & 0.039 & 141.6 & -122 \\
8 & 0.624 & +0.365 & 0.624 & 0.054 & 0.04 & -35.7 & 90 \\ \midrule
9 & 0.641 & -0.466 & 0.641 & 0.056 & 0.045 & 133.3 & -106.3 \\
10 & 0.45 & +0.421 & 0.45 & 0.039 & 0.034 & -69.4 & 110.9 \\
11 & 0.598 & -0.597 & 0.598 & 0.052 & 0.025 & 92.3 & -109.3 \\ \bottomrule
\end{tabular}
\end{document}
tabu
package documentation is an eyesore. - Charles Staats
S
in the tabular argument mean? - Gaslight Deceive Subvert
I think its worth mentioning the combination tcolorbox
-tabularx
, which provides an easy way to draw (possibly very much) fancy tables.
Some examples:
\documentclass{article}
\usepackage[usenames,dvipsnames]{xcolor}
\usepackage{tcolorbox}
\usepackage{tabularx}
\usepackage{array}
\usepackage{colortbl}
\tcbuselibrary{skins}
\newcolumntype{Y}{>{\raggedleft\arraybackslash}X}
\tcbset{tab1/.style={fonttitle=\bfseries\large,fontupper=\normalsize\sffamily,
colback=yellow!10!white,colframe=red!75!black,colbacktitle=Salmon!40!white,
coltitle=black,center title,freelance,frame code={
\foreach \n in {north east,north west,south east,south west}
{\path [fill=red!75!black] (interior.\n) circle (3mm); };},}}
\tcbset{tab2/.style={enhanced,fonttitle=\bfseries,fontupper=\normalsize\sffamily,
colback=yellow!10!white,colframe=red!50!black,colbacktitle=Salmon!40!white,
coltitle=black,center title}}
\begin{document}
\begin{tcolorbox}[tab2,tabularx={X||Y|Y|Y|Y||Y}]
Group & One & Two & Three & Four & Sum \\\hline\hline
Red & 1000.00 & 2000.00 & 3000.00 & 4000.00 & 10000.00 \\\hline
Green & 2000.00 & 3000.00 & 4000.00 & 5000.00 & 14000.00 \\\hline
Blue & 3000.00 & 4000.00 & 5000.00 & 6000.00 & 18000.00 \\\hline\hline
Sum & 6000.00 & 9000.00 & 12000.00 & 15000.00 & 42000.00
\end{tcolorbox}
\begin{tcolorbox}[tab2,tabularx={X||Y|Y|Y|Y||Y},title=My table,boxrule=0.5pt]
Group & One & Two & Three & Four & Sum \\\hline\hline
Red & 1000.00 & 2000.00 & 3000.00 & 4000.00 & 10000.00 \\
Green & 2000.00 & 3000.00 & 4000.00 & 5000.00 & 14000.00 \\
Blue & 3000.00 & 4000.00 & 5000.00 & 6000.00 & 18000.00 \\\hline\hline
Sum & 6000.00 & 9000.00 & 12000.00 & 15000.00 & 42000.00
\end{tcolorbox}
\begin{tcolorbox}[tab1,tabularx={X||YYYY||Y}]
Group & One & Two & Three & Four & Sum \\\hline\hline
Red & 1000.00 & 2000.00 & 3000.00 & 4000.00 & 10000.00 \\
Green & 2000.00 & 3000.00 & 4000.00 & 5000.00 & 14000.00 \\
Blue & 3000.00 & 4000.00 & 5000.00 & 6000.00 & 18000.00 \\\hline\hline
Sum & 6000.00 & 9000.00 & 12000.00 & 15000.00 & 42000.00
\end{tcolorbox}
\end{document}
The are almost endless customization possibilities, and everything is a matter of writing a custom tcb style that suits your needs. The examples (with some modifications) are taken from the
tcolorbox
manual
[1], section /tcb/tabularx
.
booktabs
documentation: 1. Never, ever use vertical lines. 2. Never use double lines. I tend to agree. - Tom Bombadil
booktabs
) like? Seriously? Please, stop this nonsense... - d-cmst
I also favour the guidance given by booktabs
, and generally prefer simple, unadorned tables. However, it may be that you want to draw attention to say the highest value for a given row --- e.g., a table of your teaching evaluation scores. (That is, a document that might be able to be 'louder' than something you'd want to put in a book.) In this case, perhaps some colour would be appropriate for an electronic form, but you'd rather just have bold for a printed version. Etc., etc.
Here is a simplified version of what I have done before (meant for fontspec
-reliant engines):
\documentclass[12pt, oneside, landscape]{memoir}
\newif\ifblackandwhite
% \blackandwhitetrue
\usepackage{fontspec}%
\defaultfontfeatures{Ligatures=TeX}%
\setmainfont[%
Numbers = OldStyle ,
ItalicFont = LinLibertineOI ,
BoldItalicFont = LinLibertineOBI ,
BoldFont = LinLibertineOB ,
]{LinLibertineO}%
\usepackage[hmargin=2cm,vmargin=2.5cm]{geometry}
\usepackage{etoolbox}
\usepackage{longtable}%
\AtBeginEnvironment{longtable}{%
\addfontfeature{RawFeature=+tnum;-onum}% <--- requires LuaTeX
}
\usepackage{pdflscape}
\usepackage[svgnames]{xcolor}
\usepackage{colortbl}%
\newcommand{\myrowcolour}{\rowcolor[gray]{0.925}}
\usepackage{booktabs}
\ifblackandwhite
\newcommand{\cheading}[2]{\textbf{#1\hfill #2}}
\newcommand{\highest}[1]{\textbf{#1}}% == highest score for question
\else
\newcommand{\cheading}[2]{\textcolor{Maroon}{\textbf{#1\hfill #2}}}
\newcommand{\highest}[1]{\textcolor{Maroon}{\textbf{#1}}}%
\fi
\begin{document}
\thispagestyle{empty}
\parindent0pt
%
\cheading{Fake Course Evaluation Summary for \textsc{course
1234y}}{Sept.\ 2010 --- May 2011}
\begin{longtable}{@{}l rr rr rr rr rr rr}
% pairs: absolute number (percentage)
\toprule%
\centering%
& \multicolumn{2}{c}{{{\bfseries Excellent}}}
& \multicolumn{2}{c}{{{\bfseries Very Good}}}
& \multicolumn{2}{c}{{{\bfseries Good}}}
& \multicolumn{2}{c}{{{\bfseries Average}}}
& \multicolumn{2}{c}{{{\bfseries Poor}}}
& \multicolumn{2}{c}{{{\bfseries Very Poor}}} \\
\cmidrule[0.4pt](r{0.125em}){1-1}%
\cmidrule[0.4pt](lr{0.125em}){2-3}%
\cmidrule[0.4pt](lr{0.125em}){4-5}%
\cmidrule[0.4pt](lr{0.125em}){6-7}%
\cmidrule[0.4pt](lr{0.125em}){8-9}%
\cmidrule[0.4pt](lr{0.125em}){10-11}%
\cmidrule[0.4pt](l{0.25em}){12-13}%
% \midrule
\endhead
Some question about the Instructor or Course & 2 & (7.14) & 4 &
(14.29) & \highest{12} & \highest{(42.86)} & 4
& (14.29) & 6 & (21.43) & 0 & (0.00) \\
\myrowcolour%
Some question about the Instructor or Course & 3 & (10.71) &
\highest{15} & \highest{(53.57)} & 5 & (17.86) & 5 & (17.86) & 0 &
(0.00) & 0 & (0.00) \\
Some question about the Instructor or Course & 4 & (14.29) & 8 &
(28.57) & \highest{15}
& \highest{(53.57)} & 1 & (3.57) & 0 & (0.00) & 0 & (0.00) \\
\myrowcolour%
Some question about the Instructor or Course & 3 & (10.71) & 8 &
(28.57) & \highest{10} & \highest{(35.71)}
& 5 & (17.86) & 2 & (7.14) & 0 & (0.00) \\
Some question about the Instructor or Course & 6 & (21.43) &
\highest{9} & \highest{(32.14)}
& 4 & (14.29) & \highest{9} & \highest{(32.14)} & 0 & (0.00) & 0 & (0.00) \\
\myrowcolour%
Some question about the Instructor or Course & \highest{10} &
\highest{(35.71)} & \highest{10} & \highest{(35.71)}
& 3 & (10.71) & 5 & (17.86) & 0 & (0.00) & 0 & (0.00) \\
Some question about the Instructor or Course & \highest{12} &
\highest{(42.86)} & \highest{12} & \highest{(42.86)} & 3
& (10.71) & 1 & (3.57) & 0 & (0.00) & 0 & (0.00) \\
\myrowcolour%
Some question about the Instructor or Course & \highest{12} &
\highest{(42.86)} & 3 & (10.71) & 7
& (25.00) & 5 & (17.86) & 1 & (3.57) & 0 & (0.00) \\
Some question about the Instructor or Course & \highest{10} &
\highest{(35.71)} & 6 & (21.43) & 6 & (21.43) & 6 & (21.43)
& 1 & (3.57) & 0 & (0.00) \\
\myrowcolour%
Some question about the Instructor or Course & 5 & (17.86) & 5 &
(17.86) & \highest{12} & \highest{(42.86)} & 2 & (7.14)
& 3 & (10.71) & 1 & (3.57)\\
Some question about the Instructor or Course & 3 & (10.71) & 8 &
(28.57) & \highest{11} & \highest{(39.29)} & 3 & (10.71) & 3 & (10.71)
& 0 & (0.00) \\
\myrowcolour%
Some question about the Instructor or Course & \highest{18} &
\highest{(64.29)}
& 5 & (17.86) & 3 & (10.71) & 1 & (3.57) & 1 & (3.57) & 0 & (0.00) \\
Some question about the Instructor or Course & \highest{15} &
\highest{(53.57)}
& 7 & (25.00) & 2 & (7.14) & 2 & (7.14) & 2 & (7.14) & 0 & (0.00) \\
\myrowcolour%
Some question about the Instructor or Course & 3 & (10.71) &
\highest{13} & \highest{(46.43)} & 4 & (14.29) & 6 & (21.43) & 2
& (7.14) & 0 & (0.00) \\
\bottomrule
\end{longtable}
\end{document}
Remarks: Uncomment \blackandwhitetrue
if you want to disable colour. And the \addfontfeature
command in \AtBeginEnvironment
requires the fontspec
package.
\npboldmath
from the numprint
package? It does not seem to work with all fonts, but I have fixed alignment of bold digits in tables with that in the past. - adl
1
01
0 pattern as a visual aid, sometimes they attribute extra meaning to a 01
001
001
0 pattern and ask "Why some lines are highlighted?" - gboffi
Not a beautiful table yet but I would like some help to make it beautiful :) Here is my attempt at recreating OP's table.
\documentclass{article}
\usepackage[table]{xcolor}
\usepackage[margin=1in]{geometry}
\usepackage{tabularx}
\usepackage{enumitem}
\setlist{nolistsep}
\definecolor{green}{HTML}{66FF66}
\definecolor{myGreen}{HTML}{009900}
\renewcommand{\familydefault}{\sfdefault}
\renewcommand{\arraystretch}{1.5}
\begin{document}
\begin{center}
\begin{tabularx}{\textwidth}[t]{XX}
\arrayrulecolor{green}\hline
\textbf{\textcolor{myGreen}{Goal 1 Eradicate Extreme Poverty}} & \\
\hline
Target 1.A Halve, between 1990 and 2015, the proportion of the people whose income is less than \$1 a day. &
\begin{minipage}[t]{\linewidth}%
\begin{itemize}
\item[1.1] Proportion of population below \$1 purchasing power parity (PPP) a day$^a$
\item[1.2] Poverty Gap ratio [incidence x depth of poverty]
\item[1.3] Share of the poorest quintile in national consumption
\end{itemize}
\end{minipage}\\
\arrayrulecolor{black}\hline
Target 1.B Achieve full and productive employment and decent work for all, including women and young people &
\begin{minipage}[t]{\linewidth}%
\begin{itemize}
\item[1.4] Growth of GDP per person employed
\item[1.5] Employment to population ratio
\item[1.6] Proportion of employed people living below \$1 (PP) a day
\item[1.7] Proportion of own-account and contribution family workers in total employment
\end{itemize}
\end{minipage}\\
\hline
Target 1.C Halve, between 1990 and 2015, the proportion of people who suffer from hunger &
\begin{minipage}[t]{\linewidth}%
\begin{itemize}
\item[1.8] Prevalence of underweight children under five years of age
\item[1.9] Proportion of population below minimum level of dietary energy consumption
\end{itemize}
\end{minipage}\\
\arrayrulecolor{green}\hline
\textbf{\textcolor{myGreen}{Goal 2 Achieve universal primary education}} \\
\hline
Target 2.A Ensure that by 2015 children everywhere, boy and girls alike, will be able to complete a full course of primary schooling. &
\begin{minipage}[t]{\linewidth}%
\begin{itemize}
\item[2.1] Net enrollment ratio in primary education
\item[2.2] Proportion of pupils starting grade 1 who reach last grade of primary education
\item[2.3] Literacy rate of 15- to 24-year-olds, women and men
\end{itemize}
\end{minipage}\\
\hline
\multicolumn{2}{l}{%
\textbf{\textcolor{myGreen}{Goal 3 Promote gender equality and empower women}}} \\
\hline
Target 3.A Eliminate gender disparity in primary and secondary education, preferably by 2005, and in all levels of education no later than 2015 &
\begin{minipage}[t]{\linewidth}%
\begin{itemize}
\item[3.1] Ratios of girls to boys in primary, secondary and tertiary education
\item[3.2] Share of women in wage employment in the non-agricultural sector.
\end{itemize}
\end{minipage}
\end{tabularx}
\end{center}
\end{document}
One often-quoted typographer, Robert Bringhurst [1], says about tables in his book The Elements of Typographic Style, pp. 70–71:
Edit tables with the same attention given to text, and set them as text to be read.
...
- All text should be horizontal, or in the rare cases oblique. Setting column heads vertically as a space-saving measure is quite feasible if the text is in Japanese or Chinese, but not if it is written in the Latin alphabet.
- Letterforms too small or too condensed for comfortable reading are not part of the solution.
- There should be a minimum amount of furniture (rules, boxes, dots and other guiderails for traveling through typographic space) and a maximum amount of information.
- Rules, tint blocks or other guides and dividers, where they are necessary at all, should run in the predominant reading direction: vertically in the case of lists, indices and some numerical tables, and horizontally otherwise.
- A rule located at the edge of a table, separating the first or final column from the adjacent empty space, ordinarily serves no function.
- A table, like any other text in multiple columns, must contain within itself an adequate amount of white space.
On that third point, Edward Tufte [2] has coined the term “data-ink ratio” to mean (reconstructed from The Visual Display of Quantitative Information, p. 93):
Following that, you can usually replace any rules you use in tables with just whitespace. Likewise, when displaying larger amounts of data in a table, instead of “ zebra-striping [3]” rows, you can add vertical whitespace (or background color) between groups of rows of, for example, 3 or 5 (provided the rows are evenly divisible) to make it easier to follow the information.
Here's an example set in baselinegrid I've made for a cheatsheet for a game (It's in plain XeTeX-format, so compile with xetex
):
\def\mainfont{Myriad Pro}
\font\bodyfont="\mainfont:mapping=tex-text;+onum" at 8bp \let\tenrm\bodyfont
\font\boldfont="\mainfont/B" at 8bp \let\tenbf\boldfont
\bodyfont
\baselineskip=10bp
\smallskipamount=\baselineskip
\medskipamount=2\baselineskip
\setbox\strutbox=\hbox{%
\vrule height .7\baselineskip depth .3\baselineskip width 0pt}
\newcount\rowcount
\def\headersfor#1{
\noalign{\global\rowcount=0 \medbreak}
\bf #1& LVL& LDR& ATT& DEF& INI& SPD& HP& DMG\crcr
\noalign{\nobreak\smallskip}}
\def\cr{\crcr\noalign{\maybeskip}}
\def\maybeskip{\ifnum\rowcount=2 \global\rowcount=0 \smallbreak
\else \global\advance\rowcount by 1 \fi}
\halign{#\hfil\strut&& \quad\hfil#\crcr
\headersfor{Orc}
Goblin& 2& 35& 16& 10& 4& 2& 20& 2--4\cr
Furious Goblin& 2& 40& 14& 14& 6& 3& 38& 3--8\cr
Orc& 3& 60& 16& 17& 4& 2& 65& 7--10\cr
Catapult& 3& 120& 33& 15& 4& 2& 80& 5--9\cr
Veteran Orc& 4& 140& 25& 25& 6& 3& 110& 15--20\cr
Shaman& 4& 200& 24& 32& 5& 3& 160& 15--18\cr
\headersfor{Neutral}
Thorn-Hunter& 1& 8& 4& 1& 2& 3& 5& 1--2\cr
Thorn-Warrior& 1& 8& 4& 3& 4& 3& 8& 1--3\cr
Fire Dragonfly& 1& 9& 3& 1& 5& 3& 6& 1--3\cr
Lake Dragonfly& 1& 9& 3& 1& 6& 4& 6& 1--3\cr
Devilfish& 1& 12& 6& 4& 6& 3& 10& 1--3\cr
Venomous Spider&1& 12& 5& 1& 4& 3& 10& 2--3\cr
Cave Spider& 1& 14& 4& 4& 2& 3& 14& 2--4\cr
Hyena& 2& 20& 8& 8& 4& 3& 14& 3--4\cr
Pirate& 2& 25& 8& 4& 4& 3& 20& 3--5\cr
Swamp Snake& 2& 28& 12& 8& 4& 2& 25& 3--5\cr
Fire Spider& 2& 30& 12& 12& 6& 3& 27& 4--5\cr
Snake& 2& 30& 14& 8& 5& 2& 28& 3--6\cr
% ...
}
\bye
[1] http://en.wikipedia.org/wiki/Robert_BringhurstThere's always the ''obvious'' solution: use TikZ! (Note that I wasn't going for beauty, but for possibility)
\documentclass[parskip]{scrartcl}
\usepackage[margin=15mm]{geometry}
\usepackage{tikz}
\usetikzlibrary{calc}
\usetikzlibrary{matrix}
\begin{document}
\pgfdeclarelayer{background}
\pgfsetlayers{background,main}
\begin{tikzpicture}
\matrix (magic) [matrix of nodes,nodes={minimum width=3cm,minimum height=1cm,draw,very thin},draw,inner sep=0]
{ |[fill=red!70]|8 & 1 & 6 \\
3 & |[left color=cyan,right color=orange]| 5 & 7 \\
4 & 9 & |[text=red,blue]|2 \\
};
\draw[thick,violet] (magic-2-1.east) to[out=180,in=270,looseness=0.5] (magic-2-1.north) to[out=270,in=0,looseness=0.5] (magic-2-1.west) to[out=0,in=90,looseness=0.5] (magic-2-1.south) to[out=90,in=180,looseness=0.5] (magic-2-1.east);
\draw[rounded corners=2pt,densely dashed,green!50!gray] ($(magic-1-2.center)+(-0.15,-0.25)$) rectangle ($(magic-1-3.center)+(0.15,0.25)$);
\end{tikzpicture}
\end{document}
Wasn't there a CW checkbox somewhere? I can't seem to find it.
TikZ tables are particularly useful when you need to include images in the table cells. Here a short example (needs several PNG images to compile):
\documentclass[9pt]{article}
\usepackage{tikz}
\newcommand{\orb}[2][0.15]{
\node[minimum width=13mm] {
\includegraphics[scale=#1]{orb-#2.png}
};
}
\begin{document}
\begin{tikzpicture}
\matrix[row sep=1mm, column sep=2mm] (orbs) {
\node {0}; & & & \orb[0.09]{s} \\
\node {1}; & & \orb{py} & \orb[0.12]{pz} & \orb{px} \\
\node {2}; & \orb{dxy} & \orb[0.14]{dyz} & \orb{dz2} & \orb{dxz} & \orb{dx2-y2} \\
& \node{-2}; & \node{-1}; & \node{0}; & \node{1}; & \node{2}; \\
};
\node[anchor=south, rotate=90, xshift=5mm] at (orbs.west) {angular momentum $\ell$};
\node[anchor=north] at (orbs.south) {magnetic quantum number $m$};
\end{tikzpicture}
\end{document}
I really like the showcase of tables contained in
Axel Reichert's tabsatz
[1]; a tutorial on typesetting tables. The document is in German, but fortunately for those of us who don't read German, the code is understandable for everyone. The .tex
document is also available for everyone to see the actual code used.
I will simply copy here two of the examples in the document using mainly just array
, booktabs
and dcolumn
:
\documentclass[a4,portrait,semrot]{seminar}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[ngerman]{babel}
\usepackage[skip=4pt]{caption}
\usepackage{booktabs}
\usepackage{dcolumn}
\usepackage{units}
\usepackage{array}
\pagestyle{empty}
\renewcommand{\printlandscape}{\special{landscape}}
\slideframe{none}
\centerslidesfalse
\slidesmag{3}
\setlength{\slideheight}{183mm}
\setlength{\slidewidth}{264mm}
\makeatletter
\newcommand{\armultirow}[3]{%
\multicolumn{#1}{#2}{%
\begin{picture}(0,0)%
\put(0,0){%
\begin{tabular}[t]{@{}#2@{}}%
#3%
\end{tabular}%
}%
\end{picture}%
}%
}%
\newcolumntype{f}{>{$}l<{$}}
\newcolumntype{n}{l}
\newcolumntype{N}{>{\scriptsize}l}
\newcolumntype{v}[1]{>{\raggedright\hspace{0pt}}p{#1}}
\newcolumntype{V}[1]{>{\scriptsize\raggedright\hspace{0pt}}p{#1}}
%
% array.sty, dcolumn.sty
\newcolumntype{B}[1]{>{\boldmath\DC@{.}{,}{#1}}l<{\DC@end}}
\newcolumntype{d}[1]{>{\DC@{.}{,}{#1}}l<{\DC@end}}
\newcolumntype{i}[1]{>{\DC@{.}{,}{#1}\mathnormal\bgroup}l<{\egroup\DC@end}}
\newcolumntype{s}[1]{>{\DC@{.}{,}{#1}\mathsf\bgroup}l<{\egroup\DC@end}}
%
% array.sty, rotating.sty
\newcolumntype{R}[1]{%
>{\begin{turn}{90}\begin{minipage}{#1}\scriptsize\raggedright\hspace{0pt}}l%
<{\end{minipage}\end{turn}}%
}
%
% array.sty, tabularx.sty
\newcolumntype{x}{>{\scriptsize\raggedright\hspace{0pt}}X}
\makeatother
\begin{document}
\begin{slide*}
\begin{table}
\centering
\caption{Minuskelziffern}
\label{tab:minuskelziffern}
\begin{tabular}{@{}v{7em}i{4.0}i{3.0}i{5.0}n@{}}
\toprule
&
\multicolumn{4}{N@{}}{Diese also Sachen} \\
\cmidrule(l){2-5}
&
\multicolumn{1}{V{5.5em}}{Blick linken sonst endlich} &
\multicolumn{1}{V{5.5em}}{auf nicht weit Soll des} &
\multicolumn{1}{V{5em}}{gleich man kann ist} &
\multicolumn{1}{V{5em}@{}}{weil Sache zu einem} \\
&
&
\multicolumn{1}{N}{\unit{\%}} \\
\cmidrule(r){1-1}\cmidrule(lr){2-2}\cmidrule(lr){3-3}\cmidrule(lr){4-4}%
\cmidrule(l){5-5}
\armultirow{1}{@{}v{7em}}{Um hier sonst damit Platz ist gegeben} &
1991 & 20 & 45637 & \oldstylenums{657} unter \\
& 1992 & 47 & 47916 & \oldstylenums{645} linken \\
& 1993 & 65 & 22848 & \oldstylenums{347} nein \\
\addlinespace
\armultirow{1}{@{}v{7em}}{Durch gehört wollen und} &
1994 & 87 & 46475 & \oldstylenums{957} einem \\
& 1995 & 95 & 94356 & \oldstylenums{8363} Sache \\
& 1996 & 100 & 84646 & \oldstylenums{93635} nein \\
\cmidrule(r){1-1}\cmidrule(lr){2-2}\cmidrule(lr){3-3}\cmidrule(lr){4-4}%
\cmidrule(l){5-5}
&
\multicolumn{4}{N@{}}{Gerade langt hinauf sonst nicht gleich
man} \\
\cmidrule(r){1-1}\cmidrule(l){2-5}
\armultirow{1}{@{}v{7em}}{Um hier damit Platz hat} &
1796 & 4 & 46032 & \oldstylenums{56} scheidet \\
& 1896 & 25 & 38937 & \oldstylenums{746} linken \\
& 1996 & 100 & 83458 & \oldstylenums{48746} eine \\
\bottomrule
\end{tabular}
\end{table}
\end{slide*}
\begin{slide*}
\begin{table}
\centering
\footnotesize
\caption{Kathodenfallableiter}
\label{tab:kathoden}
\begin{tabular}{@{}nd{1.1}*{3}{d{1.2}}d{1.1}d{3.2}@{}}
\toprule
\multicolumn{1}{@{}N}{Typenbezeichnung} &
\multicolumn{5}{N}{Spannungsschutz für Netze} &
\multicolumn{1}{N@{}}{Preis} \\
&
\multicolumn{5}{N}{Leiterspannung an der Einbaustelle} \\
\cmidrule(lr){2-6}
&
\multicolumn{2}{V{6.5em}}{Nicht geerdeter Sternpunkt} &
\multicolumn{2}{V{6.5em}}{Starr geerdeter Sternpunkt} &
\multicolumn{1}{V{4em}}{Nenn"-spannung} \\
\cmidrule(lr){2-3}\cmidrule(lr){4-5}
&
\multicolumn{1}{V{4.5em}}{Normale Leiterspannung} &
\multicolumn{1}{V{4.5em}}{Zulässiger Bereich} &
\multicolumn{1}{V{4.5em}}{Normale Leiterspannung} &
\multicolumn{1}{V{4.5em}}{Zulässiger Bereich} \\
&
\multicolumn{1}{N}{\unit{kV}} &
\multicolumn{1}{N}{\unit{kV}} &
\multicolumn{1}{N}{\unit{kV}} &
\multicolumn{1}{N}{\unit{kV}} &
\multicolumn{1}{N}{\unit{kV}} &
\multicolumn{1}{N}{DM} \\
\cmidrule(r){1-1}\cmidrule(lr){2-2}\cmidrule(lr){3-3}\cmidrule(lr){4-4}%
\cmidrule(lr){5-5}\cmidrule(lr){6-6}\cmidrule(l){7-7}
H 484--1 & 1 & 1.15 & 1.25 & 1.45 & 1 & 220.$---$ \\
H 484--1,5 & 1.5 & 1.8 & 1.9 & 2.2 & 1.5 & 233.$---$ \\
H 484--2 & 2 & 2.3 & 2.5 & 2.9 & 2 & 252.$---$ \\
H 484--2,5 & 3 & 2.9 & 3.1 & 3.6 & 2.5 & 261.$---$ \\
H 484--3 & 3.5 & 3.5 & 3.8 & 4.3 & 3 & 264.$---$ \\
\bottomrule
\end{tabular}
\end{table}
\end{slide*}
\end{document}
[1] http://www.ctan.org/pkg/tabsatzUnfortunately, as of 2018-11-12, the tabu
package is still
unmaintained
[1] (
see repository
[2]) and color are not working anymore.
Therefore my example below is not working.
Here is my modest contribution. I created this flat table style using the tabu [3] package and XeLaTeX.
\documentclass{article}
\usepackage{tabu}
\usepackage{longtable}
\usepackage[table]{xcolor}
\definecolor{tableHeader}{RGB}{211, 47, 47}
\definecolor{tableLineOne}{RGB}{245, 245, 245}
\definecolor{tableLineTwo}{RGB}{224, 224, 224}
\newcommand{\tableHeaderStyle}{
\rowfont{\leavevmode\color{white}\bfseries}
\rowcolor{tableHeader}
}
\begin{document}
\taburowcolors[2] 2{tableLineOne .. tableLineTwo}
\tabulinesep = ^4mm_3mm
\everyrow{\tabucline[.4mm white]{}}
\begin{tabu} to \textwidth {l >{\bfseries}X[r, 1] X[4] l}
\tableHeaderStyle
& Mot & Définition & \\
...
\end{tabu}
\end{document}
You can find the whole code here [4] and access the rest of my LaTeX codes on my Github repository [5].
[1] https://tex.stackexchange.com/questions/121841/is-the-tabu-package-obsolete! Undefined control sequence. <recently read> \definecolor
Something is missing as an import. - Zelphir Kaltstahl
\usepackage{xcolor}
line... I corrected it! - HarveyShepp
tabu
is not maintained anymore, the example above indeed does not work. I modified my answer to reflect this. - HarveyShepp
tabularray
is an alternative to the outdated tabu
package. - L.J.R.
I spend today much time to layout a table and I am pleased with the result. As some other answers I also use mainly the booktabs
package and added some color. The main point is that I use pgfplotstable
for typeset the table. Wich makes it very easy to reuse the defined style or to change the style later without touching the actual table. The table itself is
that by this lines:
\pgfplotstabletypeset[normal,
columns/eg/.style={
column name={$E_{\textup{g}}$ (\si{\electronvolt})},
dec sep align
}
]{ %
Material & Symbol & eg & Type \\
\topmidheader{5}{Elements}
diamond & C & 5.46 & i \\
...
\midheader{5}{IV-IV Compounds}
silicon carbide & SiC 3C & 2.36 & i \\
...
aluminium nitride & AlN & 6.2 & d \\
}
Most of the styling is done by the style normal
I defined before. The first line gives the header and the commands \topmidheader
and \midheader
define subheadings. The first argument (here 5) is the column count, note, that pgfplotstable adds an extra column for each numerical column. The column style eg is there for two reasons (1) it is not possible to have math and other complex stuff inside of a header cell and (2) we define that the numbers are align to the decimal point.
And here comes the full code:
\documentclass{article}
\usepackage{unicode-math}
\setmainfont[Mapping=tex-text, Numbers=OldStyle]{TeX Gyre Pagella}
\setmathfont[math-style=ISO]{TeX Gyre Pagella Math}
\usepackage{siunitx}
\usepackage{xcolor}
\usepackage{booktabs,colortbl, array}
\usepackage{pgfplotstable}
\pgfplotsset{compat=1.8}
\definecolor{rulecolor}{RGB}{0,71,171}
\definecolor{tableheadcolor}{gray}{0.92}
% Following is taken from Werner: http://tex.stackexchange.com/a/33761/3061
% and modified for my needs
%
% Command \topline consists of a (slightly modified)
% \toprule followed by a \heavyrule rule of colour tableheadcolor
% (hence, 2 separate rules)
\newcommand{\topline}{ %
\arrayrulecolor{rulecolor}\specialrule{0.1em}{\abovetopsep}{0pt}%
\arrayrulecolor{tableheadcolor}\specialrule{\belowrulesep}{0pt}{0pt}%
\arrayrulecolor{rulecolor}}
% Command \midline consists of 3 rules (top colour tableheadcolor, middle colour black, bottom colour white)
\newcommand{\midtopline}{ %
\arrayrulecolor{tableheadcolor}\specialrule{\aboverulesep}{0pt}{0pt}%
\arrayrulecolor{rulecolor}\specialrule{\lightrulewidth}{0pt}{0pt}%
\arrayrulecolor{white}\specialrule{\belowrulesep}{0pt}{0pt}%
\arrayrulecolor{rulecolor}}
% Command \bottomline consists of 2 rules (top colour
\newcommand{\bottomline}{ %
\arrayrulecolor{white}\specialrule{\aboverulesep}{0pt}{0pt}%
\arrayrulecolor{rulecolor} %
\specialrule{\heavyrulewidth}{0pt}{\belowbottomsep}}%
\newcommand{\midheader}[2]{%
\midrule\topmidheader{#1}{#2}}
\newcommand\topmidheader[2]{\multicolumn{#1}{c}{\textsc{#2}}\\%
\addlinespace[0.5ex]}
\pgfplotstableset{normal/.style ={%
header=true,
string type,
font=\addfontfeature{Numbers={Monospaced}}\small,
column type=l,
every odd row/.style={
before row=
},
every head row/.style={
before row={\topline\rowcolor{tableheadcolor}},
after row={\midtopline}
},
every last row/.style={
after row=\bottomline
},
col sep=&,
row sep=\\
}
}
\begin{document}
\begin{table}
\centering
\caption{The bandgab of some semiconductors.}
\pgfplotstabletypeset[normal,
columns/eg/.style={
column name={$E_{\textup{g}}$ (\si{\electronvolt})},
dec sep align
}
]{ %
Material & Symbol & eg & Type \\
\topmidheader{5}{Elements}
diamond & C & 5.46 & i \\
silicon & Si & 1.12 & i \\
germanium & Ge & 0.67 & i \\
selenium & Se & 1.74 & d \\
\midheader{5}{IV-IV Compounds}
silicon carbide & SiC 3C & 2.36 & i \\
silicon carbide & SiC 4H & 3.28 & i \\
silicon carbide & SiC 6H & 3.03 & i \\
\midheader{5}{III-V Compounds}
indium phosphide& InP & 1.27 & d \\
indium arsenide & InAs & 0.355& d \\
gallium nitride & GaN & 3.37 & d \\
gallium arsenide& GaAs & 1.42 & d \\
aluminium nitride & AlN & 6.2 & d \\
}
\end{table}
\end{document}
The values are token from wikipedia [1].
[1] http://de.wikipedia.org/wiki/Bandl%C3%BCckebandgap
in the caption. - Christian Lindig
My humble contribution from studying the way the Economist formats its tables.
\documentclass[10.8pt,a4]{article}
\usepackage[margin=1.1in,a4paper]{geometry}
\usepackage{booktabs}
\usepackage{caption}
\usepackage{float}
\usepackage{titlesec}
\usepackage{capt-of}
%dashed line
\usepackage{array}
\usepackage{arydshln}
\setlength\dashlinedash{0.2pt}
\setlength\dashlinegap{1.5pt}
\setlength\arrayrulewidth{0.3pt}
%Widows & Orphans & Penalties
\widowpenalty500
\clubpenalty500
\clubpenalty=9996
\exhyphenpenalty=50 %for line-breaking at an explicit hyphen
\brokenpenalty=4991
\predisplaypenalty=10000
\postdisplaypenalty=1549
\displaywidowpenalty=1602
\floatingpenalty = 20000
\usepackage[T1]{fontenc}
\usepackage{fontspec}
\setmainfont[Scale=0.85, Ligatures={Required,Common,Contextual,TeX}]{TeX Gyre Schola} % Incredible font inside latex
\begin{document}
\begin{table*}[] \centering
%\ra{1.3}
\begin{small}
\begin{tabular}{@{}lrrrrrrrrrrrr@{}}\toprule
\textbf{Debt/Assets} & \textbf{2002} & \textbf{2003} & \textbf{2004} & \textbf{2005} & \textbf{2006} & \textbf{2007} & \textbf{2008} & \textbf{2009} & \textbf{2010} & \textbf{2011} & \textbf{2012} & \textbf{Total} \\ \midrule
\textbf{<50\%} & -\% & 10\% & 5\% & 7\% & 11\% & 2\% & -\% & -\% & -\% & -\% & 3\% & 2\%\\ \hdashline
\textbf{<50\% - 59.9\%} & 20\ & 5\ & 16\ & 7\ & 11\ & 8\ & 13\ & 11\ & 9\ & 15\ & 8\ & 11\ \\ \hdashline
\textbf{<60\% - 69.9\%} & -\ & 10\ & 5\ & 13\ & 11\ & 10\ & 16\ & 16\ & 17\ & 11\ & 15\ & 13\ \\ \hdashline
\textbf{<70\% - 79.9\%} & -\ & 10\ & 37\ & 13\ & 15\ & 8\ & 24\ & 29\ & 16\ & 14\ & 35\ & 22\ \\ \hdashline
\textbf{<80\% - 89.9\%} & 40\ & 10\ & 5\ & 17\ & 7\ & 24\ & 18\ & 18\ & 21\ & 6\ & 8\ & 15\ \\ \hdashline
\textbf{>90\%} & 40\ & 55\ & 32\ & 43\ & 46\ & 49\ & 29\ & 26\ & 38\ & 24\ & 35\ & 37\ \\ \midrule
\textbf{Total} & 100\% & 100\% & 100\% & 100\% & 100\% & 100\% & 100\% & 100\% & 100\% & 100\% & 100\% & 100\% \\ \midrule
\textbf{Mean} & 85\% & 80\% & 77\% & 80\% & 78\% & 85\% & 79\% & 79\% & 82\% & 77\% & 80\% & 80\% \\ \hdashline
\textbf{Median} & 85\% & 94\% & 76\% & 81\% & 80\% & 87\% & 79\% & 77\% & 82\% & 75\% & 72\% & 80\% \\ \hdashline
\textbf{No. of Projects} & 5\% & 20\% & 19\% & 30\% & 46\% & 51\% & 68\% & 38\% & 58\% & 54\% & 26\% & 415\% \\
\bottomrule
\end{tabular}
\end{small}
\caption{Initial capital structures of large projects (\$1bn.+) \emph{(Finnerty, 2013)}}
\end{table*}
\begin{table*}[] \centering
%\ra{1.3}
\begin{small}
\begin{tabular}{@{}lrrrrrrrrrr@{}}\toprule
& \textbf{1995} & \textbf{1996} & \textbf{1997} & \textbf{1998} & \textbf{1999} & \textbf{2000} & \textbf{2001} & \textbf{2002} & \textbf{Total}\\ \midrule
\textbf{Bank Loans} & \$23.33 & \$42.83 & \$67.43 & \$56.65 & \$72.39 & \$110.89 & \$108.48 & \$62.20 & \$557.88\\ \hdashline
\textbf{Bonds} & 3.79 & 4.79 & 7.70 & 9.79 & 19.79 & 20.81 & 25.00 & 13.80 & 109.26\\ \hdashline
\textbf{Development Agencies} & 17.59 & 18.96 & 22.05 & 20.97 & 16.62 & 17.69 & 18.75 & 18.75 & 162.63\\ \hdashline
\textbf{Total Debt} & 44.71 & 66.58 & 96.98 & 87.41 & 108.80 & 149.39 & 152.23 & 94.75 & 829.77\\ \hdashline
\textbf{Equity} & 19.16 & 28.54 & 41.56 & 37.46 & 46.70 & 64.02 & 65.24 & 40.61 & 355.68\\ \midrule
\textbf{Total} & \$63.88 & \$95.12 & \$138.54 & \$124.87 & \$155.68 & \$213.40 & \$217.47 & \$135.36 & \$1185.63\\ \midrule
\textbf{Bank Loans} & 37\% & 45\% & 49\% & 45\% & 46\% & 52\% & 50\% & 46\% & 42\% \\ \hdashline
\textbf{Bonds} & 6 & 5 & 5 & 8 & 13 & 10 & 11 & 10 & 9\\ \hdashline
\textbf{Development Agencies} & 28 & 20 & 16 & 17 & 11 & 8 & 9 & 14 & 14\\ \hdashline
\textbf{Total Debt} & 70 & 70 & 70 & 70 & 70 & 70 & 70 & 70 & 70\\ \hdashline
\textbf{Equity} & 30 & 30 & 30 & 30 & 30 & 30 & 30 & 30 & 30\\ \midrule
\textbf{Total} & 100 & 100 & 100 & 100 & 100 & 100 & 100 & 100 & 100\\
\bottomrule
\end{tabular}
\end{small}
\caption{Project funding by source (US\$ billions) \emph{(Finnerty, 2013)}}
\end{table*}
\begin{table*}[] \centering
%\ra{1.3}
\begin{small}
\begin{tabular}{@{}lllrrr@{}}\toprule
\textbf{Rank} & \textbf{Lead Arranger} & \textbf{Number of Deals} & \textbf{Dollar Amount} & \textbf{Market Share} & \textbf{Equator Principles Adoption}\\ \midrule
\textbf{1} & State Bank of India & 52 & \$21,631.6 & 10.1\% & NA\\ \hdashline
\textbf{2} & Mitsubishi UFJ Financial & 88 & 9,486.1 & 4.4 & Dec 2005\\ \hdashline
\textbf{3} & Sumitomo Mitsui & 71 & 8,188.1 & 3.8 & Jan 2006\\ \hdashline
\textbf{4} & Credit Agrocole & 60 & 6,506.4 & 3.1 & Jun 2005\\ \hdashline
\textbf{5} & Mizuho Financial & 55 & 5,797.5 & 2.7 & Oct 2003\\ \hdashline
\textbf{6} & Soci\'{e}t\'{e} Generale & 55 & 5,760.5 & 2.7 & Sep 2007\\ \hdashline
\textbf{7} & BNP Paribas & 55 & 5,390.8 & 2.5 & Oct 2008\\ \hdashline
\textbf{8} & Axis Bank & 18 & 5,216.9 & 2.4 & NA\\ \hdashline
\textbf{9} & IDBI Bank & 10 & 5,162.3 & 2.4 & NA\\ \hdashline
\textbf{10} & ING & 49 & 4,916.1 & 2.3 & Jun 2003\\ \midrule
& Others & 102 & 135,430.4 & 63.6 & \\ \midrule
& Total Market & 615 & \$213,486.7 & 100\% & \\
\bottomrule
\end{tabular}
\end{small}
\caption{Global project bank facility lead arrangers \emph{(Finnerty, 2013)}}
\end{table*}
\end{document}
siunitx
to correctly format numbers and units, for example \SI{99}{\percent}
will correctly produce 99 %
- with a space before the %
and there should also be spaces after >
etc. (economists are bad at typesetting numbers correctly) - skvery
I recently did this timetable in tikz
. I found it easy to set things out in columns rather than rows. The original inspiration for this method was taken from http://www.texample.net/tikz/examples/timetable/
I'm happy with both the ease and flexibility in laying it out and the final look.
\documentclass{article}
\usepackage[landscape,a4paper]{geometry}
\usepackage{microtype}
\usepackage[default,semibold,light]{sourcesanspro}
\usepackage{realscripts}
\usepackage{parskip}
\pagestyle{empty}
\newcommand*{\roomone}{Adare Uniting Church Auditorium}
\newcommand*{\roomtwo}{Adare Uniting Church Hall}
\newcommand*{\roomfour}{Adare Uniting Church Foyer}
\newcommand*{\roomsix}{Adare Dining Room}
\newcommand*{\roomtwelve}{Bethany Hall}
\newcommand*{\roomfood}{\roomsix\slash\roomtwelve}
\newcommand*{\roommdgs}{Room listed on booklet cover}
\newcommand*{\roomseminars}{Rooms listed on p.~\pageref{seminars}}
\newcommand*{\roomworkshops}{Rooms listed on p.~\pageref{workshops}}
\newcommand*{\firstspeaker}{Gary Millar}
\newcommand*{\secondspeaker}{Reuben Salagaras}
\newcommand*{\timetablefont}{\scriptsize}
\newcommand*{\yscale}{0.862}
\newlength{\timewidth}
\settowidth{\timewidth}{\timetablefont\bfseries
\addfontfeature{RawFeature=-pnum}00:00}
\addtolength{\timewidth}{4pt}
\newlength{\activitywidth}
\setlength{\activitywidth}{\textwidth}
\addtolength{\activitywidth}{-4\timewidth}
\addtolength{\activitywidth}{-14pt}
\setlength{\activitywidth}{0.25\activitywidth}
\usepackage[cmyk]{xcolor}
\definecolor{mdg}{cmyk}{0,0.3,0.24,0.03}
\definecolor{talk}{cmyk}{0.13,0,0,0}
\definecolor{coach}{cmyk}{0,0.02,0.22,0}
\definecolor{food}{cmyk}{0,0.2,0.41,0.06}
\definecolor{seminar}{cmyk}{0.08,0,0.11,0.04}
\definecolor{workshop}{cmyk}{0,0,0,0.11}
\usepackage{tikz}
\usetikzlibrary{positioning,chains}
\begin{document}
\begin{tikzpicture}[
remember picture,
overlay,
node distance=0 cm,
chain default direction=going below,
inner sep=0pt,
outer sep=1pt,
font=\timetablefont,
time/.style args={#1,#2}{
anchor=north west,
minimum width=\timewidth,
minimum height=\yscale*#1cm-2pt,
node contents={},
append after command={
node[anchor=north east, inner sep=0pt, outer sep=3pt,
font=\timetablefont\bfseries\addfontfeature{RawFeature=-pnum}]
at (\tikzlastnode.north east) {#2}
},
on chain
},
activity/.style args={#1,#2,#3}{
anchor=north west,
minimum width=\activitywidth,
minimum height=\yscale*#1cm-2pt,
node contents={},
append after command={
node[anchor=north west, inner sep=0pt, outer sep=3pt,
text width=\activitywidth-6pt]
at (\tikzlastnode.north west) {\textbf{#2}\\#3}
},
on chain
}
]
\begin{scope}[start chain]
\node (fri-time) [time={1,}];
\node[time={10,}];
\node[time={2,18:00}];
\node[time={1.5,20:00}];
\node[time={1,21:30}];
\end{scope}
\begin{scope}[start chain]
\node (fri) [right=of fri-time.north east, activity={1,\Large\hfill
Friday\hfill\strut,}];
\node[activity={10,,}];
\node[activity={2,Registration,\roomfour}];
\node[activity={1.5,Talk 1: \firstspeaker,\roomone},fill=talk];
\node[activity={1,Supper,\roomtwo}];
\end{scope}
\begin{scope}[start chain]
\node (sat-time) [right=of fri.north east, time={1,}];
\node[time={1,8:00}];
\node[time={1.5,9:00}];
\node[time={0.75,10:30}];
\node[time={1.25,11:15}];
\node[time={0.5,12:45}];
\node[time={1.5,13:00}];
\node[time={1.5,14:30}];
\node[time={0.5,16:00}];
\node[time={1.5,16:30}];
\node[time={1.5,18:00}];
\node[time={1.5,19:30}];
\node[time={1.5,21:00}];
\end{scope}
\begin{scope}[start chain]
\node (sat) [right=of sat-time.north east, activity={1,\Large\hfill
Saturday\hfill\strut,}];
\node[activity={1,Breakfast,\roomfood}, fill=food];
\node[activity={1.5,Talk 2: \secondspeaker,\roomone}, fill=talk];
\node[activity={0.75,Morning tea,}];
\node[activity={1.25,Ministry Discussion Group 1,Room listed on booklet
cover}, fill=mdg];
\node[activity={0.5,Coach's briefing,}];
\node[activity={1.5,Lunch,\roomfood}, fill=food];
\node[activity={1.5,Free time\slash Coaching slot 1,}, fill=coach];
\node[activity={0.5,Afternoon tea,}];
\node[activity={1.5,Free time\slash Coaching slot 2,}, fill=coach];
\node[activity={1.5,Dinner,\roomfood}, fill=food];
\node[activity={1.5,Talk 3: \firstspeaker,\roomone}, fill=talk];
\node[activity={1.5,Supper,\roomtwo}];
\end{scope}
\begin{scope}[start chain]
\node (sun-time) [right=of sat.north east, time={1,}];
\node[time={0.5,}];
\node[time={1,8:30}];
\node[time={1.25,9:30}];
\node[time={0.5,10:45}];
\node[time={1.25,11:15}];
\node[time={1,12:30}];
\node[time={1,13:30}];
\node[time={1.5,14:30}];
\node[time={0.5,16:00}];
\node[time={1.5,16:30}];
\node[time={1.5,18:00}];
\node[time={2,19:30}];
\node[time={1,21:30}];
\end{scope}
\begin{scope}[start chain]
\node (sun) [right=of sun-time.north east, activity={1,\Large\hfill
Sunday\hfill\strut,}];
\node[activity={0.5,,}];
\node[activity={1,Breakfast,\roomfood}, fill=food];
\node[activity={1.25,Seminars,\roomseminars}, fill=seminar];
\node[activity={0.5,Morning tea,}];
\node[activity={1.25,Workshops,\roomworkshops}, fill=workshop];
\node[activity={1,Lunch,\roomfood}, fill=food];
\node[activity={1,Ministry Discussion Group 2,\roommdgs}, fill=mdg];
\node[activity={1.5,Free time\slash Coaching slot 3,}, fill=coach];
\node[activity={0.5,Afternoon tea,}];
\node[activity={1.5,Free time\slash Coaching slot 4,}, fill=coach];
\node[activity={1.5,Dinner,\roomfood}, fill=food];
\node[activity={2,Talk 4: \secondspeaker,\roomone}, fill=talk];
\node[activity={1,Supper,\roomtwo}];
\end{scope}
\begin{scope}[start chain]
\node (mon-time) [right=of sun.north east, time={1,}];
\node[time={0.5,}];
\node[time={0.5,8:30}];
\node[time={1,9:00}];
\node[time={0.5,10:00}];
\node[time={1,10:30}];
\node[time={1.5,11:30}];
\node[time={1,13:00}];
\end{scope}
\begin{scope}[start chain]
\node[right=of mon-time.north east, activity={1,\Large\hfill
Monday\hfill\strut,}];
\node[activity={0.5,,}];
\node[activity={0.5,Light breakfast,}];
\node[activity={1,Ministry Discussion Group 3,\roommdgs}, fill=mdg];
\node[activity={0.5,Personal reflection\slash prayer,}];
\node[activity={1,Brunch,\roomtwo}, fill=food];
\node[activity={1.5,Talk 5: \firstspeaker,\roomone}, fill=talk];
\node[activity={1,Pack up and leave,}];
\end{scope}
\end{tikzpicture}%
\end{document}
An interesting and simple
gallery is presented at
Wikibooks - LaTeX/Tables
[1]
BTW, my contribution is:
\documentclass{beamer}
\usepackage{booktabs}
\begin{document}
\frame{
\frametitle{Simple Table}
\begin{center}
\begin{tabular}{cccc}
\toprule
Dec & Bin & Octal & Hexa \\
\midrule
33 & \alert{100001} & \alert{41} & \alert{21} \\
\midrule
\alert{117} & 1110101 & \alert{165} & \alert{75} \\
\midrule
\alert{451} & \alert{111000011} & 703 & \alert{1C3} \\
\midrule
\alert{431} & \alert{110101111} & \alert{657} & 1AF \\
\bottomrule
\end{tabular}
\end{center}
}
\end{document}
[1] http://en.wikibooks.org/wiki/LaTeX/TablesResult:
booktabs
is the way to go :) - jub0bs
I will give an example about drawing a chessboard with the new LaTeX3 package
tabularray
[1]:
\documentclass{article}
\usepackage{fontspec} % Need XeLaTeX or LuaLaTeX
\setmainfont{Arial Unicode MS}
%\setmainfont{Segoe UI Symbol}
\usepackage{xcolor}
\usepackage{tabularray}
\begin{document}
\begin{center}
\begin{tblr}{
rows = {35pt}, columns = {35pt},
rowsep = 1pt, colsep = 1pt, stretch = 0,
cells = {c,font=\Huge},
cell{odd}{even} = {azure7},
cell{even}{odd} = {azure7},
hlines, vlines,
}
♜ & ♞ & ♝ & ♛ & ♚ & ♝ & ♞ & ♜ \\
♟ & ♟ & ♟ & ♟ & ♟ & ♟ & ♟ & ♟ \\
& & & & & & & \\
& & & & & & & \\
& & & & & & & \\
& & & & & & & \\
♙ & ♙ & ♙ & ♙ & ♙ & ♙ & ♙ & ♙ \\
♖ & ♘ & ♗ & ♕ & ♔ & ♗ & ♘ & ♖ \\
\end{tblr}
\end{center}
\begin{center}
\begin{tblr}{colspec={lXXXXXX},hlines}
Chess & King & Queen & Rook & Bishop & Knight & Pawn \\
White & ♔ & ♕ & ♖ & ♗ & ♘ & ♙ \\
Black & ♚ & ♛ & ♜ & ♝ & ♞ & ♟ \\
\end{tblr}
\end{center}
\end{document}
[1] https://ctan.org/pkg/tabularrayThe package tablestyles [1] was designed to offer convenient typesetting of good-looking tables.
Preamble:
\usepackage{tabularx}
\usepackage[table]{xcolor}
\usepackage{colortbl}
\usepackage{tablestyles}
Content:
\begin{table}
%
\tablestyle[sansbold]
%
\begin{tabular}{*{2}{p{0.45\textwidth}}}
\theadstart
\thead header &
\thead header \\
\tbody
%
content & content \\
content & content \\
content & content \\
%
\tsubheadstart
\tsubhead subhead &
\tsubhead subhead \\
%
content & content \\
content & content \\
\tend
\end{tabular}
\caption{sansbold style}
\label{tab:style:sansbold}
\end{table}
[1] https://ctan.org/pkg/tablestylesI made my example using that of @Jeel Shah with simple enhancement(font and color) i'm planing to use it in my book
\documentclass{article}
\usepackage[table]{xcolor}
\usepackage[margin=1in]{geometry}
\usepackage{tabularx}
\usepackage{enumitem}
\setlist{nolistsep}
\definecolor{blue}{HTML}{008ED7}
\definecolor{mygray}{gray}{0.75}
\definecolor{lightBlue}{HTML}{e5f7ff}
\renewcommand{\familydefault}{\sfdefault}
\renewcommand{\arraystretch}{1.5}
\begin{document}
\begin{center}
\fontfamily{cmss}\selectfont
\begin{tabularx}{\textwidth}[t]{XX}
\arrayrulecolor{blue}\hline
\rowcolor{lightBlue} \textbf{\textcolor{blue}{Goal 1 Eradicate Extreme Poverty}} & \\
\hline
Target 1.A Halve, between 1990 and 2015, the proportion of the people whose income is less than \$1 a day. &
\begin{minipage}[t]{\linewidth}%
\begin{itemize}
\item[1.1] Proportion of population below \$1 purchasing power parity (PPP) a day$^a$
\item[1.2] Poverty Gap ratio [incidence x depth of poverty]
\item[1.3] Share of the poorest quintile in national consumption
\end{itemize}
\end{minipage}\\
\arrayrulecolor{mygray}\hline
Target 1.B Achieve full and productive employment and decent work for all, including women and young people &
\begin{minipage}[t]{\linewidth}%
\begin{itemize}
\item[1.4] Growth of GDP per person employed
\item[1.5] Employment to population ratio
\item[1.6] Proportion of employed people living below \$1 (PP) a day
\item[1.7] Proportion of own-account and contribution family workers in total employment
\end{itemize}
\end{minipage}\\
\hline
Target 1.C Halve, between 1990 and 2015, the proportion of people who suffer from hunger &
\begin{minipage}[t]{\linewidth}%
\begin{itemize}
\item[1.8] Prevalence of underweight children under five years of age
\item[1.9] Proportion of population below minimum level of dietary energy consumption
\end{itemize}
\end{minipage}\\
\arrayrulecolor{blue}\hline
\rowcolor{lightBlue} \textbf{\textcolor{blue}{Goal 2 Achieve universal primary education}} & \\
\hline
Target 2.A Ensure that by 2015 children everywhere, boy and girls alike, will be able to complete a full course of primary schooling. &
\begin{minipage}[t]{\linewidth}%
\begin{itemize}
\item[2.1] Net enrollment ratio in primary education
\item[2.2] Proportion of pupils starting grade 1 who reach last grade of primary education
\item[2.3] Literacy rate of 15- to 24-year-olds, women and men
\end{itemize}
\end{minipage}\\
\hline
\rowcolor{lightBlue} \multicolumn{2}{l}{%
\textbf{\textcolor{blue}{Goal 3 Promote gender equality and empower women}}} \\
\hline
Target 3.A Eliminate gender disparity in primary and secondary education, preferably by 2005, and in all levels of education no later than 2015 &
\begin{minipage}[t]{\linewidth}%
\begin{itemize}
\item[3.1] Ratios of girls to boys in primary, secondary and tertiary education
\item[3.2] Share of women in wage employment in the non-agricultural sector.
\end{itemize}
\end{minipage}
\end{tabularx}
\end{center}
\end{document}