summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2016-01-29 00:15:18 +0000
committerKarl Berry <karl@freefriends.org>2016-01-29 00:15:18 +0000
commitd6aa7870f4322f31fd8ac41987918202b17fd53a (patch)
tree60f20ff89ea3a9901a603285595c4f2f89155299 /Master/texmf-dist/tex/latex
parentece52c2cf2361f40a788fc16e8a7753e83c53daf (diff)
mcmthesis (28jan16)
git-svn-id: svn://tug.org/texlive/trunk@39500 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex')
-rw-r--r--Master/texmf-dist/tex/latex/mcmthesis/mcmthesis.cls111
1 files changed, 73 insertions, 38 deletions
diff --git a/Master/texmf-dist/tex/latex/mcmthesis/mcmthesis.cls b/Master/texmf-dist/tex/latex/mcmthesis/mcmthesis.cls
index 79f1d2f9329..72ce8e132b4 100644
--- a/Master/texmf-dist/tex/latex/mcmthesis/mcmthesis.cls
+++ b/Master/texmf-dist/tex/latex/mcmthesis/mcmthesis.cls
@@ -12,7 +12,7 @@
%%
%% Copyright (C)
%% 2010 -- 2015 by Zhaoli Wang
-%% 2014 -- 2015 by Liam Huang
+%% 2014 -- 2016 by Liam Huang
%%
%% This work may be distributed and/or modified under the
%% conditions of the LaTeX Project Public License, either version 1.3
@@ -28,27 +28,36 @@
%%
\NeedsTeXFormat{LaTeX2e}[1999/12/01]
\ProvidesClass{mcmthesis}
- [2015/04/21 v5.1.0f The Thesis Template Designed For MCM/ICM]
+ [2016/01/28 v6.0 The Thesis Template Designed For MCM/ICM]
\typeout{The Thesis Template Designed For MCM/ICM}
-\def\MCMversion{v5.1.0f}
-\RequirePackage{kvoptions}
+\def\MCMversion{v6.0}
+\RequirePackage{xkeyval}
\RequirePackage{etoolbox}
-\SetupKeyvalOptions{family=MCM, prefix=MCM@opt@, setkeys=\kvsetkeys}
-\newcommand{\mcmsetup}[1]{\kvsetkeys{MCM}{#1}}
-\DeclareBoolOption[true]{sheet}
-\DeclareComplementaryOption{nosheet}{sheet}
-\DeclareBoolOption[false]{titleinsheet}
-\DeclareComplementaryOption{notitleinsheet}{titleinsheet}
-\DeclareBoolOption[false]{keywordsinsheet}
-\DeclareComplementaryOption{nokeywordsinsheet}{keywordsinsheet}
-\DeclareBoolOption[true]{titlepage}
-\DeclareComplementaryOption{notitlepage}{titlepage}
-\DeclareBoolOption[true]{abstract}
-\DeclareComplementaryOption{noabstract}{abstract}
-\DeclareStringOption[0000]{tcn}[0000]
-\DeclareStringOption[A]{problem}[A]
-\DeclareDefaultOption{\relax}
-\ProcessKeyvalOptions*\relax
+\define@boolkey{MCM}[MCM@opt@]{CTeX}[false]{}
+\define@boolkey{MCM}[MCM@opt@]{titlepage}[true]{}
+\define@boolkey{MCM}[MCM@opt@]{abstract}[true]{}
+\define@boolkey{MCM}[MCM@opt@]{sheet}[true]{}
+\define@boolkey{MCM}[MCM@opt@]{titleinsheet}[false]{}
+\define@boolkey{MCM}[MCM@opt@]{keywordsinsheet}[false]{}
+\define@cmdkeys{MCM}[MCM@opt@]{tcn,problem}
+\define@key{MCM}{tcn}[0000]{\gdef\MCM@opt@tcn{#1}}
+\define@key{MCM}{problem}[A]{\gdef\MCM@opt@problem{#1}}
+\setkeys{MCM}{tcn=0000,problem=B}
+
+\define@key{mcmthesis.cls}{tcn}[0000]{\gdef\MCM@opt@tcn{#1}}
+\define@key{mcmthesis.cls}{problem}[A]{\gdef\MCM@opt@problem{#1}}
+\define@boolkey{mcmthesis.cls}[MCM@opt@]{titlepage}{}
+\define@boolkey{mcmthesis.cls}[MCM@opt@]{abstract}{}
+\define@boolkey{mcmthesis.cls}[MCM@opt@]{sheet}{}
+\define@boolkey{mcmthesis.cls}[MCM@opt@]{titleinsheet}{}
+\define@boolkey{mcmthesis.cls}[MCM@opt@]{keywordsinsheet}{}
+\MCM@opt@sheettrue
+\MCM@opt@titlepagetrue
+\MCM@opt@titleinsheetfalse
+\MCM@opt@keywordsinsheetfalse
+\MCM@opt@abstracttrue
+\newcommand{\mcmsetup}[1]{\setkeys{MCM}{#1}}
+\ProcessOptionsX\relax
\LoadClass[a4paper, 11pt]{article}
\newcommand{\team}{Team \#\ \MCM@opt@tcn}
\RequirePackage{fancyhdr, fancybox}
@@ -70,7 +79,10 @@
\RequirePackage[scaled]{berasans}
\RequirePackage{hyperref}
\RequirePackage{ifpdf, ifxetex}
-\RequirePackage{environ}
+\ifMCM@opt@CTeX
+\else
+ \RequirePackage{environ}
+\fi
\ifpdf
\RequirePackage{graphicx}
\RequirePackage{epstopdf}
@@ -95,11 +107,11 @@
\geometry{a4paper, margin = 1.2in}
\pagestyle{fancy}
\fancyhf{}
-\lhead{\small \team}
-\rhead{\small Page \thepage\ of \pageref{LastPage}}
+\lhead{\small\sffamily \team}
+\rhead{\small\sffamily Page \thepage\ of \pageref{LastPage}}
\setlength\parskip{.5\baselineskip}
\renewcommand\tableofcontents{%
- \centerline{\normalfont\Large\bfseries\contentsname
+ \centerline{\normalfont\Large\bfseries\sffamily\contentsname
\@mkboth{%
\MakeUppercase\contentsname}{\MakeUppercase\contentsname}}%
\vskip 5ex%
@@ -132,24 +144,47 @@
\pagestyle{fancy}
}
\def\abstractname{Summary}
-\RenewEnviron{abstract}{\xdef\@abstract{\expandonce\BODY}}
-\def\make@abstract{%
- \begin{center}
- \textbf{\abstractname}
- \end{center}
- \@abstract\par
-}
+\ifMCM@opt@CTeX
+ \newbox\@abstract%
+ \setbox\@abstract\hbox{}%
+ \long\def\abstract{\bgroup\global\setbox\@abstract\vbox\bgroup\hsize\textwidth\leftskip1cm\rightskip1cm}%
+ \def\endabstract{\egroup\egroup}
+ \def\make@abstract{%
+ \begin{center}
+ \textbf{\abstractname}
+ \end{center}
+ \usebox\@abstract\par
+ }
+\else
+ \RenewEnviron{abstract}{\xdef\@abstract{\expandonce\BODY}}
+ \def\make@abstract{%
+ \begin{center}
+ \textbf{\abstractname}
+ \end{center}
+ \@abstract\par
+ }
+\fi
\def\keywordsname{Keywords}
-\NewEnviron{keywords}{\xdef\@keywords{\expandonce\BODY}}
-\def\make@keywords{%
- \par\noindent\textbf{\keywordsname}:
- \@keywords\par
-}
+\ifMCM@opt@CTeX
+ \newbox\@keywords
+ \setbox\@keywords\hbox{}
+ \def\keywords{\global\setbox\@keywords\vbox\bgroup\noindent\leftskip0cm}
+ \def\endkeywords{\egroup}%
+ \def\make@keywords{%
+ \par\hskip.4cm\textbf{\keywordsname}: \usebox\@keywords\hfill\par
+ }
+\else
+ \NewEnviron{keywords}{\xdef\@keywords{\expandonce\BODY}}
+ \def\make@keywords{%
+ \par\noindent\textbf{\keywordsname}:
+ \@keywords\par
+ }
+\fi
\newcommand{\problem}[1]{\mcmsetup{problem = #1}}
\def\makesheet{%
\pagestyle{empty}%
\null%
- \vspace*{-6pc}%
+ \vspace*{-5pc}%
\begin{center}
\begingroup
\setlength{\parindent}{0pt}
@@ -163,7 +198,7 @@
\begin{minipage}{0.44\linewidth}
\centering
Team Control Number\\[0.7pc]
- {\LARGE\textbf{\MCM@opt@tcn}}\\[1.8pc]
+ {\Huge\textbf{\MCM@opt@tcn}}\\[1.8pc]
Problem Chosen\\[0.7pc]
{\Huge\textbf{\MCM@opt@problem}}
\end{minipage}%