I am trying to create the following table (drafted in Excel) in my manuscript.
I am working with two conferences' templates (IEEE & SPLNCS), so I organize my work like so:
├── IEEEtran.cls
├── llncs.cls
├── mainIEEE.tex
├── mainLNCS.tex
├── Introdoction.tex
└── # ... other sections' tex
So that I can navigate between mainEEE.tex
and mainLNCS.tex
to compile to conference's format.
However, I have difficulty aligning this table to fit with the column of these tamplates (other tables in my doc work fine).
MWE: IEEEtran.cls and llncs.cls
%%% Introduction.tex
\section{Introduction}
\lipsum[1]
\begin{table}[ht]
\caption{Some results}
\label{tab:my_label}
\centering
\begin{tabularx}{\linewidth}{l|c|c|c|c|c|c|c|c|c|c|c|c|c|c|c|}
\toprule
Mode & \multicolumn{5}{l|}{Precision} & \multicolumn{5}{l|}{Recall} & \multicolumn{5}{l}{F1\-score} \\
\cline{2-15}
& RF & RF-SMOTEd & AdaBoost & SMOTEBoost & DECOC & RF & RF-SMOTEd & AdaBoost & SMOTEBoost & DECOC & RF & RF-SMOTEd & AdaBoost & SMOTEBoost & DECOC \\
\midrule
cat &1&2&3&4&5 &1&2&3&4&5 &1&2&3&4&5\\
\bottomrule
\end{tabularx}
\end{table}
mainLNCS.tex
output:
\documentclass[runningheads]{llncs}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{booktabs}
\usepackage{tabularx,ragged2e}
\usepackage{lipsum}
\begin{document}
\title{Manuscript Title (SPLNCS) }
\maketitle
\begin{abstract}
The abstract in 150--250 words.
\keywords{keyword1 \and keyword2}
\end{abstract}
\input{Introduction}
%\bibliographystyle{splncs04}
%\bibliography{Bib/references}
\end{document}
mainIEEE.tex
output:
\documentclass[conference]{IEEEtran}
\IEEEoverridecommandlockouts
\usepackage{booktabs}
\usepackage{lipsum}
\usepackage{tabularx,ragged2e}
\def\BibTeX{{\rm B\kern-.05em{\sc i\kern-.025em b}\kern-.08em
T\kern-.1667em\lower.7ex\hbox{E}\kern-.125emX}}
\begin{document}
\title{Conference Paper Title (IEEEtran)}
\begin{abstract}
This document is a model and instructions for \LaTeX.
This and the IEEEtran.cls ...
\end{abstract}
\begin{IEEEkeywords}
keyword1, keyword2
\end{IEEEkeywords}
\input{Introduction}
\end{document}