3

I've been wrestling with inserting long DNA sequences into tables. To compact it a little I've made the sequences a smaller fontsize, but this introduces some some unwanted space in the top of the cells. What can I do to remove it?

PS, sorry if there are some extra messy packages and redundant \begin tags. I had some trouble removing them for a working minimal document.

\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

You want that the X column (hidden behind C) is of type 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}

Don't use center inside table, it just adds unwanted vertical space on top and bottom.

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.