我尝试生成仅包含页眉和页脚的页面但始终收到我无法理解的错误。
错误太详细,无法附加,但这是我的代码。
如果我附加哪怕一小段代码,它也能完美运行。
我只需要确保我永远不能单独生成页眉和页脚以供将来参考。
\documentclass{article}%
\usepackage[T1]{fontenc}%
\usepackage[utf8]{inputenc}%
\usepackage{lmodern}%
\usepackage{textcomp}%
\usepackage{lastpage}%
\usepackage{geometry}%
\geometry{head=120pt,foot=40pt,margin=0.5in,bottom=0.6in,includeheadfoot=True}%
\usepackage{fancyhdr}%
\usepackage{ragged2e}%
\usepackage{graphicx}%
\usepackage{tabularx}%
\usepackage[table]{xcolor}%
%
\fancypagestyle{firstpage}{%
\renewcommand{\headrulewidth}{0pt}%
\renewcommand{\footrulewidth}{0pt}%
\fancyhead{%
}%
\fancyfoot{%
}%
\fancyhead[L]{%
\begin{minipage}[c]{0.49\textwidth}%
\includegraphics[width=120px]{fuoye_logo.png}%
\end{minipage}%
}%
\fancyhead[R]{%
\begin{minipage}[c]{0.49\textwidth}%
\flushright%
\begin{Large}%
\textbf{Bank Account Statement}%
\end{Large}%
\linebreak%
\begin{large}%
\textbf{Date}%
\end{large}%
\end{minipage}%
}%
\fancyfoot[C]{%
\begin{tabularx}{\textwidth}{X X X X}%
\multicolumn{4}{l}{\textcolor{blue}{%
Important message please read%
}}\\%
\arrayrulecolor{blue}%
\hline%
&&&\\%
\begin{minipage}[t]{0.25\textwidth}%
960 {-} 22nd street east%
\newline%
%
Saskatoon, SK%
\end{minipage}&\begin{minipage}[t]{0.25\textwidth}%
960 {-} 22nd street east%
\newline%
%
Saskatoon, SK%
\end{minipage}&\begin{minipage}[t]{0.25\textwidth}%
960 {-} 22nd street east%
\newline%
%
Saskatoon, SK%
\end{minipage}&\begin{minipage}[t]{0.25\textwidth}%
\flushright%
1000%
\linebreak%
Page \thepage\ of \pageref{LastPage}%
\end{minipage}\\%
\end{tabularx}%
}%
}%
%
\begin{document}%
\normalsize%
\pagestyle{firstpage}%
\end{document}