라텍스 코딩 테이블 문제

라텍스 코딩 테이블 문제

LaTeX를 사용하여 테이블을 코딩하는 데 도움을 줄 수 있는지 궁금합니다. 나는 그것을하는 데 어려움을 겪고 있습니다.

이것은 내가 수행한 코드입니다:

\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}

여기에 이미지 설명을 입력하세요

그림과 동일한 테이블을 생성할 수 있는 코드가 필요합니다.

답변1

사진과 함께 제공한 테이블을 생성하기 위해 다음 코드를 사용했습니다(마지막에 이에 대한 몇 가지 강조 표시).

\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}

우선 caption캡션을 중앙에 배치하는 옵션을 추가하고 \captionof플로트 외부에 캡션을 생성할 수 있는 명령을 사용하기 위해 패키지를 추가했습니다.

그런 다음 각주 이름을 사진에 있는 대로 숫자에서 소문자로 변경했습니다.

표 바로 뒤에 각주를 두고 페이지 끝에 주석을 두려면 미니페이지 환경을 사용하여 표를 둘러싸는 것이 요령입니다. 미니페이지 환경이 끝나면 각주가 표시됩니다.

나는 가능한 한 사진에 가까운 모습을 얻기 위해 multirow및 기능을 가지고 놀았습니다 . multicolumn가장 어려운 것은 2줄을 3줄로 맞추는 것이었습니다. 여기서의 비결은 언급된 솔루션을 사용하는 것입니다.여기.

테이블을 채우는 작업이 아직 남아 있지만 대부분 레이아웃 부분이 완료되었습니다.

내 코드와 함께 얻은 테이블은 다음과 같습니다.획득한 테이블

관련 정보