Problem bei der Kodierungstabelle in Latex

Problem bei der Kodierungstabelle in Latex

Ich frage mich, ob Sie mir beim Codieren einer Tabelle mit LaTeX helfen können. Ich habe dabei Schwierigkeiten.

Dies ist der Code, den ich erstellt habe:

\documentclass[12pt]{article}
%\documentclass[12pt,english]{report}
\usepackage[a4paper,bindingoffset=0.2in,left=0.40in,right=0.40in,top=1in,bottom=1in,footskip=0.75in]{geometry}
\usepackage{graphicx}
\usepackage{times}
\usepackage{ifthen}
\usepackage{url}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{graphicx}
\usepackage{lipsum}
\usepackage{setspace}
\usepackage{tabularx}
\usepackage{booktabs}
\usepackage{multirow}
\usepackage{rotating}
\author{}
\title{\fontsize{18}{28}\bf {A 0-1 Integer programming Formulation for solving the College Student-project assignment problem}}
\date{\today}
\begin{document}

\maketitle
\begin{abstract}
The assignment process for graduated students at the beginning of each semester is an 

important process for all academic programs at Benghazi University. This paper presents a model that includes a number of constraints relating to the minimum and maximum number of students in each academic program and the prerequisites and corequisites for each project in each academic program. The objective is to determine a way to assign students to projects according to their preferences. A linear grade function that represents the preferences of each student is introduced to be maximized. A 0-1 integer programming formulation is proposed that was implemented using data from the 2008 fall and 2009 spring semesters in the Industrial Engineering and Manufacturing Systems Department at the University of Benghazi in Benghazi, Libya. The assignment solutions were obtained using different preference criterions and were then compared with the solutions previously obtained using a manual system.\\
\end{abstract}
\begin{table}[htb]
\begin{scriptsize}
%\renewcommand{\arraystretch}{1.3}
\caption{Comparison between IMPROVE algorithm, developed IMPROVE algorithm with other earlier approaches} \label{table_example}
\centering
\scalebox{0.84}{
\begin{tabular} {|c|p{1cm}|c|c|p{1cm}|c|p{1cm}|c|p{1cm}|c|p{1cm}|c|p{1cm}|c|c|c|c|c|c|c|c|c|}
%{\textwidth}{c @{\extracolsep{\fill}} ccccccccccccccc}
     \hline

  \begin{sideways}Case\end{sideways}& \multicolumn{1}{c}{Solution \linebreak source} & Approach &Cell &  exceptional elements&  void element & Grouping index &  Cell &  exceptional elements &  void element & Grouping index &  Cell &  exceptional elements &  void element & Grouping index \\

    \hline
1   &   Kusiak & With p=2 & 2& 19 & 246 & $0.65^b$ & 2 & 13 & 232 & 0.67 & 2 & 13 & 232 & 0.67 \\
1   &   Kusiak & With p=2 & 2& 19 & 246 & $0.65^b$ & 2 & 13 & 232 & 0.67 & 2 & 13 & 232 & 0.67 \\
1   &   Kusiak & With p=2 & 2& 19 & 246 & $0.65^b$ & 2 & 13 & 232 & 0.67 & 2 & 13 & 232 & 0.67 \\
1   &   Kusiak & With p=2 & 2& 19 & 246 & $0.65^b$ & 2 & 13 & 232 & 0.67 & 2 & 13 & 232 & 0.67 \\
1   &   Kusiak & With p=2 & 2& 19 & 246 & $0.65^b$ & 2 & 13 & 232 & 0.67 & 2 & 13 & 232 & 0.67 \\
1   &   Kusiak & With p=2 & 2& 19 & 246 & $0.65^b$ & 2 & 13 & 232 & 0.67 & 2 & 13 & 232 & 0.67 \\
1   &   Kusiak & With p=2 & 2& 19 & 246 & $0.65^b$ & 2 & 13 & 232 & 0.67 & 2 & 13 & 232 & 0.67 \\
1   &   Kusiak & With p=2 & 2& 19 & 246 & $0.65^b$ & 2 & 13 & 232 & 0.67 & 2 & 13 & 232 & 0.67 \\
    \hline
\end{tabular}
}
\end{scriptsize}
\end{table}
\end{document}

