[Tex/LaTex] Get section title and table on same page

tables

I have a problem with getting a section title and a table on the same page since I want the text in my table centered. Is there a way around this? Thank you!

\documentclass[twoside,twocolumn, 10pt]{article}
\usepackage{color, colortbl}

\subsection{Theoretically Calculated Disulfide-Bound Fragment Masses}

\begin{table*}
    \hspace*{-1.5cm}
     \caption{\textit{Theoretically calculated molecular weights of trypsin-cleaved disulfide bonded fragments of LECT2 that were searched for in the MS spectra.}}
    \vspace{2mm}
        \begin{tabular}{cccccccc}
        \vspace{3mm}
         & & \begin{tabular}[c]{@{}c@{}}\textbf{TCDR}\\ \textbf{(Cys 36)}\end{tabular} & \begin{tabular}[c]{@{}c@{}}\textbf{GFCVK}\\ \textbf{(Cys 99)}\end{tabular} & \begin{tabular}[c]{@{}c@{}}\textbf{HGCGQ} \\ \textbf{YSAQR}\\  \textbf{(Cys 41)}\end{tabular} & \begin{tabular}[c]{@{}c@{}}\textbf{HHHENL} \\ \textbf{YFQGPW}\\ \textbf{ANICAGK}\\ \textbf{(Cys 25)}\end{tabular} & \begin{tabular}[c]{@{}c@{}}\textbf{VYPGIQSHV} \\ \textbf{HIENCDSSD} \\ \textbf{PTAYL} \\    \textbf{(Cys 142)}\end{tabular} & \begin{tabular}[c]{@{}c@{}}\textbf{SQRPHQGVD} \\ \textbf{ILCSAGSTV} \\ \textbf{YAPFTGMIV} \\ \textbf{GQEKPYQNK}\\ \textbf{(Cys 60)}\end{tabular} \\
        \vspace{3mm}
        &  & {\color[HTML]{A9A9A9} 494.203} & {\color[HTML]{A9A9A9} 553.28}  & {\color[HTML]{A9A9A9} 1106.48}  & {\color[HTML]{A9A9A9} 2222.03}  & {\color[HTML]{A9A9A9} 2545.17} & {\color[HTML]{A9A9A9} 3906.93} \\
        \vspace{3mm}
        \begin{tabular}[c]{@{}c@{}}\textbf{TCDR}\\ \textbf{(Cys 36)}\end{tabular} & {\color[HTML]{A9A9A9} 494.203} & 986.3898 & & & & &  \\
        \vspace{3mm}
        \begin{tabular}[c]{@{}c@{}}\textbf{GFCVK}\\ \textbf{(Cys 99)} \end{tabular} & {\color[HTML]{A9A9A9} 553.28}  & 1045.467  & 1104.545  &  &   &    & \\
        \vspace{3mm}
        \begin{tabular}[c]{@{}c@{}}\textbf{HGCGQ} \\ \textbf{YSAQR} \\      \textbf{(Cys 41)}\end{tabular} & {\color[HTML]{A9A9A9} 1106.48} & {\color[HTML]{333388} \textbf{1598.667}} & {\color[HTML]{A9A9A9} 1657.744} & 2210.943 & & & \\
        \vspace{3mm}
        \begin{tabular}[c]{@{}c@{}}\textbf{HHHENL} \\ \textbf{YFQGPW} \\ \textbf{ANICAGK} \\ \textbf{(Cys 25)} \end{tabular} & {\color[HTML]{A9A9A9} 2222.03} & 2714.222 & 2773.299 & 3326.499 & 4442.054  & & \\
        \vspace{3mm}
        \begin{tabular}[c]{@{}c@{}}\textbf{VYPGIQSHV} \\ \textbf{HIENCDSSD} \\ \textbf{PTAYL}\\ \textbf{(Cys142)}\end{tabular} & {\color[HTML]{A9A9A9} 2545.17} & 3037.353 & {\color[HTML]{FF0000} \textbf{\large{3096.431}}} & 3649.63 & 4765.186 & 5088.317 &  \\
        \begin{tabular}[c]{@{}c@{}}\textbf{SQRPHQGVD} \\ \textbf{ILCSAGSTV} \\ \textbf{YAPFTGMIV} \\ \textbf{GQEKPYQNK}\\  \textbf{(Cys  60)}\end{tabular} & {\color[HTML]{A9A9A9} 3906.93} & 4399.114 & 4458.191 & 5011.39  & {\color[HTML]{333388} \textbf{6126.946}} & 6450.077 & 7811.837 
    \end{tabular}
