I have a relatively complicated table with a lot of manual adjustments to the column widths and spacing that I am trying to convert to a standalone
pdf (for the purpose of ultimately inserting it into a Word Doc). The original table text is below:
\begin{table}[h!]
\begin{center}
\begin{tabularx}{0.7\textwidth}{>{\raggedright\arraybackslash}X >{\raggedleft\arraybackslash}X }
\hline
\hline
\vspace{1mm}
& Initiate conflict \\
\Xhline{2\arrayrulewidth}
First = female & $-0.08$ \\
& $(0.05)$ \\
Second = prefer not to say & $-0.21$ \\
& $(0.18)$ \\
Third = non-binary/non-conforming & $-0.18$ \\
& $(0.12)$ \\
(Intercept) & $0.35^{***}$ \\
& $(0.03)$ \\
\hline
R$^2$ & $0.01$ \\
Adj. R$^2$ & $0.01$ \\
Num. obs. & $404$ \\
\hline
\hline
\multicolumn{2}{l}{\scriptsize{$^{***}p<0.001$; $^{**}p<0.01$; $^{*}p<0.05$}}
\end{tabularx} \\
\parbox{11cm}{\caption{Random caption inserted as a placeholder for what I am actually going to say, which will be a sentence or two long in the end I think.}}
\label{table:coefficients}
\end{center}
\end{table}
Any guidance on how to successfully make this work in a document type standalone
would be greatly appreciated. Alternatively, if there is an easier way to put such a table into a Word Doc, I am open to suggestions.
Best Answer
I don't think that using a
tabularx
environment with two equally wide columns and some ensuing line-breaks in the first column generates a good layout. I'd go with a basictabular
environment, usel
for the first column, and align the numbers in the second column. To force the width of the legend to be the same as thetabular
material above it, I suggest you employ athreeparttable
wrapper.