将表格合并为 IEEE 的一列

将表格合并为 IEEE 的一列

我试图将此表放入一列但不可能......

\documentclass[journal,twoside]{IEEEtran}
\usepackage{siunitx}
\usepackage{tabularx}
\usepackage{booktabs}
\usepackage{float}
\begin{document}
\begin{table}[H]
  \centering
  \begin{tabularx}{0.8\textwidth}{XcccXX}
    \toprule
    Item Name & Quantity & Item Price & Total Price & Supplier & Part Number \\
    \midrule
    Coilcraft Fixed Inductor \SI{10}{\milli\henry} & 1 & 0.71 & 0.71 & Mouser Electronics & 994-RFC0807B-106KE \\
    Bourns Fixed Inductor \SI{500}{\micro\henry} & 1 & 1.38 & 1.38 & Mouser Electronics & 542-5256-
    ON Semiconductor Diode & 4 & 0.08 & 0.32 & Mouser Electronics & 512-1N4148 \\
    Murata \SI{10}{\micro\farad} Capacitor  & 2 & 0.16 & 0.32 & Mouser Electronics & 81-GRM155C80G106ME44 \\
    Alpha \SI{1}{\kilo\ohm} Potentiometer & 1 & 1.47 & 1.47 & Mouser Electronics & 313-1000f-1K \\
  KEMET \SI{0.1}{\micro\farad} Capacitor & 2 & 0.56 & 1.12 & Mouser Electronics & 80-C0805X104K4RAUTO \\
  Bourns \SI{200}{\kilo\ohm} Potentiometer & 1 & 0.83 & 0.83 & Mouser Electronics & 652-PDB12-F4201204BF \\
    TT Electronics \SI{10}{\kilo\ohm} Potentiometer & 1 & 0.77 & 0.77 & Mouser Electronics & 858-P160KN-0QC17B10K \\
    Vishay \SI{1}{\kilo\ohm} Resistor & 1 & 0.25 & 0.25 & Mouser Electronics & 71-RCS12061K00FKEA \\  
    TE Connectivity \SI{11}{\kilo\ohm}  Resistor & 1 & 0.34 & 0.34 & Mouser Electronics & 279-ROX5SSJ11K \\
    Analogue Devices Inc. AD8666 Op-amp & 1 & 1.05 & 1.05 & Digi-Key & AD8666ARZ-REELTR-ND \\
    \bottomrule
  \end{tabularx}
\end{table}
\end{document}

我确实需要只在一列中显示。有什么办法吗?可能,更好地显示表格并改善代码,他们做了一些符号,所以也许在项目名称上添加供应商符号,然后在下面有一个键?或者有其他方法可以将其放在 IEEEtran 日记帐类的一列中?

答案1

有以下可能性:

\documentclass[journal,twoside]{IEEEtran}
\usepackage{siunitx}
\usepackage{tabularx}
\usepackage{booktabs, makecell}
\usepackage{float}
\usepackage{seqsplit, collcell, ragged2e}
\newcolumntype{Y}{>{\arraybackslash\collectcell\seqsplit}X<{\endcollectcell}}
\usepackage{lipsum}
\begin{document}

\lipsum[11]
\begin{table}[H]
  \centering\footnotesize
\setlength{\tabcolsep}{4pt}
\setlength{\extrarowheight}{3pt}
  \begin{tabularx}{\columnwidth}{>{\RaggedRight}X@{}ccc>{\RaggedRight}X@{}Y}
    \toprule
    Item Name & Quantity & \thead{Item\\ Price} & \thead{Total\\Price} & Supplier & Part Number \\
    \midrule
    Coilcraft Fixed Inductor \SI{10}{\milli\henry} & 1 & 0.71 & 0.71 & Mouser Electronics & 994-RFC0807B-106KE \\
    Bourns Fixed Inductor \SI{500}{\micro\henry} & 1 & 1.38 & 1.38 & Mouser Electronics & 542-5256- \\
 ON Semiconductor Diode & 4 & 0.08 & 0.32 & Mouser Electronics & 512-1N4148 \\
 Murata \SI{10}{\micro\farad} Capacitor & 2 & 0.16 & 0.32 & Mouser Electronics & 81-GRM155C80G106ME44 \\
 Alpha \SI{1}{\kilo\ohm} Potentiometer & 1 & 1.47 & 1.47 & Mouser Electronics & 313-1000f-1K \\
 KEMET \SI{0.1}{\micro\farad} Capacitor & 2 & 0.56 & 1.12 & Mouser Electronics & 80-C0805X104K4RAUTO \\
 Bourns \SI{200}{\kilo\ohm} Potentiometer & 1 & 0.83 & 0.83 & Mouser Electronics & 652-PDB12-F4201204BF \\
 TT Electronics \SI{10}{\kilo\ohm} Potentiometer & 1 & 0.77 & 0.77 & Mouser Electronics & 858-P160KN-0QC17B10K \\
 Vishay \SI{1}{\kilo\ohm} Resistor & 1 & 0.25 & 0.25 & Mouser Electronics & 71-RCS12061K00FKEA \\
 TE Connectivity \SI{11}{\kilo\ohm} Resistor & 1 & 0.34 & 0.34 & Mouser Electronics & 279-ROX5SSJ11K \\
 Analogue Devices Inc. AD8666 Op-amp & 1 & 1.05 & 1.05 & Digi-Key & AD8666ARZ-REELTR-ND \\
    \bottomrule
  \end{tabularx}
\end{table}

\end{document} 

在此处输入图片描述

相关内容