<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">% \iffalse meta-comment
%
% Copyright (C) 2020 by zhaofeng-shu33 &lt;616545598@qq.com&gt;
%
% 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'.
%
% \fi
%
%\iffalse
%&lt;*internal&gt;
\begingroup
\input docstrip.tex
\askforoverwritefalse
\showprogress
\keepsilent
\preamble

This is a generated file.

Copyright (C) \the\year by zhaofeng-shu33 &lt;616545598@qq.com&gt;

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.

To produce the documentation run the original source files ending with `.dtx'
through LaTeX.

\endpreamble
\nopostamble
\generate{
\file{dtx-style.sty}{\from{\jobname.dtx}{dtx-style}}  
\file{iidef.sty}{\from{\jobname.dtx}{sty}}
}

\ifToplevel{%
  \Msg{***********************************************************}
  \Msg{*}
  \Msg{* To produce the documentation run the files ending with}
  \Msg{* `.dtx' through XeLaTeX.}
  \Msg{*}
  \Msg{* Happy TeXing!}
  \Msg{***********************************************************}}
\endgroup
%&lt;/internal&gt;
%&lt;*driver&gt;
\ProvidesFile{thucoursework.dtx}[2020/09/09 2.6 Tsinghua University Coursework Template]
\documentclass{ltxdoc}
\usepackage{dtx-style}

\EnableCrossrefs
\CodelineIndex
\RecordChanges

\begin{document}
  \DocInput{\jobname.dtx}
