2

I'm trying to insert a table into my IEEEtran document. Following tables I have created with Excel. enter image description here

Here is my IEEEtran code. Can someone tell me how I can create my table into following code?

\documentclass{IEEEtran}

\makeatletter
\newcommand*\titleheader[1]{\gdef\@titleheader{#1}}
\pagenumbering{gobble} %no page number
\AtBeginDocument{%
  \let\st@red@title\@title
  \def\@title{%
    \bgroup\normalfont\large\centering\@titleheader\par\egroup
    \vskip1.5em\st@red@title}
}
\makeatother

\title{My Paper Title}
\titleheader{2016 IEEE 24th International Requirements Engineering Conference}

%\author{maxmin}
\author{\IEEEauthorblockN{M.Sc. John Doe}
\IEEEauthorblockA{Department of Economic Computer Science\\Economic Computer Science\\
University of California\\
California, USA 04103-04358\\
Email: John.Dow@university-xx.com}}
%#################DOCUMENTS STARTS HERE #########################
\begin{document}
\maketitle
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Maecenas porta ut orci in scelerisque. Sed cursus, quam ut facilisis dapibus, mi dui auctor lorem, id cursus turpis leo a ante. Nullam pharetra sem ipsum, sit amet porttitor nulla dapibus vitae. Donec venenatis dapibus leo. Nunc ultrices lacinia interdum. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Proin bibendum mauris non arcu congue sollicitudin. Proin et velit ac ipsum porta dignissim.

Integer hendrerit at libero eget sagittis. Nullam eu rhoncus diam, eu pellentesque eros. Cras urna mi, scelerisque a nibh quis, consectetur rutrum massa. Ut at consectetur nisi. Aliquam erat lorem, dictum et tellus non, dapibus accumsan est. Duis porttitor scelerisque mauris sed ullamcorper. Cras venenatis maximus nibh, ut malesuada ipsum gravida ac. Fusce eu ligula eget eros porta vestibulum id eu sem. Aenean ullamcorper sollicitudin posuere. Donec gravida non tellus vitae suscipit. Mauris eget erat eu nisl aliquet dictum. Sed vestibulum tortor laoreet justo interdum, in fermentum eros malesuada. Nulla vitae lorem faucibus, lobortis dolor sed, consequat lectus. Mauris posuere feugiat mi eu egestas.

\begin{table}[!t]
%% increase table row spacing, adjust to taste
%\renewcommand{\arraystretch}{1.3}
% if using array.sty, it might be a good idea to tweak the value of
% \extrarowheight as needed to properly center the text within the cells
\caption{An Example of a Table}
\label{table_example}
\centering
%% Some packages, such as MDW tools, offer better commands for making tables
%% than the plain LaTeX2e tabular which is used here.

\end{table}

Duis pellentesque ornare eros. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Sed convallis ut sem id commodo. Aenean ac tellus at ipsum efficitur iaculis. Curabitur pharetra at dui quis aliquam. Pellentesque vitae ante purus. Ut eleifend augue eu arcu pretium, eu gravida sem pretium. Sed fringilla quam blandit tincidunt bibendum. In pellentesque tincidunt eros, a eleifend leo faucibus nec. Suspendisse sit amet nunc urna. Proin varius dolor facilisis ex mollis ornare. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed hendrerit id eros at malesuada. Praesent nisl dolor, consequat et aliquet vel, volutpat eu neque. Nunc venenatis at arcu quis ultricies. Vestibulum sollicitudin erat est, eu egestas lorem ultricies non.

Nam mauris eros, porta eget tincidunt in, facilisis id lacus. Nunc at mauris orci. Duis risus neque, feugiat vitae tincidunt a, placerat ut neque. Etiam eget tincidunt eros, eu posuere arcu. Mauris luctus, leo dapibus condimentum efficitur, orci quam tincidunt nisi, id malesuada risus elit vitae nisl. Vivamus fringilla erat sed maximus blandit. Nulla ultrices turpis quis erat dapibus gravida. Cras vestibulum, quam eget malesuada porttitor, est nunc faucibus nisi, ac molestie lectus ex id ante. Ut feugiat leo et neque malesuada, sed posuere nisl tincidunt. Curabitur congue id risus in eleifend. Cras cursus, augue vitae mattis posuere, lacus sapien efficitur tellus, et lobortis nibh dolor sed lectus.
\end{document}
2

Just add

\begin{tabular}{|c|c|c|}
\hline
\multicolumn{3}{|c|}{\textbf{New CHAOS DB}}\\\hline
\textbf{2012}&\textbf{Small Projects}&\textbf{Large Projects}\\\hline
Successful&78\%&10\%\\\hline
Failed&4\%&38\%\\\hline
Challenged&20\%&52\%\\\hline
Time&&\\\hline
Cost&&\\\hline
Features&&\\\hline
\end{tabular}

to your code. Your full code is below.

\documentclass{IEEEtran}

\makeatletter
\newcommand*\titleheader[1]{\gdef\@titleheader{#1}}
\pagenumbering{gobble} %no page number
\AtBeginDocument{%
  \let\st@red@title\@title
  \def\@title{%
    \bgroup\normalfont\large\centering\@titleheader\par\egroup
    \vskip1.5em\st@red@title}
}
\makeatother

\title{My Paper Title}
\titleheader{2016 IEEE 24th International Requirements Engineering Conference}

%\author{maxmin}
\author{\IEEEauthorblockN{M.Sc. John Doe}
\IEEEauthorblockA{Department of Economic Computer Science\\Economic Computer Science\\
University of California\\
California, USA 04103-04358\\
Email: John.Dow@university-xx.com}}
%#################DOCUMENTS STARTS HERE #########################
\begin{document}
\maketitle
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Maecenas porta ut orci in scelerisque. Sed cursus, quam ut facilisis dapibus, mi dui auctor lorem, id cursus turpis leo a ante. Nullam pharetra sem ipsum, sit amet porttitor nulla dapibus vitae. Donec venenatis dapibus leo. Nunc ultrices lacinia interdum. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Proin bibendum mauris non arcu congue sollicitudin. Proin et velit ac ipsum porta dignissim.

Integer hendrerit at libero eget sagittis. Nullam eu rhoncus diam, eu pellentesque eros. Cras urna mi, scelerisque a nibh quis, consectetur rutrum massa. Ut at consectetur nisi. Aliquam erat lorem, dictum et tellus non, dapibus accumsan est. Duis porttitor scelerisque mauris sed ullamcorper. Cras venenatis maximus nibh, ut malesuada ipsum gravida ac. Fusce eu ligula eget eros porta vestibulum id eu sem. Aenean ullamcorper sollicitudin posuere. Donec gravida non tellus vitae suscipit. Mauris eget erat eu nisl aliquet dictum. Sed vestibulum tortor laoreet justo interdum, in fermentum eros malesuada. Nulla vitae lorem faucibus, lobortis dolor sed, consequat lectus. Mauris posuere feugiat mi eu egestas.

\begin{table}[!t]
%% increase table row spacing, adjust to taste
%\renewcommand{\arraystretch}{1.3}
% if using array.sty, it might be a good idea to tweak the value of
% \extrarowheight as needed to properly center the text within the cells
\caption{An Example of a Table}
\label{table_example}
\centering
%% Some packages, such as MDW tools, offer better commands for making tables
%% than the plain LaTeX2e tabular which is used here.
\begin{tabular}{|c|c|c|}
\hline
\multicolumn{3}{|c|}{\textbf{New CHAOS DB}}\\\hline
\textbf{2012}&\textbf{Small Projects}&\textbf{Large Projects}\\\hline
Successful&78\%&10\%\\\hline
Failed&4\%&38\%\\\hline
Challenged&20\%&52\%\\\hline
Time&&\\\hline
Cost&&\\\hline
Features&&\\\hline
\end{tabular}    
\end{table}

Duis pellentesque ornare eros. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Sed convallis ut sem id commodo. Aenean ac tellus at ipsum efficitur iaculis. Curabitur pharetra at dui quis aliquam. Pellentesque vitae ante purus. Ut eleifend augue eu arcu pretium, eu gravida sem pretium. Sed fringilla quam blandit tincidunt bibendum. In pellentesque tincidunt eros, a eleifend leo faucibus nec. Suspendisse sit amet nunc urna. Proin varius dolor facilisis ex mollis ornare. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed hendrerit id eros at malesuada. Praesent nisl dolor, consequat et aliquet vel, volutpat eu neque. Nunc venenatis at arcu quis ultricies. Vestibulum sollicitudin erat est, eu egestas lorem ultricies non.

Nam mauris eros, porta eget tincidunt in, facilisis id lacus. Nunc at mauris orci. Duis risus neque, feugiat vitae tincidunt a, placerat ut neque. Etiam eget tincidunt eros, eu posuere arcu. Mauris luctus, leo dapibus condimentum efficitur, orci quam tincidunt nisi, id malesuada risus elit vitae nisl. Vivamus fringilla erat sed maximus blandit. Nulla ultrices turpis quis erat dapibus gravida. Cras vestibulum, quam eget malesuada porttitor, est nunc faucibus nisi, ac molestie lectus ex id ante. Ut feugiat leo et neque malesuada, sed posuere nisl tincidunt. Curabitur congue id risus in eleifend. Cras cursus, augue vitae mattis posuere, lacus sapien efficitur tellus, et lobortis nibh dolor sed lectus.


\end{document}

Yields:

enter image description here

6
  • Thanks a lot. But now the tables name is not above the table it's on top of my lines. The table name has to be right above the table. I've got it. Just copied the \end{tabulator} before \end{table}. – maxmin Jan 29 '17 at 16:26
  • I now need to double underline from 2012 till Large Projects and underline Features and the whole line? – maxmin Jan 29 '17 at 16:39
  • c__ is not working either c= or c-- – maxmin Jan 29 '17 at 16:57
  • I found out the hline but how can I create a table without the horizontal line. When I remove it from my code I got an error. \begin{tabular}{c c c}\\\hline \textbf{2012}&\textbf{Small Projects}&\textbf{Large Projects}\\\hline \hline Successful&78\%&10\%\\ Failed&4\%&38\%\\ Challenged&20\%&52\%\\ Time&&\\ Cost&&\\ Features&&\\ \end{tabular} – maxmin Jan 29 '17 at 17:18
  • Got everything. Tks again to @Dan – maxmin Jan 29 '17 at 17:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.