在同一页面上获取章节标题和表格

在同一页面上获取章节标题和表格

由于我希望表格中的文本居中,因此无法在同一页面上获取节标题和表格。有办法解决这个问题吗?谢谢!

\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*}

答案1

要在原本只有两栏的页面中放置一个页面宽度的表格(或图形),部分标题,您可以使用包strip中的环境cuted。这会使您的表格不浮动,因此对于标题,您必须使用命令\captionof{table}{...}

这是一个可能的解决方案,通过siunitxmakecell包进行了一些简化和改进。

\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} 

在此处输入图片描述

答案2

以下是稍微修改的Bernards 之前的回答

也许你有兴趣稍微改变一下表格的布局,让它更紧凑。像这样,表格将很容易适应文本宽度,而无需减小字体大小或 tabcolsep:

在此处输入图片描述

\documentclass[twoside,twocolumn, 10pt]{article}
\usepackage[hmargin=20mm,top=18mm,columnsep=15pt]{geometry}
\usepackage[table, svgnames]{xcolor}
\usepackage{makecell, caption}
\usepackage{siunitx}
\usepackage{etoolbox}
\robustify\bfseries
\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, detect-weight=true}
\captionof{table}{Theoretically calculated molecular weights of trypsin-cleaved disulfide bonded fragments of LECT2 that were searched for in the MS spectra.}
        \begin{tabular}{@{}l>{\color{DarkGray}}*{8}{S}@{}}
         & &{\thead{Cys 36}} &{\thead{Cys 99}} &{ \thead{Cys 41}} & {\thead{Cys 25}} & {\thead{Cys 142}} & {\thead{Cys 60}} \\
        & & \color{DarkGray} 494.203 & \color{DarkGray} 553.28 & \color{DarkGray} 1106.48 & \color{DarkGray} 2222.03 & \color{DarkGray} 2545.17 & \color{DarkGray} 3906.93 \\
        \thead{Cys 36} & 494.203 & 986.3898 & & & & & \\
        \thead{Cys 99} & 553.28 & 1045.467 & 1104.545 & & & & \\
        \thead{Cys 41} & 1106.48 & \bfseries \color[HTML]{333388} 1598.667 & \color{DarkGray} 1657.744 & 2210.943 & & & \\
        \thead{Cys 25} & 2222.03 & 2714.222 & 2773.299 & 3326.499 & 4442.054 & & \\
        \thead{Cys142} & 2545.17 & 3037.353 & \bfseries \color[HTML]{FF0000} 3096.431 & 3649.63 & 4765.186 & 5088.317 & \\
        \thead{Cys 60} & 3906.93 & 4399.114 & 4458.191 & 5011.39 & \bfseries \color[HTML]{333388} 6126.946 & 6450.077 & 7811.837\\[2ex]
        \multicolumn{8}{@{}l@{}}{Cys 36: TCDR, Cys 99: GFCVK, Cys 41: HGCGQYSAQR,}\\
        \multicolumn{8}{@{}l@{}}{Cys 25: HHHENLYFQGPWANICAGK, Cys 142: VYPGIQSHVHIENCDSSDPTAYL,}\\
        \multicolumn{8}{@{}l@{}}{Cys 60: SQRPHQGVDILCSAGSTVYAPFTGMIVGQEKPYQNK} 
    \end{tabular}
\end{strip}

\end{document} 

相关内容