Below is the code I use.
\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage{caption}
\usepackage{subfigure}
\usepackage[labelfont=bf]{caption}
\captionsetup[table]{labelsep=space,justification=raggedright,singlelinecheck=off}
\captionsetup[figure]{labelsep=quad}
\usepackage{threeparttable}
\begin{document}
\begin{table}[ht]
\centering
\caption{Data Partitioning} \label{exp_dataset}
\begin{tabular}{c|c|c}
\hline
\#Set & Training Data (7d) & Testing Data (1d) \\ \hline
1 & 07/06/2015-07/12/2015 & 07/13/2015 \\ \hline
2 & 07/09/2015-07/15/2015 & 07/16/2015 \\ \hline
3 & 07/12/2015-07/18/2015 & 07/19/2015 \\ \hline
\end{tabular}
\end{table}
\end{document}
But the output is like below:
What I want is like below: (The table should be at the center of the page. The caption should be left-align with the table.)
I tried the answers in related posts. None of them works out.
subfigure
andcaption
packages. If you're using one of the "standard" LaTeX document classes (which includesarticle
), do not load the deprecatedsubfigure
package. Instead, load thesubcaption
package.