% \iffalse meta-comment % This is file `mcmthesis.dtx'. % % Copyright (C) 2010 -- 2015 by latexstudio % 2014 -- 2019 by Liam Huang % 2019 -- present by latexstudio.net % ----------------------------------- % 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 LaTeXStudio. % %<*internal> \begingroup \def\LaTeXeName{LaTeX2e} \expandafter\endgroup\ifx\LaTeXeName\fmtname\else \csname fi\endcsname %</internal> %<*install> \input docstrip.tex \keepsilent \askforoverwritefalse \preamble ----------------------------------- This is a generated file. Copyright (C) 2010 -- 2015 by latexstudio 2014 -- 2019 by Liam Huang 2019 -- present by latexstudio.net 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. The Current Maintainer of this work is latexstudio.net. \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, *} \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} [2024/01/22 v6.3.3 The Thesis Template Designed For MCM/ICM] \documentclass{ltxdoc} \EnableCrossrefs \CodelineIndex \RecordChanges \usepackage[UTF8, fontset=fandol,fntef]{ctexcap} \usepackage{hologo} \usepackage{xcolor} \usepackage{longtable} \usepackage{booktabs} \usepackage{graphicx} \usepackage{listings} \usepackage{multirow} \usepackage{amsmath} \definecolor{grey}{rgb}{0.8,0.8,0.8} \definecolor{darkgreen}{rgb}{0,0.3,0} \definecolor{darkblue}{rgb}{0,0,0.3} \lstset{ language=[LaTeX]TeX, % style frame=lines,% basicstyle={\footnotesize\ttfamily},% keywordstyle=\color{darkblue}\bfseries,% identifierstyle=,% commentstyle=\color{darkgreen},%\itshape,% stringstyle=\color{black},% } \AtBeginDocument{\hypersetup{colorlinks=true}} \newcommand{\pkg}[1]{\textsf{#1}} \newcommand{\env}[1]{\textsf{#1}} \newcommand{\cntr}[1]{\textsf{#1}} \newcommand{\XeLaTeX}{\hologo{XeLaTeX}} \newcommand{\mem}[1]{\textcolor{blue}{\kaishu #1}} \newcommand{\file}[1]{\textsf{#1}} \newcommand{\path}[1]{\textsf{#1}} \newcommand{\mopt}{\textsf} \usepackage{hyperref} \begin{document} \DocInput{\jobname.dtx} \end{document} %</driver> % \fi % % \CheckSum{673} % % \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 % Digits \0\1\2\3\4\5\6\7\8\9 % Exclamation \! Double quote \" Hash (number) \# % Dollar \$ Percent \% Ampersand \& % Acute accent \' Left paren \( Right paren \) % Asterisk \* Plus \+ Comma \, % Minus \- Point \. Solidus \/ % Colon \: Semicolon \; Less than \< % Equals \= Greater than \> Question mark \? % Commercial at \@ Left bracket \[ Backslash \\ % Right bracket \] Circumflex \^ Underscore \_ % Grave accent \` Left brace \{ Vertical bar \| % Right brace \} Tilde \~} % % \changes{v6.3.3}{2024/01/22}{��������������������������������������������� AI ���������������} % % \GetFileInfo{\jobname.dtx} % % \DoNotIndex{\test} % % \title{\hypertarget{Chinese}{% % \textsf{\jobname} ��������� \fileversion % \thanks{��������������� \textsf{\jobname}~\fileversion % ������������������������������ \filedate���}}% % \makebox[0pt][l]{\hspace{1.5cm}\hyperlink{English}% % {\large$ \to $ English Version}} % } % \author{\LaTeX Studio \\ \texttt{latexstudio@qq.com}\and ��������� \\ \texttt{liamhuang0205+\jobname@gmail.com}} % \date{\filedate} % % \maketitle % % \begin{abstract} % ���������������������������������������������������MCM/ICM������������������������������������������������������������������ % ������������������������������������������������������������������������������������������ % \end{abstract} % % \section{������������} % % ��������������������� latexstudio ���������������������������������������������������������2014 ������������������������������������ % ��� key-value ������������������������������������������������ bug���2015 ������������������������������������ % \pkg{DocStrip} ������������������������������ CTAN��� % % % % ������������������������������������������������������������ \LaTeX{} ��������������� % % \centerline{\includegraphics[width=3.5cm]{./figures/qrcodewechat}} % \section{������������������} % % \subsection{������} % % ������������������������������������������������������������������������ % % \begin{description} % \item [CTAN] \url{http://www.ctan.org/pkg/mcmthesis} % \item [GitHub] \url{https://github.com/latexstudio-org/mcmthesis} % \item [\LaTeX Studio] \url{https://www.latexstudio.net} % \end{description} % % ��������������������������������� CTAN��������������� \TeX{} Live ������������������������������������������ % % \subsection{������} % % ��������� \path{SOURCE} ��������������������������������������������������������������������� % \iffalse %<*internal> % \fi \begin{lstlisting}[language=bash] cd SOURCE xetex mcmthesis.dtx xelatex mcmthesis.dtx xelatex mcmthesis.dtx xelatex mcmthesis-demo.tex xelatex mcmthesis-demo.tex \end{lstlisting} % \iffalse %</internal> % \fi % % ��������������������� \file{mcmthesis.cls} ��������� \path{TEXMF/tex/latex/mcmthesis/} % ������������ \file{mcmthesis.dtx} ��������� % \path{TEXMF/source/latex/mcmthesis/}������ \file{mcmthesis.pdf}��� % \file{mcmthesis-demo.tex}���\file{mcmthesis-demo.pdf}���\file{figures/} % ��� \file{code/} ��������� \path{TEXMF/doc/latex/mcmthesis/}������������������ % ������ \verb|texhash|��������������� \file{mcmthesis.cls} ��������������������������������� % % ��������� \file{mcmthesis-demo.tex} ��������������������������������������������������������������������������� % ������������������������������������ % % \section{������������} % \subsection{������} % \pkg{mcmthesis} ������������������������������������������������ \TeX{} ��������������������������� % ��������������������������������������� \TeX{} ������������������������������������������ % \begin{longtable}{cccc} % \toprule % \pkg{xkeyval} & \pkg{etoolbox} & \pkg{fancyhdr} & \pkg{fancybox} \\ % \pkg{ifthen} & \pkg{lastpage} & \pkg{listings} & \pkg{appendix} \\ % \pkg{amsmath} & \pkg{amssymb} & \pkg{amsfonts} & \pkg{amsbsy} \\ % \pkg{bm} & \pkg{mathrsfs} & \pkg{latexsym} & \pkg{paralist} \\ % \pkg{longtable} & \pkg{multirow} & \pkg{hhline} & \pkg{tabularx} \\ % \pkg{ctex} & \pkg{xeCJK} & \pkg{CJK} & \pkg{xCJK2uni}\\ % \pkg{tabu} & \pkg{environ} & \pkg{longtable} & \pkg{hologo}\\ % \pkg{array} & \pkg{flafter} & \pkg{pifont} & \pkg{calc} \\ % \pkg{colortbl} & \pkg{booktabs} & \pkg{geometry} & \pkg{fontenc}\\ % \pkg{berasans} & \pkg{hyperref} & \pkg{ifpdf} & \pkg{ifxetex}\\ % \pkg{graphicx} & \pkg{epstopdf} & \pkg{bmpsize} & \pkg{xcolor}\\ % \pkg{longtable} & \pkg{tabu} & \pkg{hologo} & \pkg{palatino}\\ % \bottomrule % \end{longtable} % ������������������������������������������������������ \TeX{} ��������������������������� % ��������������������� \url{http://www.ctan.org} ��������������������������� % % \subsection{������} % \pkg{mcmthesis} ������������������������������������������������������ % ��������������������������������������������������������������������� % \iffalse %<*internal> % \fi \begin{lstlisting}[language={[LaTeX]TeX}] \documentclass[tcn = 12345, problem = B, titlepage = false]{mcmthesis} \end{lstlisting} % \iffalse %</internal> % \fi %���\DescribeMacro{\mcmsetup}������������������ \cs{mcmsetup}^^A % \marg{key-value ������} ��������������������������� % \iffalse %<*internal> % \fi \begin{lstlisting}[language={[LaTeX]TeX}] \documentclass{mcmthesis} %\documentclass[CTeX = true]{mcmthesis} % ��������� CTeX ��������������������������� \mcmsetup{tcn = 12345, problem = B, titlepage = false} \end{lstlisting} % \iffalse %</internal> % \fi % ��������������������������� % % ���������\pkg{mcmthesis} ������������������ % \begin{description} % \item [CTeX] ��������������������������������������� 2.9.2.164 ��������� CTeX ��������������������� % \item [tstyle] ������������������������������������������������������������������ % \item [tcn] ��������������������������������������������������������������������������������������������� % ��������������������������������� \texttt{0000}��� % \item [problem] ��������������������������������������������������������������������������������� % ��������� \texttt{A}��� % \item [sheet] ��������������������������������������������������������������������� \texttt{true}��� % \item [titleinsheet] ��������������������������������������������������������������������� % ��������� \texttt{false}��� % \item [keywordsinsheet] ������������������������������������������������������������������������ % ��������� \texttt{false}��� % \item [titlepage] ��������������������������������������������������������������������� \texttt{true}��� % \item [abstract] ��������������������������������������������������������������������������������������������� % \texttt{true}��� % \end{description} % % ���������\texttt{titleinsheet} ��� \texttt{keywordsinsheet} ������������ \texttt{sheet} % ��������������� \texttt{sheet = false}������������������������������������������������������������������������/��� % ������������������������������ \texttt{sheet = true}������������������������������������������������ % \texttt{abstract} ��� \texttt{titlepage} ��������������������������������� % % \subsection{������} % % \DescribeMacro{\problem}������������ \cs{mcmsetup} ������������������������������������ % \cs{problem}\marg{������} ������������������������������������������������������������������������������ % ��������� % % \subsection{������} % % \DescribeEnv{abstract}\DescribeEnv{keywords} % \pkg{mcmthesis} ��������������� \env{abstract} ��������������� % ��������� \env{keywords} ������������������������������������������������ % \LaTeX{} ��������� \cs{title} ������������������������������������������������������������������������������������ % ������������������������������ \cs{maketitle} ��������� % % \DescribeEnv{memo} % \pkg{mcmthesis} ��������� \env{memo} ��������������������������������������������������������� % ������������������������������������������������ MCM ��������������������������������������������������������������������������������������� % % \DescribeMacro{memoto}\DescribeMacro{memofrom}\DescribeMacro{memosubject} % \DescribeMacro{memodate}\DescribeMacro{memologo} % \env{memo} ������������������������������ % \begin{description} % \item[\cs{memoto}] ��������������������������������������� % \item[\cs{memofrom}] ��������������������������������������� % \item[\cs{memosubject}] ��������������������������������� % \item[\cs{memodate}] ��������������������������������������� % \item[\cs{memologo}] ��������������������������������������������� LOGO ��������������� % \end{description} % % \subsection{���������������������} % \DescribeMacro{\headset}MCM/ICM ������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������ % \iffalse %<*internal> % \fi \begin{lstlisting}[language={[LaTeX]TeX}] \renewcommand{\headset}{{\Large\the\year}\\MCM/ICM\\Summary Sheet} \end{lstlisting} % \iffalse %</internal> % \fi % ��������������� % \begin{trivlist}\item % \newcommand{\headset}{{\Large\the\year}\\MCM/ICM\\Summary Sheet} % \begin{center} % \textbf{\headset} % \end{center} % \end{trivlist} % % \subsection{������������} % % ��������������������������������� % \begin{itemize} % \item \XeLaTeX ��������������������� % \item pdf\LaTeX \textbf{���������������������}��� % \item \LaTeX{} + DVIPDFMx��� % \end{itemize} % % \subsection{������������} % % ������ MCM/ICM ��������������������������������������������������������������������������������������������������������������� % ��������������������������������������������������������������������� CTeX ��������� % % \iffalse %<*internal> % \fi \begin{lstlisting}[language={[LaTeX]TeX}] \usepackage[UTF8, nocap]{ctex} \end{lstlisting} % \iffalse %</internal> % \fi % % \section{������������} % \begin{description} % \item [5.1.0a] ��������������� CTAN��� % \item [5.1.0b] ������ \textsf{CheckSum} ������������������������ % \item [5.1.0c] ������ \mopt{titleinsheet} ������������ % \item [5.1.0d] ������ \mopt{problem} ������������������������ % \cs{mcmsetup}\marg{key-val ������} ������������������ % ��������������������������������������������������������������������������������� % ��������������������������������������������������������������������� % \item [5.1.0e] ��������������������������������������������������������������� COMAP ��������������� % ������������ % \item [5.1.0f] ������ TCN ��������������������������� % \item [6.0] ��������������������������������� CTeX ��������� 2.9.2.164 ��������� CTeX ��������� % \item [6.1] ��������������� % \item [6.2] ������������ headset��� % \item [6.2.1] ������������������ |11pt| ��������� |12pt|��� % \item [6.3] ������summary������������������ % \item [6.3.1] ��������������������������� |a4paper| ��������� |letterpaper|��� % \item [6.3.2] ������������������������������������������������ % \item [6.3.3] ��������������������������������������������� AI ��������������� % \end{description} % % \title{\hypertarget{English}{% % The \textsf{\jobname} class \fileversion\thanks{This Document % corresponds to \textsf{\jobname}~\fileversion, dated \filedate.}}% % \makebox[0pt][l]{\hspace{1.5cm}\hyperlink{Chinese}{\large$ \to $ ���������}} % } % \author{\LaTeX{}Studio\\ \texttt{\texttt{latexstudio@qq.com}}\and Liam Huang \\ \texttt{liamhuang0205+\jobname@gmail.com}} % \date{\filedate} % % \maketitle % % \renewcommand{\abstractname}{Abstract} % \begin{abstract} % This template is designed for MCM/ICM. The template configured fonts, % header and footer and summary sheet style, accroding to the requirements % of COMAP. This document describes the template. % \end{abstract} % % \section{Introduction} % % This template was designed by latexstudio first, and was improved by him % following the suggestions from contest takers. In the beginning of the year % 2014, Liam Huang redesigned it, by using key-value syntax, and fixed known % bugs. Liam reimplemented it at the begining of the year 2015, % by \pkg{DocStrip}, and uploaded it to CTAN. % % \section{Installation Guide} % % \subsection{Download} % % You could find the latest version of this template at the project % homepage. We will % not maintain any other mirror. % % \begin{description} % \item [CTAN] \url{http://www.ctan.org/pkg/mcmthesis} % \item [GitHub] \url{https://github.com/latexstudio-org/mcmthesis} % \item [\LaTeX Studio] \url{https://www.latexstudio.net} % \end{description} % % Moreover, this template had been uploaded to CTAN, so that it could % be managed by the package manager of your distribution, such as \TeX\ Live. % % \subsection{Installation} % % We denote \path{SOURCE} as the folder, who contains the file you've % just downloaded. Execute these command in the terminal. % \iffalse %<*internal> % \fi \begin{lstlisting}[language=bash] cd SOURCE xetex mcmthesis.dtx xelatex mcmthesis.dtx xelatex mcmthesis.dtx xelatex mcmthesis-demo.tex xelatex mcmthesis-demo.tex \end{lstlisting} % \iffalse %</internal> % \fi % % To finish the installation, you could copy \file{mcmthesis.cls} to % \path{TEXMF/tex/latex/mcmthesis/}, copy \file{mcmthesis.dtx} % to \path{TEXMF/source/latex/mcmthesis/}, % copy \file{mcmthesis.pdf}, \file{mcmthesis-demo.tex}, % \file{mcmthesis-demo.pdf}, \file{figures/} and \file{code/} to % \path{TEXMF/doc/latex/mcmthesis/}, and then run \verb|texhash| in your % terminal; you could also put \file{mcmthesis.cls} in the same folder of % the master file. % % \file{mcmthesis-demo.tex} is a generated demo file, you could write the % manuscript of you paper by mimicing this file; you may also modify this % file to build your paper. % % \section{Usage} % \subsection{Dependence} % The \pkg{mcmthesis} class depends on the following pakcages. % These packages has been installed in common \TeX{} distribution. % Before installation, please make sure that you have installed these % packages correctly. % \begin{longtable}{cccc} % \toprule % \pkg{xkeyval} & \pkg{etoolbox} & \pkg{fancyhdr} & \pkg{fancybox} \\ % \pkg{ifthen} & \pkg{lastpage} & \pkg{listings} & \pkg{appendix} \\ % \pkg{amsmath} & \pkg{amssymb} & \pkg{amsfonts} & \pkg{amsbsy} \\ % \pkg{bm} & \pkg{mathrsfs} & \pkg{latexsym} & \pkg{paralist} \\ % \pkg{longtable} & \pkg{multirow} & \pkg{hhline} & \pkg{tabularx} \\ % \pkg{ctex} & \pkg{xeCJK} & \pkg{CJK} & \pkg{xCJK2uni}\\ % \pkg{tabu} & \pkg{environ} & \pkg{longtable} & \pkg{hologo}\\ % \pkg{array} & \pkg{flafter} & \pkg{pifont} & \pkg{calc} \\ % \pkg{colortbl} & \pkg{booktabs} & \pkg{geometry} & \pkg{fontenc}\\ % \pkg{berasans} & \pkg{hyperref} & \pkg{ifpdf} & \pkg{ifxetex}\\ % \pkg{graphicx} & \pkg{epstopdf} & \pkg{bmpsize} & \pkg{xcolor}\\ % \pkg{longtable} & \pkg{tabu} & \pkg{hologo} & \pkg{palatino}\\ % \bottomrule % \end{longtable} % If you haven't install these packages, you could execute the package % manager of your distribution and install them; you could also download % them from \url{http://www.ctan.org}. % % \subsection{Options} % \pkg{mcmthesis} defined serval options to control the behaviour of % the template. You could specify these options while loading the class. % \iffalse %<*internal> % \fi \begin{lstlisting}[language={[LaTeX]TeX}] \documentclass[tcn = 12345, problem = B, titlepage = false]{mcmthesis} \end{lstlisting} % \iffalse %</internal> % \fi %���\DescribeMacro{\mcmsetup}You may also use the command \cs{mcmsetup}^^A % \marg{key-value list} to specify them. % \iffalse %<*internal> % \fi \begin{lstlisting}[language={[LaTeX]TeX}] \documentclass{mcmthesis} \mcmsetup{tcn = 12345, problem = B, titlepage = false} \end{lstlisting} % \iffalse %</internal> % \fi % The two methods share the same effect. % % \pkg{mcmthesis} has seven options. % \begin{description} % \item [tstyle] change the text color of the team control number and problem no. % \item [tcn] The team control number, recieves a string as value; % this value will be displayed on summary sheet and every page's header. % The default value is \texttt{0000}. % \item [problem] The question, recieves a string as value; % this value will be displayed on summary sheet. % The default value is \texttt{A}. % \item [sheet] Bool, true to print the summary sheet, default % is \texttt{true}. % \item [titleinsheet] Bool, true to print the title in the summary sheet, % default is \texttt{false}. % \item [keywordsinsheet] Bool, true to print keywords in the summary 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 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 summary sheet, whatever the value of these two options are. % On the other hand, the abstract will always be printed on the summary 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} % % \DescribeMacro{\problem}Besides using \cs{mcmsetup} to choose question, % you could also use \cs{problem}\marg{Question} to do this. % However, the later one is here just because of backward compatibility, % and is not recommended any longer. % % \subsection{Environment} % % \DescribeEnv{abstract}\DescribeEnv{keywords} % \pkg{mcmthesis} redefined the \env{abstract} environment, and defined a % new environment named \env{keywords}. Note that these two environments % behave like the standard \cs{title} --- they will not print any contents % to the PDF file when they are used but just record them; the output task % belongs to \cs{maketitle}. % % \DescribeEnv{memo} % \pkg{mcmthesis} defines the \env{memo} environment, which accepts one optional % argument as the title. This work is inspired by the fact that in recent years, % MCM requires students to provide a letter or memorandum as a part of the thesis. % % \DescribeMacro{memoto}\DescribeMacro{memofrom}\DescribeMacro{memosubject} % \DescribeMacro{memodate}\DescribeMacro{memologo} % The \env{memo} environment is defined with some helper macros listed below: % \begin{description} % \item[\cs{memoto}] describes the person you want to leave the memorandum to. % \item[\cs{memofrom}] describes who is the author of the memorandum. % \item[\cs{memosubject}] describes the subject of the memorandum. % \item[\cs{memodate}] describes the date of the memorandum. % \item[\cs{memologo}] the command that will be executed to print a logo for the memorandum. % \end{description} % % \subsection{The headset of the Summary Sheet} % \DescribeMacro{\headset}Due to the frequent change of the headset's style of the Summary Sheet from the host of MCM/ICM, it's difficult for me to keep in with. Hence, a easy-to-modified interfaced is designed. Let's see an succinct example: % \iffalse %<*internal> % \fi \begin{lstlisting}[language={[LaTeX]TeX}] \renewcommand{\headset}{{\Large\the\year}\\MCM/ICM\\Summary Sheet} \end{lstlisting} % \iffalse %</internal> % \fi % while the output is: % \begin{trivlist}\item % \newcommand{\headset}{{\Large\the\year}\\MCM/ICM\\Summary Sheet} % \begin{center} % \textbf{\headset} % \end{center} % \end{trivlist} % % \subsection{Compilation Workflow} % % The template supports various kinds of compilation workflow: % \begin{itemize} % \item \XeLaTeX (If with chinese and so on)��� % \item pdf\LaTeX\ (\textbf{recommend})��� % \item \LaTeX{} + DVIPDFMx��� % \end{itemize} % % % \section{History} % \begin{description} % \item [5.1.0a] First release to CTAN. % \item [5.1.0b] Fix the bug of \textsf{CheckSum} and typos. % \item [5.1.0c] Import options, such as \mopt{titleinsheet}. % \item [5.1.0d] Change the way to define \mopt{problem}, create % \cs{mcmsetup}\marg{key-val list} to modify the option, slightly lift % the table on the summary sheet, fix the % bug of page number and fix the bug of title, abstract and keywords. % \item [5.1.0e] Redefine the table at the top of the summary sheet to % match the latest summary sheet from COMAP, the maker of the contest. % \item [5.1.0f] Cancle the red emphasizing of tcn and problem mark in the % table at the topo of the summary sheet. % \item [6.0] Change the output style slightly. % \item [6.1] Bugfix. % \item [6.2] Making headset of the Summary Sheet modifible. % \item [6.2.1] Change default fontsize, from |11pt| to |12pt|. % \item [6.3] Change summary sheet layout and demo code. % \item [6.3.1] Change the default papersize, frome |a4paper| to |letterpaper|. % \item [6.3.2] fixed some bugs and ctex compatibility. % \item [6.3.3] Fixed several styling errors and added the reference style for the generative AI. % \end{description} % % \StopEventually{} % \section{The Implementation} % \subsection{Basic Information} % \begin{macrocode} %<*class> \NeedsTeXFormat{LaTeX2e}[1999/12/01] \ProvidesClass{mcmthesis} [2024/01/22 v6.3.3 The Thesis Template Designed For MCM/ICM] \typeout{The Thesis Template Designed For MCM/ICM} \def\MCMversion{v6.3.3} % \end{macrocode} % \subsection{Options} % % Loading \pkg{xkeyval} and \pkg{etoolbox} to handle key-value options. % \begin{macrocode} \RequirePackage{xkeyval} \RequirePackage{etoolbox} % \end{macrocode} % % Declaring options. % \begin{macrocode} \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,tstyle} \define@key{MCM}{tcn}[0000]{\gdef\MCM@opt@tcn{#1}} \define@key{MCM}{problem}[A]{\gdef\MCM@opt@problem{#1}} \define@key{MCM}{tstyle}[A]{\gdef\MCM@opt@tstyle{#1}} \setkeys{MCM}{tcn=0000,problem=B,tstyle=\color{red}\bfseries} \define@key{mcmthesis.cls}{tcn}[0000]{\gdef\MCM@opt@tcn{#1}} \define@key{mcmthesis.cls}{problem}[A]{\gdef\MCM@opt@problem{#1}} \define@key{mcmthesis.cls}{tstyle}[A]{\gdef\MCM@opt@tstyle{#1}} \define@boolkey{mcmthesis.cls}[MCM@opt@]{CTeX}{} \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 % \end{macrocode} % % \begin{macro}{\mcmsetup} % % \begin{macrocode} \newcommand{\mcmsetup}[1]{\setkeys{MCM}{#1}} % \end{macrocode} % \end{macro} % % Processing options. % \begin{macrocode} \ProcessOptionsX\relax % \end{macrocode} % % Loading document class. % \begin{macrocode} \LoadClass[letterpaper, 12pt]{article} % \end{macrocode} % % User interface. % \begin{macrocode} \newcommand{\team}{Team \#\ \MCM@opt@tcn} % \end{macrocode} % \subsection{Loading Packages} % \begin{macrocode} \RequirePackage{fancyhdr, fancybox} \RequirePackage{ifthen} % \RequirePackage{lastpage} \RequirePackage{listings} \RequirePackage[toc, page, title, titletoc, header]{appendix} \RequirePackage{paralist} \RequirePackage{amsthm, amsfonts} \RequirePackage{amsmath, bm} \RequirePackage{amssymb, mathrsfs} \RequirePackage{latexsym} \RequirePackage{longtable, multirow, hhline, tabularx, array} \RequirePackage{flafter} \RequirePackage{pifont, calc} \RequirePackage{colortbl, booktabs} \RequirePackage{geometry} \RequirePackage[T1]{fontenc} \RequirePackage[scaled]{berasans} \RequirePackage{hyperref} \RequirePackage{ifpdf, ifxetex} \ifMCM@opt@CTeX \else \RequirePackage{environ} \fi % \end{macrocode} % % Loading \pkg{graphicx} and its relations after checking drivers. % \begin{macrocode} \ifpdf \RequirePackage{graphicx} \RequirePackage{epstopdf} \else \ifxetex \RequirePackage{graphicx} \else \RequirePackage[dvipdfmx]{graphicx} \RequirePackage{bmpsize} \fi \fi \RequirePackage[svgnames]{xcolor} % \end{macrocode} % \subsection{\pkg{hyperref} Settings} % \begin{macrocode} \ifpdf \hypersetup{hidelinks} \else \ifxetex \hypersetup{hidelinks} \else \hypersetup{dvipdfm, hidelinks} \fi \fi % \end{macrocode} % \subsection{Page Layout} % Setting paper size and margin sep. % \begin{macrocode} \geometry{letterpaper, margin = 1in} % \end{macrocode} % % Making the footer and header. % \begin{macrocode} \fancypagestyle{main}{ \fancyhf{} \lhead{\small\sffamily \team} \rhead{\small\sffamily Page \thepage\ of \pageref{LastPage}} } \pagestyle{main} \fancypagestyle{aimain}{ \fancyhf{} \lhead{\small\sffamily \team} \rhead{\small\sffamily Page \thepage } } % \end{macrocode} % % Setting \cs{parskip}. % \begin{macrocode} \setlength\parskip{.5\baselineskip} % \end{macrocode} % \subsection{Redefining TOC} % \begin{macrocode} \renewcommand\tableofcontents{% \centerline{\normalfont\Large\bfseries\sffamily\contentsname \@mkboth{% \MakeUppercase\contentsname}{\MakeUppercase\contentsname}}% \vskip 5ex% \@starttoc{toc}% } % \end{macrocode} % \subsection{Mastering Floats, Figures and Tables} % Setting counters. Here \cntr{totalnumber} is the maximum number of % floats on a text page, \cntr{topnumber} is the maximum number of % floats at top of a text page and \cntr{bottomnumber} is the maximum % number of floats at bottom of a text page. Obviously, we have % $ \text{\cntr{totalnumber}} = \text{\cntr{topnumber}} + % \text{\cntr{bottomnumber}} $. % \begin{macrocode} \setcounter{totalnumber}{4} \setcounter{topnumber}{2} \setcounter{bottomnumber}{2} % \end{macrocode} % % Setting float fractions. % \begin{macrocode} \renewcommand{\textfraction}{0.15} \renewcommand{\topfraction}{0.85} \renewcommand{\bottomfraction}{0.65} \renewcommand{\floatpagefraction}{0.60} % \end{macrocode} % % Setting caption names. % \begin{macrocode} \renewcommand{\figurename}{Figure} \renewcommand{\tablename}{Table} % \end{macrocode} % % Setting graphic paths. % \begin{macrocode} \graphicspath{{./}{./img/}{./fig/}{./image/}{./figure/}{./picture/} {./imgs/}{./figs/}{./images/}{./figures/}{./pictures/}} % \end{macrocode} % \subsection{Designing Sheets and their Relations} % Redefining \cs{maketitle}, which will check if the control % sheet and titlepage should be printed. % \begin{macrocode} \def\maketitle{% %\let\saved@thepage\thepage %\let\thepage\relax \ifMCM@opt@sheet \makesheet \fi \newpage \setcounter{page}{1} \pagestyle{fancy} \ifMCM@opt@titlepage \MCM@maketitle \fi \newpage } % \end{macrocode} % % Making the \env{abstract} environment. % \begin{macrocode} \def\abstractname{Summary} \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 \newenvironment{letter}[1]{% \par% \bgroup\parindent0pt% \begin{minipage}{5cm} \flushleft #1% \end{minipage}} {\egroup\smallskip} % \end{macrocode} % % Making the \env{keywords} environment. % \begin{macrocode} \def\keywordsname{Keywords} \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 % \end{macrocode} % % \begin{macro}{\headset} % % \begin{macrocode} \newcommand{\headset}{{\the\year}\\MCM/ICM\\Summary Sheet} % \end{macrocode} % \end{macro} % % Defining the \cs{makesheet}. % \begin{macrocode} \newcommand{\problem}[1]{\mcmsetup{problem = #1}} \def\makesheet{% \thispagestyle{empty}% \null% \vspace*{-5pc}% \begin{center} \begingroup \setlength{\parindent}{0pt} \begin{minipage}[t]{0.33\linewidth} \centering% \textbf{Problem Chosen}\\[0.7pc] {\Large \MCM@opt@tstyle {\MCM@opt@problem}}\\[2.8pc] \end{minipage}% \begin{minipage}[t]{0.33\linewidth} \centering% \textbf{\headset}% \end{minipage}% \begin{minipage}[t]{0.33\linewidth} \centering% \textbf{Team Control Number}\\[0.7pc] {\Large\MCM@opt@tstyle{\MCM@opt@tcn}}\\[2.8pc] \end{minipage}\par \rule{\linewidth}{1.5pt} \endgroup \vskip 5pt% \ifMCM@opt@titleinsheet \normalfont \LARGE \@title \par \fi \end{center} \ifMCM@opt@keywordsinsheet \make@abstract \make@keywords \else \make@abstract \fi} % \end{macrocode} % % Defining the \cs{MCM@maketitle} % \begin{macrocode} \newcommand{\MCM@maketitle}{% %\let\thepage\saved@thepage %\setcounter{page}{1} \begin{center}% \let \footnote \thanks% \pagestyle{fancy}% {\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 \make@keywords \fi% } % \end{macrocode} % % \changes{6.3.3}{2024/01/22}{���������������AI������������} % \subsection{the memo environment} % Defining macros to store information here. % \begin{macrocode} \def\MCM@memoto{\relax} \newcommand{\memoto}[1]{\gdef\MCM@memoto{#1}} \def\MCM@memofrom{\relax} \newcommand{\memofrom}[1]{\gdef\MCM@memofrom{#1}} \def\MCM@memosubject{\relax} \newcommand{\memosubject}[1]{\gdef\MCM@memosubject{#1}} \def\MCM@memodate{\relax} \newcommand{\memodate}[1]{\gdef\MCM@memodate{#1}} \def\MCM@memologo{\relax} \newcommand{\memologo}[1]{\gdef\MCM@memologo{\protect #1}} \def\@letterheadaddress{\relax} \newcommand{\lhaddress}[1]{\gdef\@letterheadaddress{#1}} % \end{macrocode} % % Now, we could define the |memo| environment. % \begin{macrocode} \newenvironment{memo}[1][Memorandum]{% \pagestyle{fancy}% \ifthenelse{\equal{\MCM@memologo}{\relax}}{% % without logo specified. }{% % with logo specified \begin{minipage}[t]{\columnwidth}% \begin{flushright} \vspace{-0.2in} \MCM@memologo \vspace{0.5in} \par\end{flushright}% \end{minipage}% } \begin{center} \LARGE\bfseries\scshape #1 \end{center} \begin{description} \ifthenelse{\equal{\MCM@memoto}{\relax}}{}{\item [{To:}] \MCM@memoto} \ifthenelse{\equal{\MCM@memofrom}{\relax}}{}{\item [{From:}] \MCM@memofrom} \ifthenelse{\equal{\MCM@memosubject}{\relax}}{}{\item [{Subject:}] \MCM@memosubject} \ifthenelse{\equal{\MCM@memodate}{\relax}}{}{\item [{Date:}] \MCM@memodate} \end{description} \par\noindent \rule[0.5ex]{\linewidth}{0.1pt}\par \bigskip{} }{% \clearpage \pagestyle{fancy}% } % \end{macrocode} % \subsection{Mathematics} % Theorems. % \begin{macrocode} \newtheorem{Theorem}{Theorem}[section] \newtheorem{Lemma}[Theorem]{Lemma} \newtheorem{Corollary}[Theorem]{Corollary} \newtheorem{Proposition}[Theorem]{Proposition} \newtheorem{Definition}[Theorem]{Definition} \newtheorem{Example}[Theorem]{Example} % \end{macrocode} % % define the section fonts and spaces. % \begin{macrocode} \renewcommand\section{\@startsection{section}{1}{\z@}% {-1sp\@plus -.2ex \@minus -.2ex}% {1pt \@plus .2ex}% {\rmfamily\Large\bfseries}} \renewcommand\subsection{\@startsection{subsection}{2}{\z@}% {-1sp\@plus -.2ex \@minus -.2ex}% {1pt \@plus .2ex}% {\rmfamily\large\bfseries}} \renewcommand\subsubsection{\@startsection{subsubsection}{3}{\z@}% {-.5ex\@plus -1ex \@minus -.2ex}% {.25ex \@plus .2ex}% {\rmfamily\normalsize\bfseries}} \renewcommand\paragraph{\@startsection{paragraph}{4}{\z@}% {1ex \@plus1ex \@minus.2ex}% {-1em}% {\rmfamily\normalsize}} % \end{macrocode} % Other definitions. % \begin{macrocode} \providecommand{\dif}{\mathop{}\!\mathrm{d}} \providecommand{\me}{\mathrm{e}} \providecommand{\mi}{\mathrm{i}} % \end{macrocode} % \subsection{Listing Settings} % \begin{macrocode} \definecolor{grey}{rgb}{0.8,0.8,0.8} \definecolor{darkgreen}{rgb}{0,0.3,0} \definecolor{darkblue}{rgb}{0,0,0.3} \def\lstbasicfont{\fontfamily{pcr}\selectfont\footnotesize} \lstset{% % indexing % numbers=left, % numberstyle=\small,% % character display showstringspaces=false, showspaces=false,% tabsize=4,% % style frame=lines,% basicstyle={\footnotesize\lstbasicfont},% keywordstyle=\color{darkblue}\bfseries,% identifierstyle=,% commentstyle=\color{darkgreen},%\itshape,% stringstyle=\color{black},% breaklines=true,% postbreak=\mbox{\textcolor{red}{$\hookrightarrow$}\space} } \lstloadlanguages{C,C++,Java,Matlab,python,Mathematica} % \end{macrocode} % \subsection{Report on Use of AI Settings} % \begin{macrocode} \def\AIcite{\@newl@bel b} \let\citation\@gobble \DeclareRobustCommand\AIcite{% \@ifnextchar [{\@tempswatrue\@AIcitex}{\@tempswafalse\@AIcitex[]}} \def\@AIcitex[#1]#2{\leavevmode \let\@AIcitea\@empty \@AIcite{\@for\@AIciteb:=#2\do {\@AIcitea\def\@AIcitea{,\penalty\@m\ }% \edef\@AIciteb{\expandafter\@firstofone\@AIciteb\@empty}% \if@filesw\immediate\write\@auxout{\string\citation{\@AIciteb}}\fi \@ifundefined{b@\@AIciteb}{\hbox{\reset@font\bfseries ?}% \G@refundefinedtrue \@latex@warning {Citation `\@AIciteb' on page \thepage \space undefined}}% {\@AIcite@ofmt{\csname b@\@AIciteb\endcsname}}}}{#1}} \def\@AIcite#1#2{[AI: {#1\if@tempswa , #2\fi}]} \let\@AIcite@ofmt\hbox \def\reportname{Report on Use of AI} \providecommand\@AIlabel[1]{#1.~} \newenvironment{ReportAiUse}[1] {\centerline{\underline{\large\sffamily\bfseries\reportname}}% \vspace*{-.2em} \@mkboth{\MakeUppercase\refname}{\MakeUppercase\refname}% \list{\@AIlabel{\@arabic\c@enumiv}}% {\settowidth\labelwidth{\@AIlabel{#1}}% \leftmargin\labelwidth \advance\leftmargin\labelsep \@openbib@code \usecounter{enumiv}% \let\p@enumiv\@empty \renewcommand\theenumiv{\@arabic\c@enumiv}}% \sloppy \clubpenalty4000 \@clubpenalty \clubpenalty \widowpenalty4000% \sfcode`\.\@m} {\def\@noitemerr {\@latex@warning{Empty `thebibliography' environment}}% \endlist} \def\AImatter{\label{LastPage}\clearpage\pagestyle{aimain}} % \end{macrocode} % \begin{macrocode} %</class> %<class>\endinput % \end{macrocode} % \iffalse %<*demo> %!TEX program = pdflatex|xelatex %% !Mode:: "TeX:UTF-8" \documentclass{mcmthesis} %\documentclass[CTeX = true]{mcmthesis} % ��������� CTeX ������������������������������������������������ \mcmsetup{tstyle=\color{red}\bfseries,%��������������������������������������������������������������������� black tcn = 0000, problem = A, %��������������������������� sheet = true, titleinsheet = true, keywordsinsheet = true, titlepage = false, abstract = true} %������������������������ %\usepackage{times} %\usepackage{newtxtext} %\usepackage{palatino} \usepackage{txfonts} \usepackage{indentfirst} %��������������������������������������������������� \usepackage{lipsum} \title{The \LaTeX{} Template for MCM Version \MCMversion} \author{\small \href{https://www.latexstudio.net/} {\includegraphics[width=7cm]{mcmthesis-logo}}} \date{\today} \begin{document} \begin{abstract} \par Use this template to begin typing the first page (summary page) of your electronic report. This template uses a 12-point Times New Roman font. Submit your paper as an Adobe PDF electronic file (e.g. 1111111.pdf), typed in English, with a readable font of at least 12-point type. Do not include the name of your school, advisor, or team members on this or any page. Papers must be within the 25 page limit. Be sure to change the control number and problem choice above. You may delete these instructions as you begin to type your report here. Follow us @COMAPMath on Twitter or COMAPCHINAOFFICIAL on Weibo for the most up to date contest information. \begin{keywords} keyword1; keyword2 \end{keywords} \end{abstract} \maketitle %% Generate the Table of Contents, if it's needed. \tableofcontents \newpage %% %% Generate the Memorandum, if it's needed. %% \memoto{\LaTeX{}studio} %% \memofrom{Liam Huang} %% \memosubject{Happy \TeX{}ing!} %% \memodate{\today} %% \memologo{\LARGE I'm pretending to be a LOGO!} %% \begin{memo}[Memorandum] %% \lipsum[1-3] %% \end{memo} %% \section{Introduction} \subsection{What's this all about? What's \LaTeX?} \LaTeX\ is a document preparation system which uses the \TeX\ typesetting program. It enables you to produce publication-quality documents with great accuracy and consistency. \LaTeX\ works on any computer and produces industry-standard PDF. It is available both in free (open-source) and commercial implementations. \LaTeX\ can be used for any kind of document, but it is especially suited to those with complex structures, repetitive formatting, or notations like mathematics. Install the software from \url{www.tug.org/texlive/}. \subsection{Creating and typesetting your document} Follow our WeChat official account for more LaTeX materials and information. \centerline{\includegraphics[width=5cm]{qrcodewechat}} \subsection{Syntax (how to type \LaTeX\ commands --- these are the rules)} \lipsum[3] \begin{itemize} \item the angular velocity of the bat, \item the velocity of the ball, and \item the position of impact along the bat. \end{itemize} \lipsum[4] \emph{center of percussion} [Brody 1986], \lipsum[5] \begin{Theorem} \label{thm:latex} \LaTeX \end{Theorem} \begin{Lemma} \label{thm:tex} \TeX . \end{Lemma} \begin{proof} The proof of theorem. \end{proof} \subsection{Other Assumptions} \lipsum[6] \begin{itemize} \item \item \item \item \end{itemize} \lipsum[7] \section{Analysis of the Problem} \begin{figure}[h] \small \centering \includegraphics[width=8cm]{example-image-a} \caption{The name of figure} \label{fig:aa} \end{figure} \lipsum[8] \eqref{aa} \begin{equation} a^2 \label{aa} \end{equation} \[ \begin{pmatrix}{*{20}c} {a_{11} } & {a_{12} } & {a_{13} } \\ {a_{21} } & {a_{22} } & {a_{23} } \\ {a_{31} } & {a_{32} } & {a_{33} } \\ \end{pmatrix} = \frac{{Opposite}}{{Hypotenuse}}\cos ^{ - 1} \theta \arcsin \theta \] \lipsum[9] \[ p_{j}=\begin{cases} 0,&\text{if $j$ is odd}\\ r!\,(-1)^{j/2},&\text{if $j$ is even} \end{cases} \] \lipsum[10] \[ \arcsin \theta = \mathop{{\int\!\!\!\!\!\int\!\!\!\!\!\int}} \limits_\varphi {\mathop {\lim }\limits_{x \to \infty } \frac{{n!}}{{r!\left( {n - r} \right)!}}} \eqno (1) \] \section{Calculating and Simplifying the Model } \lipsum[11] \section{The Model Results} \lipsum[6] \section{Validating the Model} \lipsum[9] \section{Conclusions} \lipsum[6] \section{A Summary} \lipsum[6] \section{Evaluate of the Mode} \section{Strengths and weaknesses} \lipsum[12] \subsection{Strengths} \begin{itemize} \item \textbf{Applies widely}\\ This system can be used for many types of airplanes, and it also solves the interference during the procedure of the boarding airplane,as described above we can get to the optimization boarding time.We also know that all the service is automate. \item \textbf{Improve the quality of the airport service}\\ Balancing the cost of the cost and the benefit, it will bring in more convenient for airport and passengers.It also saves many human resources for the airline. \end{itemize} \subsection{How to cite?} bibliography cite use \cite{1,2,3} AI cite use \AIcite{AI1,AI2,AI3} \begin{thebibliography}{99} \bibitem{1} D.~E. KNUTH The \TeX{}book the American Mathematical Society and Addison-Wesley Publishing Company , 1984-1986. \bibitem{2}Lamport, Leslie, \LaTeX{}: `` A Document Preparation System '', Addison-Wesley Publishing Company, 1986. \bibitem{3}\url{https://www.latexstudio.net/} \end{thebibliography} \begin{appendices} \section{First appendix} In addition, your report must include a letter to the Chief Financial Officer (CFO) of the Goodgrant Foundation, Mr. Alpha Chiang, that describes the optimal investment strategy, your modeling approach and major results, and a brief discussion of your proposed concept of a return-on-investment (ROI). This letter should be no more than two pages in length. \begin{letter}{Dear, Mr. Alpha Chiang} \lipsum[1-2] \vspace{\parskip} Sincerely yours, Your friends \end{letter} Here are simulation programmes we used in our model as follow.\\ \textbf{\textcolor[rgb]{0.98,0.00,0.00}{Input matlab source:}} \lstinputlisting[language=Matlab]{./code/mcmthesis-matlab1.m} \section{Second appendix} some more text \textcolor[rgb]{0.98,0.00,0.00}{\textbf{Input C++ source:}} \lstinputlisting[language=C++]{./code/mcmthesis-sudoku.cpp} \end{appendices} %\label{LastPage} % put the label at end of paper \AImatter \begin{ReportAiUse}{9} \bibitem{AI1} Bing AI\\ Query1: write a sort algorithm\\ Output: Sure, I can help you with that. Here is a simple implementation of the selection sort algorithm in Python: % Python \begin{lstlisting}[language=python] def selection_sort(arr): for i in range(len(arr)): min_idx = i for j in range(i + 1, len(arr)): if arr[min_idx] > arr[j]: min_idx = j arr[i], arr[min_idx] = arr[min_idx], arr[i] return arr \end{lstlisting} % AI-generated code. Review and use carefully. More info on FAQ. This algorithm sorts an array by repeatedly finding the minimum element from the unsorted part of the array and putting it at the beginning. \href{https://www.geeksforgeeks.org/sorting-algorithms/}{The time complexity of this algorithm is O($n^2$)}. There are many other sorting algorithms available such as bubble sort, insertion sort, merge sort, quick sort, heap sort, and more. Each of these algorithms has its own advantages and disadvantages. You can learn more about them on GeeksforGeeks and Programiz. I hope this helps! \bibitem{AI2} OpenAl Enie (Nov 5, 2023 version, Ernie 4.0)\\ Query1: <insert the exact wording of any subsequent input into the Al tool>\\ Output: <insert the complete output from the second query> \bibitem{AI3} Github CoPilot (Feb 3, 2024 version)\\ Query1: <insert the exact wording you input into the Al tool>\\ Output: <insert the complete output fron the Al tool> \bibitem{AI4} Google Bard (Feb 2,2024 version)\\ Query: <insert the exact wording of your query>\\ Output: <irsert the complete output from the Al tool> \bibitem{AI5} Bing AI\\ Query: write a FFT algorithm\\ Output: Sure, here is a Python implementation of the Fast Fourier Transform (FFT) algorithm: \begin{lstlisting}[language=python] import numpy as np def fft(x): n = len(x) if n == 1: return x even = fft(x[0::2]) odd = fft(x[1::2]) T = [np.exp(-2j * np.pi * k / n) * odd[k] for k in range(n // 2)] return [even[k] + T[k] for k in range(n // 2)] + [even[k] - T[k] for k in range(n // 2)] \end{lstlisting} % AI-generated code. Review and use carefully. More info on FAQ. The FFT is a widely used algorithm for computing the \textbf{Discrete Fourier Transform (DFT)} of a sequence. It reduces the number of computations needed from O(n$^2$) to O(n log n) 12. The basic idea of the FFT is to apply divide and conquer. We divide the coefficient vector of the polynomial into two vectors, recursively compute the DFT for each of them, and combine the results to compute the DFT of the complete polynomial 3. I hope this helps! \end{ReportAiUse} \end{document} %</demo> %<*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 ```plain 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 compile mcmthesis.dtx with xetex mcmthesis.dtx, compile mcmthesis.dtx with xelatex mcmthesis.dtx twice, compile mcmthesis-demo.tex with xelatex mcmthesis-demo.tex twice, rename README.tex and LICENSE.tex respectively to README and LICENSE, 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. ``` ## Authors * [latexstudio][latexstudio]: latexstudio@qq.com * [Liam Huang][liam-ctan]: liamhuang0205+mcmthesis@gmail.com ## Project Page If you are interested in the process of development you may observe <https://github.com/latexstudio-org/mcmthesis> [latexstudio]: 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 [latexstudio](latexstudio@qq.com). %</license> % \fi % \Finale \endinput %% %% 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. %% %% End of file `mcmthesis.dtx'.