我一直在努力将较长的 DNA 序列插入表格中。为了使表格更紧凑,我将序列的字体大小设置得更小,但这会在单元格顶部产生一些不必要的空间。我该怎么做才能消除这些空间?
PS,如果有一些额外的混乱包和多余的\begin
标签,请见谅。为了得到一个可用的最小文档,我费了好大劲才把它们移除。
\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{gensymb} % Enables the \degree command for degree symbol
\usepackage[margin=3cm]{geometry} % Margins
\usepackage{tabularx}
\usepackage{ragged2e}
\newcolumntype{C}{>{\Centering\arraybackslash}X} % centered "X" column
\usepackage{seqsplit} % For splitting long DNA sequences
\usepackage{makecell}
\usepackage{moresize}
\usepackage{cellspace}
%\setlength\cellspacetoplimit{4pt}
%\setlength\cellspacebottomlimit{4pt}
\usepackage[labelfont=bf, font=small]{caption} % Bold figure caption
\DeclareCaptionLabelSeparator{bar}{ | } % Custom separator
\captionsetup{labelsep=bar}
\setlength{\parindent}{0pt} % Sets the paragraph indentation to 0, globally.
\setlength{\textfloatsep}{0pt} % Sets space after figure caption and main text
\pretolerance=10000
\begin{document}
\begin{table}
\begin{center}
\begin{tabularx}{\textwidth}{|c|c|C|c|c|}
\hline
\textbf{Orientation} & \textbf{Name} & \textbf{Sequence} & \textbf{T\textsubscript{m} (\degree C)} & \textbf{Product} \\
\hline
Reverse & RV1 PstI & \ssmall{\seqsplit{CCTTGTAGACTCTGTTAATTTCCTGCAGCTCCTGG}} & 66 & A1, B1 \\
\hline
Forward & FW2 EcoRV & \ssmall{\seqsplit{TTGGTGCGGATATCTCGGTAGTGGGATACG}} & 66 & A2, B2 \\
\hline
Forward & His-tag FW1 & \ssmall{\seqsplit{GGAATAAACCATGCATCATCATCATCATCATTCTACTGTTCACGAAATC}} & \makecell{First round: 60 \\ Subsequently: 66} & A2 \\
\hline
Reverse & His-tag RV2 & \ssmall{\seqsplit{GATTTCGTGAACAGTAGAATGATGATGATGATGATGCATGGTTTATTCCTCC}} & \makecell{First round: 61 \\ Subsequently: 68} & A1 \\
\hline
Forward & $\Delta$Nterm His-tag FW1 & \ssmall{\seqsplit{AATAAACCATGCATCATCATCATCATCATGATGCTGAGCGGGATG}} & \makecell{First round: 57 \\ Subsequently: 69} & B2 \\
\hline
Reverse & $\Delta$Nterm His-tag RV2 & \ssmall{\seqsplit{CATCCCGCTCAGCATCATGATGATGATGATGATGCATGGTTTATTCCTC}} & \makecell{First round: 57 \\ Subsequently: 69} & B1 \\
\hline
\end{tabularx}
\caption{Primers used for PCR. All primers are listed 5’$\rightarrow$3’ For the last four primers, the 6-histidine CATCATCATCATCATCAT (and reverse complementary) sequence does not anneal in the first few rounds of PCR, hence the lower Tm for the first round. The primers RV1 PstI and FW2 EcoRV create overhangs to restore the restriction sites.}
\end{center}
\end{table}
\end{document}
答案1
您希望该X
列(隐藏在后面C
)属于以下类型m
:
\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{gensymb} % Enables the \degree command for degree symbol
\usepackage[margin=3cm]{geometry} % Margins
\usepackage{tabularx}
\usepackage{ragged2e}
\newcolumntype{C}{>{\Centering\arraybackslash}X} % centered "X" column
\usepackage{seqsplit} % For splitting long DNA sequences
\usepackage{makecell}
\usepackage{moresize}
\usepackage{cellspace}
%\setlength\cellspacetoplimit{4pt}
%\setlength\cellspacebottomlimit{4pt}
\usepackage[labelfont=bf, font=small]{caption} % Bold figure caption
\DeclareCaptionLabelSeparator{bar}{ | } % Custom separator
\captionsetup{labelsep=bar}
\setlength{\parindent}{0pt} % Sets the paragraph indentation to 0, globally.
\setlength{\textfloatsep}{0pt} % Sets space after figure caption and main text
\pretolerance=10000
\begin{document}
\begin{table}
\renewcommand\tabularxcolumn[1]{m{#1}}
\begin{tabularx}{\textwidth}{|c|c|C|c|c|}
\hline
\textbf{Orientation} & \textbf{Name} & \textbf{Sequence} & \textbf{T\textsubscript{m} (\degree C)} & \textbf{Product} \\
\hline
Reverse & RV1 PstI & \ssmall{\seqsplit{CCTTGTAGACTCTGTTAATTTCCTGCAGCTCCTGG}} & 66 & A1, B1 \\
\hline
Forward & FW2 EcoRV & \ssmall{\seqsplit{TTGGTGCGGATATCTCGGTAGTGGGATACG}} & 66 & A2, B2 \\
\hline
Forward & His-tag FW1 & \ssmall{\seqsplit{GGAATAAACCATGCATCATCATCATCATCATTCTACTGTTCACGAAATC}} & \makecell{First round: 60 \\ Subsequently: 66} & A2 \\
\hline
Reverse & His-tag RV2 & \ssmall{\seqsplit{GATTTCGTGAACAGTAGAATGATGATGATGATGATGCATGGTTTATTCCTCC}} & \makecell{First round: 61 \\ Subsequently: 68} & A1 \\
\hline
Forward & $\Delta$Nterm His-tag FW1 & \ssmall{\seqsplit{AATAAACCATGCATCATCATCATCATCATGATGCTGAGCGGGATG}} & \makecell{First round: 57 \\ Subsequently: 69} & B2 \\
\hline
Reverse & $\Delta$Nterm His-tag RV2 & \ssmall{\seqsplit{CATCCCGCTCAGCATCATGATGATGATGATGATGCATGGTTTATTCCTC}} & \makecell{First round: 57 \\ Subsequently: 69} & B1 \\
\hline
\end{tabularx}
\caption{Primers used for PCR. All primers are listed 5’$\rightarrow$3’ For the last four primers, the 6-histidine CATCATCATCATCATCAT (and reverse complementary) sequence does not anneal in the first few rounds of PCR, hence the lower Tm for the first round. The primers RV1 PstI and FW2 EcoRV create overhangs to restore the restriction sites.}
\end{table}
\end{document}
不要center
在里面使用table
,它只会在顶部和底部增加不必要的垂直空间。