我已经用\begin{titlepage}
命令创建了标题页,我想在它周围放置一个方框。我试过fbox
、framebox
和makebox
其他几个,但没有一个能把框架放在整个页面周围。唯一有效的包fancybox
是
\thisfancyput(3.15in,-4.5in){%
\setlength{\unitlength}{2.65cm}\fancyoval}%(7,9.7)}%
但问题是我不想要椭圆形框。我只需要一个像 Word 那样的单页边框。我的标题页是这样的:
\begin{titlepage}
\begin{center}
% Upper part of the page
\textsc{\LARGE University}\\[2.5cm]
\textsc{\Large Project}\\[3cm]
% Title
\HRule \\[0.4cm]
{ \huge \bfseries Title}\\[0.4cm]
\HRule \\[4cm]
\begin{minipage}{0.45\textwidth}
\begin{flushleft} \large
\emph{Author:}\\
name \textsc{name}
\end{flushleft}
\end{minipage}
\begin{minipage}{0.45\textwidth}
\begin{flushright} \large
\emph{Supervisor:} \\
name \textsc{name}
\end{flushright}
\end{minipage}
\vfill
% Bottom of the page
{\large \today}
\end{center}
\end{titlepage}
答案1
可能是这样的:
\documentclass{report}
\usepackage{tikz}
\usetikzlibrary{calc}
\newcommand\HRule{\rule{\textwidth}{1pt}}
\begin{document}
\begin{titlepage}
\begin{tikzpicture}[remember picture, overlay]
\draw[line width = 4pt] ($(current page.north west) + (1in,-1in)$) rectangle ($(current page.south east) + (-1in,1in)$);
\end{tikzpicture}
\begin{center}
% Upper part of the page
\textsc{\LARGE University}\\[2.5cm]
\textsc{\Large Project}\\[3cm]
% Title
\HRule \\[0.4cm]
{ \huge \bfseries Title}\\[0.4cm]
\HRule \\[4cm]
\begin{minipage}{0.45\textwidth}
\begin{flushleft} \large
\emph{Author:}\\
name \textsc{name}
\end{flushleft}
\end{minipage}
\begin{minipage}{0.45\textwidth}
\begin{flushright} \large
\emph{Supervisor:} \\
name \textsc{name}
\end{flushright}
\end{minipage}
\vfill
% Bottom of the page
{\large \today}
\end{center}
\end{titlepage}
\end{document}