清除选项冲突错误

清除选项冲突错误

我正在使用模板创建课程大纲。该包需要一个 .sty 文件,我将其放在同一个文件夹中。无论我怎么尝试,我都无法清除错误:“第 53 行的包颜色选项冲突”。我读到这与重复的包有关,但我不知道它在哪里。任何帮助都表示感谢。[.sty 文件也在下面]

%
% 
%
\documentclass[11pt,article,oneside]{memoir}

%% Script-based version control (requires vc package)
% \input{vc}

\usepackage{graphicx,url}
\usepackage{rotating}
\usepackage{memoir-article-styles} % in latex-custom-kjh/needs-memoir

%% Choose font system. Comment out these lines if you are not using xelatex
\usepackage{fontspec}
\usepackage{xunicode}

% Biblatex
\usepackage[american]{babel}
\usepackage[babel]{csquotes}
\usepackage[style=authoryear,
            bibstyle=authoryear,
            citestyle=authoryear-comp,
            uniquename=false,
            hyperref=true,
            backend=biber, babel=hyphen, bibencoding=inputenc]{biblatex}

%% Fix biblatex's odd preference for using In: by default.
\renewbibmacro{in:}{%
  \ifentrytype{article}{}{%
  \printtext{\bibstring{}\intitlepunct}}}

%% Bibliography from http://kjhealy.github.com/socbibs/
\addbibresource{/Users/kjhealy/Documents/bibs/socbib.bib}

