我需要以某种方式调整列分隔线以接触框架线,从而看起来像表格环境。
我对使用表格环境来实现此目的不感兴趣,因为枚举不太适合它。(例如,项目编号位于表格的中间(垂直),而不是来自表格的左上角。
如何实现这一点?
到目前为止,我尝试使用
framed
环境来获取边框,并调整rule
命令以垂直分割框架环境。现在我还需要水平分割,但我无法实现。
梅威瑟:
\documentclass[a4paper,11pt]{article}
\oddsidemargin 0in \evensidemargin 0in \topmargin 0in \textheight 9.2in \textwidth 6.5in
\usepackage{enumitem, lipsum,xcolor}
\usepackage{framed}
\newlength{\framedline}
\setlength{\framedline}{\textwidth plus 18pt}
\let\oldrule\rule
\renewcommand{\rule}[2]{
\hspace*{-36.7pt}\oldrule{\framedline}{0.4pt}\newline
}
\usepackage{multicol}
\setlength{\columnseprule}{1pt}
\begin{document}
\begin{center}\bfseries
PROGRESS REPORT OF THE PROJECT \\
YEAR: 2015-2017(2 years)
\end{center}
\begin{framed}
\begin{enumerate}
\item \begin{multicols}{2}
\lipsum[1]
\end{multicols}\rule\\
\item \begin{multicols}{2}
\lipsum[1]
\end{multicols}\rule
\lipsum[1-20]
%
\end{enumerate}
\end{framed}
\end{document}
我的报告应该是这样的:
电流输出:
答案1
一种方法是使用tcolorbox
:
\documentclass[a4paper]{article}
\usepackage[margin=2cm]{geometry}
\usepackage{lipsum}
\usepackage{ulem}
\usepackage[shortlabels]{enumitem}
\usepackage[most]{tcolorbox}
\tcbuselibrary{breakable}
\newtcolorbox{rowtable}[1][]{%
breakable,enhanced,nobeforeafter,colback=white,
boxsep=1em, after skip=0pt,before skip=-1pt,
arc=0mm,boxrule=1pt, segmentation style={solid,}}
\newtcolorbox{rowcell}[1][]{%
enhanced,nobeforeafter, colback=white, boxsep=1em,
after skip=0pt,before skip=-1pt,arc=0mm,boxrule=1pt,
left skip=0pt,right skip=0pt, segmentation style={solid,}}
\begin{document}
\sffamily
\begin{tcolorbox}[sidebyside,enhanced,nobeforeafter,
colback=white, boxsep=1em, after skip=0pt,before skip=-1pt,
arc=0mm,boxrule=1pt,left skip=0pt,right skip=0pt,
segmentation style={solid}]
Date of start of project: \today
\tcblower
Total cost of project: \par INR 0,000,000.00
\end{tcolorbox}
\begin{rowtable}
\section{foo}
\begin{enumerate}
\item \lipsum[1]
\begin{enumerate}
\item \lipsum[2]
\item \lipsum[3]
\end{enumerate}
\tcbline \item \lipsum[4]
\tcbline \item \lipsum[5]
\tcbline \item \lipsum[6-7]
\tcbline \item \lipsum[8]
\end{enumerate}
\end{rowtable}
\begin{rowtable}
\section{Some more} \lipsum[9]
\end{rowtable}
\begin{tcbraster}[raster columns=3,raster equal height,raster equal skip=-2pt]
\begin{rowcell} This \end{rowcell}%
\begin{rowcell} is \end{rowcell}%
\begin{rowcell}The end \end{rowcell}%
\end{tcbraster}
\end{document}