\end{table*}

Best Answer

To have a table (or figure) page wide in the same otherwise two-column page, after the section title, you can use the strip environment, from the cuted package. This makes your table non-float, so for the caption, you have to use the \captionof{table}{...} command.

Here is a possible solution, with some simplifications and improvements, with the siunitx and makecell packages.

\documentclass[twoside,twocolumn, 10pt]{article}
\usepackage[hmargin=20mm,top=18mm,columnsep=15pt]{geometry}
\usepackage[table, svgnames]{xcolor}
\usepackage{makecell, caption}
\usepackage{siunitx}
\renewcommand{\theadfont}{\bfseries}
\usepackage{cuted}

\begin{document}

\subsection{Theoretically Calculated Di\-sul\-fide-Bound Fragment Masses}
\mbox{}
\begin{strip}
\small\centering
\setlength{\tabcolsep}{3pt}
\captionsetup{textfont = it}
\sisetup{table-format=4.3, table-number-alignment=center}
 \captionof{table}{Theoretically calculated molecular weights of trypsin-cleaved disulfide bonded fragments of LECT2 that were searched for in the MS spectra.}
        \begin{tabular}{@{}c>{\color{DarkGray}}SS[table-format=4.4]*{6}{S}@{}}
         & &{\thead{\\\\\\TCDR\\ (Cys 36)}} &{\thead{\\\\\\GFCVK \\ (Cys 99)}} &{ \thead{\\\\HGCGQ \\ YSAQR \\ (Cys 41)}} & {\thead{\\HHHENL \\ YFQGPW \\ ANICAGK \\ (Cys 25)}} & {\thead{\\VYPGIQSHV \\ HIENCDSSD \\ PTAYL \\ (Cys 142)}} & {\thead{SQRPHQGVD \\ ILCSAGSTV \\ YAPFTGMIV \\ GQEKPYQNK \\ (Cys 60)}} \\[2ex]
        & & \color{DarkGray} 494.203 & \color{DarkGray} 553.28 & \color{DarkGray} 1106.48 & \color{DarkGray} 2222.03 & \color{DarkGray} 2545.17 & \color{DarkGray} 3906.93 \\[2ex]
        \thead{TCDR \\ (Cys 36)} & 494.203 & 986.3898 & & & & & \\[2ex]
        \thead{GFCVK \\ (Cys 99)} & 553.28 & 1045.467 & 1104.545 & & & & \\[2ex]
        \thead{HGCGQ \\ YSAQR \\ (Cys 41)} & 1106.48 & \color[HTML]{333388} \textbf{1598.667} & \color{DarkGray} 1657.744 & 2210.943 & & & \\[2ex]
        \thead{HHHENL \\ YFQGPW \\ ANICAGK \\ (Cys 25)} & 2222.03 & 2714.222 & 2773.299 & 3326.499 & 4442.054 & & \\[2ex]
        \thead{VYPGIQSHV \\ HIENCDSSD \\ PTAYL \\ (Cys142)} & 2545.17 & 3037.353 & \color[HTML]{FF0000} \textbf{\normalsize{3096.431}} & 3649.63 & 4765.186 & 5088.317 & \\
        \thead{SQRPHQGVD \\ ILCSAGSTV \\ YAPFTGMIV \\ GQEKPYQNK \\(Cys 60)} & 3906.93 & 4399.114 & 4458.191 & 5011.39 & \color[HTML]{333388} \textbf{6126.946} & 6450.077 & 7811.837
    \end{tabular}
\end{strip}

\end{document} 

enter image description here