LNCS 형식을 위해 라텍스에서 두 개의 테이블을 병렬로 유지하려고 합니다. 또한 언급 한대로 시도해 보았습니다.이 답변. 하지만 정말 잘못된 형식의 테이블이 표시됩니다. 코드와 결과는 다음과 같습니다.
\begin{table}
\parbox{.4\linewidth}{
\centering
\begin{tabular}{l}
\hline
\textbf{Eliminate($D_s$):}\\
\textbf{Input:} ~Subspace $D_s \subseteq D$\\
\textbf{Output:} None\\
\hline
1.~\textbf{if} $D_s$ is not marked as \textbf{\textit{eliminated}} \textbf{then}\\
2.~~~~~Mark $D_s$ as \textbf{\textit{eliminated}}\\
3.~~~~~\textbf{for each} $D'_s \subset D_s$ such that $|D_s|-|D'_s|=1$ \textbf{do}\\
4.~~~~~~~~~$Eliminate(D'_s)$\\
5.~~~~~\textbf{end for}\\
6.~\textbf{end if}\\
\hline
\end{tabular}
\caption{Eliminate Function}
\label{topdown_2}
}
\hfill
\parbox{.4\linewidth}{
\centering
\begin{tabular}{l}
\hline
\textbf{NonISQ($D_1$, $D_2$):}\\
\textbf{Input:} ~Subspaces $D_1, D_2 \subseteq D$\\
\textbf{Output:} None\\
\hline
1.~Let $D_s = D_1 \cup D_2$\\
2.~\textbf{if} $D_s$ is not marked as \textbf{\textit{eliminated}} \textbf{then}\\
2.~~~~~Mark $D_s$ as \textbf{\textit{non-ISQ}}\\
3.~~~~~\textbf{for each} $D'_s \subset D_s$ such that\\
~~~~~~~~~~~~~~$\exists q \in D_2$ and $q \in D_s$ \textbf{do}\\
4.~~~~~~~~~$NonISQ(D'_s)$\\
5.~~~~~\textbf{end for}\\
6.~\textbf{end if}\\
\hline
\end{tabular}
\caption{NonISQ Function}
\label{topdown_3}
}
\end{table}
답변1
그 테이블을 나란히 놓으려면 크기를 조정해야 한다고 생각합니다.
\documentclass{book}
\usepackage{graphicx}
\begin{document}
\begin{table}
\parbox{.45\linewidth}{
\centering
\scalebox{.6}{%
\begin{tabular}{l}
\hline
\textbf{Eliminate($D_s$):}\\
\textbf{Input:} ~Subspace $D_s \subseteq D$\\
\textbf{Output:} None\\
\hline
1.~\textbf{if} $D_s$ is not marked as \textbf{\textit{eliminated}} \textbf{then}\\
2.~~~~~Mark $D_s$ as \textbf{\textit{eliminated}}\\
3.~~~~~\textbf{for each} $D'_s \subset D_s$ such that $|D_s|-|D'_s|=1$ \textbf{do}\\
4.~~~~~~~~~$Eliminate(D'_s)$\\
5.~~~~~\textbf{end for}\\
6.~\textbf{end if}\\
\hline
\end{tabular}
}
\caption{Eliminate Function}
\label{topdown_2}
}
\hfill
\parbox{.45\linewidth}{
\centering
\scalebox{.6}{%
\begin{tabular}{l}
\hline
\textbf{NonISQ($D_1$, $D_2$):}\\
\textbf{Input:} ~Subspaces $D_1, D_2 \subseteq D$\\
\textbf{Output:} None\\
\hline
1.~Let $D_s = D_1 \cup D_2$\\
2.~\textbf{if} $D_s$ is not marked as \textbf{\textit{eliminated}} \textbf{then}\\
2.~~~~~Mark $D_s$ as \textbf{\textit{non-ISQ}}\\
3.~~~~~\textbf{for each} $D'_s \subset D_s$ such that\\
~~~~~~~~~~~~~~$\exists q \in D_2$ and $q \in D_s$ \textbf{do}\\
4.~~~~~~~~~$NonISQ(D'_s)$\\
5.~~~~~\textbf{end for}\\
6.~\textbf{end if}\\
\hline
\end{tabular}
}
\caption{NonISQ Function}
\label{topdown_3}
}
\end{table}
\end{document}