在我的论文中,没有在每章的第一页获得页码。
论文中用到的定义如下(formatAndDefs.tex
):
\usepackage{amsmath,amssymb} % AMS Math
% \usepackage[french]{babel}
\usepackage[latin1]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[left=1.5in,right=1.3in,top=1.1in,bottom=1.1in,includefoot,includehead,headheight=13.6pt]{geometry}
\renewcommand{\baselinestretch}{1.05}
%\linespread{1.25} %%%smita
% Table of contents for each chapter
\usepackage[nottoc, notlof, notlot]{tocbibind}
\usepackage{minitoc}
\setcounter{minitocdepth}{2}
\mtcindent=15pt
% Use \minitoc where to put a table of contents
\usepackage{aecompl}
% Glossary / list of abbreviations
\usepackage[intoc]{nomencl}
\renewcommand{\nomname}{List of Abbreviations}
\makenomenclature
% My pdf code
\usepackage{ifpdf}
\ifpdf
\usepackage[pdftex]{graphicx}
\DeclareGraphicsExtensions{.jpg}
\usepackage[a4paper,pagebackref,hyperindex=true]{hyperref}
\else
\usepackage{graphicx}
\DeclareGraphicsExtensions{.ps,.eps}
\usepackage[a4paper,dvipdfm,pagebackref,hyperindex=true]{hyperref}
\fi
\graphicspath{{.}{images/}}
% nicer backref links
\renewcommand*{\backref}[1]{}
\renewcommand*{\backrefalt}[4]{%
\ifcase #1 %
(Not cited.)%
\or
(Cited on page~#2.)%
\else
(Cited on pages~#2.)%
\fi}
\renewcommand*{\backrefsep}{, }
\renewcommand*{\backreftwosep}{ and~}
\renewcommand*{\backreflastsep}{ and~}
% Links in pdf
\usepackage{color}
\definecolor{linkcol}{rgb}{0,0,0.4}
\definecolor{citecol}{rgb}{0.5,0,0}
\hypersetup
{
bookmarksopen=true,
pdftitle="Design of low power digital circuits using deep submicron technology",
pdfauthor="Smita Singhal",
pdfsubject="Low power cmos design", %subject of the document
pdfmenubar=true, %menubar shown
pdfhighlight=/O, %effect of clicking on a link
colorlinks=true, %couleurs sur les liens hypertextes
pdfpagemode=None, %aucun mode de page
pdfpagelayout=SinglePage, %ouverture en simple page
pdffitwindow=true, %pages ouvertes entierement dans toute la fenetre
linkcolor=linkcol, %couleur des liens hypertextes internes
citecolor=citecol, %couleur des liens pour les citations
urlcolor=linkcol %couleur des liens pour les url
}
% definitions.
% -------------------
\setcounter{secnumdepth}{3}
\setcounter{tocdepth}{2}
% Some useful commands and shortcut for maths: partial derivative and stuff
\newcommand{\pd}[2]{\frac{\partial #1}{\partial #2}}
\def\abs{\operatorname{abs}}
\def\argmax{\operatornamewithlimits{arg\,max}}
\def\argmin{\operatornamewithlimits{arg\,min}}
\def\diag{\operatorname{Diag}}
\newcommand{\eqRef}[1]{(\ref{#1})}
\usepackage{rotating} % Sideways of figures & tables
\usepackage{fancyhdr} % Fancy Header and Footer
%%% Fancy Header %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Fancy Header Style Options
\pagestyle{fancy} % Sets fancy header and footer
\fancyfoot{} % Delete current footer settings
\fancyhead{} %by smita
\fancyfoot[C]{\bfseries\thepage} %%%%by smita:
% pages and right on odd pages
\fancyhead[RE]{\bfseries\nouppercase{\leftmark}} % Chapter in the right on even pages
\fancyhead[LO]{\bfseries\nouppercase{\rightmark}} % Section in the left on odd pages
\let\headruleORIG\headrule
\renewcommand{\headrule}{\color{black} \headruleORIG}
\renewcommand{\headrulewidth}{1.0pt}
\usepackage{colortbl}
\arrayrulecolor{black}
\fancypagestyle{plain}{
\fancyhead{}
\fancyfoot{}
\renewcommand{\headrulewidth}{0pt}
}
\usepackage{algorithm}
\usepackage[noend]{algorithmic}
%%% Clear Header %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Clear Header Style on the Last Empty Odd pages
\makeatletter
\def\cleardoublepage{\clearpage\if@twoside \ifodd\c@page\else%
\hbox{}%
\thispagestyle{empty}% % Empty header styles
\newpage%
\if@twocolumn\hbox{}\newpage\fi\fi\fi}
\makeatother
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Prints your review date and 'Draft Version' (From Josullvn, CS, CMU)
\newcommand{\reviewtimetoday}[2]{\special{!userdict begin
/bop-hook{gsave 20 710 translate 45 rotate 0.8 setgray
/Times-Roman findfont 12 scalefont setfont 0 0 moveto (#1) show
0 -12 moveto (#2) show grestore}def end}}
% You can turn on or off this option.
% \reviewtimetoday{\today}{Draft Version}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\newenvironment{maxime}[1]
{
\vspace*{0cm}
\hfill
\begin{minipage}{0.5\textwidth}%
%\rule[0.5ex]{\textwidth}{0.1mm}\\%
\hrulefill $\:$ {\bf #1}\\
%\vspace*{-0.25cm}
\it
}%
{%
\hrulefill
\vspace*{0.5cm}%
\end{minipage}
}
\let\minitocORIG\minitoc
\renewcommand{\minitoc}{\minitocORIG \vspace{1.5em}}
\usepackage{multirow}
\usepackage{slashbox}
\newenvironment{bulletList}%
{ \begin{list}%
{$\bullet$}%
{\setlength{\labelwidth}{25pt}%
\setlength{\leftmargin}{30pt}%
\setlength{\itemsep}{\parsep}}}%
{ \end{list} }
\newtheorem{definition}{Définition}
\renewcommand{\epsilon}{\varepsilon}
% centered page environment
\newenvironment{vcenterpage}
{\newpage\vspace*{\fill}\renewcommand{\headrulewidth}{0pt}} %%Smita
{\vspace*{\fill}}
文件Thesis.tex
包括:
\documentclass[a4paper,12pt,twoside, openany]{ThesisStyle}
\usepackage{fixltx2e}
\providecommand{\e}[1]{\ensuremath{\times 10^{#1}}}
\newcommand\tsub[1]{\textsubscript{#1}}
\newcommand\tsup[1]{\textsuperscript{#1}}
\include{formatAndDefs}
\usepackage{setspace}
\usepackage{subfigure}% Support for small, `sub' figures and tables
\usepackage{titlesec}
\usepackage[font=small,labelfont=bf]{caption}
\usepackage{enumitem}
\titlespacing\section{0pt}{12pt plus 4pt minus 2pt}{0pt plus 2pt minus 2pt}
\titlespacing\subsection{0pt}{12pt plus 4pt minus 2pt}{0pt plus 2pt minus 2pt}
\titlespacing\subsubsection{0pt}{12pt plus 4pt minus 2pt}{0pt plus 2pt minus 2pt}
\begin{document}
\setstretch{1.5}
\begingroup
\let\cleardoublepage\clearpage
\include{TitlePage2}
\endgroup
\dominitoc
\pagenumbering{roman}
\setcounter{page}{2}
\begingroup
\let\cleardoublepage\clearpage
\tableofcontents
\listoffigures
\listoftables
\endgroup
\mainmatter
\include{chapters/chapter1}
\include{chapters/chapter2}
\include{chapters/chapter3}
\include{chapters/chapter4}
\include{chapters/chapter5}
\include{chapters/chapter6}
%\appendix
%\include{Appendix1}
%\bibliographystyle{ThesisStyle}
\bibliographystyle{IEEEtran/bibtex/IEEEtran}
\bibliography{mybib}
\include{publications}
\end{document}
答案1
你好,ssinghal,欢迎来到 TeX-SE。
正如您在问题评论中所说,请修改您的代码并在此处仅发布问题所需的最少内容。如果您在组合软件包时遇到一些问题,请提出有关它的具体问题。
当有人使用大量的包和其他配置时,清楚地识别问题就会变得有点混乱。
话虽如此,我还是假设您的ThesisStyle
是该类的一些变体book
(选项似乎基本相同)。本书class
总是使用pagestyle
plain
章节开始的页面。按您想要的方式定义包含章节的页面的一种简单方法是使用pagestyle
plain
包修改fancyhdr
。
以下代码有一些注释选项,可让您更轻松、更快速地测试它们。基本上\pagestyle{headings}
定义了整个文档的样式并\fancypagestyle{plain}{...}
定义了带有章节的页面的样式。
该行使用页码\fancyhead[RO,LE]{\thepage}
设置页面的右奇数和左偶数页眉。如果您使用openany
该类的选项,则这是必需的book
。我建议测试使用该选项openright
和其他fancyhead
组合会发生什么。
MWE 如下:
\documentclass[twoside,openany]{book}
%\documentclass[twoside,openright]{book}
\usepackage{lipsum}
\usepackage{fancyhdr}
\pagestyle{headings} % options: fancy, headings, myheadings
\fancypagestyle{plain}{
\fancyhf{} % clear all header and footer fields
\fancyhead[RO,LE]{\thepage} % Right Odd, Left Even => Outside
% Some examples
%\fancyhead[R]{\thepage} % Right side has the page number
%\fancyhead[L]{\leftmark} % Left side has the \chapter{title}
\renewcommand{\headrulewidth}{0pt} % remove line between header and main text
}
\begin{document}
\chapter{title a}
\lipsum[1-12]
\chapter{title b}
\section{S1}
\lipsum[1-10]
\section{S2}
\lipsum[1-10]
\section{S3}
\lipsum[1-10]
\end{document}