2010-05-02 59 views
17

我有一个报告,我也有附录。 我想要的是在附录开始时在页码上使用不同的样式。我如何在乳胶中制作自定义页码?

我使用阿拉伯语,直到我到达附录。然后,我会想要做这样的事情:

我想自定义页面编号为:

Chapter: A 
Section: {Chapter}{1}  (A-1) 
\newpage 
\pagenumbering{custompagenumbering} 

这是可能的吗?

+0

要得到更准确的答案,您应该详细说明您正在查找的“自定义页面编号”的确切格式和行为。 – glts 2010-05-07 15:56:13

+0

我投票结束这个问题作为题外话,因为它是关于乳胶 – Flexo 2016-01-14 17:27:10

回答

23
Some paragraph. Some paragraph. Some paragraph. Some paragraph. Some paragraph. 

\newpage 
\setcounter{page}{1} 
\renewcommand{\thepage}{A-\arabic{page}} 

Some paragraph. Some paragraph. Some paragraph. Some paragraph. Some paragraph. 

这会在你想要做的任何地方吗?这是如何操作page计数器以及\thepage命令,该命令确定将打印为页码的内容。 \roman{page}会给罗马数字,\alph{page}一个bç ...

其他明智的解决办法是使用fancyhdr包,之前建议。

+0

+1好答案。 “fancyhdr”的例子会使这个答案非常好。 – Geoff 2010-05-07 12:08:31

+0

+1这节省了我的时间 – 2011-03-04 16:08:24

2

如果你能够使用Memoir类(我推荐),你可以使用页面样式。见Chapter 7.2 Page Styles。例如,创建两种风格:

\pagestyle{plain} % Regular page numbering 

... STUFF ... 

\clearpage % make a new page numbering down here 
\copypagestyle{AppendixPS}{plain} 
\renewcommand{\thepage}{Chapter \chapter Section \section page \page} 
\pagestyle{AppendixPS} 

我已经有一段时间没有–测试此–或使用乳胶这样做,但我希望它提供了一些精神食粮,或者至少让你在正确的轨道上。

2

首先,我将创建一个文件,其中包括所有的章节和附录等一些所谓main.tex或thesis.tex

那里你可以做所有的包括和文档设置,还您页眉和页脚的设置:

% Free Header and Footer 
\usepackage{fancyhdr} 
\lfoot[\fancyplain{}{}]{\fancyplain{}{}} 
\rfoot[\fancyplain{}{}]{\fancyplain{}{}} 
\cfoot[\fancyplain{}{\footnotesize\thepage}]{\fancyplain{}{\footnotesize\thepage}} 
\lhead[\fancyplain{}{\footnotesize\nouppercase\leftmark}]{\fancyplain{}{}} 
\chead{} 
\rhead[\fancyplain{}{}]{\fancyplain{}{\footnotesize\nouppercase\sc\leftmark}} 

这里它会使页面中心的页码成为页脚。以及标题左侧的章节标题以及右侧的章节标题。

然后你就可以开始你的包括其他章节..矿山看起来像(仍在thesis.tex):

% --- Start of Document ---------------------------------------- 
\begin{document} 

\pagenumbering{roman}  %roemische ziffern 

\pagestyle{fancy}   % Initialize Header and Footer 

\include{title}   % Title Page 
\include{affidavit}  % affidavit 
\include{abstracts}  % Englisch and German abstracts 
\include{acknowl}  % Acknowledgements 
\include{glossary}  % Glossary 
\include{abbreviation} % Abkuerzungen 
%\include{keywords}  % Keywords 
\include{toc}  % Table of Contents 

%--- Include your chapters here ---------- 
\setcounter{page}{1} % set page to 1 again to start arabic count 
\pagenumbering{arabic} 
%\include{chapter0} 
\include{chapter1}  % Introduction 
\include{chapter2}  % Background 
\include{chapter3}  % Konzeption 
\include{chapter4}  % Technische Umsetzung 
\include{chapter5} 

\include{chapter6} 

% 
%% .... 

\appendix 
\include{appendix}   % Appendix A 

\end{document} 

希望帮助!页眉和页脚有一些时间困难,有时如果你改变\ documentclass它可能会出现不同。 ;)