How do I center the second line of the title?
\documentclass[twocolumn]{article}
\usepackage{booktabs, makecell, tabularx}
\renewcommand\theadfont{\normalsize}
\renewcommand\theadgape{}
\setcellgapes{2pt}
\newcolumntype{L}{>{\raggedright\arraybackslash}X}
\usepackage{caption}
\usepackage{textcomp}
\usepackage{graphicx}
\raggedbottom
\usepackage{amsmath,geometry}
\usepackage{rotating}
\usepackage{booktabs, makecell}
\usepackage[referable]{threeparttablex}
\usepackage{siunitx}
\usepackage[skip=1ex]{caption}
\usepackage{upquote}
\usepackage{balance}
\usepackage[lite]{mtpro2} % Times Roman math font
\usepackage{float}
\usepackage{wasysym}
\usepackage{footmisc}
\title{\LARGE \bf ECON 425 Term Paper}
\begin{document}
%TABLE:
\begin{table}[H]
\caption{Difference in Means}
\label{tab:table1}
\raggedright
Male and Female CEOs, 2010-2017
\medskip
\setlength\tabcolsep{4pt}
\small
\makegapedcells
\begin{tabularx}{\columnwidth}{@{}Lll @{}}
\toprule
\thead[l]{\\}
& \thead[l]{Male}
& \thead[l]{Female\\} \\
\midrule
N & 528 & 13150 \\
Mean salary (thousands)
& 873.5 (14.244) & 824.4 (3.7423) \\
\addlinespace
Standard deviation & 327.3 & 429.1 \\
t Value & 2.60$^{*}$ & 3.33 $^{*}$ \\
\bottomrule
\end{tabularx}
\smallskip
$^{*}$ Significant at the 1\% level.
\end{table}
\end{document}
SamCarter, could you help me with this table as well? For consistency. I can't manage to get the first line of the title, where it says "table 2: etc" using the \centering command.
\documentclass[twocolumn]{article}
\usepackage{booktabs, makecell, tabularx}
\renewcommand\theadfont{\normalsize}
\renewcommand\theadgape{}
\setcellgapes{2pt}
\newcolumntype{L}{>{\raggedright\arraybackslash}X}
\usepackage{caption}
\usepackage{textcomp}
\usepackage{graphicx}
\raggedbottom
\usepackage{amsmath,geometry}
\usepackage{rotating}
\usepackage{booktabs, makecell}
\usepackage[referable]{threeparttablex}
\usepackage{siunitx}
\usepackage[skip=1ex]{caption}
\usepackage{upquote}
\usepackage{balance}
\usepackage[lite]{mtpro2} % Times Roman math font
\usepackage{float}
\usepackage{wasysym}
\usepackage{footmisc}
\title{\LARGE \bf ECON 425 Term Paper}
\begin{document}
%TABLE:
\begin{table}[H]
\centering
\caption{Estimates of pay-performance sensitivity}
\label{tab:table1}
OLS regressions of CEO salary and CEO total compensation on change in shareholder wealth. Standard errors in parentheses.
\medskip
\setlength\tabcolsep{4pt}
\small
\makegapedcells
\begin{tabularx}{\columnwidth}{@{}Lll @{}}
\toprule
\thead[l]{Dependent\\ variable}
& \thead[l]{CEO\\salary (\ref{eqn:first})}
& \thead[l]{CEO total\\compensation (\ref{eqn:second})} \\
\midrule
Intercept & 434.319 & 6250.899 \\
Change in Shareholder Wealth (\%~Change)
& -0.304 (.083) & -2.638 (1.551) \\
\addlinespace
Adj R-squared & 0.255 & 0.062 \\
F-statistic & 142.13$^{*}$ & 34.10$^{*}$ \\
Sample Size & 11537 & 11529 \\
\bottomrule
\end{tabularx}
\smallskip
$^{*}$ Significant at the 1\% level.
\end{table}
\end{document}
Best Answer
for your second question (added later at editing first one) is not clear what is the problem. with your code with very small changes i obtain the following result:
note: it is sufficient to load packages only once -:)
edit: formatting/appearance of cation is independent to positioning of figure/table. with the package
caption
is controlled by\captionsetup
.in case, that you like to have left aligned also the single caption's text, then you should do the following:
\usepackage[singlelinecheck=false]{caption}
\begin{table}
or `begin{figure} add\captionsetup{singlelinecheck=false}
\captionsetup[table]{singlelinecheck=false}
in the both aforementioned cases the caption text, if it is longer than column/text width is formatted as standard paragraph.
if you like to have in this cases centered last line of
caption's text, than you need add to caption options
centerlast`for all possibilities of caption settings you should read package documentation. it is part of your latex installation
assuming that you like to have at all captions (i) size of the caption font small, (ii) caption label font bold, (iii) only one line text aligned left and longer caption's text formatted as standard paragraph, then you load caption as:
and your caption will looks as:
and at longer caption text:
revised mwe consider above description can be: