\documentclass[journal]{IEEEtran}
\hyphenation{Smart Grid}
\usepackage[classicReIm]{kpfonts}
\usepackage{siunitx,booktabs}
\usepackage{subfloat}
\usepackage{subcaption}
\usepackage{graphicx}
\usepackage{color} %for colors
\usepackage{epstopdf}
\usepackage{url}
\usepackage{hhline}%%%
\usepackage{float} %for fix the image position
%\usepackage[]{algorithm2e}
\usepackage{amsmath} %% for case bracket
%\usepackage{url}
\usepackage{multirow} % for devide row
\usepackage{caption}
%\usepackage{subcaption} % forr subfigures
\usepackage{multicol}
%\usepackage{subfig}
%\usepackage{cite}
\usepackage{cleveref}
\usepackage{amsmath}
\pagenumbering{gobble} %%% for without page numbers
\usepackage{float}
%\usepackage{algorithm}
\usepackage{array}
\usepackage{pdflscape}
\usepackage[classicReIm]{kpfonts}
\begin{document}
\begin{table}[H]
\centering \small
\tablesize{\footnotesize}
\caption{Comprehension of recent and relevant work.} \label{litrature}
\begin{tabular}{C{2.5cm}C{6cm}C{2.5cm}C{2.5cm}}
\toprule
\centering{\bf Methodologies } & \centering{\bf Features}&\centering{\bf Targets Achieved}&\bf{Limitations and Remarks} \\
\midrule
%\hline Optimal power scheduling method for DR in HEMS is presented in \cite{9} & GA & Cost and PAR reduction & Increased system complexity \\
MILP& Optimal domestic load scheduling \cite{35} & Electricity cost reduction & The cost is reduced at expense of user discomfort\\
\midrule Greedy algorithm& Heuristic optimization of generic cost model \cite{6} & Reduced user frustration and electricity cost & The PAR is ignored and complexity of the system is increased \\
\midrule GWO and ILP &GWO applied to economic load dispatch problems \cite{3}& Load dispatching in off-peak hours & Solved economic load dispatch (ELD) problems in the current study \\ \bottomrule
\end{tabular}
\end{table}
\end{document}
- 65,388
- 511
3 Answers
You have a lot of issues in your shown code.
- Do you really need all the packages you are loading?
- You load several packages twice, do not do this!
- Have a closer look at the order of calling packages. In your case package
cleverefshould be called last. If you want to usehyperreftoo load it beforecleveref! - For the problem with your table the used font is not relevant (I commented it).
- The definition for
Cyou used in your table is missing. Because you loadarrayI think\newcolumntype{C}[1]{>{\centering\arraybackslash}m{#1}}is what you are using but you had not copied into your code. If you usep{#1}instead of mym{#1}please check the added screenshot below for differences! - I did a little bit pretty printing with your table so the reader can faster locate a special cell in the table.
- I commented all not needed packages you used in your code for the issue with the table. Please check the different order of loading packages!
Please see that
\centeringis not working with your used class inside environmenttable. To visualize this I added packageshowframe. It shows typing area and margins ... The reason is that classIEEEtranuses a two-column-layout. Then environmenttablehas to fit into one column, but your used table exceeds the possible\columnwidth. To get rid of this use environmenttable*instead. It spans both columns ...I commented
\tablesize{\footnotesize}because it throws the error messagecomand \tablesize undefined.- Your used command
\bfis outdated, in your case you can use\textbf{...}instead (as I did in the following code). An alternative would be to change\bfto\bfseries. - Because you gave us no
bibfile I simply commented your citing of books etc. in the table (\cite) ...
With the following code
\documentclass[journal]{IEEEtran}
%usepackage[classicReIm]{kpfonts}
%\usepackage{siunitx}
\usepackage{booktabs}
\usepackage{float} % for fix the image position
%\usepackage{subfloat}
\usepackage{caption}
%\usepackage{subcaption} % for subfigures
%\usepackage{graphicx}
%\usepackage{color} % for colors
%\usepackage{epstopdf}
%\usepackage{url}
%\usepackage{hhline}%%%
%\usepackage[]{algorithm2e}
%\usepackage{amsmath} % for case bracket
%\usepackage{multirow} % for devide row
%\usepackage{multicol}
%\usepackage{subfig}
%\usepackage{cite}
%\usepackage{algorithm}
\usepackage{array}
%\usepackage{pdflscape}
\usepackage{showframe}
%\usepackage{cleveref} % <===============================================
\hyphenation{Smart Grid}
\pagenumbering{gobble} %%% for without page numbers
\newcolumntype{C}[1]{>{\centering\arraybackslash}m{#1}}
\begin{document}
\begin{table}[H]
% \centering
\small
%\tablesize{\footnotesize} % <==========================================
\caption{Comprehension of recent and relevant work.}
\label{litrature}
\begin{tabular}{C{2.5cm}C{6cm}C{2.5cm}C{2.5cm}} % C
\toprule
\textbf{Methodologies}
& \textbf{Features}
& \textbf{Targets Achieved}
& \textbf{Limitations and Remarks} \\
\midrule
%\hline Optimal power scheduling method for DR in HEMS is presented in \cite{9} & GA & Cost and PAR reduction & Increased system complexity \\
MILP
& Optimal domestic load scheduling %\cite{35}
& Electricity cost reduction
& The cost is reduced at expense of user discomfort\\
\midrule
Greedy algorithm
& Heuristic optimization of generic cost model %\cite{6}
& Reduced user frustration and electricity cost
& The PAR is ignored and complexity of the system is increased \\
\midrule
GWO and ILP
& GWO applied to economic load dispatch problems %\cite{3}
& Load dispatching in off-peak hours
& Solved economic load dispatch (ELD) problems in the current study \\
\bottomrule
\end{tabular}
\end{table}
\end{document}
you get the result:
or better for showing the issue with environment table with filled columns in document:
With using the following code for the table (I used package blindtext to generate dummy text to fill the columns) with environment table*:
\blindtext
\begin{table*}
\centering % <========================================================
\small
%\tablesize{\footnotesize} % <==========================================
\caption{Comprehension of recent and relevant work.}
\label{tab:litraturea}
\begin{tabular}{C{2.5cm}C{6cm}C{2.5cm}C{2.5cm}} % C
\toprule
\textbf{Methodologies}
& \textbf{Features}
& \textbf{Targets Achieved}
& \textbf{Limitations and Remarks} \\
\midrule
%\hline Optimal power scheduling method for DR in HEMS is presented in \cite{9} & GA & Cost and PAR reduction & Increased system complexity \\
MILP
& Optimal domestic load scheduling %\cite{35}
& Electricity cost reduction
& The cost is reduced at expense of user discomfort\\
\midrule
Greedy algorithm
& Heuristic optimization of generic cost model %\cite{6}
& Reduced user frustration and electricity cost
& The PAR is ignored and complexity of the system is increased \\
\midrule
GWO and ILP
& GWO applied to economic load dispatch problems %\cite{3}
& Load dispatching in off-peak hours
& Solved economic load dispatch (ELD) problems in the current study \\
\bottomrule
\end{tabular}
\end{table*}
\Blindtext
you get the following result:
The complete code is with both tables (see the better label for the tables with \label{tab:<name>}):
\documentclass[journal]{IEEEtran}
%usepackage[classicReIm]{kpfonts}
%\usepackage{siunitx}
\usepackage{booktabs}
\usepackage{float} % for fix the image position
%\usepackage{subfloat}
%\usepackage{caption} % unsupported in IEEEtran!
%\usepackage{subcaption} % for subfigures
%\usepackage{graphicx}
%\usepackage{color} % for colors
%\usepackage{epstopdf}
%\usepackage{url}
%\usepackage{hhline}%%%
%\usepackage[]{algorithm2e}
%\usepackage{amsmath} % for case bracket
%\usepackage{multirow} % for devide row
%\usepackage{multicol}
%\usepackage{subfig}
%\usepackage{cite}
%\usepackage{algorithm}
\usepackage{array}
%\usepackage{pdflscape}
\usepackage{showframe}
\usepackage{blindtext}
%\usepackage{cleveref} % <===============================================
\hyphenation{Smart Grid}
\pagenumbering{gobble} %%% for without page numbers
\newcolumntype{C}[1]{>{\centering\arraybackslash}m{#1}}
\begin{document}
\begin{table}[H]
% \centering
\small
%\tablesize{\footnotesize} % <==========================================
\caption{Comprehension of recent and relevant work.}
\label{tab:litrature}
\begin{tabular}{C{2.5cm}C{6cm}C{2.5cm}C{2.5cm}} % C
\toprule
\bf Methodologies
& \bf Features
& \bf Targets Achieved
& \bf{Limitations and Remarks} \\
\midrule
\bfseries Methodologies
& \bfseries Features
& \bfseries Targets Achieved
& \bfseries{Limitations and Remarks} \\
\midrule
\textbf{Methodologies}
& \textbf{Features}
& \textbf{Targets Achieved}
& \textbf{Limitations and Remarks} \\
\midrule
%\hline Optimal power scheduling method for DR in HEMS is presented in \cite{9} & GA & Cost and PAR reduction & Increased system complexity \\
MILP
& Optimal domestic load scheduling %\cite{35}
& Electricity cost reduction
& The cost is reduced at expense of user discomfort\\
\midrule
Greedy algorithm
& Heuristic optimization of generic cost model %\cite{6}
& Reduced user frustration and electricity cost
& The PAR is ignored and complexity of the system is increased \\
\midrule
GWO and ILP
& GWO applied to economic load dispatch problems %\cite{3}
& Load dispatching in off-peak hours
& Solved economic load dispatch (ELD) problems in the current study \\
\bottomrule
\end{tabular}
\end{table}
\Blindtext
\blindtext
\begin{table*}
\centering % <========================================================
\small
%\tablesize{\footnotesize} % <==========================================
\caption{Comprehension of recent and relevant work.}
\label{tab:litraturea}
\begin{tabular}{C{2.5cm}C{6cm}C{2.5cm}C{2.5cm}} % C
\toprule
\textbf{Methodologies}
& \textbf{Features}
& \textbf{Targets Achieved}
& \textbf{Limitations and Remarks} \\
\midrule
%\hline Optimal power scheduling method for DR in HEMS is presented in \cite{9} & GA & Cost and PAR reduction & Increased system complexity \\
MILP
& Optimal domestic load scheduling %\cite{35}
& Electricity cost reduction
& The cost is reduced at expense of user discomfort\\
\midrule
Greedy algorithm
& Heuristic optimization of generic cost model %\cite{6}
& Reduced user frustration and electricity cost
& The PAR is ignored and complexity of the system is increased \\
\midrule
GWO and ILP
& GWO applied to economic load dispatch problems %\cite{3}
& Load dispatching in off-peak hours
& Solved economic load dispatch (ELD) problems in the current study \\
\bottomrule
\end{tabular}
\end{table*}
\Blindtext
\end{document}
- 65,388
Your code has some serious issues. The fact that the C column type isn't defined is not even the most serious issue.
The
IEEEtrandocument class employs a two-column layout by default. You need to employ atable*environment instead of atableenvironment, so that the tabular material may safely span both columns.Since the
table*environment spans both columns, you might as well make use of this fact and employ atabularxenvironment instead of atabularenvironment. I suggest you use the basiclcolumn type for the left-hand column and theXcolumn type for the next three columns.The
captionandsubcaptionpackages are known not be compatible with theIEEEtrandocument class. Don't load these packages. Instead, just rely on the caption formatting algorithms provided by theIEEEtrandocument class.Do give the tabular material a more open "look", mainly by using fewer horizontal rules. Also, don't over-use bold-facing. For sure, for the table at hand, using bold-facing for the header cells risks coming across as tacky, maybe even a bit vulgar.
As already pointed out in this answer, don't load packages multiple times. In fact, do ask yourself if you really need all the packages you currently load. The code below loads only those packages that are required to make the table compilable.
\documentclass[journal]{IEEEtran}
\usepackage[classicReIm]{kpfonts}
\usepackage{booktabs,tabularx,lipsum}
\begin{document}
\begin{table*}
\caption{Summary of recent and relevant work.} \label{litrature}
\begin{tabularx}{\textwidth}{@{}lXXX@{}}
\toprule
Methodologies & Features & Targets Achieved & Limitations and Remarks \\
\midrule
%\hline Optimal power scheduling method for DR in HEMS is presented in \cite{9} & GA & Cost and PAR reduction & Increased system complexity \\
MILP& Optimal domestic load scheduling \cite{35} & Electricity cost reduction & The cost is reduced at expense of user discomfort\\
\addlinespace %\midrule
Greedy algorithm& Heuristic optimization of generic cost model \cite{6} & Reduced user frustration and electricity cost & The PAR is ignored and complexity of the system is increased \\
\addlinespace %\midrule
GWO and ILP &GWO applied to economic load dispatch problems \cite{3}& Load dispatching in off-peak hours & Solved economic load dispatch (ELD) problems in the current study \\
\bottomrule
\end{tabularx}
\end{table*}
\lipsum[1-30] % filler text
\end{document}
You need to define the C column. I took the definition from here.
\documentclass[journal]{IEEEtran}
\usepackage{siunitx,booktabs}
\usepackage{float} %for fix the image position
\usepackage{amsmath} %% for case bracket
\pagenumbering{gobble} %%% for without page numbers
\usepackage{float}
\usepackage{array}
\usepackage[classicReIm]{kpfonts}
% from https://tex.stackexchange.com/a/175138/121799
\newcolumntype{C}[1]{>{\centering\arraybackslash}m{#1}}
\begin{document}
\begin{table}[H]
\centering \small
\caption{Comprehension of recent and relevant work.} \label{litrature}
\begin{tabular}{C{2.5cm}C{6cm}C{2.5cm}C{2.5cm}}
\toprule
\textbf{Methodologies } & \textbf{Features}&\textbf{Targets Achieved}&\bf{Limitations and Remarks} \\
\midrule
%\hline Optimal power scheduling method for DR in HEMS is presented in \cite{9} & GA & Cost and PAR reduction & Increased system complexity \\
MILP& Optimal domestic load scheduling \cite{35} & Electricity cost reduction & The cost is reduced at expense of user discomfort\\
\midrule
Greedy algorithm& Heuristic optimization of generic cost model \cite{6} & Reduced user frustration and electricity cost & The PAR is ignored and complexity of the system is increased \\
\midrule
GWO and ILP &GWO applied to economic load dispatch problems \cite{3}& Load dispatching in off-peak hours & Solved economic load dispatch (ELD) problems in the current study \\ \bottomrule
\end{tabular}
\end{table}
\end{document}
-
1The fact that the caption is not centered over the table should be a give-away that the document class employs two-column mode. Hence, do please inform the OP that he/she should be using a
table*environment, to let the material span both columns. – Mico Apr 16 '19 at 06:54





IEEEtrandocument class, employing thecaptionandsubcaptionpackages is not recommended. Depending on the options with whichcaptionis loaded, you may experience some serious conflicts and may not be able to compile your document successfully. – Mico Apr 16 '19 at 06:33