[Tex/LaTex] Remove the overlapping text in a table

horizontal alignmenttables

I am trying to make a table with lots of columns. I specify width of each column. However, my text in column is overlapping the neighbouring column instead of going to new row.

How do I solve it?

See attached picture:

enter image description here

Code is as follows:

\begin{table}[h]
  \newcolumntype{P}[1]{>{\centering\arraybackslash}p{#1}}
  \setlength\extrarowheight{5pt}
  \scriptsize
  \centering
  \begin{tabular}{P{0.7 cm} P{0.9cm} P{1cm} P{2 cm} P{0.4cm} P{1.2cm} 
   P{0.4cm} P{0.8cm} P{0.5cm} P{0.9cm} }
  Ref & IL & H$\kappa$ & $D_{it}$ & $C_{ox}(\mu F/cm^2)$ & Technique & 
  $\sigma$ & Sn & Strain & Device \\
  \hline
  \cite{gong2012towards} & $SiO_2/Si$ & 3.6 nm Hf$O_2$ & $1.7 \times 10^{12}$(MG)   & 2.2   & CP & - & 3\% & F.S & p-FET \\
    \hline
  \end{tabular}
  \caption{No Caption} \label{table: No label}
\end{table}

Best Answer

I suggest you use a tabularx environment, to ensure that the material will fit inside the text block, with a centered version of the package's X column for 5 or the 10 columns, to allow automatic line-wrapping if needed. I would also like to suggest that you use the macros of the siunitx package to typeset units and numbers. Finally, do use the line-drawing macros of the booktabs package to obtain well-spaced lines.

enter image description here

\documentclass{article}
\usepackage{booktabs,ragged2e}
\usepackage{siunitx}
\sisetup{tight-spacing = true, per-mode = symbol}
\usepackage{tabularx}
\newcolumntype{C}{>{\Centering\arraybackslash}X}

\begin{document}
\begin{table}
  \small  % \scriptsize not needed anymore
  \begin{tabularx}{\textwidth}{@{} c *{5}{C} *{4}{c} @{}}
  Ref & IL & H$\kappa$ & $D_{it}$ & 
  $C_{ox}$ (\si{\micro\farad\per\centi\meter\squared}) & 
  \hspace{0pt}Technique & $\sigma$ & Sn & Strain & Device \\
  \midrule
  \cite{gong2012towards} & $SiO_2/Si$ & 
  \SI{3.6}{\nano\meter} Hf$O_2$ & \num{1.7e12} (MG)   & 
  2.2   & CP & -- & 3\% & F.S & p-FET \\
  \bottomrule
  \end{tabularx}
  \caption{No Caption} 
  \label{table:NoLabel}
\end{table}
\end{document}

Addendum, posted after the OP left a comment that line-breaks weren't acceptable. If linebreaks aren't acceptable, and if you're not willing to switch to an extremely small font size (which, in my view, you shouldn't do anyway), the main option that's left is to switch to a landscape-oriented table. The following example employs a sidewaystable environment, and it uses a tabular* environment instead of a tabularx environment, as automatic text wrapping isn't supposed to happen.

enter image description here

\documentclass{article}
\usepackage{booktabs,mhchem,rotating,siunitx}
\sisetup{tight-spacing = true, per-mode = symbol}

\begin{document}
\begin{sidewaystable}
\setlength\tabcolsep{0pt} % make LaTeX figure out intercolumn whitespace
  \begin{tabular*}{\textwidth}{@{\extracolsep{\fill}} l *{9}{c} }
  Ref & IL & H$\kappa$ & $D_{it}$ & 
  $C_{ox}$ (\si{\micro\farad\per\centi\meter\squared}) & 
  Technique & $\sigma$ & Sn & Strain & Device \\
  \midrule
  \cite{gong2012towards} & \ce{SiO2}/\ce{Si} & 
  \SI{3.6}{\nano\meter} \ce{HfO2} & \num{1.7e12} (MG)   & 
  2.2 & CP & -- & 3\% & F.S & p-FET \\
  \bottomrule
  \end{tabular*}
  \caption{No Caption} 
  \label{table:NoLabel}
\end{sidewaystable}
\end{document}