我正在尝试在附录中添加精美的标题。我编写的代码适用于除 \appendixpage 之后的第一页之外的所有页面。任何建议都将不胜感激。
\documentclass[11pt, twoside]{article}
\usepackage{blindtext}
% -- Headers and Footers --
\usepackage{fancyhdr} % allow headers and footers
\pagestyle{fancy}
\renewcommand{\sectionmark}[1]{\markboth{#1}{}}
\fancyhf{}
\fancyhead[LE,RO]{\thepage}
\fancyhead[RE, LO]{{\MakeUppercase{\leftmark}}}
\fancyfoot[RE,LO]{Desciption}
\fancyfoot[LE,RO]{Logo}
\renewcommand{\footrulewidth}{1pt}
\footskip = 45pt
\fancypagestyle{appendix}{%
\fancyhead{}
\fancyfoot{}
\fancyhead[LE,RO]{\thepage}
\fancyhead[RE,LO]{\MakeUppercase{\rightmark}}
\fancyfoot[RE,LO]{Description}
\fancyfoot[LE,RO]{Logo}
\renewcommand{\footrulewidth}{1pt}
\footskip = 45pt
\fancyheadoffset{1.8 cm}
\fancyfootoffset{1.8 cm}
}
% - Appendices -
\usepackage[toc,page]{appendix}
\renewcommand{\appendixtocname}{Appendices}
\renewcommand{\appendixpagename}{\vspace*{3cm}\centering \huge Appendices\vspace*{\fill} \clearpage}
\newcommand{\appsubsection}[1]{% Trying to remove blank page before pdf (can't get headers to work)
% \par\refstepcounter{subsection}% Increase subsection counter
% \subsectionmark{#1}% Add subsection mark (header)
% \addcontentsline{toc}{subsection}{\protect\numberline{\thesubsection}#1}% Add subsection to ToC
\subsection{#1}
}
\usepackage{pdfpages} % insert pdf files into document
\begin{document}
\pagestyle{fancy}
\tableofcontents
\clearpage
\section{Main Section}
\blindtext[1]
\subsection{Interesting Subsection}
\blindtext[1]
\clearpage
% To get an A
\renewcommand{\thesubsection}{A.\arabic{subsection}}
\pagestyle{appendix}
\begin{appendices}
\clearpage
\subsection{First Appendix}
\includepdf[scale=0.9, pages=-, offset=.3in -0.5in, pagecommand={\thispagestyle{appendix}}]
{sample.pdf}
\clearpage
\subsection{Second Appendix}
\includepdf[scale=0.9, pages=-, offset=.3in -0.5in, pagecommand={\thispagestyle{appendix}}]
{sample.pdf}
\end{appendices}
\end{document}
'''