如何在我的标题上添加方框? 只是在我的标题页上添加一个方框(如图所示)?
亲切的问候
答案1
可以通过简单tabular
使用全文宽度来完成:
\documentclass{article}
\usepackage{array}%
\begin{document}
\noindent
\begingroup
\bfseries
\renewcommand*{\arraystretch}{1.2}%
\begin{tabular}{|*{2}{p{.5\dimexpr\linewidth-4\tabcolsep-2\arrayrulewidth\relax}}|}
\hline
Received: & Approved: \\
& Date: \\
& Signature: \\
(for the instructor) & \\
\hline
\end{tabular}%
\endgroup
\end{document}
评论:
- 包
array
会改变有关规则的计算。我已将其添加为独立项,无论是否已加载(因为它始终已加载)。
框架\fbox
类似,但包含来自以下行\fbox
:
\documentclass{article}
\begin{document}
\noindent
\fbox{%
\bfseries
\parbox{\dimexpr\linewidth-2\fboxsep-2\fboxrule\relax}{%
\renewcommand*{\arraystretch}{1.2}%
\begin{tabular}{@{} *{2}{p{.5\dimexpr\linewidth-2\tabcolsep\relax}} @{}}
Received: & Approved: \\
& Date: \\
& Signature: \\
(for the instructor) & \\
\end{tabular}%
}%
}
\medskip
\noindent
\fbox{%
\bfseries
\renewcommand*{\arraystretch}{1.2}%
\begin{tabular}{@{} *{2}{p{.5\dimexpr\linewidth-2\fboxsep-2\fboxrule-2\tabcolsep\relax}} @{}}
Received: & Approved: \\
& Date: \\
& Signature: \\
(for the instructor) & \\
\end{tabular}%
}
\end{document}
评论:
\parbox
更新\linewidth
当前可用宽度。