答案1
我不会将其称为表格,而是两个框:
\documentclass{article}
\usepackage{enumitem}
\begin{document}
\fbox{%
\begin{minipage}[t]{.45\textwidth}
\raggedright
function\_1 (a,b,c):\\
\quad answer\_1 = a + b + c\\[\baselineskip]
Where
\begin{itemize}[nosep]
\item a = param\_1
\item b = param\_2
\item c = param\_3
\end{itemize}
\end{minipage}%
}\kern-\fboxrule
\fbox{%
\begin{minipage}[t]{.45\textwidth}
\raggedright
function\_2 (d,e,f):\\
\quad answer\_2 = d + e + f\\[\baselineskip]
Where
\begin{itemize}[nosep]
\item d = param\_1
\item e = param\_2
\item f = param\_3
\end{itemize}
\end{minipage}%
}
\end{document}
但是,如果你坚持使用表格:
\documentclass{article}
\usepackage{enumitem}
\begin{document}
\begin{tabular}{|*2{p{.45\textwidth}|}}
\hline
function\_1 (a,b,c): & function\_2 (d,e,f) \\
\quad answer\_1 = a + b + c & \quad answer\_2 = d + e + f \\[\baselineskip]
Where
\begin{itemize}[nosep]
\item a = param\_1
\item b = param\_2
\item c = param\_3
\end{itemize}
&
Where
\begin{itemize}[nosep]
\item d = param\_1
\item e = param\_2
\item f = param\_3
\end{itemize}
\\
\hline
\end{tabular}
\end{document}
注意:也许对变量和和使用数学模式\text{…}
会更好。但是因为我对文本的语义不太了解,而且你没有function
展示answer
param
最小工作示例,我决定将答案简化为制作框和表格,而不是如何使内容尽可能美观。