summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/latex/mcmthesis
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2015-01-30 00:48:05 +0000
committerKarl Berry <karl@freefriends.org>2015-01-30 00:48:05 +0000
commit7c86e9c8ed85629d15393ae260c21121cb35fba1 (patch)
tree974e19e0bd58c1e1b6893451c75c7cfc27386992 /Master/texmf-dist/source/latex/mcmthesis
parent84e40e86ea4e5295d5a90460b79dac71be88b4b3 (diff)
mcmthesis (29jan15)
git-svn-id: svn://tug.org/texlive/trunk@36165 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source/latex/mcmthesis')
-rw-r--r--Master/texmf-dist/source/latex/mcmthesis/mcmthesis.dtx321
-rw-r--r--Master/texmf-dist/source/latex/mcmthesis/mcmthesis.ins87
2 files changed, 222 insertions, 186 deletions
diff --git a/Master/texmf-dist/source/latex/mcmthesis/mcmthesis.dtx b/Master/texmf-dist/source/latex/mcmthesis/mcmthesis.dtx
index 492c85e8c09..f4b32c53313 100644
--- a/Master/texmf-dist/source/latex/mcmthesis/mcmthesis.dtx
+++ b/Master/texmf-dist/source/latex/mcmthesis/mcmthesis.dtx
@@ -18,12 +18,90 @@
%
% The Current Maintainer of this work is Liam Huang.
%
-% \fi
-%
-% \iffalse
+%<*internal>
+\begingroup
+ \def\temp{LaTeX2e}
+\expandafter\endgroup\ifx\temp\fmtname\else
+\csname fi\endcsname
+%</internal>
+%<*install>
+\input docstrip.tex
+\keepsilent
+\preamble
+
+-----------------------------------
+
+This is a generated file.
+
+Copyright (C)
+ 2010 -- 2015 by Zhaoli Wang
+ 2014 -- 2015 by Liam Huang
+
+This work may be distributed and/or modified under the
+conditions of the LaTeX Project Public License, either version 1.3
+of this license or (at your option) any later version.
+The latest version of this license is in
+ http://www.latex-project.org/lppl.txt
+and version 1.3 or later is part of all distributions of LaTeX
+version 2005/12/01 or later.
+
+This work has the LPPL maintenance status `maintained'.
+
+The Current Maintainer of this work is Liam Huang.
+
+\endpreamble
+\postamble
+
+This work consists of these files \jobname.dtx,
+ figures/ and
+ code/,
+and the derived files \jobname.cls,
+ \jobname-demo.tex,
+ README,
+ LICENSE,
+ \jobname.pdf and
+ \jobname-demo.pdf.
+\endpostamble
+
+\generate{%
+ \usedir{tex/latex/\jobname}%
+ \file{\jobname.cls}{\from{\jobname.dtx}{class}}%
+ \usedir{doc/latex/\jobname}%
+ \file{\jobname-demo.tex}{\from{\jobname.dtx}{demo}}%
+ \nopreamble\nopostamble
+ \file{README.tex}{\from{\jobname.dtx}{readme}}%
+ \file{LICENSE.tex}{\from{\jobname.dtx}{license}}%
+}
+\obeyspaces
+\Msg{*************************************************************}
+\Msg{* *}
+\Msg{* To finish the installation you have to *}
+\Msg{* *}
+\Msg{* produce the user manual run the file \jobname.dtx *}
+\Msg{* through XeLaTeX --shell-escape, *}
+\Msg{* *}
+\Msg{* produce the demo file run the file \jobname-demo.tex *}
+\Msg{* through XeLaTeX, *}
+\Msg{* *}
+\Msg{* move the following file into a directory searched *}
+\Msg{* by TeX: *}
+\Msg{* *}
+\Msg{* \jobname.cls to TEXMF/tex/latex/mcmthesis/, *}
+\Msg{* \jobname.dtx to TEXMF/source/latex/mcmthesis/, *}
+\Msg{* other files to TEXMF/doc/latex/mcmthesis/, *}
+\Msg{* *}
+\Msg{* and then run texhash. *}
+\Msg{* *}
+\Msg{* Happy TeXing! *}
+\Msg{*************************************************************}
+\endbatchfile
+%</install>
+%<*internal>
+\fi
+%</internal>
%<*driver>
\ProvidesFile{mcmthesis.dtx}
- [2015/01/19 v5.1.0a Thesis Template For MCM/ICM]
+ [2015/01/29 v5.1.0c Thesis Template For MCM/ICM]
\documentclass{ltxdoc}
\EnableCrossrefs
\CodelineIndex
@@ -45,14 +123,15 @@
\newcommand{\XeLaTeX}{\hologo{XeLaTeX}}
\newcommand{\mem}[1]{\textcolor{blue}{\kaishu #1}}
\newcommand{\file}[1]{\textsf{#1}}
-\newcommand{\path}{\file}
+\newcommand{\path}[1]{\textsf{#1}}
\begin{document}
\DocInput{\jobname.dtx}
\end{document}
%</driver>
% \fi
%
-% \CheckSum{0}
+% \CheckSum{368}
+%
% \CharacterTable
% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z
% Lower-case \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z
@@ -163,17 +242,24 @@ xelatex mcmthesis-demo.tex
% 来安装;或者到 \url{http://www.ctan.org} 上搜索下载并安装。
%
% \subsection{选项}
-% \pkg{mcmthesis} 有三个选项:
+% \pkg{mcmthesis} 有六个选项,用来控制模板的行为:
% \begin{description}
% \item [tcn] 队伍控制号码,接受一个字符串作为值;输入的值将显示在控制页上和
% 每一页的页眉上;默认为 \texttt{0000}。
% \item [sheet] 布尔值;为真时将输出控制页,否则不输出;默认为 \texttt{true}。
+% \item [titleinsheet] 布尔值;为真时将在控制页输出标题,否则不输出;
+% 默认为 \texttt{false}。
+% \item [keywordsinsheet] 布尔值;为真时将在控制页输出关键字,否则不输出;
+% 默认为 \texttt{false}。
+% \item [titlepage] 布尔值;为真时将输出标题页,否则不输出;默认为 \texttt{true}。
% \item [abstract] 布尔值;为真时将在标题页输出摘要和关键词,否则不输出;默认值为
% \texttt{true}。
% \end{description}
%
-% 注意,模板提供了 \env{keywords} 环境。该环境的内容只在标题页的摘要下输出,不会在控制页
-% 的摘要下输出。因此,若 \texttt{abstract = false},则不会输出关键词。
+% 注意,\texttt{titleinsheet} 和 \texttt{keywordsinsheet} 的效果受 \texttt{sheet}
+% 的影响。若 \texttt{sheet = false},则不论前二者的真假,均不会在控制页上输出标题和/或
+% 关键字。另一方面,若 \texttt{sheet = true},则摘要部分总是会出现在控制页。
+% \texttt{abstract} 与 \texttt{titlepage} 选项的关系于前述类似。
%
% \subsection{题号}
%
@@ -199,7 +285,7 @@ xelatex mcmthesis-demo.tex
% \fi
\begin{minted}{tex}
\usepackage{xeCJK}
-\setCJkmainfont{SimSun}
+\setCJKmainfont{SimSun}
\end{minted}
% \iffalse
%</internal>
@@ -213,7 +299,7 @@ xelatex mcmthesis-demo.tex
% \fi
\begin{minted}{tex}
\usepackage{zhmCJK}
-\setCJkmainfont{SimSun.ttc}
+\setCJKmainfont{SimSun.ttc}
\end{minted}
% \iffalse
%</internal>
@@ -250,8 +336,8 @@ xelatex mcmthesis-demo.tex
%
% \subsection{Download}
%
-% You could find the latest version of this tamplate at the project homepage,
-% as well as the websit \href{http://latexstudio.net/}{\LaTeX Studio}. We will
+% You could find the latest version of this template at the project homepage,
+% as well as the website \href{http://latexstudio.net/}{\LaTeX Studio}. We will
% not maintain any other mirror.
%
% \begin{quote}
@@ -321,21 +407,31 @@ xelatex mcmthesis-demo.tex
% them from \url{http://www.ctan.org}.
%
% \subsection{Options}
-% \pkg{mcmthesis} has three options:
+% \pkg{mcmthesis} has six options that are designed to control the behaviour
+% of the template.
% \begin{description}
% \item [tcn] The team control number, recieves a string as value;
% this value will be displayed on control sheet and every page's header.
% The default value is \texttt{0000}.
% \item [sheet] Bool, true to print the control sheet, default
% is \texttt{true}.
+% \item [titleinsheet] Bool, true to print the title in the control sheet,
+% default is \texttt{false}.
+% \item [keywordsinsheet] Bool, true to print keywords in the control sheet,
+% default is \texttt{false}.
+% \item [titlepage] Bool, true to print the titlepage,
+% default is \texttt{true}.
% \item [abstract] Bool, true to print the abstract on the titlepage,
% default is \texttt{true}.
% \end{description}
%
-% Note that the template provides the \env{keywords} environment, whose
-% contents will only be displayed after the abstract on titlepage, and
-% will not be displayed on the control sheet. Thus, if one set
-% \texttt{abstract = false}, keywords will not be printed.
+% Note that the effect of \texttt{titleinsheet} and \texttt{keywordsinsheet}
+% are under the control of the option \texttt{sheet}, that is, if
+% \texttt{sheet} is set to \texttt{false}, title and/or keywords will not be
+% printed on the control sheet, whatever the value of these two options are.
+% On the other hand, the abstract will always be printed on the control sheet,
+% if the \texttt{sheet} is set to \texttt{true}. The relationship between
+% \texttt{abstract} and \texttt{titlepage} is similar to that just mentioned.
%
% \subsection{Question}
%
@@ -351,16 +447,16 @@ xelatex mcmthesis-demo.tex
% \end{itemize}
%
%
-%
+% \StopEventually{}
% \section{The Implementation}
% \subsection{Basic Information}
% \begin{macrocode}
%<*class>
\NeedsTeXFormat{LaTeX2e}[1999/12/01]
\ProvidesClass{mcmthesis}
- [2015/01/19 v5.1.0a Thesis Template For MCM/ICM]
+ [2015/01/29 v5.1.0c Thesis Template For MCM/ICM]
\typeout{Thesis Template For MCM/ICM}
-\def\MCMversion{v5.1.0a}
+\def\MCMversion{v5.1.0c}
% \end{macrocode}
% \subsection{Options}
%
@@ -376,6 +472,12 @@ xelatex mcmthesis-demo.tex
% \begin{macrocode}
\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]
@@ -508,36 +610,17 @@ xelatex mcmthesis-demo.tex
% \end{macrocode}
% \subsection{Designing Sheets and their Relations}
% Redefining \cs{@maketitle}, which is executed by \cs{maketitle}.
-% \cs{@maketitle} will check if the control sheet and abstract (on title
-% page) should be printed.
-%
-% Note that the keywords will only be printed on the titlepage.
+% \cs{@maketitle} will check if the control sheet and titlepage should
+% be printed.
% \begin{macrocode}
\def\@maketitle{%
- \ifMCM@opt@sheet%
- \makesheet%
+ \ifMCM@opt@sheet
+ \makesheet
\fi
\newpage
- \null
- \vskip 2em%
- \begin{center}%
- \let \footnote \thanks
- {\LARGE \@title \par}%
- \vskip 1.5em%
- {\large
- \lineskip .5em%
- \begin{tabular}[t]{c}%
- \@author
- \end{tabular}\par}%
- \vskip 1em%
- {\large \@date}%
- \end{center}%
- \par
- \vskip 1.5em%
- \ifMCM@opt@abstract%
- \make@abstract%
- \fi%
-}
+ \ifMCM@opt@titlepage
+ \MCM@maketitle
+ \fi}
% \end{macrocode}
%
% Making the \env{abstract} environment.
@@ -598,12 +681,43 @@ xelatex mcmthesis-demo.tex
\textbf{\the\year\ Mathematical Contest in Modeling (MCM) Summary Sheet}\\
(Attach a copy of this page to each copy of your solution paper.)
\end{center}
-\par%
+\ifMCM@opt@titleinsheet
+ \centerline{\normalfont \LARGE \@title}
+\fi
\vskip 1.5em%
-\centerline{\large\bfseries\abstractname}
-\noindent\usebox\@abstract%
+\ifMCM@opt@keywordsinsheet
+ \make@abstract
+\else
+ \centerline{\large\bfseries\abstractname}
+ \noindent\usebox\@abstract
+\fi
\endgroup}
% \end{macrocode}
+%
+% Defining the \cs{MCM@maketitle}
+% \begin{macrocode}
+\newcommand{\MCM@maketitle}{%
+ \null
+ \vskip 2em%
+ \begin{center}%
+ \let \footnote \thanks
+ {\LARGE \@title \par}%
+ \vskip 1.5em%
+ {\large
+ \lineskip .5em%
+ \begin{tabular}[t]{c}%
+ \@author
+ \end{tabular}\par}%
+ \vskip 1em%
+ {\large \@date}%
+ \end{center}%
+ \par
+ \vskip 1.5em%
+ \ifMCM@opt@abstract%
+ \make@abstract%
+ \fi%
+}
+% \end{macrocode}
% \subsection{Mathematics}
% Theorems.
% \begin{macrocode}
@@ -650,59 +764,16 @@ xelatex mcmthesis-demo.tex
%<class>\endinput
% \end{macrocode}
% \iffalse
-%<*readme>
-# The `mcmthesis` Class
-
-This class is designed for the MCM/ICM.
-
-This work is released under the [LaTeX Project Public
-License](http://www.latex-project.org/lppl.txt), v1.3c or later.
-
-## Installation
-
-This work consists of the file mcmthesis.dtx, mcmthesis.ins,
- figures/, and code/,
-and the derived files mcmthesis.cls,
- mcmthesis-demo.tex,
- README,
- LICENSE,
- mcmthesis.pdf and
- mcmthesis-demo.pdf.
-
-To install this class, you should copy `mcmthesis.cls` to
-`TEXMF/tex/latex/mcmthesis/`, copy `mcmthesis.dtx` and `mcmthesis.ins`
-to `TEXMF/source/latex/mcmthesis/` and copy other files to
-`TEXMF/doc/latex/mcmthesis/` and then run `texhash`.
-
-## Author
-
-[Zhaoli Wang][zhaoli]
-
-[Liam Huang][liam-ctan]
-
-Email: liamhuang0205+mcmthesis@gmail.com
-
-If you are interested in the process of development you may observe
-
-<https://github.com/LiamHuang0205/mcmthesis>
-
-[zhaoli]: http://www.latexstudio.net/
-[liam-ctan]: http://www.ctan.org/author/huang-l
-%</readme>
-%<*license>
-Released under the [LaTeX Project Public
-License](http://www.latex-project.org/lppl.txt), v1.3c or later.
-
-The package has status 'maintained': the current maintainer is
-[Liam Huang](liamhuang0205+mcmthesis@gmail.com).
-%</license>
%<*demo>
%!TEX program = xelatex
-\documentclass[tcn = 0000, sheet = true, abstract = true]{mcmthesis}
+\documentclass[tcn = 0000,
+ sheet = true, titleinsheet = true, keywordsinsheet = true,
+ titlepage = true, abstract = true]
+ {mcmthesis}
\problem{A}
\usepackage{palatino}
\usepackage{mwe}
-\title{The \LaTeX{} Template for MCM Version 5.1.0a}
+\title{The \LaTeX{} Template for MCM Version 5.1.0b}
\author{\small \href{http://www.latexstudio.net/}
{\includegraphics[width=7cm]{mcmthesis-logo}}}
\date{\today}
@@ -867,7 +938,59 @@ some more text \textcolor[rgb]{0.98,0.00,0.00}{\textbf{Input C++ source:}}
\end{document}
%</demo>
-%\fi
+%<*readme>
+# The `mcmthesis` Class
+
+This class is designed for the MCM/ICM.
+
+This work is released under the [LaTeX Project Public
+License](http://www.latex-project.org/lppl.txt), v1.3c or later.
+
+## Installation
+
+This work consists of the file mcmthesis.dtx,
+ figures/, and
+ code/,
+and the derived files mcmthesis.cls,
+ mcmthesis-demo.tex,
+ README,
+ LICENSE,
+ mcmthesis.pdf and
+ mcmthesis-demo.pdf.
+
+To install this class, you should
+ move `mcmthesis.cls` to `TEXMF/tex/latex/mcmthesis/`,
+ move `mcmthesis.dtx` to `TEXMF/source/latex/mcmthesis/`,
+ move other files to `TEXMF/doc/latex/mcmthesis/` and then
+ run `texhash`.
+
+## Author
+
+[Zhaoli Wang][zhaoli]
+
+Email: 343083553@qq.com
+
+[Liam Huang][liam-ctan]
+
+Email: liamhuang0205+mcmthesis@gmail.com
+
+## Project Page
+
+If you are interested in the process of development you may observe
+
+<https://github.com/LiamHuang0205/mcmthesis>
+
+[zhaoli]: http://www.latexstudio.net/
+[liam-ctan]: http://www.ctan.org/author/huang-l
+%</readme>
+%<*license>
+Released under the [LaTeX Project Public License]
+(http://www.latex-project.org/lppl.txt), v1.3c or later.
+
+The package has status 'maintained': the current maintainer is
+[Liam Huang](liamhuang0205+mcmthesis@gmail.com).
+%</license>
+% \fi
% \Finale
\endinput
%%
diff --git a/Master/texmf-dist/source/latex/mcmthesis/mcmthesis.ins b/Master/texmf-dist/source/latex/mcmthesis/mcmthesis.ins
deleted file mode 100644
index ccade8359d0..00000000000
--- a/Master/texmf-dist/source/latex/mcmthesis/mcmthesis.ins
+++ /dev/null
@@ -1,87 +0,0 @@
-% This is file `mcmthesis.ins'.
-%
-% Copyright (C)
-% 2010 -- 2015 by Zhaoli Wang
-% 2014 -- 2015 by Liam Huang
-% -----------------------------------
-% This work may be distributed and/or modified under the
-% conditions of the LaTeX Project Public License, either version 1.3
-% of this license or (at your option) any later version.
-% The latest version of this license is in
-% http://www.latex-project.org/lppl.txt
-% and version 1.3 or later is part of all distributions of LaTeX
-% version 2005/12/01 or later.
-%
-% This work has the LPPL maintenance status `maintained'.
-%
-% The Current Maintainer of this work is Liam Huang.
-\input docstrip.tex
-\keepsilent
-\preamble
-
------------------------------------
-
-This is a generated file.
-
-Copyright (C)
- 2010 -- 2015 by Zhaoli Wang
- 2014 -- 2015 by Liam Huang
-
-This work may be distributed and/or modified under the
-conditions of the LaTeX Project Public License, either version 1.3
-of this license or (at your option) any later version.
-The latest version of this license is in
- http://www.latex-project.org/lppl.txt
-and version 1.3 or later is part of all distributions of LaTeX
-version 2005/12/01 or later.
-
-This work has the LPPL maintenance status `maintained'.
-
-The Current Maintainer of this work is Liam Huang.
-
-\endpreamble
-\postamble
-
-This work consists of the file \jobname.dtx, \jobname.ins,
- figures/, and code/,
-and the derived files \jobname.cls,
- \jobname-demo.tex,
- README,
- LICENSE,
- \jobname.pdf and
- \jobname-demo.pdf.
-\endpostamble
-
-\generate{%
- \usedir{tex/latex/\jobname}%
- \file{\jobname.cls}{\from{\jobname.dtx}{class}}%
- \usedir{doc/latex/\jobname}%
- \file{\jobname-demo.tex}{\from{\jobname.dtx}{demo}}%
- \nopreamble\nopostamble
- \file{README.md}{\from{\jobname.dtx}{readme}}%
- \file{LICENSE.md}{\from{\jobname.dtx}{license}}%
-}
-
-\Msg{*********************************************************}
-\Msg{*}
-\Msg{* To finish the installation you have to}
-\Msg{*}
-\Msg{* produce the user manual run the file \jobname.dtx}
-\Msg{* through XeLaTeX --shell-escape,}
-\Msg{*}
-\Msg{* produce the demo file run the file \jobname-demo.tex}
-\Msg{* through XeLaTeX,}
-\Msg{*}
-\Msg{* move the following file into a directory searched}
-\Msg{* \space\space by TeX:}
-\Msg{*}
-\Msg{* \space\space\jobname.cls to TEXMF/tex/latex/mcmthesis/,}
-\Msg{* \space\space\jobname.dtx and \jobname.ins}
-\Msg{* \space\space\space\space to TEXMF/sourct/latex/mcmthesis/,}
-\Msg{* \space\space other files to TEXMF/doc/latex/mcmthesis,}
-\Msg{*}
-\Msg{* and then run texhash.}
-\Msg{*}
-\Msg{* Happy TeXing!}
-\Msg{*********************************************************}
-\endbatchfile