Bildbeschreibung hier eingeben

Ich brauche Code, der dieselbe Tabelle wie in der Abbildung generieren kann.

Antwort1

Zum Erstellen der Tabelle, die Sie mit Ihrem Bild bereitgestellt haben, habe ich den folgenden Code verwendet (einige Highlights dazu am Ende):

\documentclass[12pt]{article}
\usepackage[a4paper,bindingoffset=0.2in,left=0.40in,right=0.40in,top=1in,bottom=1in,footskip=0.75in]{geometry} 
\usepackage{graphicx} 
\usepackage{times}
\usepackage{ifthen} 
\usepackage{url} 
\usepackage{amsmath} 
\usepackage{amssymb} 
\usepackage{lipsum} 
\usepackage{setspace} 
\usepackage{tabularx} 
\usepackage{booktabs} 
\usepackage{multirow} 
\usepackage{rotating} 
\usepackage[justification=centering]{caption} 
\author{} 
\title{\fontsize{18}{28}\bf {A 0-1 Integer programming Formulation for solving the College Student-project assignment problem}} \date{\today}     \begin{document} 
\maketitle 
\begin{abstract} The assignment process for graduated students at the beginning of each semester is an important process for all academic programs at Benghazi University. This paper presents a model that includes a number of constraints relating to the minimum and maximum number of students in each academic program and the prerequisites and corequisites for each project in each academic program. The objective is to determine a way to assign students to projects according to their preferences. A linear grade function that represents the preferences of each student is introduced to be maximized. A 0-1 integer programming formulation is proposed that was implemented using data from the 2008 fall and 2009 spring semesters in the Industrial Engineering and Manufacturing Systems Department at the University of Benghazi in Benghazi, Libya. The assignment solutions were obtained using different preference criterions and were then compared with the solutions previously obtained using a manual system. 
\end{abstract}

\renewcommand{\thefootnote}{\alph{footnote}} 

