Errores de látex: secuencia de control indefinida, modo par externo, hbox insuficiente y excesivo

Errores de látex: secuencia de control indefinida, modo par externo, hbox insuficiente y excesivo

Estoy intentando poner una tabla de regresión de Stata en Latex, pero mi código produce los siguientes errores:

Undefined control sequence \estwide{PEAssignment2tabl1.tex}{6}{c}
Not in outer par mode. \begin{table}[htbp]
Undefined control sequence \estwide{PEAssignment2tabl1.tex}{6}{c}
Undefined control sequence \estwide{PEAssignment2tabl1.tex}{6}{c}
Underfull \hbox (badness 10000) in paragraph
Underfull \hbox (badness 10000) in paragraph
Overfull \hbox (240.51797pt too wide) in paragraph

El código comienza:

\documentclass[10pt]{article}
\usepackage[left=0.5in, right=0.5in, top=0.5in, bottom=0.5in]{geometry}

\newcommand{\sym}[1]{\rlap{#1}}% Thanks to David Carlisle

\let\estinput=\input% define a new input command so that we can still flatten the document

\newcommand{\estwide}[3]{
    \vspace{.75ex}{
        \begin{tabular*}
        {\textwidth}{@{\hskip\tabcolsep\extracolsep\fill}l*{#2}{#3}}
        \toprule
        \estinput{#1}
        \bottomrule
        \addlinespace[.75ex]
        \end{tabular*}
        }
    }   

\newcommand{\estauto}[3]{
    \vspace{.75ex}{
        \begin{tabular}{l*{#2}{#3}}
        \toprule
        \estinput{#1}
        \bottomrule
        \addlinespace[.75ex]
        \end{tabular}
        }
    }

% Allow line breaks with \\ in specialcells
    \newcommand{\specialcell}[2][c]{%
\begin{tabular}[#1]{@{}c@{}}#2\end{tabular}}

% *****************************************************************
% Custom subcaptions
% *****************************************************************
% Note/Source/Text after Tables
\newcommand{\figtext}[1]{
\vspace{-1.9ex}
\captionsetup{justification=justified,font=footnotesize}
\caption*{\hspace{6pt}\hangindent=1.5em #1}
}
\newcommand{\fignote}[1]{\figtext{\emph{Note:~}~#1}}

\newcommand{\figsource}[1]{\figtext{\emph{Source:~}~#1}}

% Add significance note with \starnote
\newcommand{\starnote}{\figtext{* p < 0.1, ** p < 0.05, *** p < 0.01. Standard errors in parentheses.}}

% *****************************************************************
% siunitx
% *****************************************************************
\usepackage{siunitx} % centering in tables
\sisetup{
    detect-mode,
    tight-spacing       = true,
    group-digits        = false ,
    input-signs     = ,
    input-symbols       = ( ) [ ] - + *,
    input-open-uncertainty  = ,
    input-close-uncertainty = ,
    table-align-text-post   = false
    }

\begin{document}
\title{Assignment 2 \\ \vspace{0.001 mm} {\large Program Evaluation, Spring 2014} \\             \vspace{0.001 mm} {\large Sarah Armstrong}}
\maketitle

\begin{table}
\caption{Sample Characteristics by the Amount of Co-Holding (\pounds)}
\estwide{PEAssignment2tabl1.tex}{6}{c}
\label{table2}
\end{table}


\end{document}

Encontré el código del preámbulo enhttp://www.jwe.cc/2012/03/stata-latex-tables-estout/

Respuesta1

El (primer) error de tex del código publicado no es uno de los que usted enumera, es:

! Undefined control sequence.
\estwide ...tracolsep \fill }l*{#2}{#3}} \toprule 

\topruleestá definido por el paquete booktabs que no ha cargado. si agrego

\usepackage{booktabs}

y comentar

  %\estinput{#1}

como no tengo el archivo

Su ejemplo se ejecuta sin errores.

información relacionada