1

I am trying to fit this table into one column but not possible...

\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}

I really need this in one column only. Any way to do that? Possibly, Display table nicely and better code, they did some symbols, so maybe add symbol for supplier on item name and then have a key below? Or any other way to fit in one column on IEEEtran journal class?

3
  • Welcome! Please post a complete code.
    – Bernard
    Nov 5, 2019 at 12:21
  • That's perfect!
    – Bernard
    Nov 5, 2019 at 12:28
  • Note, you really should use [ht] instead of [H], just in case. Nov 5, 2019 at 17:40

1 Answer 1

1

Here is a possibility:

\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} 

enter image description here

1
  • Thank you very very much for this morning...but I have delete my answer because there is a little problem of space. :-)
    – Sebastiano
    Nov 5, 2019 at 13:03

You must log in to answer this question.