Skip to main content
correct spelling error
Source Link
Zarko
  • 317.4k
  • 25
  • 190
  • 399

This may not answer to your question, but something you may want to cosniderconsider. \resizebox may solve your problem of fitting the table to your pagewidth put it also changes the font size of the table. To avoid that you can use tabularx as seen in maymy table 1. I

I also added \section to keep it organized.

This may not answer to your question, but something you may want to cosnider. \resizebox may solve your problem of fitting the table to your pagewidth put it also changes the font size of the table. To avoid that you can use tabularx as seen in may table 1. I also added \section to keep it organized.

This may not answer to your question, but something you may want to consider. \resizebox may solve your problem of fitting the table to your pagewidth put it also changes the font size of the table. To avoid that you can use tabularx as seen in my table 1.

I also added \section to keep it organized.

deleted 14 characters in body
Source Link
Roland
  • 6.8k
  • 6
  • 21
  • 44
\documentclass{article} \usepackage[skip=0.5\baselineskip,labelfont=bf,format=plain,labelsep=newline,singlelinecheck=false]{caption} \usepackage[utf8]{inputenc} \usepackage[hyphens]{url} \usepackage[authoryear,round]{natbib} \usepackage{fullpage} \usepackage{graphicx} %\usepackage[left=0.5in, right=0.5in, top=.70in]{geometry} \setlength{\footskip}{25mm} \usepackage{tabularx} \renewcommand\tabularxcolumn[1]{m{#1}}%middle aligns X column type \usepackage{lipsum} \usepackage{titlesec} \newcommand{\sectionbreak}{\clearpage} %pagebreak after new section \begin{document} \section{Methods} \lipsum[1-2] \begin{table}[htbp] \centering \caption{The training and test data frequencies for each city for Case 1.} \label{tab:case1} \resizebox%\resizebox{\textwidth}{!}{% \setlength%\setlength{\tabcolsep}{7pt} \renewcommand{\arraystretch}{1.5} \begin{tabularx}{\textwidth}{@{}l *5{>{\centering\arraybackslash}X}@{}} \hline \multicolumn{1}{c}{Training Set} & Test Set & Dates for Training Set & Dates for Test Set & Dates for Test Set \\ \hline Seattle & 750 & 367 & January 1, 2018 - January 20, 2020 & January 21, 2020 - January 21, 2021 \\ [0.5ex] San Francisco & 750 & 370 & January 1, 2018 - January 20, 2020 & January 21, 2020 - January 24, 2021 \\ [0.5ex] Los Angeles & 750 & 364 & January 1, 2018 - January 20, 2020 & January 21, 2020 - January 18, 2021 \\[0.5ex] Philadelphia & 750 & 370 & January 1, 2018 - January 20, 2020 & January 21, 2020 - January 24, 2021 \\ \hline \end{tabularx}}  \bigskip \caption{The training and test data frequencies for each city for Case 2.} \label{tab:case2} \resizebox{\textwidth}{!}{% \setlength{\tabcolsep}{7pt} \renewcommand{\arraystretch}{1.5} \begin{tabular}{lcccc} \hline \multicolumn{1}{c}{Training Set} & Test Set & Dates for Training Set & Dates for Test Set & Dates for Test Set \\ \hline Seattle & 876 & 241 & January 1, 2018 - May 25, 2020 & May 26, 2020 - January 21, 2021 \\ San Francisco & 876 & 244 & January 1, 2018 - May 25, 2020 & May 26, 2020 - January 24, 2021 \\ Los Angeles & 876 & 238 & January 1, 2018 - May 25, 2020 & May 26, 2020 - January 18, 2021 \\ Philadelphia & 876 & 244 & January 1, 2018 - May 25, 2020 & May 26, 2020 - January 24, 2021 \\ \hline \end{tabular}} \end{table} \section{Results} \vspace{2mm} \lipsum[1-3]\\ \end{document} 

Pagebreak:

enter image description hereenter image description here

\documentclass{article} \usepackage[skip=0.5\baselineskip,labelfont=bf,format=plain,labelsep=newline,singlelinecheck=false]{caption} \usepackage[utf8]{inputenc} \usepackage[hyphens]{url} \usepackage[authoryear,round]{natbib} \usepackage{fullpage} \usepackage{graphicx} %\usepackage[left=0.5in, right=0.5in, top=.70in]{geometry} \setlength{\footskip}{25mm} \usepackage{tabularx} \renewcommand\tabularxcolumn[1]{m{#1}}%middle aligns X column type \usepackage{lipsum} \usepackage{titlesec} \newcommand{\sectionbreak}{\clearpage} %pagebreak after new section \begin{document} \section{Methods} \lipsum[1-2] \begin{table}[htbp] \centering \caption{The training and test data frequencies for each city for Case 1.} \label{tab:case1} \resizebox{\textwidth}{!}{% \setlength{\tabcolsep}{7pt} \renewcommand{\arraystretch}{1.5} \begin{tabularx}{\textwidth}{@{}l *5{>{\centering\arraybackslash}X}@{}} \hline \multicolumn{1}{c}{Training Set} & Test Set & Dates for Training Set & Dates for Test Set & Dates for Test Set \\ \hline Seattle & 750 & 367 & January 1, 2018 - January 20, 2020 & January 21, 2020 - January 21, 2021 \\ [0.5ex] San Francisco & 750 & 370 & January 1, 2018 - January 20, 2020 & January 21, 2020 - January 24, 2021 \\ [0.5ex] Los Angeles & 750 & 364 & January 1, 2018 - January 20, 2020 & January 21, 2020 - January 18, 2021 \\[0.5ex] Philadelphia & 750 & 370 & January 1, 2018 - January 20, 2020 & January 21, 2020 - January 24, 2021 \\ \hline \end{tabularx}}  \bigskip \caption{The training and test data frequencies for each city for Case 2.} \label{tab:case2} \resizebox{\textwidth}{!}{% \setlength{\tabcolsep}{7pt} \renewcommand{\arraystretch}{1.5} \begin{tabular}{lcccc} \hline \multicolumn{1}{c}{Training Set} & Test Set & Dates for Training Set & Dates for Test Set & Dates for Test Set \\ \hline Seattle & 876 & 241 & January 1, 2018 - May 25, 2020 & May 26, 2020 - January 21, 2021 \\ San Francisco & 876 & 244 & January 1, 2018 - May 25, 2020 & May 26, 2020 - January 24, 2021 \\ Los Angeles & 876 & 238 & January 1, 2018 - May 25, 2020 & May 26, 2020 - January 18, 2021 \\ Philadelphia & 876 & 244 & January 1, 2018 - May 25, 2020 & May 26, 2020 - January 24, 2021 \\ \hline \end{tabular}} \end{table} \section{Results} \vspace{2mm} \lipsum[1-3]\\ \end{document} 

Pagebreak:

enter image description here

\documentclass{article} \usepackage[skip=0.5\baselineskip,labelfont=bf,format=plain,labelsep=newline,singlelinecheck=false]{caption} \usepackage[utf8]{inputenc} \usepackage[hyphens]{url} \usepackage[authoryear,round]{natbib} \usepackage{fullpage} \usepackage{graphicx} %\usepackage[left=0.5in, right=0.5in, top=.70in]{geometry} \setlength{\footskip}{25mm} \usepackage{tabularx} \renewcommand\tabularxcolumn[1]{m{#1}}%middle aligns X column type \usepackage{lipsum} \usepackage{titlesec} \newcommand{\sectionbreak}{\clearpage} %pagebreak after new section \begin{document} \section{Methods} \lipsum[1-2] \begin{table}[htbp] \centering \caption{The training and test data frequencies for each city for Case 1.} \label{tab:case1} %\resizebox{\textwidth}{!}{% %\setlength{\tabcolsep}{7pt} \renewcommand{\arraystretch}{1.5} \begin{tabularx}{\textwidth}{@{}l *5{>{\centering\arraybackslash}X}@{}} \hline \multicolumn{1}{c}{Training Set} & Test Set & Dates for Training Set & Dates for Test Set & Dates for Test Set \\ \hline Seattle & 750 & 367 & January 1, 2018 - January 20, 2020 & January 21, 2020 - January 21, 2021 \\ [0.5ex] San Francisco & 750 & 370 & January 1, 2018 - January 20, 2020 & January 21, 2020 - January 24, 2021 \\ [0.5ex] Los Angeles & 750 & 364 & January 1, 2018 - January 20, 2020 & January 21, 2020 - January 18, 2021 \\[0.5ex] Philadelphia & 750 & 370 & January 1, 2018 - January 20, 2020 & January 21, 2020 - January 24, 2021 \\ \hline \end{tabularx} \bigskip \caption{The training and test data frequencies for each city for Case 2.} \label{tab:case2} \resizebox{\textwidth}{!}{% \setlength{\tabcolsep}{7pt} \renewcommand{\arraystretch}{1.5} \begin{tabular}{lcccc} \hline \multicolumn{1}{c}{Training Set} & Test Set & Dates for Training Set & Dates for Test Set & Dates for Test Set \\ \hline Seattle & 876 & 241 & January 1, 2018 - May 25, 2020 & May 26, 2020 - January 21, 2021 \\ San Francisco & 876 & 244 & January 1, 2018 - May 25, 2020 & May 26, 2020 - January 24, 2021 \\ Los Angeles & 876 & 238 & January 1, 2018 - May 25, 2020 & May 26, 2020 - January 18, 2021 \\ Philadelphia & 876 & 244 & January 1, 2018 - May 25, 2020 & May 26, 2020 - January 24, 2021 \\ \hline \end{tabular}} \end{table} \section{Results} \vspace{2mm} \lipsum[1-3]\\ \end{document} 

enter image description here

deleted 3 characters in body
Source Link
Roland
  • 6.8k
  • 6
  • 21
  • 44
\documentclass{article} \usepackage[skip=0.5\baselineskip,labelfont=bf,format=plain,labelsep=newline,singlelinecheck=false]{caption} \usepackage[utf8]{inputenc} \usepackage[hyphens]{url} \usepackage[authoryear,round]{natbib} \usepackage{fullpage} \usepackage{graphicx} %\usepackage[left=0.5in, right=0.5in, top=.70in]{geometry} \setlength{\footskip}{25mm} \usepackage{tabularx} \renewcommand\tabularxcolumn[1]{m{#1}}%middle aligns X column type \usepackage{lipsum} \usepackage{titlesec} \newcommand{\sectionbreak}{\clearpage} %pagebreak after new section \begin{document} \section{Methods} \lipsum[1-2] \begin{table}[htbp] \centering \caption{The training and test data frequencies for each city for Case 1.} \label{tab:case1} \resizebox{\textwidth}{!}{% \setlength{\tabcolsep}{7pt} \renewcommand{\arraystretch}{1.5} \begin{tabularx}{\textwidth}{@{}l *5{>{\centering\arraybackslash}X}@{}} \hline \multicolumn{1}{c}{Training Set} & Test Set & Dates for Training Set & Dates for Test Set & Dates for Test Set \\ \hline Seattle & 750 & 367 & January 1, 2018 - January 20, 2020 & January 21, 2020 - January 21, 2021 \\ [0.5ex] San Francisco & 750 & 370 & January 1, 2018 - January 20, 2020 & January 21, 2020 - January 24, 2021 \\ [0.5ex] Los Angeles & 750 & 364 & January 1, 2018 - January 20, 2020 & January 21, 2020 - January 18, 2021 \\[0.5ex] Philadelphia & 750 & 370 & January 1, 2018 - January 20, 2020 & January 21, 2020 - January 24, 2021 \\ \hline \end{tabularx}} \bigskip \caption{The training and test data frequencies for each city for Case 2.} \label{tab:case2} \resizebox{\textwidth}{!}{% \setlength{\tabcolsep}{7pt} \renewcommand{\arraystretch}{1.5} \begin{tabular}{lcccc} \hline \multicolumn{1}{c}{Training Set} & Test Set & Dates for Training Set & Dates for Test Set & Dates for Test Set \\ \hline Seattle & 876 & 241 & January 1, 2018 - May 25, 2020 & May 26, 2020 - January 21, 2021 \\ San Francisco & 876 & 244 & January 1, 2018 - May 25, 2020 & May 26, 2020 - January 24, 2021 \\ Los Angeles & 876 & 238 & January 1, 2018 - May 25, 2020 & May 26, 2020 - January 18, 2021 \\ Philadelphia & 876 & 244 & January 1, 2018 - May 25, 2020 & May 26, 2020 - January 24, 2021 \\ \hline \end{tabular}} \end{table} \vspace{5mm} \lipsum[1-2]\\  \section{Results} \vspace{2mm} \lipsum[1-3]\\ \end{document} 

enter image description here Pagebreak:

enter image description here

\documentclass{article} \usepackage[skip=0.5\baselineskip,labelfont=bf,format=plain,labelsep=newline,singlelinecheck=false]{caption} \usepackage[utf8]{inputenc} \usepackage[hyphens]{url} \usepackage[authoryear,round]{natbib} \usepackage{fullpage} \usepackage{graphicx} %\usepackage[left=0.5in, right=0.5in, top=.70in]{geometry} \setlength{\footskip}{25mm} \usepackage{tabularx} \renewcommand\tabularxcolumn[1]{m{#1}}%middle aligns X column type \usepackage{lipsum} \usepackage{titlesec} \newcommand{\sectionbreak}{\clearpage} %pagebreak after new section \begin{document} \section{Methods} \lipsum[1-2] \begin{table}[htbp] \centering \caption{The training and test data frequencies for each city for Case 1.} \label{tab:case1} \resizebox{\textwidth}{!}{% \setlength{\tabcolsep}{7pt} \renewcommand{\arraystretch}{1.5} \begin{tabularx}{\textwidth}{@{}l *5{>{\centering\arraybackslash}X}@{}} \hline \multicolumn{1}{c}{Training Set} & Test Set & Dates for Training Set & Dates for Test Set & Dates for Test Set \\ \hline Seattle & 750 & 367 & January 1, 2018 - January 20, 2020 & January 21, 2020 - January 21, 2021 \\ [0.5ex] San Francisco & 750 & 370 & January 1, 2018 - January 20, 2020 & January 21, 2020 - January 24, 2021 \\ [0.5ex] Los Angeles & 750 & 364 & January 1, 2018 - January 20, 2020 & January 21, 2020 - January 18, 2021 \\[0.5ex] Philadelphia & 750 & 370 & January 1, 2018 - January 20, 2020 & January 21, 2020 - January 24, 2021 \\ \hline \end{tabularx}} \bigskip \caption{The training and test data frequencies for each city for Case 2.} \label{tab:case2} \resizebox{\textwidth}{!}{% \setlength{\tabcolsep}{7pt} \renewcommand{\arraystretch}{1.5} \begin{tabular}{lcccc} \hline \multicolumn{1}{c}{Training Set} & Test Set & Dates for Training Set & Dates for Test Set & Dates for Test Set \\ \hline Seattle & 876 & 241 & January 1, 2018 - May 25, 2020 & May 26, 2020 - January 21, 2021 \\ San Francisco & 876 & 244 & January 1, 2018 - May 25, 2020 & May 26, 2020 - January 24, 2021 \\ Los Angeles & 876 & 238 & January 1, 2018 - May 25, 2020 & May 26, 2020 - January 18, 2021 \\ Philadelphia & 876 & 244 & January 1, 2018 - May 25, 2020 & May 26, 2020 - January 24, 2021 \\ \hline \end{tabular}} \end{table} \vspace{5mm} \lipsum[1-2]\\  \section{Results} \vspace{2mm} \lipsum[1-3]\\ \end{document} 

enter image description here

\documentclass{article} \usepackage[skip=0.5\baselineskip,labelfont=bf,format=plain,labelsep=newline,singlelinecheck=false]{caption} \usepackage[utf8]{inputenc} \usepackage[hyphens]{url} \usepackage[authoryear,round]{natbib} \usepackage{fullpage} \usepackage{graphicx} %\usepackage[left=0.5in, right=0.5in, top=.70in]{geometry} \setlength{\footskip}{25mm} \usepackage{tabularx} \renewcommand\tabularxcolumn[1]{m{#1}}%middle aligns X column type \usepackage{lipsum} \usepackage{titlesec} \newcommand{\sectionbreak}{\clearpage} %pagebreak after new section \begin{document} \section{Methods} \lipsum[1-2] \begin{table}[htbp] \centering \caption{The training and test data frequencies for each city for Case 1.} \label{tab:case1} \resizebox{\textwidth}{!}{% \setlength{\tabcolsep}{7pt} \renewcommand{\arraystretch}{1.5} \begin{tabularx}{\textwidth}{@{}l *5{>{\centering\arraybackslash}X}@{}} \hline \multicolumn{1}{c}{Training Set} & Test Set & Dates for Training Set & Dates for Test Set & Dates for Test Set \\ \hline Seattle & 750 & 367 & January 1, 2018 - January 20, 2020 & January 21, 2020 - January 21, 2021 \\ [0.5ex] San Francisco & 750 & 370 & January 1, 2018 - January 20, 2020 & January 21, 2020 - January 24, 2021 \\ [0.5ex] Los Angeles & 750 & 364 & January 1, 2018 - January 20, 2020 & January 21, 2020 - January 18, 2021 \\[0.5ex] Philadelphia & 750 & 370 & January 1, 2018 - January 20, 2020 & January 21, 2020 - January 24, 2021 \\ \hline \end{tabularx}} \bigskip \caption{The training and test data frequencies for each city for Case 2.} \label{tab:case2} \resizebox{\textwidth}{!}{% \setlength{\tabcolsep}{7pt} \renewcommand{\arraystretch}{1.5} \begin{tabular}{lcccc} \hline \multicolumn{1}{c}{Training Set} & Test Set & Dates for Training Set & Dates for Test Set & Dates for Test Set \\ \hline Seattle & 876 & 241 & January 1, 2018 - May 25, 2020 & May 26, 2020 - January 21, 2021 \\ San Francisco & 876 & 244 & January 1, 2018 - May 25, 2020 & May 26, 2020 - January 24, 2021 \\ Los Angeles & 876 & 238 & January 1, 2018 - May 25, 2020 & May 26, 2020 - January 18, 2021 \\ Philadelphia & 876 & 244 & January 1, 2018 - May 25, 2020 & May 26, 2020 - January 24, 2021 \\ \hline \end{tabular}} \end{table} \section{Results} \vspace{2mm} \lipsum[1-3]\\ \end{document} 

Pagebreak:

enter image description here

deleted 3 characters in body
Source Link
Roland
  • 6.8k
  • 6
  • 21
  • 44
Loading
Source Link
Roland
  • 6.8k
  • 6
  • 21
  • 44
Loading