% Definitions
\def\myauthor{Kieran Healy}
\def\mytitle{Sociology 155: Organizations and Management}
\def\mysubtitle{Syllabus}
\def\mycopyright{\myauthor}
\def\mykeywords{}
\def\mybibliostyle{plain}
\def\mybibliocommand{}
\def\mysubtitle{}
\def\myaddress{276 Soc/Psych}
\def\myemail{[email protected]}
\def\myweb{http://www.kieranhealy.org}
\def\myphone{660-5737}
\def\myaffiliation{\ \\Duke University}
\def\mykeywords{Sociology, Syllabus, Undergraduate, Organizations, Management}

%% Links
\usepackage[usenames,dvipsnames]{color}
\usepackage[xetex,
colorlinks=true,
urlcolor=BrickRed,
plainpages=false,
   pdfpagelabels,
   bookmarksnumbered,
   pdftitle={\mytitle},
   pdfauthor={\myauthor},
   pdfkeywords={\mykeywords}
   ]{hyperref}

%% Uncomment to make a "DRAFT" watermark
% Page watermark
% \usepackage{type1cm,eso-pic}
% \makeatletter
% \AddToShipoutPicture{%
% \setlength{\@tempdimb}{.5\paperwidth}%
% \setlength{\@tempdimc}{.5\paperheight}%
% \setlength{\unitlength}{1pt}%
% \put(\strip@pt\@tempdimb,\strip@pt\@tempdimc){%
% \makebox(0,0){\rotatebox{45}{\textcolor[gray]{0.9}%
% {\fontsize{3cm}{3cm}\selectfont{Draft Only}}}}%
% Marginal Watermark
% \makebox(-100,-300){\rotatebox{45}{\textcolor[gray]{0.95}%
% {\fontsize{2cm}{2cm}\selectfont{}}}}
% \makebox(-500,-0){\rotatebox{90}{\textcolor[gray]{0.95}%
% {\fontsize{0.7cm}{0.7cm}\selectfont{}}}}
% }%
% }
% \makeatother

\begin{document}

%%% xelatex font choices
%\defaultfontfeatures{}
%\defaultfontfeatures{Scale=MatchLowercase}
% You will need to buy these fonts, change the names to fonts you own, or comment out if not using xelatex.
\setromanfont[Mapping=tex-text]{Minion Pro}
\setsansfont[Mapping=tex-text]{Myriad Pro}
\setmonofont[Mapping=tex-text,Scale=0.8]{Pragmata}

%% blank label items; hanging bibs for text
%% Custom hanging indent for vita items
\def\ind{\hangindent=1 true cm\hangafter=1 \noindent}
\def\labelitemi{$\cdot$}
%\renewcommand{\labelitemii}{~}

% Make figures as wide as the margins
\setkeys{Gin}{width=1\textwidth}

\chapterstyle{article-2} % alternative styles are defined in latex-custom-kjh/needs-memoir/. Consider e.g.\chapterstyle{article-4}
\pagestyle{kjh}

\title{\mytitle}
\author{\myauthor\smallskip\footnotesize\newline Office: 276 Sociology/Psychology \newline\texttt{\myemail} \newline \url{http://www.kieranhealy.org}}
\date{}

\published{\sffamily Spring 2010 / Tu\&Th 1:15--2:30pm / Gray 228}

\maketitle

% Include version information in footer if using vc package (see above).
% \thispagestyle{kjhgit}


% Copyright Page
% \textcopyright{} \mycopyright

%
% Main Content
%

\section{Course Description and Objectives}

%\newpage
%% Uncomment if you want a printed bibliography.
%\printbibliography

\end{document}

%%%%%%%%%%%%%%%%%%%%%

样式文件:

%%% Some article styles and page layout tweaks for the memoir class
%%% Choose these as article or pagestyles for your memoir document. 
%%% Kieran Healy


%%% --------------------------------------------------
%%% Some useful bits and pieces
%%% --------------------------------------------------
%% Blank footnote command.
% Use \symbolfootnote[0]{Footnote text} for a blank footnote. 
% Useful for an initial acknowledgment note.
\long\def\symbolfootnote[#1]#2{\begingroup%
\def\thefootnote{\fnsymbol{footnote}}\footnote[#1]{#2}\endgroup}

%% Redefine \and and \andnext to remove tabular environment.
%% Needed below for custom article-styles when multiple authors are present. 
\renewcommand{\and}{\, }
\renewcommand*{\andnext}{%
  \\\medskip }

%%% --------------------------------------------------
%%% Style: memo-comments
%%% For short notes.
%%% --------------------------------------------------

% Make the style for Chapters and sections
   \makechapterstyle{memo-comments}{
     \renewcommand\thesection{\arabic{section}} 
     \setsecheadstyle{\Large\sffamily} 
     \setsubsecheadstyle{\large\sffamily} 
     \setsubsubsecheadstyle{\normalsize\sffamily\itshape} 
    \renewcommand{\printchaptername}{} 
    \renewcommand{\chapternamenum}{} 
    \renewcommand{\chapnumfont}{\chaptitlefont} 
    \renewcommand{\printchapternum}{\chapnumfont \thechapter\space} 
    \renewcommand{\afterchapternum}{} 
    \renewcommand{\printchaptername}{\secheadstyle}
    \renewcommand{\cftchapterfont}{\normalfont} 
    \renewcommand{\cftchapterpagefont}{\normalfont\sffamily} 
    \renewcommand{\cftchapterpresnum}{\sffamily} 
    %\renewcommand{\cftchapterleader}{} 
    %\renewcommand{\cftchapterafterpnum}{\cftparfillskip}
    \captiontitlefont{\small}
    \settocdepth{chapter}
    \maxsecnumdepth{chapter} 
    \setsecnumdepth{chapter}

    % reduce skip after section heading
    \setaftersecskip{1.7ex}

    % Title 
    \pretitle{\begin{flushleft}\LARGE\sffamily\bfseries}
    \posttitle{\end{flushleft}\par\vskip 0.5em}
    \preauthor{\begin{flushleft}\Large\sffamily}
    \postauthor{\end{flushleft}}
    \predate{\begin{flushleft}\sffamily\footnotesize\vspace{0.9em}}
    \postdate{\end{flushleft}\par\vskip 2em}
   }

%%% --------------------------------------------------
%%% Style: article-1 
%%% --------------------------------------------------
   \makechapterstyle{article-1}{
     \setsecheadstyle{\Large\scshape} 
     \setsubsecheadstyle{\normalsize\itshape} 
    \renewcommand{\printchaptername}{} 
    \renewcommand{\chapternamenum}{} 
    \renewcommand{\chapnumfont}{\chaptitlefont} 
    \renewcommand{\printchapternum}{\chapnumfont \thechapter\space} 
    \renewcommand{\afterchapternum}{} 
    \renewcommand{\printchaptername}{\secheadstyle}
    \renewcommand{\cftchapterfont}{\normalfont} 
    \renewcommand{\cftchapterpagefont}{\normalfont\scshape} 
    \renewcommand{\cftchapterpresnum}{\scshape} 
    %\renewcommand{\cftchapterleader}{} 
    %\renewcommand{\cftchapterafterpnum}{\cftparfillskip}
    \captiontitlefont{\small}
    %\settocdepth{chapter}
%     \maxsecnumdepth{section} 
%     \setsecnumdepth{section}

    % reduce skip after section heading
    \setaftersecskip{1.7ex}

    % set name of bibliography to 'references'
    % \renewcommand{\bibname}{\mdseries\Large\scshape\MakeLowercase References}

    \pretitle{\newline\centering \LARGE\scshape \MakeLowercase }
    \posttitle{\par\vskip 1em}
    \predate{\footnotesize \centering}
    \postdate{\par\vskip 1em}

    % 'abstract' title, bigger skip from title
    \addto\captionsamerican{\renewcommand{\abstractname}{}}
    \abstractrunin
   }

%%% --------------------------------------------------
%%% Style: article-2 
%%% --------------------------------------------------

% Make the style for Chapters and sections
   \makechapterstyle{article-2}{
    \setsecheadstyle{\Large\sffamily} 
    \setsubsecheadstyle{\normalsize\sffamily\itshape} 
    \setaftersubsubsecskip{-1em}
    \setsubsubsecheadstyle{\small\bfseries}
    \renewcommand{\printchaptername}{} 
    \renewcommand{\chapternamenum}{} 
    \renewcommand{\chapnumfont}{\chaptitlefont} 
    \renewcommand{\printchapternum}{\chapnumfont \thechapter\space} 
    \renewcommand{\afterchapternum}{} 
    \renewcommand{\printchaptername}{\secheadstyle}
    \renewcommand{\cftchapterfont}{\normalfont} 
    \renewcommand{\cftchapterpagefont}{\normalfont\scshape} 
    \renewcommand{\cftchapterpresnum}{\scshape} 
    %\renewcommand{\cftchapterleader}{} 
    %\renewcommand{\cftchapterafterpnum}{\cftparfillskip}
    \captiontitlefont{\small}
    %\settocdepth{chapter}
    \maxsecnumdepth{chapter} 
    \setsecnumdepth{chapter}

    % reduce skip after section heading
    \setaftersecskip{1.7ex}

    % set name of bibliography to 'references'
    % \renewcommand{\bibname}{\mdseries\Large\scshape\MakeLowercase References}

    % Title flush left
    \pretitle{\begin{flushleft}\LARGE\sffamily}
    \posttitle{\end{flushleft}\par\vskip 0.5em}
    \preauthor{\begin{flushleft}\sffamily\itshape  \Large \vspace{0.5em}}
    \postauthor{\end{flushleft}}
    \predate{\begin{flushleft}\sffamily\footnotesize\vspace{0.9em}}
    \postdate{\end{flushleft}\par\vskip 2em}

    % 'abstract' title, bigger skip from title
    \addto\captionsamerican{\renewcommand{\abstractname}{Abstract:}}
    \renewcommand{\abstractnamefont}{\normalfont\scriptsize\itshape}
    \renewcommand{\abstracttextfont}{\normalfont\scriptsize}
    \abstractrunin

   }

%%% --------------------------------------------------
%%% Style: article-3 
%%% --------------------------------------------------

% Make the style for Chapters and sections
   \makechapterstyle{article-3}{
     \renewcommand\thesection{\arabic{section}} 
     \setsecheadstyle{\Large\sffamily} 
     \setsubsecheadstyle{\large\sffamily} 
     \setsubsubsecheadstyle{\normalsize\sffamily\itshape} 
    \renewcommand{\printchaptername}{} 
    \renewcommand{\chapternamenum}{} 
    \renewcommand{\chapnumfont}{\chaptitlefont} 
    \renewcommand{\printchapternum}{\chapnumfont \thechapter\space} 
    \renewcommand{\afterchapternum}{} 
    \renewcommand{\printchaptername}{\secheadstyle}
    \renewcommand{\cftchapterfont}{\normalfont} 
    \renewcommand{\cftchapterpagefont}{\normalfont\sffamily} 
    \renewcommand{\cftchapterpresnum}{\sffamily} 
    %\renewcommand{\cftchapterleader}{} 
    %\renewcommand{\cftchapterafterpnum}{\cftparfillskip}
    \captiontitlefont{\small}
    \settocdepth{chapter}
    \maxsecnumdepth{chapter} 
    \setsecnumdepth{chapter}

    % reduce skip after section heading
    \setaftersecskip{1.7ex}

    % set name of bibliography to 'references'
    % \renewcommand{\bibname}{\mdseries\Large\sffamily\MakeLowercase References}

    % Title 
    \pretitle{\par\vskip 3em 
        \begin{flushleft}\Huge\bfseries\sffamily}
    \posttitle{\end{flushleft}\par\vskip 0.5em}
    \preauthor{\begin{flushleft}\Large\bigskip}
    \postauthor{\end{flushleft}}
    \predate{\begin{flushleft}\normalsize}
    \postdate{\end{flushleft}}

    % \pretitle{\LARGE \sffamily}
    % \posttitle{\par\vskip 0.5em}
    % \preauthor{\large \sffamily \lineskip 1em}
    % \postauthor{\par\lineskip 1em}
    % \predate{\sffamily\footnotesize\vspace{0.65em}}
    % \postdate{\par\vskip 2em}

    % 'abstract' title, bigger skip from title
    \addto\captionsamerican{\renewcommand{\abstractname}{Abstract:}}
    \renewcommand{\abstractnamefont}{\normalfont\scriptsize\itshape}
    \renewcommand{\abstracttextfont}{\normalfont\scriptsize}
    \abstractrunin

   }     

%%% --------------------------------------------------
%%% Style: article-4 (AJS) 
%%% --------------------------------------------------

%% Make the style for Chapters and sections
   \makechapterstyle{article-4}{
    \setsecheadstyle{\Large\scshape\MakeLowercase} 
    \setsubsecheadstyle{\normalsize\itshape} 
    \setaftersubsubsecskip{-1em}
    \setsubsubsecheadstyle{\small\bfseries}
    \renewcommand{\printchaptername}{} 
    \renewcommand{\chapternamenum}{} 
    \renewcommand{\chapnumfont}{\chaptitlefont} 
    \renewcommand{\printchapternum}{\chapnumfont \thechapter\space} 
    \renewcommand{\afterchapternum}{} 
    \renewcommand{\printchaptername}{\secheadstyle}
    \renewcommand{\cftchapterfont}{\normalfont} 
    \renewcommand{\cftchapterpagefont}{\normalfont\scshape} 
    \renewcommand{\cftchapterpresnum}{\scshape} 
    %\renewcommand{\cftchapterleader}{} 
    %\renewcommand{\cftchapterafterpnum}{\cftparfillskip}
    \captiontitlefont{\small}
    %\settocdepth{chapter}
    \maxsecnumdepth{chapter} 
    \setsecnumdepth{chapter}

    % reduce skip after section heading
    \setaftersecskip{1.7ex}

    % set name of bibliography to 'references'
    %\renewcommand{\bibname}{\mdseries\Large\scshape\MakeLowercase References}

    % % Title flush left
    \pretitle{\par\vskip 3em 
        \begin{flushleft}\LARGE\bfseries}
    \posttitle{\end{flushleft}\par\vskip 0.5em}
    \preauthor{\begin{flushleft}\normalsize\bigskip}
    \postauthor{\end{flushleft}}
    \predate{\begin{flushleft}\normalsize}
    \postdate{\end{flushleft}}

    % 'abstract' bigger skip from title
    \addto\captionsamerican{\renewcommand{\abstractname}{}}
    \renewcommand{\abstractname}{}
    \renewcommand{\abstracttextfont}{\normalfont\scriptsize}
    \abstractrunin
   }


%%% --------------------------------------------------
%%% article-4-sans (AJS, but sans-serif headings) 
%%% --------------------------------------------------

%% Make the style for Chapters and sections
   \makechapterstyle{article-4-sans}{
    \setsecheadstyle{\sffamily\bfseries} 
    \setsubsecheadstyle{\normalsize\sffamily\itshape} 
    \setaftersubsubsecskip{-1em}
    \setsubsubsecheadstyle{\small}
    \renewcommand{\printchaptername}{} 
    \renewcommand{\chapternamenum}{} 
    \renewcommand{\chapnumfont}{\chaptitlefont} 
    \renewcommand{\printchapternum}{\chapnumfont \thechapter\space} 
    \renewcommand{\afterchapternum}{} 
    \renewcommand{\printchaptername}{\secheadstyle}
    \renewcommand{\cftchapterfont}{\normalfont} 
    \renewcommand{\cftchapterpagefont}{\normalfont\sffamily} 
    \renewcommand{\cftchapterpresnum}{\sffamily} 
    %\renewcommand{\cftchapterleader}{} 
    %\renewcommand{\cftchapterafterpnum}{\cftparfillskip}
    \captiontitlefont{\small}
    %\settocdepth{chapter}
    \maxsecnumdepth{chapter} 
    \setsecnumdepth{chapter}

    %% reduce skip after section heading
    \setaftersecskip{1.7ex}

    %% set name of bibliography to 'references'
    %%\renewcommand{\bibname}{\mdseries\Large\sffamily References}

    % % Title flush left
    \pretitle{\par\vskip 3em 
        \begin{flushleft}\LARGE\sffamily\bfseries}
    \posttitle{\end{flushleft}\par\vskip 0.5em}
    \preauthor{\begin{flushleft}\Large}
    \postauthor{\end{flushleft}}
    \predate{\begin{flushleft}\normalsize}
    \postdate{\end{flushleft}}

    %% 'abstract' bigger skip from title
    \addto\captionsamerican{\renewcommand*{\abstractname}{}}
    \renewcommand{\abstractnamefont}{\normalfont\scriptsize}
    \renewcommand{\abstracttextfont}{\normalfont\scriptsize}
    \abstractrunin


   }

%%% --------------------------------------------------
%%% Style: membook
%%% A book style
%%% --------------------------------------------------

%% Make the style for Chapters and sections
   % \makechapterstyle{membook}{
   %  \setsecheadstyle{\Large\sffamily\bfseries} 
   %  \setsubsecheadstyle{\normalsize\sffamily\itshape} 
   %      \setaftersubsubsecskip{-1em}
   %  \setsubsubsecheadstyle{\small\sffamily\bfseries}
   %  \renewcommand{\printchaptername}{\sffamily} 
   %  \renewcommand{\chapternamenum}{\sffamily} 
   %  \renewcommand{\chapnumfont}{\chaptitlefont\sffamily} 
   %  \renewcommand{\printchapternum}{\chapnumfont \thechapter\space} 
   %  \renewcommand{\afterchapternum}{} 
   %  \renewcommand{\printchaptername}{\secheadstyle}
   %  \renewcommand{\cftchapterfont}{\normalfont} 
   %  \renewcommand{\cftchapterpagefont}{\normalfont\sffamily} 
   %  \renewcommand{\cftchapterpresnum}{\sffamily} 
   %  \renewcommand{\cftchapterleader}{\sffamily} 
   %  \renewcommand{\cftchapterafterpnum}{\cftparfillskip}
   %  \captiontitlefont{\small}
   %  %\settocdepth{chapter}
   %  \maxsecnumdepth{chapter} 
   %  \setsecnumdepth{chapter}

   %  % reduce skip after section heading
   %  \setaftersecskip{1.7ex}

   %  % set name of bibliography to 'references'
   %  %\renewcommand{\bibname}{\mdseries\Large\scshape\MakeLowercase References}

   %  % % Title flush left
   %  \pretitle{\par\vskip 3em 
   %      \begin{flushleft}\LARGE\sffamily\bfseries}
   %  \posttitle{\end{flushleft}\par\vskip 0.5em}
   %  \preauthor{\begin{flushleft}\normalsize\sffamily\bigskip}
   %  \postauthor{\end{flushleft}}
   %  \predate{\begin{flushleft}\normalsize\sffamily}
   %  \postdate{\end{flushleft}}

   %  % 'abstract' bigger skip from title
   %  \addto\captionsamerican{\renewcommand{\abstractname}{}}
   %  \renewcommand{\abstractname}{}
   %  \renewcommand{\abstracttextfont}{\normalfont\scriptsize}
   %  \abstractrunin
   % }


%\RequirePackage[usenames,dvipsnames]{color}
%\RequirePackage{calc}
%\RequirePackage{color,calc}
%\newsavebox{\ChpNumBox}
%\definecolor{ChapBlue}{rgb}{0.00,0.65,0.65}
%\makeatletter
% \newcommand*{\thickhrulefill}{%
%   \leavevmode\leaders\hrule height 1\p@ \hfill \kern \z@}
% \newcommand*\BuildChpNum[2]{%
%   \begin{tabular}[t]{@{}c@{}}
%     \makebox[0pt][c]{#1\strut}  \\[.5ex]
%     \colorbox{BrickRed}{%
%       \rule[-10em]{0pt}{0pt}%
%       \rule{1ex}{0pt}\color{black}#2\strut
%       \rule{1ex}{0pt}}%
%   \end{tabular}}
% \makechapterstyle{BlueBox}{%
%   \renewcommand{\chapnamefont}{\large\sffamily}
%   \renewcommand{\chapnumfont}{\Huge\sffamily}
%   \renewcommand{\chaptitlefont}{\raggedright\Huge\sffamily}
%   \setlength{\beforechapskip}{20pt}
%   \setlength{\midchapskip}{26pt}
%   \setlength{\afterchapskip}{40pt}
%   \renewcommand{\printchaptername}{\sffamily}
%   \renewcommand{\chapternamenum}{\sffamily}
%   \renewcommand{\printchapternum}{%
%     \sbox{\ChpNumBox}{%
%       \BuildChpNum{\chapnamefont\@chapapp}%
%       {\chapnumfont\thechapter}}}
%   \renewcommand{\printchapternonum}{%
%     \sbox{\ChpNumBox}{%
%       \BuildChpNum{\chapnamefont\vphantom{\@chapapp}}%
%       {\chapnumfont\hphantom{\thechapter}}}}
% \renewcommand{\afterchapternum}{}
% \renewcommand{\printchaptertitle}[1]{%
%   \usebox{\ChpNumBox}\hfill
%   \parbox[t]{\hsize-\wd\ChpNumBox-1em}{%
%     \vspace{\midchapskip}%
%     \thickhrulefill\par
%     \chaptitlefont ##1\par}}%
%     \pretitle{\par\vskip 3em 
%         \begin{flushleft}\LARGE\sffamily\bfseries}
%     \posttitle{\end{flushleft}\par\vskip 0.5em}
%     \preauthor{\begin{flushleft}\normalsize\sffamily\bigskip}
%     \postauthor{\end{flushleft}}
%     \predate{\begin{flushleft}\normalsize}
%     \postdate{\end{flushleft}}

% }


%%% -------------------------------------------------- 
%%% Custom styles for headers and footers The chapterstyles above
%%% style sections/subsections and titles, etc. These pagestyles
%%% control the running headers and footers. So far there's just one.
%%% --------------------------------------------------

%%%
%%% Basic 
%%%
\makepagestyle{kjh}
%\makeevenfoot{kjh}{\thepage}{}{}
%\makeoddfoot{kjh}{}{}{\thepage}
%\makeheadrule{kjh}{\textwidth}{\normalrulethickness}
\newcommand{\@kjhmarks}{%
  \let\@mkboth\markboth
  \def\chaptermark##1{%
    \markboth{%
      \ifnum \c@secnumdepth >\m@ne
        \if@mainmatter
          \thechapter. \ %
        \fi
      \fi
      ##1}{}}
  \def\sectionmark##1{%
    \markright{##1}}
}
\makepsmarks{kjh}{\@kjhmarks}
\makepsmarks{kjh}{}
\makeevenhead{kjh}{}{}{\scshape\thepage}
\makeoddhead{kjh}{}{}{\scshape\thepage}



%%%
%%% RCS in footer 
%%%

% Make the style for RCS revision control headers and footers
\makepagestyle{kjhrcs}
% \makeheadrule{kjhrcs}{\textwidth}{\normalrulethickness}
\newcommand{\@kjhrcsmarks}{%
  \let\@mkboth\markboth
  \def\chaptermark##1{%
    \markboth{%
      \ifnum \c@secnumdepth >\m@ne
        \if@mainmatter
          \thechapter. \ %
        \fi
      \fi
      ##1}{}}
  \def\sectionmark##1{%
    \markright{##1}}
}
\makepsmarks{kjhrcs}{\@kjhrcsmarks}
%\makeevenhead{kjhrcs}{\footnotesize\scshape\leftmark}{}{\scshape\thepage}
%\makeoddhead{kjhrcs}{}{}{\footnotesize\rightmark\normalsize\ \ \scshape\thepage}
\makeevenfoot{kjhrcs}{\texttt{\footnotesize\rcsInfoFile}}{\scshape\thepage}{\footnotesize \emph{Rev} \texttt{\rcsInfoRevision \  \rcsInfoDate}}
\makeoddfoot{kjhrcs}{\texttt{\footnotesize\rcsInfoFile}}{\scshape\thepage}{\footnotesize \emph{Rev} \texttt{\rcsInfoRevision \ \rcsInfoDate}}



%%%
%%% Mercurial rev info in footers 
%%%

% Make the style for hg revision control headers and footers
\makepagestyle{kjhhg}
% \makeheadrule{kjhhg}{\textwidth}{\normalrulethickness}
\newcommand{\@kjhhgmarks}{%
  \let\@mkboth\markboth
  \def\chaptermark##1{%
    \markboth{%
      \ifnum \c@secnumdepth >\m@ne
        \if@mainmatter
          \thechapter. \ %
        \fi
      \fi
      ##1}{}}
  \def\sectionmark##1{%
    \markright{##1}}
}
\makepsmarks{kjhhg}{\@kjhhgmarks}
%\makeevenhead{kjhhg}{\footnotesize\scshape\leftmark}{}{\scshape\thepage}
%\makeoddhead{kjhhg}{}{}{\footnotesize\rightmark\normalsize\ \ \scshape\thepage}
\makeevenfoot{kjhhg}{\texttt{\footnotesize \hgkw{Filename}}}{\scshape\thepage}{\texttt{\footnotesize Rev \hgkw{LastChangedRevision} on \hgfilemonth\ \hgfileday, \hgfileyear}}
\makeoddfoot{kjhhg}{\texttt{\footnotesize \hgkw{Filename}}}{\scshape\thepage}{\texttt{\footnotesize Rev \hgkw{LastChangedRevision} on \hgfilemonth\ \hgfileday, \hgfileyear}}



%%%
%%% Git info in footers; requires vc package 
%%%

% Make the style for vc-git revision control headers and footers
\makepagestyle{kjhgit}
% \makeheadrule{kjhgit}{\textwidth}{\normalrulethickness}
\newcommand{\@kjhgitmarks}{%
  \let\@mkboth\markboth
  \def\chaptermark##1{%
    \markboth{%
      \ifnum \c@secnumdepth >\m@ne
        \if@mainmatter
          \thechapter. \ %
        \fi
      \fi
      ##1}{}}
  \def\sectionmark##1{%
    \markright{##1}}
}
\makepsmarks{kjhgit}{\@kjhgitmarks}
%\makeevenhead{kjhgit}{\footnotesize\scshape\leftmark}{}{\scshape\thepage}
%\makeoddhead{kjhgit}{}{}{\footnotesize\rightmark\normalsize\ \ \scshape\thepage}
\makeevenfoot{kjhgit}{}{\scshape\thepage}{\texttt{\footnotesize \VCRevision\ on \VCDateTEX}}
\makeoddfoot{kjhgit}{}{\scshape\thepage}{\texttt{\footnotesize \VCRevision\ on \VCDateTEX}}            

%%% 
%%% Custom appendix 
%%%

% % Make the style for headers and footers in the Appendix
% \makepagestyle{kjhappendix}
% %\makeevenfoot{kjh}{\thepage}{}{}
% %\makeoddfoot{kjh}{}{}{\thepage}
% \makeheadrule{kjhapp}{\textwidth}{\normalrulethickness}
% \newcommand{\@kjhappmarks}{%
%   \let\@mkboth\markboth
%   \def\chaptermark##1{%
%     \markboth{%
%       \ifnum \c@secnumdepth >\m@ne
%         \if@mainmatter
%           \thechapter. \ %
%         \fi
%       \fi
%       ##1}{}}
%   \def\sectionmark##1{%
%     \markright{##1}}
% }
% \makepsmarks{kjhappendix}{\@kjhappmarks}
% \makeevenhead{kjhappendix}{\footnotesize\scshape Appendix}{}{\scshape\thepage}
% \makeoddhead{kjhappendix}{}{}{\footnotesize Data and Methods for \rightmark\normalsize\ \ \scshape\thepage}

%% Create a command to make a note at the top of the first page describing the
%% publication status of the paper. 
\newcommand{\published}[1]{% 
   \gdef\puB{#1}} 
   \newcommand{\puB}{} 
   \renewcommand{\maketitlehooka}{% 
       \par\noindent\footnotesize \puB} 

\endinput

相关内容