\documentclass[12pt]{article} \newcommand{\bs}{$\backslash$} \thispagestyle{empty} \begin{document} \section{Tabstat in \LaTeX using {\tt latabstat} Command} \noindent Example 3: Table with a title The last example table does not have a title. We can use the option {\tt cap} after {\tt latabstat} to make a title for the table. \begin{small} \begin{verbatim} . latabstat math write read, by(female) cap(Scores by Gender) \begin{table}[htbp]\centering \caption{\label{} \textbf{Scores by Gender} }\begin{tabular} {@{} l r r r @{}} \\ \hline \textbf{female } & \textbf{ math} & \textbf{ write} & \textbf{ read} \\ \hline male & 52.94505 & 50.12088 & 52.82418 \\ female & 52.3945 & 54.99083 & 51.73394 \\ Total & 52.645 & 52.775 & 52.23 \\ \hline \multicolumn{4}{@{}l}{ \footnotesize{\emph{Source:} http://www.ats.ucla.edu/stat/stata/notes/hsb2.dta}} \end{tabular} \end{table} \end{verbatim} \end{small} \begin{table}[htbp]\centering \caption{\label{} \textbf{Scores by Gender} }\begin{tabular} {@{} l r r r @{}} \\ \hline \textbf{female } & \textbf{ math} & \textbf{ write} & \textbf{ read} \\ \hline male & 52.94505 & 50.12088 & 52.82418 \\ female & 52.3945 & 54.99083 & 51.73394 \\ Total & 52.645 & 52.775 & 52.23 \\ \hline \multicolumn{4}{@{}l}{ \footnotesize{\emph{Source:} http://www.ats.ucla.edu/stat/stata/notes/hsb2.dta}} \end{tabular} \end{table} \end{document}