Am using a stata package to output to latex and create tables in a latex package that I am unfamiliar with. Not quite sure what the bug in the outputted latex code (below) is and would appreciate advice.
This generates a "File ended while scanning use of \TX@get@body". I've read through some help, but can't find a solution.
Thanks in advance for help
Code: Select all
\documentclass{article}
\usepackage{graphicx}
\usepackage{tabularx}
\usepackage{booktabs}
\usepackage{array}
\begin{document}
\begin{center}
\footnotesize
\newcolumntype{Y}{>{\raggedleft \arraybackslash}X}
\begin{tabularx} {10 cm} {@{} l Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y@{}} \\
\toprule
\cmidrule(l{.75em}){2-4}
\textbf{industry}&\textbf{nonunion}&\textbf{union}&\textbf{Total} \\
\midrule \textbf{Race: white) \\
Ag/Forestry/Fisheries&8&1&9 \\
Mining&2&0&2 \\
Construction&14&2&16 \\
Manufacturing&155&40&195 \\
Transport/Comm/Utility&31&28&59a \\
Wholesale/Retail Trade&188&18&206 \\
Finance/Ins/Real Estate&127&6&133 \\
Business/Repair Svc&41&3&44 \\
Personal Services&33&2&35 \\
Entertainment/Rec Svc&9&2&11 \\
Professional Services&372&160&532 \\
Public Administration&65&37&102 \\
\textbf{Total}&1,045&299&1,344 \\
\midrule \textbf{Race: black} \\
Ag/Forestry/Fisheries&2&1&3 \\
Construction&2&1&3 \\
Manufacturing&76&43&119 \\
Transport/Comm/Utility&8&19&27 \\
Wholesale/Retail Trade&51&3&54 \\
Finance/Ins/Real Estate&16&3&19 \\
Business/Repair Svc&9&4&13 \\
Personal Services&25&3&28 \\
Entertainment/Rec Svc&3&0&3 \\
Professional Services&119&58&177 \\
Public Administration&35&16&51 \\
\textbf{Total}&346&151&497 \\
\midrule \textbf{Race: other) \\
Construction&1&0&1 \\
Manufacturing&3&1&4 \\
Transport/Comm/Utility&0&1&1 \\
Finance/Ins/Real Estate&1&0&1 \\
Business/Repair Svc&1&1&2 \\
Professional Services&9&2&11 \\
Public Administration&1&3&4 \\
\textbf{Total}&16&8&24 \\
\bottomrule
\addlinespace[.75ex]
\end{tabularx}
\par
\scriptsize{\emph{Source: }nlsw88.dta}
\normalsize
\end{center}
\end{document}