\end{document}
%&lt;/driver&gt;
% \fi
% \DoNotIndex{\NeedsTeXFormat,\ProvidesClass,\RequirePackage}
% \DoNotIndex{\renewcommand,\underline,\newcommand,\def}
% \DoNotIndex{\setlist,\hfill,\hrule,\vspace}
% \DoNotIndex{\begin,\end,\DeclareStringOption}
% \DoNotIndex{\fancypagestyle,\fancyhead,\pagestyle,\thispagestyle}
% \DoNotIndex{\protect,\mathpalette,\rlap,\mathrel,\mkern}
% \GetFileInfo{\jobname.dtx}
%^^A theses changes are moved from update.md
%^^A \changes{hversioni}{hdatei}{htexti}
% \def\xiangxiang{\textit{Xiangxiang}}
% \def\zhaofeng{\textit{zhaofeng-shu33}}
% \changes{v1.1}{2017/09/26}{[\xiangxiang] Add mathcal and eucal package.}
% \changes{v1.1}{2017/09/26}{[\xiangxiang] Add aligned equations in \texttt{iihw.tex}.}
% \changes{v1.2}{2017/10/09}{[\xiangxiang] Add example for figures in \texttt{iihw.tex}}
% \changes{v1.2}{2017/10/09}{[\xiangxiang] Add example fro input matlab codes in \texttt{iihw.tex}}
% \changes{v1.2}{2017/10/09}{[\xiangxiang] No need to set counter style manually}
% \changes{v1.3}{2017/10/12}{[\xiangxiang] Add example for vector and random vectors(underline) in \texttt{iihw.tex}}
% \changes{v1.4}{2017/10/30}{[\xiangxiang] Add an example of hypothesis testing in \texttt{iihw.tex}}
% \def\indexname{ç´¢å¼•}
% \def\glossaryname{ä¿®æ”¹è®°å½•}
% \IndexPrologue{\section{\indexname}}
% \GlossaryPrologue{\section{\glossaryname}}
% \title{\bfseries\color{violet}\thucourseworkï¼šæ¸…åŽå¤§å­¦è¯¾ç¨‹ä½œä¸šæ¨¡æ¿\thanks{æœ¬æ–‡æ¡£åœ¨ \textit{xueruini} çš„ \href{https://github.com/xueruini/thuthesis}{\enspace \textsc{Thu}\-\textsc{Thesis}} æ‰‹å†ŒåŸºç¡€ä¸Šè¿›è¡Œæ”¹åŠ¨}}
% \author{{\fangsong èµµä¸°\thanks{å¸ˆå…„å¾ç¥¥ç¥¥ç»´æŠ¤åˆ°v1.4}}\\[5pt]\texttt{616545598@qq.com}}
% \date{v\fileversion\ (\filedate)}
% \maketitle\thispagestyle{empty}
%
%
% \begin{abstract}\noindent
%   æ­¤å®åŒ…æ—¨åœ¨å»ºç«‹ä¸€ä¸ªç®€å•æ˜“ç”¨çš„æ¸…åŽå¤§å­¦è¯¾ç¨‹ä½œä¸šæ¨¡æ¿ï¼Œä½œä¸šä¸»è¦é’ˆå¯¹ç†è®ºç‰©ç†ã€æ•°å­¦ã€ä¿¡æ¯ç§‘å­¦ã€é€šä¿¡ã€ç†è®ºåŠ›å­¦ç­‰æ–¹é¢ã€‚
% \end{abstract}
%
% \vskip2cm
% \def\abstractname{å…è´£å£°æ˜Ž}
% \begin{abstract}
% \noindent
% \begin{enumerate}
% \item æœ¬æ¨¡æ¿çš„å‘å¸ƒéµå®ˆ \LaTeX\ Project Public Licenseï¼Œä½¿ç”¨å‰è¯·è®¤çœŸé˜…è¯»åè®®å†…
%   å®¹ã€‚
% \item ä»»ä½•ä¸ªäººæˆ–ç»„ç»‡ä»¥æœ¬æ¨¡æ¿ä¸ºåŸºç¡€è¿›è¡Œä¿®æ”¹ã€æ‰©å±•è€Œç”Ÿæˆçš„æ–°çš„ä¸“ç”¨æ¨¡æ¿ï¼Œè¯·ä¸¥æ&nbsp;¼éµ
%   å®ˆ \LaTeX\ Project Public License åè®®ã€‚ç”±äºŽè¿çŠ¯åè®®è€Œå¼•èµ·çš„ä»»ä½•çº&nbsp;çº·äº‰ç«¯å‡ä¸Ž
%   æœ¬æ¨¡æ¿ä½œè€…æ—&nbsp;å…³ã€‚
% \end{enumerate}
% \end{abstract}
%
%
% \clearpage
% \pagestyle{fancy}
% \begin{multicols}{2}[
%   \setlength{\columnseprule}{.4pt}
%   \setlength{\columnsep}{18pt}]
%   \tableofcontents
% \end{multicols}
% \clearpage
%
% \section{æ¨¡æ¿ä»‹ç»}
% \thucoursework\ (\textbf{T}sing\textbf{h}ua \textbf{U}niversity \LaTeX\
% \textbf{Coursework} Template) æ˜¯ä¸ºäº†å¸®åŠ©æ¸…åŽå¤§å­¦å­¦ç”Ÿæ’°å†™è¯¾ç¨‹ä½œä¸šè€Œç¼–å†™
% çš„ \LaTeX\ æ¨¡æ¿ã€‚æœ€åˆç”±å¾ç¥¥ç¥¥å¸ˆå…„æ‹…ä»»\textit{Information Inference} è¿™é—¨è¯¾åŠ©æ•™æœŸé—´è®¾è®¡å‡ºæ¥ï¼Œå½“æ—¶å‘½åä¸º\texttt{idef.sty}ã€‚åŽæ¥ç”±èµµä¸°æŽ¥æ‰‹è¿›è¡Œæ‹“å±•å’Œå®Œå–„ã€‚
% æœ¬æ–‡æ¡£å°†å°½é‡å®Œæ•´çš„ä»‹ç»æ¨¡æ¿çš„ä½¿ç”¨æ–¹æ³•ï¼Œå¦‚æœ‰ä¸æ¸…æ¥šä¹‹å¤„å¯ä»¥å‚è€ƒç¤ºä¾‹æ–‡æ¡£æˆ–è€…æ&nbsp;¹æ®
% ç¬¬~\ref{sec:howtoask} èŠ‚è¯´æ˜Žæé—®ï¼Œæœ‰å…´è¶£è€…éƒ½å¯ä»¥å‚ä¸Žå®Œå–„æ­¤æ‰‹å†Œï¼Œä¹Ÿéžå¸¸æ¬¢è¿Žå¯¹ä»£
% ç&nbsp;çš„è´¡çŒ®ã€‚

% \section{å®‰è£…}
% \label{sec:installation}
%
%^^A å‘è¡Œç‰ˆ updated , 2018/5/17 https://mirror.ctan.org/systems/texlive/tlnet/tlpkg
% é˜…è¯»æ–‡æ¡£å¯ä»¥ä½¿ç”¨ä»¥ä¸‹å‘½ä»¤ï¼š
% \begin{shell}
% $ texdoc thucoursework
% \end{shell}
%
% å¦‚æžœè¦ä½¿ç”¨å¼€å‘ç‰ˆï¼Œéœ€è‡ªå·±ä¸‹è½½ï¼Œ\thucoursework\ ç›¸å…³é“¾æŽ¥ï¼š
% \begin{itemize}
% \item ä¸»é¡µï¼š\href{https://github.com/zhaofeng-shu33/THU-coursework-template}{GitHub}
% \item ä¸‹è½½ï¼š\href{https://www.ctan.org/pkg/thucoursework}{CTAN}
% \end{itemize}
%
% \subsection{æ¨¡æ¿çš„ç»„æˆ}
% ä¸‹è¡¨åˆ—å‡ºäº† \thucoursework\ çš„ä¸»è¦æ–‡ä»¶åŠå…¶åŠŸèƒ½ä»‹ç»ï¼š
%
% \begin{longtable}{l|p{8cm}}
% \toprule
% {\heiti æ–‡ä»¶ï¼ˆå¤¹ï¼‰} &amp; {\heiti åŠŸèƒ½æè¿°}\\\midrule
% \endfirsthead
% \midrule
% {\heiti æ–‡ä»¶ï¼ˆå¤¹ï¼‰} &amp; {\heiti åŠŸèƒ½æè¿°}\\\midrule
% \endhead
% \endfoot
% \endlastfoot
% thucoursework.dtx &amp; \textsc{DocStrip} æºæ–‡ä»¶ï¼ˆå¼€å‘ç”¨ï¼‰\\\midrule
% iihw.tex &amp; \xiangxiang ç¼–å†™çš„ä½¿ç”¨æ¨¡æ¿çš„è‹±æ–‡ä½œä¸šä¾‹å­\\
% ithw.tex &amp; \zhaofeng ç¼–å†™çš„ä½¿ç”¨æ¨¡æ¿çš„ä¸­æ–‡ä½œä¸šä¾‹å­\\ \midrule
% Makefile &amp; Makefile\\
%   &amp; latexmk é…ç½®æ–‡ä»¶ \\
% README.md &amp; Readme\\
% \textbf{thucoursework.pdf} &amp; ç”¨æˆ·æ‰‹å†Œï¼ˆæœ¬æ–‡æ¡£ï¼‰\\\bottomrule
% \end{longtable}
%
%
% \subsection{ç”Ÿæˆæ¨¡æ¿styæ–‡ä»¶å’Œç”¨æˆ·æ‰‹å†Œ}
% \label{sec:generate-cls}
% \note[æç¤ºï¼š]{è‹¥ä½¿ç”¨ linux æ“ä½œç³»ç»Ÿï¼Œå¯åœ¨å«æœ‰\file{Makefile}çš„ç›®å½•ä¸‹ç›´æŽ¥è¿è¡Œ \texttt{make doc} å‘½ä»¤
% ç”Ÿæˆæ¨¡æ¿styæ–‡ä»¶å’Œç”¨æˆ·æ‰‹å†Œ}
%
% åœ¨ä½¿ç”¨ä¹‹å‰å¯ä»¥ç”¨ä¸‹é¢çš„ä»£ç&nbsp;ç”Ÿæˆæ¨¡æ¿styæ–‡ä»¶å’Œç”¨æˆ·æ‰‹å†Œï¼š
%
% \begin{shell}
% $ xelatex thucoursework.dtx
% $ makeindex -s gind.ist -o thucoursework.ind thucoursework.idx
% $ makeindex -s gglo.ist -o thucoursework.gls thucoursework.glo
% $ xelatex thucoursework.dtx
% $ xelatex thucoursework.dtx  % ç”Ÿæˆè¯´æ˜Žæ–‡æ¡£ thucoursework.pdf
% \end{shell}
% 
%
%
% \subsection{ç”Ÿæˆä½œä¸š}
% \label{sec:generate-coursework}
% æœ¬èŠ‚ä»‹ç»å‡&nbsp;ç§å¸¸è§çš„ç”Ÿæˆä½œä¸šçš„æ–¹æ³•ã€‚ç”¨æˆ·å¯æ&nbsp;¹æ®è‡ªå·±çš„æƒ…å†µé€‰æ‹©ï¼Œä½¿ç”¨å‰è¯·ä»¿ç…§ä¾‹å­é‡Œçš„texæ–‡ä»¶ï¼Œä½¿ç”¨ 
% \begin{latex}
% \usepackage{iidef}
% \end{latex}
% å¼•ç”¨å®åŒ…ã€‚
% \subsubsection{\XeLaTeX}
% \label{sec:xelatex}
% å¾ˆå¤šç”¨æˆ·å¯¹ \LaTeX\ å‘½ä»¤æ‰§è¡Œçš„æ¬¡æ•°ä¸å¤ªæ¸…æ¥šã€‚ä¸€ä¸ªåŸºæœ¬çš„åŽŸåˆ™æ˜¯å¤šæ¬¡è¿è¡Œ \LaTeX\ å‘½
% ä»¤ç›´è‡³ä¸å†å‡ºçŽ°è­¦å‘Šã€‚ä¸‹é¢ç»™å‡ºç”Ÿæˆç¤ºä¾‹æ–‡æ¡£çš„è¯¦ç»†è¿‡ç¨‹ï¼ˆ\texttt{\#} å¼€å¤´çš„è¡Œä¸ºæ³¨
% é‡Šï¼‰ï¼Œé¦–å…ˆæ¥çœ‹æŽ¨èçš„ \texttt{xelatex} æ–¹å¼ï¼š
% \begin{shell}
% # 1. å‘çŽ°é‡Œé¢çš„å¼•ç”¨å…³ç³»ï¼Œæ–‡ä»¶åŽç¼€ .tex å¯ä»¥çœç•¥
% $ xelatex main
%
% # 2. ç¼–è¯‘å‚è€ƒæ–‡ä»¶æºæ–‡ä»¶ï¼Œç”Ÿæˆ bbl æ–‡ä»¶
% $ bibtex main
%
% # 3. ä¸‹é¢è§£å†³å¼•ç”¨
% $ xelatex main
% $ xelatex main   # æ­¤æ—¶ç”Ÿæˆå®Œæ•´çš„ pdf æ–‡ä»¶
% \end{shell}
%
% \subsubsection{PDF\LaTeX}
% \label{sec:pdflatex}
% å½“ä»…ä½¿ç”¨è‹±æ–‡å®Œæˆè¯¾ç¨‹ä½œä¸šæ—¶ï¼Œå¯ä»¥ä½¿ç”¨ PDF\LaTeXï¼Œç¼–è¯‘é€Ÿåº¦ä¼šå¿«å¾ˆå¤šã€‚æŒ‰ç…§ç¬¬~\ref{sec:xelatex} èŠ‚çš„é¡ºåºæ‰§è¡Œå³å¯ï¼Œåªæ˜¯å°†å‘½ä»¤ä¸­
% \texttt{xelatex} æ›¿æ¢ä¸º \texttt{pdflatex}ã€‚
%
% éœ€è¦æ³¨æ„çš„æ˜¯ PDF\LaTeX\ ä¸èƒ½å¤„ç†å¸¸è§çš„ EPS å›¾å½¢ï¼Œéœ€è¦å…ˆç”¨ \texttt{epstopdf} å°†å…¶è½¬åŒ–
% æˆ PDFã€‚ä¸è¿‡ PDF\LaTeX\ å¢žåŠ&nbsp;äº†å¯¹ pngï¼Œjpg ç­‰æ&nbsp;¼å¼çš„æ”¯æŒï¼Œæ¯”è¾ƒæ–¹ä¾¿ã€‚\TeX Live
% è‡ªä»Ž 2010 ç‰ˆæœ¬èµ·è‡ªåŠ¨è°ƒç”¨ \texttt{epstopdf} å°† EPS å›¾å½¢è½¬åŒ–ä¸º PDFã€‚
%
% \subsubsection{latexmk}
% \label{sec:latexmk}
% \texttt{latexmk} å‘½ä»¤æ”¯æŒå…¨è‡ªåŠ¨ç”Ÿæˆ \LaTeX\ ç¼–å†™çš„æ–‡æ¡£ï¼Œå¹¶ä¸”æ”¯æŒä½¿ç”¨ä¸åŒçš„å·¥å…·
% é“¾æ¥è¿›è¡Œç”Ÿæˆï¼Œå®ƒä¼šè‡ªåŠ¨è¿è¡Œå¤šæ¬¡å·¥å…·ç›´åˆ°äº¤å‰å¼•ç”¨éƒ½è¢«è§£å†³ã€‚ä¸‹é¢ç»™å‡ºäº†ä¸€ä¸ªç”¨
% \texttt{latexmk} è°ƒç”¨ \texttt{xelatex} ç”Ÿæˆæœ€ç»ˆæ–‡æ¡£çš„ç¤ºä¾‹ï¼š
% \begin{shell}
% # ä¸€å¥è¯å°±å¤Ÿäº†ï¼
% $ latexmk -xelatex Assignment
% \end{shell}
%
% \subsubsection{make}
% \label{sec:make}
% \note[æç¤ºï¼š]{ä½¿ç”¨ \texttt{make} ç¼–è¯‘ï¼Œéœ€è¦é…åˆlinux æ“ä½œç³»ç»Ÿã€‚}
%
%
% \subsection{å‡çº§}
% \label{sec:updgrade}
%
% \section{ä½¿ç”¨è¯´æ˜Ž}
% \label{sec:usage}
% æœ¬æ‰‹å†Œå‡å®šç”¨æˆ·å·²ç»èƒ½å¤„ç†ä¸€èˆ¬çš„ \LaTeX\ æ–‡æ¡£ã€‚å¦‚æžœ
% ä»Žæ¥æ²¡æœ‰æŽ¥è§¦è¿‡ \TeX\ å’Œ \LaTeXï¼Œå»ºè®®å…ˆå­¦ä¹&nbsp;ç›¸å…³çš„åŸºç¡€çŸ¥è¯†ã€‚
%
% \subsection{å…³äºŽæé—®}
% \label{sec:howtoask}
% æŒ‰ç…§ä¼˜å…ˆçº§æŽ¨èæé—®çš„ä½ç½®å¦‚ä¸‹ï¼š
%
% \begin{itemize}
% \item \href{https://github.com/zhaofeng-shu33/thucoursework/issues}{Github Issues}
% \item \href{https://github.com/CTeX-org/forum/issues}{ctex è®ºå›}
% \end{itemize}
%
% \subsection{ç¤ºä¾‹æ–‡ä»¶}
% \label{sec:userguide}
%
% æŽ¨èæ–°ç”¨æˆ·ä»Žæ¨¡æ¿è‡ªå¸¦çš„ç¤ºä¾‹æ–‡æ¡£å…¥æ‰‹ï¼Œé‡Œé¢åŒ…æ‹¬äº†å†™ä½œä¸šç”¨åˆ°çš„æ‰€æœ‰å‘½ä»¤åŠå…¶ä½¿ç”¨æ–¹æ³•ï¼Œ
% åªéœ€è¦ç”¨è‡ªå·±çš„å†…å®¹è¿›è¡Œç›¸åº”æ›¿æ¢å°±å¯ä»¥ã€‚å¯¹äºŽä¸æ¸…æ¥šçš„å‘½ä»¤å¯ä»¥æŸ¥é˜…æœ¬æ‰‹å†Œã€‚ä¸‹é¢çš„ä¾‹
% å­æè¿°äº†æ¨¡æ¿ä¸­ä½œä¸šçš„ç»„ç»‡å½¢å¼ï¼Œæ¥è‡ªäºŽç¤ºä¾‹æ–‡æ¡£ï¼Œå…·ä½“å†…å®¹å¯ä»¥å‚è€ƒæ¨¡æ¿é™„å¸¦
% \changes{v2.3}{2018/03/30}{[\zhaofeng] Add sample file \file{ithw.tex}}
% çš„ \file{iihw.tex} å’Œ \file{ithw.tex}ã€‚
%
% \lstinputlisting[style=lstStyleLaTeX]{iihw.tex}
%
%
% \subsection{ä½œä¸šé€‰é¡¹}
% \label{sec:option}
%
% \DescribeOption{thehwcnt}
%   æŒ‡å®šä½œä¸šåºå·ï¼Œ
%   ä¸ºå¯é€‰é¡¹ã€‚
% \begin{latex}
% % ä½¿ç”¨é»˜è®¤åºå·1
% \usepackage{iidef}
%
% % æŒ‡å®šåºå·ä¸º6
% \usepackage[thehwcnt=6]{iidef}
% \end{latex}
%
% \subsection{åŸºæœ¬ä¿¡æ¯}\label{sec:basic_info}
% \DescribeMacro{\thecourseinstitute}
% æŒ‡å®šå­¦æ&nbsp;¡æˆ–å­¦é™¢ï¼Œå¦‚æžœä½¿ç”¨ä¸­æ–‡ï¼Œè¯·å¼•ç”¨\pkg{ctex} å®åŒ…ã€‚
% \begin{latex}
% % æŒ‡å®šå­¦é™¢æ˜¯TBSI
% \thecourseinstitute{Tsinghua-Berkeley Shenzhen Institute}
%
% % æŒ‡å®šä¸­æ–‡å
% \thecourseinstitute{æ¸…åŽå¤§å­¦ç”µå­å·¥ç¨‹ç³»}
% \end{latex}
% 
% \DescribeMacro{\thecoursename}
% æŒ‡å®šè¯¾ç¨‹å
% \begin{latex}
% % æŒ‡å®šè¯¾ç¨‹åæ˜¯ Information Inference
% \thecoursename{Information Inference}
% % æŒ‡å®šè¯¾ç¨‹åæ˜¯ "åº”ç”¨ä¿¡æ¯è®º"
% \thecoursename{åº”ç”¨ä¿¡æ¯è®º}
% \end{latex}
%
% \DescribeMacro{\theterm}
% æŒ‡å®šå­¦æœŸ
% \begin{latex}
% % English example
% \theterm{Fall 2017}
% % ä¸­æ–‡ç¤ºä¾‹
% \theterm{2018å¹´æ˜¥å­£å­¦æœŸ}
% \end{latex}
%
% \DescribeMacro{\hwname}
% æŒ‡å®šä½œä¸šåï¼Œé»˜è®¤æ˜¯ Homework
% \begin{latex}
% % English example
% \hwname{Coursework}
% % ä¸­æ–‡ç¤ºä¾‹
% \hwname{ä½œä¸š}
% \end{latex}
% 
% \subsection{æ&nbsp;‡é¢˜}
% \DescribeMacro{\courseheader}
% å°†å…¶æ”¾åœ¨æ­£æ–‡å‰é¢ç”Ÿæˆä½œä¸šæ&nbsp;‡é¢˜
%
% \note[æç¤ºï¼š]{ä½¿ç”¨ \cs{courseheader} å‰éœ€ä½¿ç”¨~\ref{sec:basic_info}èŠ‚æè¿°çš„å®æŒ‡å®šç›¸å…³åŸºæœ¬ä¿¡æ¯ã€‚å¹¶ä¸”ä½¿ç”¨äº†\cs{courseheader}æ—&nbsp;éœ€å†ç”¨ \LaTeX\ é‡Œçš„\cs{maketitle}}
% \begin{latex}
% \begin{document}
% \courseheader
% \name{YOUR NAME}
% \end{latex}    
% \DescribeMacro{\name}
%^^A manually indentation 
% \indent ç”Ÿæˆå§“åã€ä½œä¸šåã€æ—¥æœŸ
%
% \note[æç¤ºï¼š]{ä½¿ç”¨ \cs{name} ä¼šç›´æŽ¥åœ¨æ–‡æ¡£ä¸­è¾“å‡ºå§“åã€ä½œä¸šåã€æ—¥æœŸï¼Œå›&nbsp;æ­¤å¦‚æžœéœ€è¦è‡ªå®šä¹‰ä½œä¸šåï¼Œéœ€è¦åœ¨ä½¿ç”¨\cs{name} å‰ç”¨ \cs{hwname} æŒ‡å®šä½œä¸šåç§°}
% \subsection{é¢˜ç›®è‡ªåŠ¨ç¼–å·}
% å»ºè®®ä½¿ç”¨åµŒå¥—çš„\texttt{enumerate} çŽ¯å¢ƒå¯¹é¢˜ç›®è‡ªåŠ¨ç¼–å·ï¼Œå¯æ¯”è¾ƒå¥½çš„è§£å†³è‡ªåŠ¨ç¼©è¿›çš„é—®é¢˜ã€‚
% æœ¬æ¨¡æ¿è®¾ç½®äº†ä¸€çº§åˆ—è¡¨ä¸ºä½œä¸šåºå·åŠ&nbsp;é¢˜ç›®åºå·ï¼Œæ¯”å¦‚ç¬¬6æ¬¡ä½œä¸šç¬¬3é¢˜ä¼šæŽ’ç‰ˆæˆ \enspace 6.3.\enspace ï¼Œå¯¹äºŽæŸä¸€é“é¢˜ç›®çš„ä¸åŒå°é—®ï¼Œé»˜è®¤æ˜¯ç”¨(a),(b),(c) è¿›è¡Œ
% é¡ºåºç¼–æŽ’ã€‚
% \begin{latex}
%   \begin{enumerate}
%    \item First Problem
%    \item Second Problem
%       \begin{enumerate}
%          \item first question of the second problem
%          \item second question of the second problem
%       \end{enumerate}
%   \end{enumerate}
% \end{latex}
% 
% å¦‚æžœéœ€è¦æ”¹å˜é»˜è®¤çš„è®¾ç½®ï¼Œæ¯”å¦‚ä¸åŒå°é—®ä½¿ç”¨ç½—é©¬æ•°å­—ï¼Œåˆ™å¯ä»¥åœ¨æ­£æ–‡å¼€å§‹ä¹‹å‰ä½¿ç”¨
% \begin{latex}
% \setlist[enumerate,2]{label=\roman*.}
% \end{latex}
% è¿›è¡Œè®¾ç½®ã€‚
%
% \subsection{è¯æ˜Žå’Œè§£çš„çŽ¯å¢ƒ}
% \myentry{è¯æ˜Ž}
% \DescribeEnv{proof}
% \texttt{proof} çŽ¯å¢ƒæ˜¯ \pkg{amsthm} å®åŒ…æä¾›çš„ï¼Œå¼•ç”¨æœ¬æ¨¡æ¿åŽå¯ä»¥ç›´æŽ¥ä½¿ç”¨ã€‚
% \begin{latex}
%    \begin{proof}
%      proof contents go here
%    \end{proof}
% \end{latex}
%  åœ¨ä¸­æ–‡ä½œä¸šä¸­ï¼Œå¼•ç”¨\pkg{ctex} å®åŒ…
%  åŽ â€œè¯æ˜Žâ€ çš„çŽ¯å¢ƒä¼šå˜æˆ ä¸­æ–‡ï¼Œå¦‚æžœéœ€è¦æ”¹å˜é»˜è®¤æ–‡å­—ï¼Œå¯ä»¥åœ¨åºè¨€ä¸­ä½¿ç”¨ \cs{ctexset} é…ç½®
% \begin{latex}
%   \ctexset{
%       proofname = \heiti{è¯æ˜Ž} 
%   }  
%   \begin{document}
% \end{latex}
% \myentry{è§£}
% \DescribeEnv{solution}
% \texttt{solution} çŽ¯å¢ƒæ˜¯æœ¬æ¨¡æ¿æä¾›çš„ï¼Œç”¨äºŽå›žç­”â€œæ±‚è§£XXXâ€ä¹‹ç±»çš„é—®é¢˜ã€‚
% \begin{latex}
%    \begin{solution}
%      solution contents go here
%    \end{solution}
% \end{latex}
% \DescribeMacro{slname}
% åœ¨ä¸­æ–‡ä½œä¸šä¸­ï¼Œå¯èƒ½éœ€è¦å°† \texttt{solution} çŽ¯å¢ƒé»˜è®¤çš„ \textit{solution.} å˜æˆä¸­æ–‡ï¼Œä¸ºæ­¤å¯ä»¥å°†
% \begin{latex}
%    \slname{\heiti{è§£}}
% \end{latex}          
% æ”¾åœ¨ä½¿ç”¨ \texttt{solution} çŽ¯å¢ƒä¹‹å‰ã€‚
% \subsection{å¸¸ç”¨æ•°å­¦ç¬¦å·}
% æœ¬æ–‡æ¡£é¢„å…ˆå®šä¹‰äº†å¸¸ç”¨çš„æ•°å­¦ç¬¦å·ï¼Œåœ¨\file{iihw.tex} ç¤ºä¾‹æ–‡ä»¶ä¸­å¯¹è¿™äº›ç¬¦å·çš„ä½¿ç”¨æœ‰è¯¦ç»†è¯´æ˜Žã€‚
% \section{è‡´è°¢}
% \label{sec:thanks}
% æ„Ÿè°¢å¸ˆå…„å¾ç¥¥ç¥¥çš„æœ€åˆçš„ä½œä¸šæ¨¡æ¿è®¾è®¡ï¼Œ \textsc{Thu}\-\textsc{Thesis} å®åŒ…çš„æ–‡æ¡£æºç&nbsp;ã€‚
% \changes{v2.4}{2018/04/09}{[\zhaofeng] finish the chinese pdf manual}
% \changes{v2.5}{2018/05/20}{[\zhaofeng] make documentation more compact by including \texttt{dtx-style.sty} in the \texttt{dtx} file itself.}
% \changes{v2.5.1}{2020/02/23}{[\zhaofeng] remove dtx-style source code from manual}
% \StopEventually{\PrintChanges\PrintIndex}
% \clearpage
%
% \section{å®žçŽ°ç»†èŠ‚}
%
% \subsection{åŸºæœ¬ä¿¡æ¯}
% \changes{v2.0}{2018/03/22}{[\zhaofeng] Make it a latex package(.sty)}
%    \begin{macrocode}
%&lt;*sty&gt;
\NeedsTeXFormat{LaTeX2e}[1999/12/01]
\ProvidesClass{iidef}
[2020/09/09 2.6 Tsinghua University Coursework Template]
%    \end{macrocode}
% \subsection{è£…è½½å®åŒ…}
% \label{sec:loadpackage}
%
% å¼•ç”¨çš„å®åŒ…å’Œç›¸åº”çš„å®šä¹‰ã€‚
% \changes{v2.6}{2020/09/09}{[\zhaofeng] support \texttt{exam} document class}
%    \begin{macrocode}
%% configuration of nested enumerate env
\RequirePackage{enumitem}
%% set hwcount key-value option
\RequirePackage{kvoptions}
%% required by macro DeclareMathOperator
\RequirePackage{amsmath}
%% Set up page headers using with fancyhdr
\@ifundefined{lhead}{\RequirePackage{fancyhdr}}
{\def\@thulhead{thulhead}}
%define the solution env with amsthm proof
\RequirePackage{amsthm}
%    \end{macrocode}
%
% å®šä¹‰å­¦æœŸã€å­¦é™¢ã€è¯¾ç¨‹åï¼Œä½œä¸šå
% \changes{v2.3}{2018/03/30}{[\zhaofeng] User configuration of \cs{hwname}}
%    \begin{macrocode}
%% semester
\def\@term{term}
\newcommand{\theterm}[1]{\renewcommand\@term{#1}}
%% institute
\newcommand{\@courseinstitute}[1]{institute}
\newcommand{\thecourseinstitute}[1]{\renewcommand\@courseinstitute{#1}}
%% coursename
\newcommand{\@coursename}[1]{coursename}
\newcommand{\thecoursename}[1]{\renewcommand\@coursename{\textsc{#1}}}
%% user can rewrite homework name
\def\@hwname{Homework}
\def\hwname#1{\renewcommand\@hwname{#1}}
%    \end{macrocode}
% \subsection{ä½œä¸šé€‰é¡¹}
% \changes{v2.1}{2018/03/22}{[\zhaofeng] Use kvoptions to set the coursework counter.}
%    \begin{macrocode}
%% \iidef@thehwcnt = 1
\DeclareStringOption[1]{thehwcnt}
\ProcessKeyvalOptions*
\def\thehwcnt{\iidef@thehwcnt}
%    \end{macrocode}
% \subsection{æ&nbsp;‡é¢˜}
% å®šä¹‰ \cs{courseheader}
% \changes{v2.2}{2018/03/27}{[\zhaofeng] Use fancyhdr to set the coursework user file header.}
%    \begin{macrocode}
%% page header setup, distinguish between first page(plain style) 
%% and second page on (runningpage style)
%%***************************************************************************
\newcommand{\courseheader}{
\thispagestyle{plain}%first page use native plain style to suppress header
\vspace*{-1in}
\begin{center}
\@courseinstitute\\
\@coursename\\
\@term
\vspace*{0.1in}
\hrule
\end{center}
\begin{center}
  \underline{\bf \@hwname\;\thehwcnt} \\
\end{center}
}
\@ifundefined{@thulhead}{
\fancypagestyle{runningpage}
{
  \fancyhead[L]{\small\@coursename}
  \fancyhead[R]{\small\@courseinstitute}
}
%% use runningpage style from second page on 
\pagestyle{runningpage}
}{}
%% *********************************************************************************************
%    \end{macrocode}
%
% å®šä¹‰ \cs{name}
%    \begin{macrocode}
%%name command macro
%%*************************
\newcommand{\name}[1]{
\begin{flushleft}
  #1\hfill
  \today
\end{flushleft}
\hrule

\vspace{2em}

\flushleft
}
%%*************************
%    \end{macrocode}
% \subsection{é¢˜ç›®è‡ªåŠ¨ç¼–å·}
%    \begin{macrocode}
%% enumitem related configuration
\setlist[enumerate,1]{label=\thehwcnt.\arabic*.}
\setlist[enumerate,2]{label=(\alph*)}
\setlist[enumerate,3]{label=\roman*.}
\setlist[enumerate,4]{label=\greek*}
%    \end{macrocode}
% \subsection{è§£çš„çŽ¯å¢ƒ}
% \changes{v2.3}{2018/03/30}{[\zhaofeng] Add \texttt{solution} environment}
% \changes{v2.3}{2018/03/30}{[\zhaofeng] user configuration of \texttt{solution} environment name}
% åŒ…è£… \pkg{amsthm} çš„ \cs{proof}ï¼Œå¯ä»¥é€šè¿‡ \cs{slname} å¯¹é»˜è®¤â€è§£â€œçš„æ–‡å­—è¿›è¡Œä¿®æ”¹ã€‚ 
%    \begin{macrocode}
%%******************************
\def\@slname{Solution}
\def\slname#1{\renewcommand\@slname{#1}}

\@ifundefined{solution}{
\newenvironment{solution}
{
\proof[\@slname]
}
{
%% no qed symbol in solution env
\renewcommand{\qedsymbol}{}
\endproof
}
}{}
%%******************************
%    \end{macrocode}
% \subsection{å¸¸ç”¨æ•°å­¦ç¬¦å·}
%    \begin{macrocode}
%%common math symbols go here
%%*************************************************
\def\v#1{\underline{#1}}
\newcommand{\uc}{\underline{c}}    % c, vec
\newcommand{\uv}{\underline{v}}    % x, vec
\newcommand{\uw}{\underline{w}}    % w, vec
\newcommand{\ux}{\underline{x}}    % x, vec
\newcommand{\uy}{\underline{y}}    % y, vec
\newcommand{\uz}{\underline{z}}    % z, vec
\newcommand{\um}{\underline{m}}    % m, vec
\newcommand{\rvx}{\mathsf{x}}    % x, r.v.
\newcommand{\rvy}{\mathsf{y}}    % y, r.v.
\newcommand{\rvz}{\mathsf{z}}    % z, r.v.
\newcommand{\rvw}{\mathsf{w}}    % w, r.v.
\newcommand{\rvH}{\mathsf{H}}    % H, r.v.
\newcommand{\urvx}{\underline{\mathsf{x}}}    % x, r.v. vec
\newcommand{\urvy}{\underline{\mathsf{y}}}    % y, r.v. vec
\newcommand{\urvz}{\underline{\mathsf{z}}}    % z, r.v. vec
\newcommand{\urvw}{\underline{\mathsf{w}}}    % w, r.v. vec

\newcommand{\defas}{\triangleq} %\coloneqq
\newcommand{\reals}{\mathbb{R}}
\newcommand{\TT}{\mathrm{T}}    % transpose
\DeclareMathOperator*{\argmax}{arg\,max}
\DeclareMathOperator*{\argmin}{arg\,min}
\DeclareMathOperator*{\argsup}{arg\,sup}
\DeclareMathOperator*{\arginf}{arg\,inf}
\DeclareMathOperator{\diag}{diag}
\DeclareMathOperator{\Var}{Var}
\DeclareMathOperator{\Cov}{Cov}
\DeclareMathOperator{\MSE}{MSE}
\DeclareMathOperator{\1}{\mathds{1}}
\DeclareMathOperator{\In}{\mathbb{I}}
\DeclareMathOperator{\E}{\mathbb{E}}
\DeclareMathOperator{\Prob}{\mathbb{P}}
\newcommand\independent{\protect\mathpalette{\protect\independenT}{\perp}}
\def\independenT#1#2{\mathrel{\rlap{$#1#2$}\mkern2mu{#1#2}}}
%%************************************************************************************
%&lt;/sty&gt;
%    \end{macrocode}
% \iffalse
%    \begin{macrocode}
%&lt;*dtx-style&gt;
\ProvidesPackage{dtx-style}
\RequirePackage{hypdoc}
\RequirePackage[UTF8,scheme=chinese]{ctex}
\RequirePackage{newpxtext}
\RequirePackage{newpxmath}
\RequirePackage[
  top=2.5cm, bottom=2.5cm,
  left=4cm, right=2cm,
  headsep=3mm]{geometry}
\RequirePackage{array,longtable,booktabs}
\RequirePackage{listings}
\RequirePackage{fancyhdr}
\RequirePackage{xcolor}
\RequirePackage{enumitem}
\RequirePackage{etoolbox}
\RequirePackage{metalogo}

\colorlet{thu@macro}{blue!60!black}
\colorlet{thu@env}{blue!70!black}
\colorlet{thu@option}{purple}
\patchcmd{\PrintMacroName}{\MacroFont}{\MacroFont\bfseries\color{thu@macro}}{}{}
\patchcmd{\PrintDescribeMacro}{\MacroFont}{\MacroFont\bfseries\color{thu@macro}}{}{}
\patchcmd{\PrintDescribeEnv}{\MacroFont}{\MacroFont\bfseries\color{thu@env}}{}{}
\patchcmd{\PrintEnvName}{\MacroFont}{\MacroFont\bfseries\color{thu@env}}{}{}

\def\DescribeOption{%
  \leavevmode\@bsphack\begingroup\MakePrivateLetters%
  \Describe@Option}
\def\Describe@Option#1{\endgroup
  \marginpar{\raggedleft\PrintDescribeOption{#1}}%
  \thu@special@index{option}{#1}\@esphack\ignorespaces}
\def\PrintDescribeOption#1{\strut \MacroFont\bfseries\sffamily\color{thu@option} #1\ }
\def\thu@special@index#1#2{\@bsphack
  \begingroup
    \HD@target
    \let\HDorg@encapchar\encapchar
    \edef\encapchar usage{%
      \HDorg@encapchar hdclindex{\the\c@HD@hypercount}{usage}%
    }%
    \index{#2\actualchar{\string\ttfamily\space#2}
           (#1)\encapchar usage}%
    \index{#1:\levelchar#2\actualchar
           {\string\ttfamily\space#2}\encapchar usage}%
  \endgroup
  \@esphack}

\lstdefinestyle{lstStyleBase}{%
   basicstyle=\small\ttfamily,
   aboveskip=\medskipamount,
   belowskip=\medskipamount,
   lineskip=0pt,
   boxpos=c,
   showlines=false,
   extendedchars=true,
   upquote=true,
   tabsize=2,
   showtabs=false,
   showspaces=false,
   showstringspaces=false,
   numbers=none,
   linewidth=\linewidth,
   xleftmargin=4pt,
   xrightmargin=0pt,
   resetmargins=false,
   breaklines=true,
   breakatwhitespace=false,
   breakindent=0pt,
   breakautoindent=true,
   columns=flexible,
   keepspaces=true,
   gobble=2,
   framesep=3pt,
   rulesep=1pt,
   framerule=1pt,
   backgroundcolor=\color{gray!5},
   stringstyle=\color{green!40!black!100},
   keywordstyle=\bfseries\color{blue!50!black},
   commentstyle=\slshape\color{black!60}}

\lstdefinestyle{lstStyleShell}{%
   style=lstStyleBase,
   frame=l,
   rulecolor=\color{purple},
   language=bash}

\lstdefinestyle{lstStyleLaTeX}{%
   style=lstStyleBase,
   frame=l,
   rulecolor=\color{violet},
   language=[LaTeX]TeX}

\lstnewenvironment{latex}{\lstset{style=lstStyleLaTeX}}{}
\lstnewenvironment{shell}{\lstset{style=lstStyleShell}}{}

\setlist{nosep}

\DeclareDocumentCommand{\option}{m}{\textsf{#1}}
\DeclareDocumentCommand{\env}{m}{\texttt{#1}}
\DeclareDocumentCommand{\pkg}{s m}{%
  \texttt{#2}\IfBooleanF#1{\thu@special@index{package}{#2}}}
\DeclareDocumentCommand{\file}{s m}{%
  \texttt{#2}\IfBooleanF#1{\thu@special@index{file}{#2}}}
\newcommand{\myentry}[1]{%
  \marginpar{\raggedleft\color{purple}\bfseries\strut #1}}
\newcommand{\note}[2][Note]{{%
  \color{magenta}{\bfseries #1}\emph{#2}}}

\def\thucoursework{\textsc{Thu}\-\textsc{Coursework}}
\endinput
%&lt;/dtx-style&gt;
%    \end{macrocode}
% \fi
% \Finale
%
\endinput
</pre></body></html>