如何 center/line 向左 >{\raggedright\arraybackslash} 对象
how to center/line to left >{\raggedright\arraybackslash} object
我有一个 table,我希望将除第一列之外的所有列居中。如何解决这个问题。非常感谢。
\documentclass[11pt, a4paper]{article}
\usepackage{graphicx,color}
\usepackage{epstopdf}
\usepackage{enumerate}
\usepackage[colorlinks,linkcolor=blue,citecolor=blue,urlcolor=blue,filecolor=blue]{hyperref}
\usepackage{array}
\usepackage{calc}
\usepackage{booktabs}
\usepackage{longtable}
\usepackage{tabularx}
\usepackage{appendix}
\usepackage{multirow}
\usepackage[table]{xcolor}
\usepackage{amsmath, amsfonts, amsthm, amssymb}
\usepackage{mathrsfs}
\usepackage{rotating}
\usepackage{bbm}
\usepackage{amsmath}
\usepackage{lmodern}
\newcommand{\etal}{{\sl et al. }}
\newcommand{\argmax}{\operatornamewithlimits{argmax}}
\newcommand{\iid}{\stackrel{\mathrm{iid}}{\sim}}
\newcolumntype{C}{>{\centering\arraybackslash}X}
\newcolumntype{R}{>{\raggedright\arraybackslash}X}
\newcolumntype{L}{>{\raggedleft\arraybackslash}X}
\newtheorem{proposition}{Proposition}
\newtheorem{definition}{Definition}
\newtheorem{corollary}{Corollary}
\newtheorem{lemma}{Lemma}
\newtheorem{theorem}{Theorem}[section]
\usepackage{blkarray}
\usepackage{pdflscape}
\usepackage{siunitx}
\renewcommand{\baselinestretch}{1}
\usepackage[authoryear,round]{natbib}
\newcommand{\vect}[1]{\boldsymbol{#1}}
%\pdfminorversion=4
% NOTE: To produce blinded version, replace "0" with "1" below.
\newcommand{\blind}{0}
% DON'T change margins - should be 1 inch all around.
\addtolength{\oddsidemargin}{-.5in}%
\addtolength{\evensidemargin}{-.5in}%
\addtolength{\textwidth}{1in}%
\addtolength{\textheight}{1.3in}%
\addtolength{\topmargin}{-.8in}%
\begin{document}
\begin{sidewaystable}[htbp]
\centering
\scriptsize
\begin{tabularx}{1\textwidth}
{>{\raggedright\arraybackslash}p{4cm}
>{\raggedright\arraybackslash}p{4cm}
>{\raggedright\arraybackslash}p{4cm}
>{\raggedright\arraybackslash}p{4cm}
>{\raggedright\arraybackslash}p{4cm}
>{\raggedright\arraybackslash}p{4cm}
%cccc
}
\toprule
& (1) & (2) & (3) & (4) & (5) \ [0.5ex]
&Tobin's Q &Total Q &Enterprise Value Multiple &Operating Cash Flow &EBITDA \
\midrule
Constituency Statute (-2 or -1) &0.2162 &0.2834* &1.286 &0.003 &0.0009\
&-0.134 &-0.166 &-2.114 &-0.018 &-0.018\
Constituency Statute (0) &0.0703 &0.1944 &0.8492 &0.0154 &0.0134\
&-0.12 &-0.201 &-1.394 &-0.015 &-0.017\
Constituency Statute (+1) &0.1373 &0.1902 &1.2016 &0.006 &0.0207\
&-0.143 &-0.186 &-1.337 &-0.018 &-0.018\
Constituency Statute (+2) &0.2084* &0.3055** &0.4787 &0.0152 &0.0066\
&-0.11 &-0.15 &-1.259 &-0.013 &-0.016\
Constituency Statute (3+) &0.2221** &0.3970*** &1.1029 &0.0003 &0.0005\
&-0.088 &-0.115 &-0.924 &-0.012 &-0.014\
Constant &4.9142*** &3.7396*** &9.1269*** &-0.0529*** &-0.0019\
&-0.092 &-0.181 &-1.589 &-0.008 &-0.013\
Control Variables &Yes &Yes &Yes &Yes &Yes \
Firm FE &Yes &Yes &Yes &Yes &Yes \
Industry-by-Year FE &Yes &Yes &Yes &Yes &Yes \
State-by-Year FE &Yes &Yes &Yes &Yes &Yes \
Observations &28555 &28498 &28481 &27903 &28555\
Adjusted R2 &0.546 &0.503 &0.554 &0.654 &0.698\
\bottomrule
\addlinespace
\multicolumn{6}{@{}p{1\textwidth}@{}}{\footnotesize
This table reports the coefficient estimates of the dynamics of treatment effect of constituency statutes for the subsample of the technology \& pharmaceutical industries. The dependent variables are Tobin's Q (column 1), Total Q (column 2), Enterprise Value Multiple (column 3), Operating Cash Flow (column 4), and EBITDA (column 5). Constituency Statute (-2 or -1) indicate observations in one and two years prior to the enactment of constituency statutes, Constituency Statute (0) indicates the year of the enactment, and Constituency Statute (+1), (+2) and (3+) indicate observations in one, two, and three or more years after the enactment respectively. All control variables are lagged by one year and are suppressed for brevity. All regressions include firm, state (of location) by year, and industry (Fama-French 12 industries) by year fixed effects. Singleton observations are dropped in regressions due to fixed effects (Correia, 2015). Robust standard errors are clustered at firm’s incorporation state level and are reported in parentheses below the coefficient estimates. ***, ** and * denote statistical significance at 1\%, 5\% and 10\% level respectively. See Appendix for detailed definitions for all variables.
}\
\end{tabularx}
\caption{Dynamics of treatment effect of constituency statutes - continued Panel B.}
\label{tab:app4}
\end{sidewaystable}
\end{document}
如果你没有 X
列,我仍然不明白你为什么要使用 tabularx
,无论如何,你可以像这样居中列:
\documentclass[11pt, a4paper]{article}
\usepackage{graphicx,color}
\usepackage{epstopdf}
\usepackage{enumerate}
\usepackage[colorlinks,linkcolor=blue,citecolor=blue,urlcolor=blue,filecolor=blue]{hyperref}
\usepackage{array}
\usepackage{calc}
\usepackage{booktabs}
\usepackage{longtable}
\usepackage{tabularx}
\usepackage{appendix}
\usepackage{multirow}
\usepackage[table]{xcolor}
\usepackage{amsmath, amsfonts, amsthm, amssymb}
\usepackage{mathrsfs}
\usepackage{rotating}
\usepackage{bbm}
\usepackage{amsmath}
\usepackage{lmodern}
\newcommand{\etal}{{\sl et al. }}
\newcommand{\argmax}{\operatornamewithlimits{argmax}}
\newcommand{\iid}{\stackrel{\mathrm{iid}}{\sim}}
\newcolumntype{C}{>{\centering\arraybackslash}X}
\newcolumntype{R}{>{\raggedright\arraybackslash}X}
\newcolumntype{L}{>{\raggedleft\arraybackslash}X}
\newtheorem{proposition}{Proposition}
\newtheorem{definition}{Definition}
\newtheorem{corollary}{Corollary}
\newtheorem{lemma}{Lemma}
\newtheorem{theorem}{Theorem}[section]
\usepackage{blkarray}
\usepackage{pdflscape}
\usepackage{siunitx}
\renewcommand{\baselinestretch}{1}
\usepackage[authoryear,round]{natbib}
\newcommand{\vect}[1]{\boldsymbol{#1}}
%\pdfminorversion=4
% NOTE: To produce blinded version, replace "0" with "1" below.
\newcommand{\blind}{0}
% DON'T change margins - should be 1 inch all around.
\addtolength{\oddsidemargin}{-.5in}%
\addtolength{\evensidemargin}{-.5in}%
\addtolength{\textwidth}{1in}%
\addtolength{\textheight}{1.3in}%
\addtolength{\topmargin}{-.8in}%
\begin{document}
\begin{sidewaystable}[htbp]
\centering
\scriptsize
\begin{tabularx}{1\textwidth}
{>{\raggedright\arraybackslash}p{4cm}
>{\centering\arraybackslash}p{4cm}
>{\centering\arraybackslash}p{4cm}
>{\centering\arraybackslash}p{4cm}
>{\centering\arraybackslash}p{4cm}
>{\centering\arraybackslash}p{4cm}
%cccc
}
\toprule
& (1) & (2) & (3) & (4) & (5) \[0.5ex]
&Tobin's Q &Total Q &Enterprise Value Multiple &Operating Cash Flow &EBITDA \
\midrule
Constituency Statute (-2 or -1) &0.2162 &0.2834* &1.286 &0.003 &0.0009\
&-0.134 &-0.166 &-2.114 &-0.018 &-0.018\
Constituency Statute (0) &0.0703 &0.1944 &0.8492 &0.0154 &0.0134\
&-0.12 &-0.201 &-1.394 &-0.015 &-0.017\
Constituency Statute (+1) &0.1373 &0.1902 &1.2016 &0.006 &0.0207\
&-0.143 &-0.186 &-1.337 &-0.018 &-0.018\
Constituency Statute (+2) &0.2084* &0.3055** &0.4787 &0.0152 &0.0066\
&-0.11 &-0.15 &-1.259 &-0.013 &-0.016\
Constituency Statute (3+) &0.2221** &0.3970*** &1.1029 &0.0003 &0.0005\
&-0.088 &-0.115 &-0.924 &-0.012 &-0.014\
Constant &4.9142*** &3.7396*** &9.1269*** &-0.0529*** &-0.0019\
&-0.092 &-0.181 &-1.589 &-0.008 &-0.013\
Control Variables &Yes &Yes &Yes &Yes &Yes \
Firm FE &Yes &Yes &Yes &Yes &Yes \
Industry-by-Year FE &Yes &Yes &Yes &Yes &Yes \
State-by-Year FE &Yes &Yes &Yes &Yes &Yes \
Observations &28555 &28498 &28481 &27903 &28555\
Adjusted R2 &0.546 &0.503 &0.554 &0.654 &0.698\
\bottomrule
\addlinespace
\multicolumn{6}{@{}p{1\textwidth}@{}}{\footnotesize
This table reports the coefficient estimates of the dynamics of treatment effect of constituency statutes for the subsample of the technology \& pharmaceutical industries. The dependent variables are Tobin's Q (column 1), Total Q (column 2), Enterprise Value Multiple (column 3), Operating Cash Flow (column 4), and EBITDA (column 5). Constituency Statute (-2 or -1) indicate observations in one and two years prior to the enactment of constituency statutes, Constituency Statute (0) indicates the year of the enactment, and Constituency Statute (+1), (+2) and (3+) indicate observations in one, two, and three or more years after the enactment respectively. All control variables are lagged by one year and are suppressed for brevity. All regressions include firm, state (of location) by year, and industry (Fama-French 12 industries) by year fixed effects. Singleton observations are dropped in regressions due to fixed effects (Correia, 2015). Robust standard errors are clustered at firm’s incorporation state level and are reported in parentheses below the coefficient estimates. ***, ** and * denote statistical significance at 1\%, 5\% and 10\% level respectively. See Appendix for detailed definitions for all variables.
}\
\end{tabularx}
\caption{Dynamics of treatment effect of constituency statutes - continued Panel B.}
\label{tab:app4}
\end{sidewaystable}
\end{document}
我有一个 table,我希望将除第一列之外的所有列居中。如何解决这个问题。非常感谢。
\documentclass[11pt, a4paper]{article}
\usepackage{graphicx,color}
\usepackage{epstopdf}
\usepackage{enumerate}
\usepackage[colorlinks,linkcolor=blue,citecolor=blue,urlcolor=blue,filecolor=blue]{hyperref}
\usepackage{array}
\usepackage{calc}
\usepackage{booktabs}
\usepackage{longtable}
\usepackage{tabularx}
\usepackage{appendix}
\usepackage{multirow}
\usepackage[table]{xcolor}
\usepackage{amsmath, amsfonts, amsthm, amssymb}
\usepackage{mathrsfs}
\usepackage{rotating}
\usepackage{bbm}
\usepackage{amsmath}
\usepackage{lmodern}
\newcommand{\etal}{{\sl et al. }}
\newcommand{\argmax}{\operatornamewithlimits{argmax}}
\newcommand{\iid}{\stackrel{\mathrm{iid}}{\sim}}
\newcolumntype{C}{>{\centering\arraybackslash}X}
\newcolumntype{R}{>{\raggedright\arraybackslash}X}
\newcolumntype{L}{>{\raggedleft\arraybackslash}X}
\newtheorem{proposition}{Proposition}
\newtheorem{definition}{Definition}
\newtheorem{corollary}{Corollary}
\newtheorem{lemma}{Lemma}
\newtheorem{theorem}{Theorem}[section]
\usepackage{blkarray}
\usepackage{pdflscape}
\usepackage{siunitx}
\renewcommand{\baselinestretch}{1}
\usepackage[authoryear,round]{natbib}
\newcommand{\vect}[1]{\boldsymbol{#1}}
%\pdfminorversion=4
% NOTE: To produce blinded version, replace "0" with "1" below.
\newcommand{\blind}{0}
% DON'T change margins - should be 1 inch all around.
\addtolength{\oddsidemargin}{-.5in}%
\addtolength{\evensidemargin}{-.5in}%
\addtolength{\textwidth}{1in}%
\addtolength{\textheight}{1.3in}%
\addtolength{\topmargin}{-.8in}%
\begin{document}
\begin{sidewaystable}[htbp]
\centering
\scriptsize
\begin{tabularx}{1\textwidth}
{>{\raggedright\arraybackslash}p{4cm}
>{\raggedright\arraybackslash}p{4cm}
>{\raggedright\arraybackslash}p{4cm}
>{\raggedright\arraybackslash}p{4cm}
>{\raggedright\arraybackslash}p{4cm}
>{\raggedright\arraybackslash}p{4cm}
%cccc
}
\toprule
& (1) & (2) & (3) & (4) & (5) \ [0.5ex]
&Tobin's Q &Total Q &Enterprise Value Multiple &Operating Cash Flow &EBITDA \
\midrule
Constituency Statute (-2 or -1) &0.2162 &0.2834* &1.286 &0.003 &0.0009\
&-0.134 &-0.166 &-2.114 &-0.018 &-0.018\
Constituency Statute (0) &0.0703 &0.1944 &0.8492 &0.0154 &0.0134\
&-0.12 &-0.201 &-1.394 &-0.015 &-0.017\
Constituency Statute (+1) &0.1373 &0.1902 &1.2016 &0.006 &0.0207\
&-0.143 &-0.186 &-1.337 &-0.018 &-0.018\
Constituency Statute (+2) &0.2084* &0.3055** &0.4787 &0.0152 &0.0066\
&-0.11 &-0.15 &-1.259 &-0.013 &-0.016\
Constituency Statute (3+) &0.2221** &0.3970*** &1.1029 &0.0003 &0.0005\
&-0.088 &-0.115 &-0.924 &-0.012 &-0.014\
Constant &4.9142*** &3.7396*** &9.1269*** &-0.0529*** &-0.0019\
&-0.092 &-0.181 &-1.589 &-0.008 &-0.013\
Control Variables &Yes &Yes &Yes &Yes &Yes \
Firm FE &Yes &Yes &Yes &Yes &Yes \
Industry-by-Year FE &Yes &Yes &Yes &Yes &Yes \
State-by-Year FE &Yes &Yes &Yes &Yes &Yes \
Observations &28555 &28498 &28481 &27903 &28555\
Adjusted R2 &0.546 &0.503 &0.554 &0.654 &0.698\
\bottomrule
\addlinespace
\multicolumn{6}{@{}p{1\textwidth}@{}}{\footnotesize
This table reports the coefficient estimates of the dynamics of treatment effect of constituency statutes for the subsample of the technology \& pharmaceutical industries. The dependent variables are Tobin's Q (column 1), Total Q (column 2), Enterprise Value Multiple (column 3), Operating Cash Flow (column 4), and EBITDA (column 5). Constituency Statute (-2 or -1) indicate observations in one and two years prior to the enactment of constituency statutes, Constituency Statute (0) indicates the year of the enactment, and Constituency Statute (+1), (+2) and (3+) indicate observations in one, two, and three or more years after the enactment respectively. All control variables are lagged by one year and are suppressed for brevity. All regressions include firm, state (of location) by year, and industry (Fama-French 12 industries) by year fixed effects. Singleton observations are dropped in regressions due to fixed effects (Correia, 2015). Robust standard errors are clustered at firm’s incorporation state level and are reported in parentheses below the coefficient estimates. ***, ** and * denote statistical significance at 1\%, 5\% and 10\% level respectively. See Appendix for detailed definitions for all variables.
}\
\end{tabularx}
\caption{Dynamics of treatment effect of constituency statutes - continued Panel B.}
\label{tab:app4}
\end{sidewaystable}
\end{document}
如果你没有 X
列,我仍然不明白你为什么要使用 tabularx
,无论如何,你可以像这样居中列:
\documentclass[11pt, a4paper]{article}
\usepackage{graphicx,color}
\usepackage{epstopdf}
\usepackage{enumerate}
\usepackage[colorlinks,linkcolor=blue,citecolor=blue,urlcolor=blue,filecolor=blue]{hyperref}
\usepackage{array}
\usepackage{calc}
\usepackage{booktabs}
\usepackage{longtable}
\usepackage{tabularx}
\usepackage{appendix}
\usepackage{multirow}
\usepackage[table]{xcolor}
\usepackage{amsmath, amsfonts, amsthm, amssymb}
\usepackage{mathrsfs}
\usepackage{rotating}
\usepackage{bbm}
\usepackage{amsmath}
\usepackage{lmodern}
\newcommand{\etal}{{\sl et al. }}
\newcommand{\argmax}{\operatornamewithlimits{argmax}}
\newcommand{\iid}{\stackrel{\mathrm{iid}}{\sim}}
\newcolumntype{C}{>{\centering\arraybackslash}X}
\newcolumntype{R}{>{\raggedright\arraybackslash}X}
\newcolumntype{L}{>{\raggedleft\arraybackslash}X}
\newtheorem{proposition}{Proposition}
\newtheorem{definition}{Definition}
\newtheorem{corollary}{Corollary}
\newtheorem{lemma}{Lemma}
\newtheorem{theorem}{Theorem}[section]
\usepackage{blkarray}
\usepackage{pdflscape}
\usepackage{siunitx}
\renewcommand{\baselinestretch}{1}
\usepackage[authoryear,round]{natbib}
\newcommand{\vect}[1]{\boldsymbol{#1}}
%\pdfminorversion=4
% NOTE: To produce blinded version, replace "0" with "1" below.
\newcommand{\blind}{0}
% DON'T change margins - should be 1 inch all around.
\addtolength{\oddsidemargin}{-.5in}%
\addtolength{\evensidemargin}{-.5in}%
\addtolength{\textwidth}{1in}%
\addtolength{\textheight}{1.3in}%
\addtolength{\topmargin}{-.8in}%
\begin{document}
\begin{sidewaystable}[htbp]
\centering
\scriptsize
\begin{tabularx}{1\textwidth}
{>{\raggedright\arraybackslash}p{4cm}
>{\centering\arraybackslash}p{4cm}
>{\centering\arraybackslash}p{4cm}
>{\centering\arraybackslash}p{4cm}
>{\centering\arraybackslash}p{4cm}
>{\centering\arraybackslash}p{4cm}
%cccc
}
\toprule
& (1) & (2) & (3) & (4) & (5) \[0.5ex]
&Tobin's Q &Total Q &Enterprise Value Multiple &Operating Cash Flow &EBITDA \
\midrule
Constituency Statute (-2 or -1) &0.2162 &0.2834* &1.286 &0.003 &0.0009\
&-0.134 &-0.166 &-2.114 &-0.018 &-0.018\
Constituency Statute (0) &0.0703 &0.1944 &0.8492 &0.0154 &0.0134\
&-0.12 &-0.201 &-1.394 &-0.015 &-0.017\
Constituency Statute (+1) &0.1373 &0.1902 &1.2016 &0.006 &0.0207\
&-0.143 &-0.186 &-1.337 &-0.018 &-0.018\
Constituency Statute (+2) &0.2084* &0.3055** &0.4787 &0.0152 &0.0066\
&-0.11 &-0.15 &-1.259 &-0.013 &-0.016\
Constituency Statute (3+) &0.2221** &0.3970*** &1.1029 &0.0003 &0.0005\
&-0.088 &-0.115 &-0.924 &-0.012 &-0.014\
Constant &4.9142*** &3.7396*** &9.1269*** &-0.0529*** &-0.0019\
&-0.092 &-0.181 &-1.589 &-0.008 &-0.013\
Control Variables &Yes &Yes &Yes &Yes &Yes \
Firm FE &Yes &Yes &Yes &Yes &Yes \
Industry-by-Year FE &Yes &Yes &Yes &Yes &Yes \
State-by-Year FE &Yes &Yes &Yes &Yes &Yes \
Observations &28555 &28498 &28481 &27903 &28555\
Adjusted R2 &0.546 &0.503 &0.554 &0.654 &0.698\
\bottomrule
\addlinespace
\multicolumn{6}{@{}p{1\textwidth}@{}}{\footnotesize
This table reports the coefficient estimates of the dynamics of treatment effect of constituency statutes for the subsample of the technology \& pharmaceutical industries. The dependent variables are Tobin's Q (column 1), Total Q (column 2), Enterprise Value Multiple (column 3), Operating Cash Flow (column 4), and EBITDA (column 5). Constituency Statute (-2 or -1) indicate observations in one and two years prior to the enactment of constituency statutes, Constituency Statute (0) indicates the year of the enactment, and Constituency Statute (+1), (+2) and (3+) indicate observations in one, two, and three or more years after the enactment respectively. All control variables are lagged by one year and are suppressed for brevity. All regressions include firm, state (of location) by year, and industry (Fama-French 12 industries) by year fixed effects. Singleton observations are dropped in regressions due to fixed effects (Correia, 2015). Robust standard errors are clustered at firm’s incorporation state level and are reported in parentheses below the coefficient estimates. ***, ** and * denote statistical significance at 1\%, 5\% and 10\% level respectively. See Appendix for detailed definitions for all variables.
}\
\end{tabularx}
\caption{Dynamics of treatment effect of constituency statutes - continued Panel B.}
\label{tab:app4}
\end{sidewaystable}
\end{document}