Estou tentando colocar uma tabela de regressão Stata em Latex, mas meu código gera os seguintes erros:
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
O código começa:
\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}
Encontrei o código do preâmbulo emhttp://www.jwe.cc/2012/03/stata-latex-tables-estout/
Responder1
O (primeiro) erro do tex do código postado não é um dos que você listou, é:
! Undefined control sequence.
\estwide ...tracolsep \fill }l*{#2}{#3}} \toprule
\toprule
é definido pelo pacote booktabs que você não carregou. Se eu adicionar
\usepackage{booktabs}
e comente
%\estinput{#1}
pois não tenho o arquivo
Seu exemplo é executado sem erros.