[Tex/LaTex] Problem with the width of a table

tableswidth

I used the following code to generate a table, but I have faced the problem that clarifies in the attached picture. Any solutions?

\documentclass[11pt,journal,compsoc]{IEEEtran}
\usepackage{filecontents}
\usepackage [noadjust]{cite}
\usepackage{caption}
\usepackage{multirow}
\usepackage{tabularx}
\usepackage{enumitem}

\usepackage{multirow}
\usepackage{booktabs}

\usepackage{array}
\usepackage{graphicx}
\usepackage{lipsum}

%
\ifCLASSOPTIONcompsoc
  % IEEE Computer Society needs nocompress option
  % requires cite.sty v4.0 or later (November 2003)
 % \usepackage[nocompress]{cite}
\else
  % normal IEEE
  %\usepackage{cite}
\fi




% *** GRAPHICS RELATED PACKAGES ***
%
\ifCLASSINFOpdf
  % \usepackage[pdftex]{graphicx}
  % declare the path(s) where your graphic files are
  % \graphicspath{{../pdf/}{../jpeg/}}
  % and their extensions so you won't have to specify these with
  % every instance of \includegraphics
  % \DeclareGraphicsExtensions{.pdf,.jpeg,.png}
\else
  % or other class option (dvipsone, dvipdf, if not using dvips). graphicx
  % will default to the driver specified in the system graphics.cfg if no
  % driver is specified.
  % \usepackage[dvips]{graphicx}
  % declare the path(s) where your graphic files are
  % \graphicspath{{../eps/}}
  % and their extensions so you won't have to specify these with
  % every instance of \includegraphics
  % \DeclareGraphicsExtensions{.eps}
\fi


\newcommand\MYhyperrefoptions{bookmarks=true,bookmarksnumbered=true,
pdfpagemode={UseOutlines},plainpages=false,pdfpagelabels=true,
colorlinks=true,linkcolor={black},citecolor={black},urlcolor={black},
pdftitle={Bare Demo of IEEEtran.cls for Computer Society Journals},%<!CHANGE!
pdfsubject={Typesetting},%<!CHANGE!
pdfauthor={Michael D. Shell},%<!CHANGE!
pdfkeywords={Computer Society, IEEEtran, journal, LaTeX, paper,
             template}}%<^!CHANGE!




\begin{document}

    \begin{table*}[t]
    \begin{tabular}{|c|c|c|c|c|c|c|c|}
    \hline 
    Study ID & Study title & First author name  & Year & Source  & Usability Factors & Development Area  & No, of Citation \\ 
    \hline 
    S1 & Persuasion for stronger passwords: Motivation and pilot study & Alain Forget & 2008 & ACM & Memorability and  efficiency & User Authentication & 26 \\ 
    \hline 
    S2 & VibraPass - Secure Authentication Based on Shared Lies   & Alexander De Luca & 2008 & ACM & Memorability and easy to use  & User Authentication & 52 \\ 
    \hline 
    \end{tabular} 


\end{document} 

enter image description here

Best Answer

Two principal ways to reduce (improve) the width of the table:

Either use p{...} columns or C{...} columns with a new column type (vertically and horizontally centered`.

Some lines are not wrapped, because I did not use hyphenation there.

The horizontal and vertical lines do not improve the readability of the table, but this is not the issue here....

\documentclass{article}

\usepackage{array}



\newcolumntype{C}[1]{>{\centering\arraybackslash}m{#1}}

\begin{document}



\begin{table*}[t]
\begin{tabular}{|c|c|c|c|c|c|c|c|}
\hline 
Study ID & Study title & First author name  & Year & Source  & Usability Factors & Development Area  & No, of Citation \\ 
\hline 
S1 & Persuasion for stronger passwords: Motivation and pilot study & Alain Forget & 2008 & ACM & Memorability and  efficiency & User Authentication & 26 \\ 
\hline 
S2 & VibraPass - Secure Authentication Based on Shared Lies   & Alexander De Luca & 2008 & ACM & Memorability and easy to use  & User Authentication & 52 \\ 
\hline 
\end{tabular} 
\end{table*}


\begin{table*}[t]
\begin{tabular}{|C{1cm}|C{3cm}|C{1.5cm}|*{2}{C{1.0cm}|}C{1.5cm}|C{1.5cm}|C{1.0cm}|}
\hline 
Study ID & Study title & First author name  & Year & Source  & Usability Factors & Develop-ment Area  & No, of Citation \\ 
\hline 
S1 & Persuasion for stronger passwords: Motivation and pilot study & Alain Forget & 2008 & ACM & Memorability and  efficiency & User Authentication & 26 \\ 
\hline 
S2 & VibraPass - Secure Authentication Based on Shared Lies   & Alexander De Luca & 2008 & ACM & Memorability and easy to use  & User Authentication & 52 \\ 
\hline 
\end{tabular} 
\end{table*}


\begin{table*}[t]
\begin{tabular}{|p{1cm}|p{3cm}|p{1.5cm}|*{2}{p{1.0cm}|}p{1.5cm}|p{1.5cm}|p{1.0cm}|}
\hline 
Study ID & Study title & First author name  & Year & Source  & Usability Factors & Develop-ment Area  & No, of Citation \\ 
\hline 
S1 & Persuasion for stronger passwords: Motivation and pilot study & Alain Forget & 2008 & ACM & Memorability and  efficiency & User Authentication & 26 \\ 
\hline 
S2 & VibraPass - Secure Authentication Based on Shared Lies   & Alexander De Luca & 2008 & ACM & Memorability and easy to use  & User Authentication & 52 \\ 
\hline 
\end{tabular} 
\end{table*}


\end{document}

enter image description here

Related Question