我的 MWE:
\documentclass[a4paper]{article}
\usepackage[left=2.2cm,right=2.2cm,top=2.2cm,bottom=2.2cm]{geometry}
\usepackage{background}
\usepackage{lipsum}
\usetikzlibrary{calc}
\usepackage[magyar]{babel}
\usepackage{t1enc}
\usepackage[utf8]{inputenc}
\usepackage{indentfirst}
\frenchspacing
\newcommand\HRule{\rule{\textwidth}{1pt}}
\SetBgScale{1}
\SetBgAngle{0}
\SetBgColor{black}
\SetBgContents{
\begin{tikzpicture}[remember picture,overlay]
\draw [line width=1 pt,black]
($ (current page.north west) + (2cm,-2cm) $)
rectangle
($ (current page.south east) + (-2cm,2cm) $);
\end{tikzpicture}
}
\begin{document}
\begin{titlepage}
\begin{center}
\textsc{\Large Proba}\[2cm]
% Title
\HRule \[0.2cm]
{ \Large \bfseries proba\ proba}\[0.2cm]
\HRule \[4cm]
\begin{minipage}{0.45\textwidth}
\begin{flushleft} \large
\emph{proba}\
\end{flushleft}
\end{minipage}
\begin{minipage}{0.45\textwidth}
\begin{flushleft} \large
\emph{proba} \
\end{flushleft}
\end{minipage}
\vfill
% Bottom of the page
{\large \today}
\end{center}
\end{titlepage}
\lipsum[1-40]
\end{document}
enter code here
https://drive.google.com/open?id=1Mywq67hOYlFisV9vJrl59XCM6Kg0Euud
答案1
我修复了一些错误,这些错误很可能不是你的错:每个\\[
都只是一个\[
。并且我opacity=1
在中添加了行tikzpicture
。
\documentclass[a4paper]{article}
\usepackage[left=2.2cm,right=2.2cm,top=2.2cm,bottom=2.2cm]{geometry}
\usepackage{background}
\usepackage{lipsum}
\usetikzlibrary{calc}
\usepackage[magyar]{babel}
\usepackage{t1enc}
\usepackage[utf8]{inputenc}
\usepackage{indentfirst}
\frenchspacing
\newcommand\HRule{\rule{\textwidth}{1pt}}
\SetBgScale{1}
\SetBgAngle{0}
\SetBgColor{black}
\SetBgContents{
\begin{tikzpicture}[remember picture,overlay]
\draw [line width=1 pt,black,opacity=1]
($ (current page.north west) + (2cm,-2cm) $)
rectangle
($ (current page.south east) + (-2cm,2cm) $);
\end{tikzpicture}
}
\begin{document}
\begin{titlepage}
\begin{center}
\textsc{\Large Proba}\\[2cm]
% Title
\HRule \\[0.2cm]
{ \Large \bfseries proba\ proba}\\[0.2cm]
\HRule \\[4cm]
\begin{minipage}{0.45\textwidth}
\begin{flushleft} \large
\emph{proba}\
\end{flushleft}
\end{minipage}
\begin{minipage}{0.45\textwidth}
\begin{flushleft} \large
\emph{proba} \
\end{flushleft}
\end{minipage}
\vfill
% Bottom of the page
{\large \today}
\end{center}
\end{titlepage}
\lipsum[1-40]
\end{document}