我正在使用 pdfTeX,版本 3.1415926-2.6-1.40.14(TeX Live 2014/dev),我想为自己制作一个报告模板。除了不了解 TeX/LaTeX 内部工作原理外,我遇到的问题还与附录包有关,我将解释:在序言中,当我导入附录包时,我为其提供了选项目录和页,正如预期的那样,它将附录添加到目录中,并插入一页,内容如下附录在我有的地方的文档中附录环境。问题是,在包含文字的页面后面的空白页上附录,如下图所示,页码没有显示,但我希望它能显示。我想知道如何在空白页上启用页码显示。
注意:没有页码的空白页是文档的最后一页,因为它只是我想要构建的模板,但即使附录中有实际内容,我也遇到了同样的问题。
梅威瑟:
\documentclass[a4paper, 12pt, twoside, openright]{report}
%% make the bibliography appear in the table of contents
\usepackage[nottoc]{tocbibind}
%% for the appendix
\usepackage[toc, page]{appendix}
% toc: put a header in the Table of Contents
% page: puts a title page in the document where the appendix begins
\begin{document}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% pages with roman numbering
\renewcommand{\thepage}{\roman{page}} % set the pages numbering to roman
%% import the title page
\input{ab-Title/a-TitlePage}
%% create the table of contents
\tableofcontents
\cleardoublepage
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% pages with arabic numbering
\renewcommand{\thepage}{\arabic{page}} % set the page numbering to arabic
\setcounter{page}{1} % reset to 1 the page numbering
%% first chapter
\chapter{Dummy Chapter}
\label{chap:Chap1}
\input{ac-Chapter1/a-Chapter1Main}
%% add the appendix
% the following commands allows one to change from english word Appendix
% to the equivalent word in another language
%\renewcommand{\appendixtocname}{Annexes} % for how it should appear in the table of contents
%\renewcommand{\appendixpagename}{Annexes} % for how it should appear on the separation page
\begin{appendices}
% add the appendix
\input{zy-Appendix/a-Appendix}
\end{appendices}
\end{document}
答案1
软件包的作者appendix
决定此页面应为空,但您可以使用软件包 etoolbox 更改此设置。
您可以在如何在文档中使用页码?.
当在一个文档中使用不同的语言时,应该使用包babel
的接口。
\documentclass[a4paper, 12pt, twoside, openright]{report}
\usepackage[toc, page]{appendix}
\usepackage{blindtext}
\usepackage{etoolbox}
\usepackage[ngerman,english]{babel}
\addto\captionsngerman{
\renewcommand{\appendixtocname}{Anh\"ange}
\renewcommand{\appendixpagename}{Anh\"ange}
}
\tracingpatches
\makeatletter
\patchcmd{\@chap@pppage}{empty}{plain}{}{}
\makeatother
\begin{document}
\pagenumbering{roman}
\tableofcontents
\cleardoublepage
\pagenumbering{arabic}
\blinddocument
%\selectlanguage{ngerman}
\begin{appendices}
% add the appendix
\blinddocument
\end{appendices}
\end{document}