我使用“tablesgenerator.com”生成了一个表格。不幸的是,我遇到了几个错误,我不记得如何修复它们。
希望有人能帮忙。如果可以的话,请写一份修改说明。
最小(不)工作示例
\documentclass[fleqn,10pt,twocolumn]{article}
\usepackage[utf8]{inputenc}
\usepackage{amsmath,array,siunitx,caption}
\usepackage{booktabs}
\usepackage{graphicx}
\usepackage{dcolumn}
\begin{document}
\begin{table}[h]
\centering
\caption{My caption}
\label{my-label}
\resizebox{\textwidth}{!}{%
\begin{tabular}{@{}lll@{}}
Primer-name & Type & Description \\
U1 & 5'-ACGGATAGCCAAGTAGGGAG-3' & Amplify w. D2 whole ayg1 gene-region - forward \\
U2 & 5'-GGGCAAATGGGGGAGCAAGA-3' & Together with 188 amplifies bipartite fragment downstream - reverse \\
U1a & 5’-GGTCTTAAU ACGGATAGCCAAGTAGGGAG-3’ & Amplify w. U2a upstream fragment w. Uracil tail - forward \\
U2b & 5’-GGCATTAAU GGGCAAATGGGGGAGCAAGA-3 & Amplify w. U1b upstream fragment w. Uracil tail - reverse \\
D1 & 5’-CCCACTCAGCTACCACAAATAC-3' & Amplify w. U1 whole ayg1 gene- region - forward \\
D2 & 5’-ACCATCACTAACTCTTCTCCAC-3' & Together with 187 amplifies bipartite fragment upstream - forward \\
D1c & 5’-GGACTTAAU CCCACTCAGCTACCACAAATAC-3' & Amplify w. D2d downstream fragment w. Uracil tail - forward \\
D2d & 5’-GGGTTTAAU ACCATCACTAACTCTTCTCCAC-3' & Amplify w. D1c downstream fragment w. Uracil tail - reverse \\
188 & 5'-AATACGAGGTCGCCAACATC-3' & Together with U1 amplifies bipartite fragment downstream - reverse \\
187 & 5'-ATAGGTCAGGCTCTCGCTGA-3' & Together with U2 amplifies bipartite fragment upstream - forward \\
139 & 5'-ACGGATAGCCAAGTAGGGAG-3' & Sequencing primer upstream fragment, first 700bp - forward \\
140 & 5'-GGGCAAATGGGGGAGCAAGA-3' & Sequencing primer upstream fragment, last 700bp - reverse \\
141 & 5’-CCCACTCAGCTACCACAAATAC-3' & Sequencing primer downstream fragment, first 700bp - forward \\
142 & 5’-ACCATCACTAACTCTTCTCCAC-3' & Sequencing primer downstream fragment, last 700bp - reverse \\
V1-fwd & 5´-TATTTGTCTGGATCGACGCCC-3' & Amplify w. V2-rev whole hph cassette + up/downstream- forward \\
V1-rev & 5´-TCACTGGCAAACTGTGATGGA-3' & Amplify w. V1-fwd upstream bipartite- forward \\
V2-fwd & 5´-TCGTCCATCACAGTTTGCCA-3' & Amplify w. V2-rev downstream bipartite- forward \\
V2-rev & 5´-GCAAGCCTACAAATGAGCCG-3' & Amplify w. V1-fwd whole hph cassette + up/downstream- reverse
\end{tabular}
}
\end{table}
\end{document}
答案1
你得到的错误是
! Undefined control sequence.
<argument> \textasciiacute
您可以通过加载textcomp
包来定义它,但我怀疑您不想这样做。
你的标记非常不一致,
有些行有
5'
有些有
5'
有些有
5´
即撇号、右单引号和尖音符。其中第三个(仅在表格的最后几行中使用)会产生错误。
但你真的想让它们有所不同吗?
答案2
修复。初始错误是!未定义的控制序列。\textasciiacute
正如@David Carlisle 指出的那样,这是由于撇号使用不一致造成的,最初使用 $\prime$ 解决了这个问题,而 $^\prime$ 应该是 $\prime$,但最终通过一致使用 $'$(正常的 ascii 撇号)解决了这个问题 - @Mike Renfro、@David Carlisle 和 @egreg 也指出了这一点
还添加了 \toprule 、 \midrule 、 \bottomrule 。注意,在 \bottomrule 之前需要换行。- 感谢@Mico
中心标题也添加了多列
\documentclass[fleqn,10pt,twocolumn]{article}
\usepackage[utf8]{inputenc}
\usepackage{amsmath,array,siunitx,caption}
\usepackage{booktabs}
\usepackage{graphicx}
\usepackage{dcolumn}
\begin{document}
\begin{table}[h]
\centering
\caption{Oligonucleotides used in this study}
\label{my-label}
\resizebox{\textwidth}{!}{%
\begin{tabular}{@{}lll@{}}
\toprule
\multicolumn{1}{c}{Primer-name} & \multicolumn{1}{c}{Type} & \multicolumn{1}{c}{Description} \\
\midrule
U1 & 5$'$-ACGGATAGCCAAGTAGGGAG-3$'$ & Amplify w. D2 whole ayg1 gene-region - forward \\
U2 & 5$'$-GGGCAAATGGGGGAGCAAGA-3$'$ & Together with 188 amplifies bipartite fragment downstream - reverse \\
U1a & 5$'$-GGTCTTAAU ACGGATAGCCAAGTAGGGAG-3$'$ & Amplify w. U2a upstream fragment w. Uracil tail - forward \\
U2b & 5$'$-GGCATTAAU GGGCAAATGGGGGAGCAAGA-3$'$ & Amplify w. U1b upstream fragment w. Uracil tail - reverse \\
D1 & 5$'$-CCCACTCAGCTACCACAAATAC-3$'$ & Amplify w. U1 whole ayg1 gene-region - forward \\
D2 & 5$'$-ACCATCACTAACTCTTCTCCAC-3$'$ & Together with 187 amplifies bipartite fragment upstream - forward \\
D1c & 5$'$-GGACTTAAU CCCACTCAGCTACCACAAATAC-3$'$& Amplify w. D2d downstream fragment w. Uracil tail - forward \\
D2d & 5$'$-GGGTTTAAU ACCATCACTAACTCTTCTCCAC-3$'$& Amplify w. D1c downstream fragment w. Uracil tail - reverse \\
188 & 5$'$-AATACGAGGTCGCCAACATC-3$'$ & Together with U1 amplifies bipartite fragment downstream - reverse \\
187 & 5$'$-ATAGGTCAGGCTCTCGCTGA-3$'$ & Together with U2 amplifies bipartite fragment upstream - forward \\
139 & 5$'$-ACGGATAGCCAAGTAGGGAG-3$'$ & Sequencing primer upstream fragment, first 700bp - forward \\
140 & 5$'$-GGGCAAATGGGGGAGCAAGA-3$'$ & Sequencing primer upstream fragment, last 700bp - reverse \\
141 & 5$'$-CCCACTCAGCTACCACAAATAC-3$'$ & Sequencing primer downstream fragment, first 700bp - forward \\
142 & 5$'$-ACCATCACTAACTCTTCTCCAC-3$'$ & Sequencing primer downstream fragment, last 700bp - reverse \\
V1-fwd & 5$'$-TATTTGTCTGGATCGACGCCC-3$'$ & Amplify w. V2-rev whole hph cassette + up/downstream- forward \\
V1-rev & 5$'$-TCACTGGCAAACTGTGATGGA-3$'$ & Amplify w. V1-fwd upstream bipartite- forward \\
V2-fwd & 5$'$-TCGTCCATCACAGTTTGCCA-3$'$ & Amplify w. V2-rev downstream bipartite- forward \\
V2-rev & 5$'$-GCAAGCCTACAAATGAGCCG-3$'$ & Amplify w. V1-fwd whole hph cassette + up/downstream- reverse \\
\bottomrule
\end{tabular}
}
\label{tab:primertable}
\end{table}
\end{document}