如何在表格下方添加注释

如何在表格下方添加注释

我一直试图在表格下方添加注释,但一直出现错误:不在外部模式。有人可以帮帮我吗?

奥巴尔

\begin{table*}[ht]
\caption{Table 2 Top 10 Philippine Exports to ASEAN, 1991-2012} 
  \begin{threeparttable}
  \centering
    \begin{tabular}{p{0.15\linewidth}
                        p{0.45\linewidth}
                        p{0.20\linewidth}}
     \hline
     PSCC&  & Description\tnote{a} & Shares         \\
     \hline

        9310221   & Semi-conductor devices, Manuf from Mat'l on consign basis & 31.5    \\
        7764109    & Finished Elect'l \& Electronic Machinery & Parts, Manuf fr Mat'l-consign, NES & 12.7  \\
        9310229  & Wafers \& discs, electrically circuit-programmed, whether or not coated on one side with gold or aluminium | Other & 5.3\\      
        7764900  & [Other] electronic [integrated circuits and] microassemblies & 3.4   \\
        7599700  & Parts \& accessories of machines of 752 & 3.2\\
        6821201  & Cathodes \& sections of cathodes, of refined copper \\
        7764100 & Other Semiconductor devides & 2.4 \\
        7843919      & Unassembled fuel tank; engine brackets & 2.4\\
        7843409 & Unassembled gear boxes for vehicles of heading 87.01 (except subheading 8701.10 or 8701.90)(agricultural tractors) & 1.5\\
        7527000 & Optical disk drives, including CD-ROM drives, DVD drives and CD-R drives & 1.5\\

     \end{tabular}
    \begin{tablenotes}
      \small
      \item [a] Semiconductor products include:  Wafer \& discs (Pscc7 7764102, 7764109, 7764300); Smart cards (7764101); Hybrid integrated circuits (7764500); Electronic microassemblies (7764900); semiconductor devices from materials on consignment basis (9310221); and Diodes (9310222).
    \end{tablenotes}
  \end{threeparttable}
\end{table*}

答案1

这是编译的代码。有几个&应该是\&。顺便问一下,你为什么要自己给表格编号?这样一张表格就有两个数字了。我借此机会改进了表格,特别是行之间的一些垂直填充、规则命令booktabsS最后一列的列类型(来自siunitx)。

\documentclass[12pt]{article}
\usepackage[utf8]{inputenc}
\usepackage{ragged2e}
\usepackage{booktabs, caption, makecell, siunitx}
\renewcommand\theadfont{\bfseries}
\usepackage[flushleft]{threeparttable}
\setcellgapes{2pt}

\begin{document}

\begin{table*}[ht]
  \centering\makegapedcells
  \caption{Top 10 Philippine Exports to ASEAN, 1991-2012}
  \begin{threeparttable}
    \centering
    \begin{tabular}{p{0.15\linewidth}
        >{\RaggedRight}p{0.45\linewidth}
        S[table-format=2.1]}
        \toprule
        PSCC & Description\tnote{a} & {Shares} \\
        \midrule
        9310221 & Semi-conductor devices, Manuf from Mat'l on consign basis & 31.5 \\
        7764109 & Finished Elect'l \& Electronic Machinery \& Parts, Manuf fr Mat'l-consign, NES & 12.7 \\
        9310229 & Wafers \& discs, electrically circuit-programmed, whether or not coated on one side with gold or aluminium | Other & 5.3 \\
        7764900 & [Other] electronic [integrated circuits and] microassemblies & 3.4 \\
        7599700 & Parts \& accessories of machines of 752 & 3.2 \\
        6821201 & Cathodes \& sections of cathodes, of refined copper \\
        7764100 & Other Semiconductor devides & 2.4 \\
        7843919 & Unassembled fuel tank; engine brackets & 2.4 \\
        7843409 & Unassembled gear boxes for vehicles of heading 87.01 (except subheading 8701.10 or 8701.90)(agricultural tractors) & 1.5 \\
        7527000 & Optical disk drives, including CD-ROM drives, DVD drives and CD-R drives & 1.5 \\
        \bottomrule
      \end{tabular}
      \begin{tablenotes}
        \footnotesize
        \item [a] Semiconductor products include: Wafer \& discs (Pscc7 7764102, 7764109, 7764300); Smart cards (7764101); Hybrid integrated circuits (7764500); Electronic microassemblies (7764900); semiconductor devices from materials on consignment basis (9310221); and Diodes (9310222).
      \end{tablenotes}
    \end{threeparttable}
  \end{table*}

\end{document} 

在此处输入图片描述

答案2

推杆

\usepackage{etoolbox}
\AtBeginEnvironment{tablenotes}{\small}

比每次都设置更好,\small因为它可以确保一致性,并且如果您以后需要更改,也更容易更改。

答案3

这似乎修复了错误。

\begin{table*}[ht]
\caption{Top 10 Philippine Exports to ASEAN, 1991-2012} 
  \begin{threeparttable}
  \centering
    \begin{tabular}{p{0.15\linewidth}
                        p{0.45\linewidth}
                        p{0.20\linewidth}}
     \hline
    PSCC & Description\tnote{a} & Shares         \\
     \hline

        9310221  & Semi-conductor devices, Manuf from Mat'l on consign basis & 31.5    \\
        7764109  & Finished Elect'l \& Electronic Machinery Parts, Manuf fr Mat'l-consign, NES & 12.7  \\
        9310229  & Wafers \& discs, electrically circuit-programmed, whether or not coated on one side with gold or aluminium | Other & 5.3\\      
        7764900  & [Other] electronic [integrated circuits and] microassemblies & 3.4   \\
        7599700  & Parts \& accessories of machines of 752 & 3.2\\
        6821201  & Cathodes \& sections of cathodes, of refined copper \\
        7764100  & Other Semiconductor devides & 2.4 \\
        7843919  & Unassembled fuel tank; engine brackets & 2.4\\
        7843409  & Unassembled gear boxes for vehicles of heading 87.01 (except subheading 8701.10 or 8701.90)(agricultural tractors) & 1.5\\
        7527000  & Optical disk drives, including CD-ROM drives, DVD drives and CD-R drives & 1.5\\

     \end{tabular}
    \begin{tablenotes}
      \small
      \item [a] Semiconductor products include:  Wafer \& discs (Pscc7 7764102, 7764109, 7764300); Smart cards (7764101); Hybrid integrated circuits (7764500); Electronic microassemblies (7764900); semiconductor devices from materials on consignment basis (9310221); and Diodes (9310222).
    \end{tablenotes}
  \end{threeparttable}
\end{table*}

相关内容