\begin{minipage}{0.9\textwidth} 
\captionof{table}{Comparison between IMPROVE algorithm, developed IMPROVE algorithm with other earlier approaches} \label{table_example} 
\centering 
\resizebox{\textwidth}{!}{ 
\begin{tabular}{|c|cc|c|c|c|c|c|c|c|c|c|c|c|c|} 
\hline 
\multirow{5}{*}{\begin{sideways}Case\end{sideways}} & 
\multirow{5}{*}{Solution source} & 
\multirow{5}{*}{Approach} & 
\multicolumn{4}{|c|}{Performance measures of} & 
\multicolumn{4}{|c|}{Performance measures of} & 
\multicolumn{4}{|c|}{Performance measures of} \\
 & & & \multicolumn{4}{|c|}{Methods} &
\multicolumn{4}{|c|}{IMPROVE algorithm} &
\multicolumn{4}{|c|}{developed IMPROVE algorithm} \\ \cline{4-15}
 & & & \multirow{3}{*}{\begin{tabular}[c]{@{}c@{}}\#\\Cell\end{tabular}} & 
\multirow{3}{*}{\begin{tabular}[c]{@{}c@{}}\#\\exceptionnal\\element\end{tabular}} & 
\multirow{3}{*}{\begin{tabular}[c]{@{}c@{}}\# void\\element\end{tabular}} & 
\multirow{3}{*}{\begin{tabular}[c]{@{}c@{}}Grouping\\index\end{tabular}} & 
\multirow{3}{*}{\begin{tabular}[c]{@{}c@{}}\#\\Cell\end{tabular}} & 
\multirow{3}{*}{\begin{tabular}[c]{@{}c@{}}\#\\exceptionnal\\element \end{tabular}} & 
\multirow{3}{*}{\begin{tabular}[c]{@{}c@{}}\# void\\element\end{tabular}} & 
\multirow{3}{*}{\begin{tabular}[c]{@{}c@{}}Grouping\\index\end{tabular}} & 
\multirow{3}{*}{\begin{tabular}[c]{@{}c@{}}\#\\Cell\end{tabular}} & 
\multirow{3}{*}{\begin{tabular}[c]{@{}c@{}}\#\\exceptionnal\\element\end{tabular}} & 
\multirow{3}{*}{\begin{tabular}[c]{@{}c@{}}\# void\\element\end{tabular}} & 
\multirow{3}{*}{\begin{tabular}[c]{@{}c@{}}Grouping\\index\end{tabular}} \\
 & & & & & & & & & & & & & & \\
 & & & & & & & & & & & & & & \\
\hline 
1 & Kusiak & With p=2 & 2& 19\footnotemark[2] & 246 & 0.65 & 2 & 13 & 232 & 0.67 & 2 & 13 & 232 & 0.67 \\
1 & Kusiak & With p=2 & 2& 19 & 246\footnotemark[2] & 0.65 & 2 & 13 & 232 & 0.67 & 2 & 13 & 232 & 0.67 \\
1 & Kusiak & With p=2 & 2& 19 & 246 & 0.65 & 2 & 13 & 232 & 0.67 & 2 & 13 & 232 & 0.67 \\
1 & Kusiak & With p=2 & 2& 19 & 246 & 0.65 & 2 & 13 & 232 & 0.67 & 2 & 13 & 232 & 0.67 \\
1 & Kusiak & With p=2\footnotemark[1] & 2& 19 & 246 & 0.65 & 2 & 13 & 232 & 0.67 & 2 & 13 & 232 & 0.67 \\
1 & Kusiak & With p=2 & 2& 19 & 246 & 0.65 & 2 & 13 & 232 & 0.67 & 2 & 13 & 232 & 0.67 \\
1 & Kusiak & With p=2 & 2& 19 & 246 & 0.65 & 2 & 13 & 232 & 0.67 & 2 & 13 & 232 & 0.67 \\
1 & Kusiak & With p=2 & 2& 19 & 246 & 0.65 & 2 & 13 & 232 & 0.67 & 2 & 13 & 232 & 0.67 \\
\hline
\end{tabular}} 
\footnotetext[1]{$\,$ First footnote} 
\footnotetext[2]{$\,$ Second footnote} 
\end{minipage} 

\end{document}

Zunächst habe ich das captionPaket aus zwei Gründen hinzugefügt: um die Option zum Zentrieren der Beschriftung hinzuzufügen und um den \captionofBefehl zu verwenden, mit dem eine Beschriftung außerhalb eines Floats erstellt werden kann.

Ich habe die Fußnote dann von Zahl in Kleinbuchstaben umbenannt, so wie auf Deinem Bild.

Um die Fußnoten direkt nach der Tabelle und die Anmerkung am Ende der Seite zu haben, können Sie eine Minipage-Umgebung verwenden, um die Tabelle zu umgeben. Die Fußnoten werden am Ende der Minipage-Umgebung angezeigt.

multirowIch habe mit den Funktionen und herumgespielt, multicolumnum einen Aspekt zu erhalten, der Ihrem Bild so nahe wie möglich kommt. Am schwierigsten war es, 2 Zeilen in 3 zu packen. Der Trick besteht hier darin, die erwähnte Lösung zu verwendenHier.

Es muss noch etwas Arbeit geleistet werden, um die Tabelle zu füllen, aber der Layout-Teil ist größtenteils fertig.

Hier ist die Tabelle, die ich mit meinem Code erhalten habe:Die erhaltene Tabelle

verwandte Informationen