Merge 后我无法在表格环境中写入长文本。我的代码是:
\documentclass{article}
\usepackage{ragged2e}
\usepackage{array}
\usepackage{multirow}
\begin{document}
\begin{table}[!htb]
\begin{tabular}{p{0.45\textwidth}p{0.5\textwidth}}
\hline
A R T I C L E I N F O & A B S T R A C T\\ \cline{1-1}
Article history: & \multirow{1}{0.5\textwidth}{\justifying This is a sample text. This is a sample text. This is a sample text. This is a sample text. This is a sample text. This is a sample text. This is a sample text. This is a sample text. This is a sample text. This is a sample text. This is a sample text. This is a sample text. This is a sample text. This is a sample text. This is a sample text. This is a sample text. This is a sample text. This is a sample text. This is a sample text. This is a sample text.. This is a sample text. This is a sample text. This is a sample text. This is a sample text. This is a sample text. This is a sample text. This is a sample text. This is a sample text. This is a sample text} \\
Received 1 May 2018 & \\
Revised 26 July 2018 & \\
Accepted 25 August 2018 & \\
Available online 20 September 2018 & \\
& \\ \cline{1-1}
Keywords: & \\
Bi-level linear programming & \\
Fuzzy programming & \\
TOPSIS\\
Compromise solution & \\
& \\ \hline
\end{tabular}
\end{table}
\end{document}
有什么建议吗?
答案1
正如评论中提到的,这里有一个使用 minpages 的解决方案:
\documentclass{article}
\usepackage{booktabs}
\begin{document}
\noindent\begin{minipage}{\linewidth}
\rule{\textwidth}{0.4pt}
\begin{minipage}[t]{0.5\textwidth}
\begin{tabular}[t]{l}
A R T I C L E I N F O \\
\midrule
Article history: \\
Received 1 May 2018 \\
Revised 26 July 2018 \\
Accepted 25 August 2018 \\
Available online 20 September 2018 \\
\midrule
Keywords: \\
Bi-level linear programming \\
Fuzzy programming \\
TOPSIS\\
Compromise solution \\
\end{tabular}
\end{minipage}%
\begin{minipage}[t]{0.5\textwidth}
A B S T R A C T
This is a sample text. This is a sample text. This is a sample text. This is a sample text. This is a sample text. This is a sample text. This is a sample text. This is a sample text. This is a sample text. This is a sample text. This is a sample text. This is a sample text. This is a sample text. This is a sample text. This is a sample text. This is a sample text. This is a sample text. This is a sample text. This is a sample text. This is a sample text.. This is a sample text. This is a sample text. This is a sample text. This is a sample text. This is a sample text. This is a sample text. This is a sample text. This is a sample text. This is a sample text
\end{minipage}
\rule{\textwidth}{0.4pt}
\end{minipage}
\end{document}
答案2
下面是一个 MWE,我使用嵌套制表符来实现效果。文本与页边距齐平,并使用书形制表符来获得更好的间距。此外,我建议使用微字体来设置字母间距。如果您更喜欢缩进的文本,只需将行
\setlength{\tabcolsep}{0.0em}
到
\setlength{\tabcolsep}{0.5em}
然后,您需要使用一个来扩展两个文本块(“关键字:”上方)之间的规则\tabcolsep
,IE.:
\\ \cmidrule(l{-\tabcolsep}){1-1}
\documentclass{article}
\usepackage{ragged2e}
\usepackage{lmodern}
\usepackage{microtype}
\usepackage{array, booktabs}
\usepackage{multirow}
% Multi-line left-aligned text with manual line breaks.
% The base line of the whole is at the top row.
\newcommand*{\tstack}[1]{%
\begingroup
\renewcommand*{\arraystretch}{1}%
\begin{tabular}[t]{@{}l@{}}#1\end{tabular}%
\endgroup
}
\setlength{\tabcolsep}{0.0em}
\begin{document}
\begin{table}[!htb]
\begin{tabular*}{\linewidth}{@{\extracolsep{\fill}}p{0.45\textwidth}p{0.5\textwidth}}
\toprule
\lsstyle ARTICLE INFO & \lsstyle ABSTACT\\ \cmidrule{1-1}
\tstack{\emph{Article history}:\\
Received 1 May 2018 \\
Revised 26 July 2018 \\
Accepted 25 August 2018 \\
Available online 20 September 2018 \\
\\ \cmidrule{1-1}
\emph{Keywords}: \\
Bi-level linear programming \\
Fuzzy programming \\
\textls{\textsc{topsis}}\\
Compromise solution \\
} &
This is a sample text. This is a sample text. This is a sample text. This is a sample text. This is a sample text. This is a sample text. This is a sample text. This is a sample text. This is a sample text. This is a sample text. This is a sample text. This is a sample text. This is a sample text. This is a sample text. This is a sample text. This is a sample text. This is a sample text. This is a sample text. This is a sample text. This is a sample text.. This is a sample text. This is a sample text. This is a sample text. This is a sample text. This is a sample text. This is a sample text. This is a sample text. This is a sample text. This is a sample text
\\ \bottomrule
\end{tabular*}
\end{table}
\end{document}