在哪里插入浮标的标题?

在哪里插入浮标的标题?

我需要插入标题,有人能建议我把标题放在哪里吗?如果我把标题放在里面,则会在浮动外部显示 \caption。

\usepackage[pdftex]{graphicx}
\usepackage{booktabs}
\usepackage{rotating}


\newcommand*{\headtab}[1]{%
    \begin{tabular}[t]{@{}l@{}}#1\end{tabular}%
}
\begin{document}
    \noindent
    \rotatebox{90}{%
        % shrinking the distance between columns a little bit
        \setlength{\tabcolsep}{.9\tabcolsep}%
        \begin{tabular}{|c|c|c|l|c|c|c|}
            \toprule
            \multirow{2}[2]{*}{Sample } & LC-MS/MS & \multirow{2}[2]{*}{z} & \multicolumn{1}{c|}{\multirow{2}[2]{*}{Peptide sequence}} & Protein Identification & \multirow{2}[2]{*}{Roasting } & \multirow{2}[2]{*}{NCBI } \\
            name & (m/z) &       &       & (M.Wt) &   degree    & accession nos   \\
            \midrule
            \multirow{2}[2]{*}{K200} & \multicolumn{1}{l|}{1030.5426} & \multicolumn{1}{l|}{1} & xxxxx &  11xxxxx  &  \multicolumn{1}{c|}{\SI{xxxx}{\degree}C}     & xxxxxx \\
            & \multicolumn{1}{l|}{1039.6394} & \multicolumn{1}{l|}{1} & xxxxxx & xxxxxxx   &       &  \\  \hline
            \multirow{4}[2]{*}{K240} & \multicolumn{1}{l|}{924.6123} & \multicolumn{1}{l|}{1} & xxxxxxx & \multicolumn{1}{c|}{11xxxxx}      &       &  \\
            & \multicolumn{1}{l|}{940.5706} & \multicolumn{1}{l|}{1} & xxxxxx & xxxxxx & \multicolumn{1}{c|}{\SI{xxxx}{\degree}C} & \multicolumn{1}{l|}{xxxxx} \\
            & \multicolumn{1}{l|}{1039.6376} & \multicolumn{1}{l|}{1} & xxxxx &       &       &  \\
            \bottomrule
        \end{tabular}%%
    }
\end{document}

答案1

没有任何模糊的替代方法。

rohanshaCaption

\documentclass{article}
\usepackage{booktabs}
\usepackage{rotating}
\usepackage{tabularx}
\usepackage{siunitx}
\usepackage{caption}

\begin{document}
\noindent
\begin{sidewaystable}
    \caption{No ducks were harmed while preparing this table.}
    \begin{tabularx}{\textwidth}{XXlXXXX}
        \toprule
        Sample name                 & \raggedright LC-MS/MS  (m/z) & z & Peptide sequence & \raggedright Protein Identification (M.Wt) & Roasting \par degree   & NCBI  \par accession nos   \\
        \midrule
        K200                        & 1030.5426       & 1 & xxxxx            & 11xxxxx                       & \SI{90}{\celsius} & xxxxxx \\
                                    & 1039.6394       & 1 & xxxxxx           & xxxxxxx                       &                   & \\\addlinespace
        K240                        & 924.6123        & 1 & xxxxxxx          & 11xxxxx                       &                   & \\
                                    & 940.5706        & 1 & xxxxxx           & xxxxxx                        & \SI{90}{\celsius} & xxxxx \\
                                    & 1039.6376       & 1 & xxxxx            &                               &                   & \\
        \bottomrule
    \end{tabularx}%%
\end{sidewaystable}
\end{document}

相关内容