feat: 9.5.9
This commit is contained in:
		
							parent
							
								
									cb1753732b
								
							
						
					
					
						commit
						35f43a7909
					
				
					 1084 changed files with 558985 additions and 0 deletions
				
			
		
							
								
								
									
										2
									
								
								stex/inputs/assign-prep.stex
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										2
									
								
								stex/inputs/assign-prep.stex
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,2 @@ | |||
| \xdef\selfstudy#1{% | ||||
|  \xedef\studylab{\genlab}\raw{\selfstudy}{#1}{\studylab}\label{\studylab}} | ||||
							
								
								
									
										1119
									
								
								stex/inputs/assignment.bst
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										1119
									
								
								stex/inputs/assignment.bst
									
										
									
									
									
										Normal file
									
								
							
										
											
												File diff suppressed because it is too large
												Load diff
											
										
									
								
							
							
								
								
									
										233
									
								
								stex/inputs/assignment.cls
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										233
									
								
								stex/inputs/assignment.cls
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,233 @@ | |||
| %%% assignment.cls | ||||
| 
 | ||||
| \ProvidesClass{assignment} | ||||
| 
 | ||||
| \def\ProvidesClass#1[#2]{\relax} | ||||
| 
 | ||||
| % \input article.cls | ||||
| \LoadClass{article} | ||||
| 
 | ||||
| \def\copyrightnotice{\ifauthor\copyright~\number\year~\theauthor\fi} | ||||
| \def\ps@plain{\let\@mkboth\@gobbletwo | ||||
|      \let\@oddhead\@empty\def\@oddfoot{\reset@font | ||||
|      \footer}\let\@evenhead\@empty\let\@evenfoot\@oddfoot} | ||||
| \def\footer{\hfil\ifnum\c@page =1 \copyrightnotice\else\thepage\fi\hfil} | ||||
| \let\trueenddocument=\enddocument | ||||
| \def\enddocument{ | ||||
|  \theselfstudy | ||||
|  \trueenddocument} | ||||
| 
 | ||||
| \newif\iftitle\titlefalse | ||||
| \newif\ifauthor\authorfalse | ||||
| \newif\ifdate\datefalse | ||||
| \def\title#1{\def\thetitle{#1}\titletrue} | ||||
| \def\author#1{\def\theauthor{#1}\authortrue} | ||||
| \def\date#1{\def\thedate{#1}\datetrue} | ||||
| \def\maketitle{ | ||||
| \begin{flushleft} | ||||
| \iftitle{\LARGE\textbf{\thetitle}} \\[6pt]\fi | ||||
| \ifauthor{\Large\textbf{\theauthor}} \\\fi | ||||
| \ifdate{\vskip 3pt\Large\textbf{\thedate}} \\\fi | ||||
| \end{flushleft}} | ||||
| 
 | ||||
| %%% to support hypertext index entries | ||||
| \def\hindex#1{\index} % ignore the label here---no links in printed version | ||||
| 
 | ||||
| \newcommand{\hyperlink}[3][]{#3} | ||||
| \newcommand{\href}[3][]{#3} | ||||
| \newcommand{\hpageref}[3][]{#3} | ||||
| \let\true@ref=\ref\renewcommand{\ref}[2][]{\true@ref{#2}} | ||||
| \let\true@pageref=\pageref\renewcommand{\pageref}[2][]{\true@pageref{#2}} | ||||
| 
 | ||||
| \newif\iflatex\latextrue | ||||
| \newif\ifhtml\htmlfalse | ||||
| 
 | ||||
| %%% table of contents | ||||
| \renewcommand{\@pnumwidth}{1.55em} | ||||
| \renewcommand{\@tocrmarg} {2.55em} | ||||
| \renewcommand{\@dotsep}{4.5} | ||||
| \setcounter{tocdepth}{2} | ||||
| \newcommand*{\l@chapter}[2]{% | ||||
|   \ifnum \c@tocdepth >\m@ne | ||||
|     \addpenalty{-\@highpenalty}% | ||||
|     \vskip 1.0em \@plus\p@ | ||||
|     \setlength\@tempdima{1.5em}% | ||||
|     \begingroup | ||||
|       \parindent \z@ \rightskip \@pnumwidth | ||||
|       \parfillskip -\@pnumwidth | ||||
|       \leavevmode \bfseries | ||||
|       \advance\leftskip\@tempdima | ||||
|       \hskip -\leftskip | ||||
|       #1\nobreak\hfil \nobreak\hbox to\@pnumwidth{\hss #2}\par | ||||
|       \penalty\@highpenalty | ||||
|     \endgroup | ||||
|   \fi} | ||||
| \renewcommand*{\l@section}[2]{\expandafter\l@xection#1\hobbes{#2}} | ||||
| \renewcommand*{\l@subsection}[2]{\expandafter\l@subxection#1\hobbes{#2}} | ||||
| \renewcommand*{\l@subsubsection}[2]{\expandafter\l@subsubxection#1\hobbes{#2}} | ||||
| \def\lead{\leaders\hbox to .3em{{\footnotesize \hss.\hss}}\hfil} | ||||
| \def\l@xection#1\calvin#2\hobbes#3{% | ||||
| \strut#1.&\multispan{3}{#2~}\lead&~#3\cr | ||||
| &\multispan{3}{\hphantom{#2~\hspace{2em}}}\hfil&\cr | ||||
| } | ||||
| \def\l@subxection#1\calvin#2\hobbes#3{% | ||||
| \strut.&\multispan{2}{#2~}\lead&~#3\cr | ||||
| &&\multispan{2}{\hphantom{#2~\hspace{2em}}}\hfil&\cr | ||||
| } | ||||
| \def\l@subsubxection#1\calvin#2\hobbes#3{% | ||||
| \strut&.&\multispan{1}{#2~}\lead&~#3\cr | ||||
| &&&\multispan{1}{\hphantom{#2~\hspace{2em}}}\hfil&\cr | ||||
| } | ||||
| \def\inserttoc{ | ||||
| \bigskip{\bfseries Contents}\medskip | ||||
| \begingroup\offinterlineskip | ||||
| \halign{\hfil##\hspace{.5em}&##\hfil\hspace{.5em}&##\hfil\hspace{.5em}&##\hfil\hspace{.5em}&\hfil##\cr | ||||
| \input{\jobname.toc} | ||||
| }\endgroup} | ||||
| \renewcommand{\tableofcontents}{% | ||||
| \def\numberline ##1{##1\calvin} | ||||
| \IfFileExists{\jobname.toc}{\inserttoc}{\typeout{No file \jobname.toc}} | ||||
| \begingroup | ||||
| \def\contentsline##1##2##3{\relax} | ||||
| \@starttoc{toc} | ||||
| \endgroup | ||||
| } | ||||
| 
 | ||||
| \newcounter{exercise} | ||||
| \renewcommand{\theexercise}{\arabic{exercise}} | ||||
| \def\@startexercise{\par\bigskip | ||||
|   \refstepcounter{exercise}\goodbreak | ||||
|   \par\hrule width \hsize{\hfil}\\\nobreak | ||||
|   \textbf{Exercise \theexercise. }\ignorespaces} | ||||
| \newenvironment{exercise} | ||||
|   {\begingroup | ||||
|    \def\afterschemedisplay{\removelastskip\penalty10000\vskip5pt} | ||||
|    \let\newexercise=\@startexercise\newexercise} | ||||
|   {\par\removelastskip\penalty10000\kern6pt\hrule width \hsize{\hfil}\endgroup} | ||||
| \newcounter{subexercise}[exercise] | ||||
| \renewcommand{\thesubexercise}{\theexercise\alph{subexercise}} | ||||
| \newcommand{\subexercise}{\par\refstepcounter{subexercise}\medskip\textbf{\thesubexercise. }} | ||||
| 
 | ||||
| %%% self study questions | ||||
| %%% we'd like to create the self study file and load it all on the same | ||||
| %%% pass, but this is not TeXnically feasible if we want to include page | ||||
| %%% numbers.  TeX delays file writing and closing until its output | ||||
| %%% routines run so that it can get the page numbers correct, so the file | ||||
| %%% may not be complete by the time we input it.  If we use \immediate | ||||
| %%% to get the writing and closing done earlier, the page numbers won't | ||||
| %%% be correct.  so we create \jobname.rawsst and count on the make file to | ||||
| %%% copy it to \jobname.sst before the next run.  We will need to do something | ||||
| %%% even more elaborate once we start generating a book with self-study | ||||
| %%% questions in each chapter. | ||||
| \newwrite\sstudy | ||||
| \newcounter{selfstudycounter} | ||||
| \renewcommand{\theselfstudycounter}{\arabic{selfstudycounter}} | ||||
| \openout\sstudy=\jobname.rawsst | ||||
| \newif\ifselfstudy\selfstudyfalse | ||||
| \def\selfstudy{\stepcounter{selfstudycounter}\selfstudytrue | ||||
|   \begingroup\@sanitize\addselfstudy} | ||||
| \def\addselfstudy#1#2{\endgroup | ||||
|   \edef\sstudyhead{\write\sstudy}% | ||||
|   \edef\sstudyentry{{\string\sstudyentry{#1}{#2}{\theselfstudycounter}}}% | ||||
|   \expandafter\sstudyhead\sstudyentry} | ||||
| \def\theselfstudy{\ifselfstudy\realselfstudy\fi} | ||||
| \def\realselfstudy{\begingroup | ||||
|   \def\sstudyentry##1##2##3{\par\bigskip\textbf{##3. } ##1 [Page \pageref{##2}]} | ||||
|   \section{Questions for self study}\label{section:selfstudy} | ||||
|   \input \jobname.sst | ||||
|   \endgroup} | ||||
| 
 | ||||
| %%% bibliography | ||||
| \newdimen\bibindent \bibindent=1.5em | ||||
| \renewcommand{\newblock}{} | ||||
| \renewenvironment{thebibliography}[1] | ||||
|      {\chapter{Bibliography} | ||||
|       \list{\@biblabel{\arabic{enumiv}}}% | ||||
|            {\settowidth\labelwidth{\@biblabel{#1}}% | ||||
|             \leftmargin\labelwidth | ||||
|             \advance\leftmargin\labelsep | ||||
|             \usecounter{enumiv}% | ||||
|             \let\p@enumiv\@empty | ||||
|             \renewcommand{\theenumiv}{\arabic{enumiv}}}% | ||||
|       \renewcommand{\newblock}{\hskip .11em \@plus.33em \@minus.07em}% | ||||
|       \sloppy\clubpenalty4000\widowpenalty4000% | ||||
|       \sfcode`\.=\@m} | ||||
|      {\def\@noitemerr | ||||
|        {\@latex@warning{Empty `thebibliography' environment}}% | ||||
|       \endlist} | ||||
| 
 | ||||
| %%% index | ||||
| \def\notsupposedtobehereindexname{\indexname} | ||||
| \renewenvironment{theindex} | ||||
|                {\if@openright\cleardoublepage\else\clearpage\fi | ||||
|                 \raggedright | ||||
|                 \columnseprule \z@ | ||||
|                 \columnsep 35\p@ | ||||
|                 \twocolumn[\plainchapterhead{\indexname}]% | ||||
|                 \addcontentsline{toc}{chapter}{\indexname}% | ||||
|                 \chaptermark{\indexname}{\notsupposedtobehereindexname}% | ||||
|                 \thispagestyle{plain}\parindent\z@ | ||||
|                 \parskip\z@ \@plus .3\p@\relax | ||||
|                 \let\item\@idxitem} | ||||
|                {\clearpage} | ||||
| \renewcommand{\@idxitem}  {\par\hangindent 40\p@} | ||||
| \renewcommand{\subitem}   {\par\hangindent 40\p@ \hspace*{20\p@}} | ||||
| \renewcommand{\subsubitem}{\par\hangindent 40\p@ \hspace*{30\p@}} | ||||
| \renewcommand{\indexspace}{\par \vskip 10\p@ \@plus5\p@ \@minus3\p@\relax} | ||||
| 
 | ||||
| %%% latex.ltx redefinitions | ||||
| %% leave padding page blank (no header) | ||||
| \def\cleardoublepage{\clearpage\if@twoside \ifodd\c@page\else | ||||
|     {\pagestyle{empty}\hbox{}\newpage\if@twocolumn\hbox{}\newpage\fi}\fi\fi} | ||||
| %% change section headers to "1.1. foo" instead of "1.1  foo" | ||||
| \def\@seccntformat#1{\csname the#1\endcsname. } | ||||
| %% change numbered table of contents lines to "1.1. foo" instead of "1.1  foo" | ||||
| \def\numberline#1{#1. } | ||||
| 
 | ||||
| \renewenvironment{description} | ||||
|                {\list{}{\labelwidth\z@ \itemindent-\leftmargin | ||||
|                         \let\makelabel\descriptionlabel}} | ||||
|                {\endlist} | ||||
| \renewcommand*\descriptionlabel[1]{\hspace\labelsep #1} | ||||
| 
 | ||||
| \def\itemvdots{\item[] \mbox{\vdots}} | ||||
| 
 | ||||
| \def\parheader#1 {\medskip\noindent{\bf #1.}~~} | ||||
| 
 | ||||
| %%% grammar support | ||||
| \newenvironment{grammar} | ||||
|   {\begingroup | ||||
|     \def\orbar{&\bar&} | ||||
|     \def\nobar{&&} | ||||
|     \def\longis{&$\longrightarrow$&} | ||||
|    \penalty-100\vskip 4pt\begin{tabular}{lcl}} | ||||
|   {\end{tabular}\penalty-200\vskip 4pt\endgroup} | ||||
| \def\bar{$\vert$} | ||||
| \def\ang#1{$\langle${\small\rm{}#1}$\rangle$} | ||||
| \def\kstar{\raise.5ex\hbox{\scheme{*}}} | ||||
| \def\kplus{\raise.5ex\hbox{\scheme{+}}} | ||||
| 
 | ||||
| \newcounter{alphacount} | ||||
| \def\alphalabel{\textit{\alph{alphacount}}.} | ||||
| \newenvironment{alphalist} | ||||
|   {\begingroup\let\beforeschemedisplay=\relax\let\afterschemedisplay=\relax | ||||
|    \begin{list}{\alphalabel}{\usecounter{alphacount}\itemsep=0pt\parsep=0pt% | ||||
|         \topsep=0pt}} | ||||
|   {\end{list}\endgroup} | ||||
| 
 | ||||
| %%% final set up | ||||
| \renewcommand{\contentsname}{Contents} | ||||
| \newcommand{\bibname}{Bibliography} | ||||
| \renewcommand{\indexname}{Index} | ||||
| \renewcommand{\today}{\ifcase\month\or | ||||
|   January\or February\or March\or April\or May\or June\or | ||||
|   July\or August\or September\or October\or November\or December\fi | ||||
|   \space\number\day, \number\year} | ||||
| \setlength\columnsep{10\p@} | ||||
| \setlength\columnseprule{0\p@} | ||||
| \pagestyle{headings} | ||||
| \pagenumbering{arabic} | ||||
| 
 | ||||
| \if@twoside\else\raggedbottom\fi | ||||
| \endinput | ||||
| %%% end of assignment.cls | ||||
							
								
								
									
										173
									
								
								stex/inputs/assignment.hcls
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										173
									
								
								stex/inputs/assignment.hcls
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,173 @@ | |||
| %%% assignment.hcls | ||||
| 
 | ||||
| \newif\iflatex\latexfalse | ||||
| \newif\ifhtml\htmltrue | ||||
| 
 | ||||
| % should be built in | ||||
| \newenvironment{center} | ||||
|   {\raw{<center>}} | ||||
|   {\raw{</center>}} | ||||
| 
 | ||||
| \def\copyrightnotice{\ifauthor\par\raw{<hr>}\copyright~\year~\theauthor\par\fi} | ||||
| \let\trueenddocument=\enddocument | ||||
| \def\enddocument{ | ||||
|  \theselfstudy | ||||
|  \begin{divertoutput}[toc] | ||||
|   \ifsubsubsec\raw{</table></td></tr>}\fi | ||||
|   \ifsubsec\raw{</table></td></tr>}\fi | ||||
|  \end{divertoutput} | ||||
|  \copyrightnotice\trueenddocument} | ||||
| 
 | ||||
| \newif\iftitle\titlefalse | ||||
| \newif\ifdate\datefalse | ||||
| \newif\ifauthor\authorfalse | ||||
| \def\title#1{\def\thetitle{#1}\titletrue} | ||||
| \def\date#1{\def\thedate{#1}\datetrue} | ||||
| \def\author#1{\def\theauthor{#1}\authortrue} | ||||
| \def\maketitle{% | ||||
| \iftitle\raw{<h1>}\thetitle\raw{</h1>}\fi | ||||
| \ifauthor | ||||
|  \ifdate | ||||
|   \raw{<h2>}\theauthor\\\thedate\raw{</h2>}% | ||||
|  \else | ||||
|   \raw{<h2>}\theauthor\raw{</h2>}% | ||||
|  \fi | ||||
| \else | ||||
|  \ifdate\raw{<h2>}\thedate\raw{</h2>}\fi | ||||
| \fi} | ||||
| 
 | ||||
| %%% table of contents | ||||
| \newif\ifsubsec\subsecfalse | ||||
| \newif\ifsubsubsec\subsubsecfalse | ||||
| \newcommand{\tableofcontents}{ | ||||
| \raw{<table cellpadding=0 cellspacing=0>} | ||||
| \rawinput{\jobname.htoc} | ||||
| \raw{</table>} | ||||
| \openrawfile{toc}{\jobname.htoc}} | ||||
| 
 | ||||
| % we \let\label=\nolabel within toc entries to avoid inserting | ||||
| % labels that belong with the labeled entity, not the toc | ||||
| \def\nolabel#1{} | ||||
| 
 | ||||
| %%% \section | ||||
| \newcounter{section} | ||||
| \renewcommand{\thesection}{\arabic{section}} | ||||
| \newcommand{\section}[1]{ | ||||
| \refstepcounter{section} | ||||
| \edef\templabel{\genlab} | ||||
| \raw{<h3><br>}\label{\templabel}\thesection. #1\raw{</h3>} | ||||
| \begin{divertoutput}[toc] | ||||
| \ifsubsubsec\raw{</table></td></tr>}\fi | ||||
| \subsubsecfalse | ||||
| \ifsubsec\raw{</table></td></tr>}\fi | ||||
| \subsecfalse | ||||
| \raw{<tr><td align="right">}\textbf{\thesection.~}\raw{<td>}\textbf{\href[plain]{\templabel}{{\let\label=\nolabel #1}}}\raw{</td></tr>} | ||||
| \end{divertoutput} | ||||
| } | ||||
| 
 | ||||
| %%% \subsection | ||||
| \newcounter{subsection}[section] | ||||
| \renewcommand{\thesubsection}{\thesection.\arabic{subsection}} | ||||
| \newcommand{\subsection}[1]{ | ||||
| \refstepcounter{subsection} | ||||
| \edef\templabel{\genlab} | ||||
| \raw{<h4><br>}\label{\templabel}\thesubsection. #1\raw{</h4>} | ||||
| \begin{divertoutput}[toc] | ||||
| \ifsubsubsec\raw{</table></td></tr>}\fi | ||||
| \subsubsecfalse | ||||
| \ifsubsec\else\raw{<tr><td></td><td><table cellpadding=0 cellspacing=0>}\fi | ||||
| \subsectrue | ||||
| \raw{<tr><td>}\textbf{\thesubsection.~}\raw{</td><td>}\textbf{\href[plain]{\templabel}{{\let\label=\nolabel #1}}}\raw{</td></tr>} | ||||
| \end{divertoutput} | ||||
| } | ||||
| 
 | ||||
| %%% \subsubsection | ||||
| \newcounter{subsubsection}[subsection] | ||||
| \renewcommand{\thesubsubsection}{\thesubsection.\arabic{subsubsection}} | ||||
| \newcommand{\subsubsection}[1]{ | ||||
| \refstepcounter{subsubsection} | ||||
| \edef\templabel{\genlab} | ||||
| \raw{<h4><br>}\label{\templabel}\thesubsubsection. #1\raw{</h4>} | ||||
| \begin{divertoutput}[toc] | ||||
| \ifsubsubsec\else\raw{<tr><td></td><td><table cellpadding=0 cellspacing=0>}\fi | ||||
| \subsubsectrue | ||||
| \raw{<tr><td>}\textbf{\thesubsubsection.~}\raw{</td><td>}\textbf{\href[plain]{\templabel}{{\let\label=\nolabel #1}}}\raw{</td></tr>} | ||||
| \end{divertoutput} | ||||
| } | ||||
| 
 | ||||
| %%% figure | ||||
| \newcounter{figure} | ||||
| \renewcommand{\thefigure}{\arabic{figure}} | ||||
| \newcommand{\caption}[1]{\\ Figure \thefigure.~#1} | ||||
| \newenvironment{figure} | ||||
|   {\begingroup\refstepcounter{figure}} | ||||
|   {\endgroup} | ||||
| 
 | ||||
| %%% exercise | ||||
| \newcounter{exercise} | ||||
| \renewcommand{\theexercise}{\arabic{exercise}} | ||||
| \def\@startexercise{\refstepcounter{exercise} | ||||
|   \raw{<hr>} | ||||
|   \textbf{Exercise \theexercise. }} | ||||
| \newenvironment{exercise} | ||||
|   {\begingroup\def\newexercise{\@startexercise}\newexercise} | ||||
|   {\raw{<hr>}} | ||||
| \newcounter{subexercise}[exercise] | ||||
| \renewcommand{\thesubexercise}{\theexercise\alph{subexercise}} | ||||
| \newcommand{\subexercise}{\par\refstepcounter{subexercise}\textbf{\thesubexercise. }} | ||||
| 
 | ||||
| %%% self-study | ||||
| \newif\ifselfstudy\selfstudyfalse | ||||
| \def\selfstudy#1#2{\selfstudytrue} | ||||
| \def\theselfstudy{\ifselfstudy\realselfstudy\fi} | ||||
| \def\realselfstudy{\begingroup | ||||
|   \def\sstudyentry##1##2##3{\raw{<p>}\textbf{##3.} ##1 [see \hyperlink{######2}{here}]\raw{</p>}} | ||||
|   \section{Questions for self study}\label{section:selfstudy} | ||||
|   \input{\jobname.sst} | ||||
|   \endgroup} | ||||
| 
 | ||||
| %%% alphalist | ||||
| \newcounter{alphalist} | ||||
| \def\alphalist{\begingroup\setcounter{alphalist}{0} | ||||
|  \def\endalphalistitem{}% | ||||
|  \renewcommand{\item}{\endalphalistitem | ||||
|   \def\endalphalistiem{\raw{</td></tr>}}% | ||||
|   \stepcounter{alphalist}% | ||||
|   \raw{<tr valign=top><td>}\alph{alphalist}.\raw{</td><td>}} | ||||
|  \raw{<table>}} | ||||
| \def\endalphalist{\endalphalistitem\raw{</table>}\endgroup} | ||||
| 
 | ||||
| %%% define our own (compact) description environment | ||||
| \def\description{\begingroup | ||||
|  \renewcommand{\item}[1][]{\raw{<dt>}##1\raw{<dd>}}\raw{<dl compact>}} | ||||
| \def\enddescription{\raw{</dl>}\endgroup} | ||||
| 
 | ||||
| %%% index | ||||
| \newcommand{\see}[2]{\emph{see} #1} | ||||
| \newenvironment{theindex} | ||||
|   {\begingroup\newcommand{\itemindent}{\raw{<tt>   </tt>}} | ||||
|    \renewcommand{\item}{\raw{<br>}} | ||||
|    \newcommand{\subitem}{\raw{<br>}\itemindent} | ||||
|    \newcommand{\subsubitem}{\raw{<br>}\itemindent\itemindent}} | ||||
|   {\par\endgroup} | ||||
| 
 | ||||
| \def\parheader#1 {\medskip\noindent{\bf #1.}~~} | ||||
| 
 | ||||
| %%% grammar support | ||||
| \newenvironment{grammar} | ||||
|   {\begingroup | ||||
|     \def\orbar{&\bar&} | ||||
|     \def\nobar{&&} | ||||
|     \def\longis{&$\longrightarrow$&} | ||||
|    \begin{tabular}{lcl}} | ||||
|   {\end{tabular}\endgroup} | ||||
| \def\bar{\raw{|}} | ||||
| \def\kplus{\raw{<sup>+</sup>}} | ||||
| \def\kstar{\raw{*}} | ||||
| \def\ang#1{\raw{<}#1\raw{>}} | ||||
| 
 | ||||
| \def\mbox#1{#1} | ||||
| 
 | ||||
| %%% hyperlink support | ||||
| \newcommand{\hyperlink}[3][]{\raw{<a #1 href="}\url{#2}\raw{">}#3\raw{</a>}} | ||||
| 
 | ||||
							
								
								
									
										92
									
								
								stex/inputs/exam.cls
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										92
									
								
								stex/inputs/exam.cls
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,92 @@ | |||
| %%% exam.cls | ||||
| 
 | ||||
| \ProvidesClass{exam} | ||||
| 
 | ||||
| \def\ProvidesClass#1[#2]{\relax} | ||||
| 
 | ||||
| \input article.cls | ||||
| 
 | ||||
| \newif\iftitle\titlefalse | ||||
| \newif\ifauthor\authorfalse | ||||
| \def\title#1{\def\thetitle{#1}\titletrue} | ||||
| \def\author#1{\def\theauthor{#1}\authortrue} | ||||
| \def\maketitle{ | ||||
| \begin{flushleft} | ||||
| \iftitle{\LARGE\textbf{\thetitle}} \\[6pt]\fi | ||||
| \ifauthor{\Large\textbf{\theauthor}} \\\fi | ||||
| \end{flushleft}} | ||||
| 
 | ||||
| \newcounter{quiz} | ||||
| \renewcommand{\thequiz}{\arabic{quiz}} | ||||
| \newenvironment{quiz} | ||||
|   {\refstepcounter{quiz} | ||||
|    \ifnum\thequiz>1\pagebreak\fi | ||||
|    \centerline{\baselineskip=18pt | ||||
|      \hbox to 3in{\vtop{\noindent \quizname\\\quizdate}} | ||||
|      \hfill | ||||
|      \hbox to 3in{\vtop{\noindent Name:\\Network ID:\\Lab section:\\Lecture section:}}} | ||||
|      \bigskip} | ||||
|   {} | ||||
| 
 | ||||
| \newcounter{problem}[quiz] | ||||
| \renewcommand{\theproblem}{\arabic{problem}} | ||||
| \newenvironment{problem} | ||||
|   {\par\bigskip\refstepcounter{problem} | ||||
|    \goodbreak | ||||
|    \par\nobreak | ||||
|    \textbf{Problem \theproblem. }} | ||||
|   {\removelastskip\bigskip\vfill} | ||||
| \newcounter{subproblem}[problem] | ||||
| \renewcommand{\thesubproblem}{\alph{subproblem}} | ||||
| \newcommand{\subproblem}{\par\refstepcounter{subproblem}\medskip\textbf{\theproblem\thesubproblem. }} | ||||
| 
 | ||||
| %%% latex.ltx redefinitions | ||||
| %% change section headers to "1.1. foo" instead of "1.1  foo" | ||||
| \def\@seccntformat#1{\csname the#1\endcsname. } | ||||
| 
 | ||||
| \renewenvironment{description} | ||||
|                {\list{}{\labelwidth\z@ \itemindent-\leftmargin | ||||
|                         \let\makelabel\descriptionlabel}} | ||||
|                {\endlist} | ||||
| \renewcommand*\descriptionlabel[1]{\hspace\labelsep #1} | ||||
| 
 | ||||
| \def\itemvdots{\item[] \mbox{\vdots}} | ||||
| 
 | ||||
| \def\parheader#1 {\medskip\noindent{\bf #1.}~~} | ||||
| 
 | ||||
| \newenvironment{grammar} | ||||
|   {\begingroup | ||||
|     \def\orbar{\hbox to 2em{\hfil}$\vert$\hbox to .75em{\hfil}} | ||||
|     \def\longis{ $\longrightarrow$\hbox to .75em{\hfil}} | ||||
|    \penalty-100\vskip 6pt plus 1pt\parindent=0pt\interlinepenalty=5000} | ||||
|   {\penalty-200\vskip6pt plus 1pt\endgroup} | ||||
| 
 | ||||
| \def\bar{$\vert$} | ||||
| \def\ang#1{$\langle${\small\rm{}#1}$\rangle$} | ||||
| \def\kstar{\raise.5ex\hbox{\scheme{*}}} | ||||
| \def\kplus{\raise.5ex\hbox{\scheme{+}}} | ||||
| 
 | ||||
| \newcounter{alphacount} | ||||
| \def\alphalabel{\textit{\alph{alphacount}}.} | ||||
| \newenvironment{alphalist} | ||||
|   {\begingroup\let\beforeschemedisplay=\relax\let\afterschemedisplay=\relax | ||||
|    \begin{list}{\alphalabel}{\usecounter{alphacount}\itemsep=0pt\parsep=0pt% | ||||
|         \topsep=0pt}} | ||||
|   {\end{list}\endgroup} | ||||
| 
 | ||||
| %%% final set up | ||||
| \renewcommand{\contentsname}{Contents} | ||||
| \newcommand{\bibname}{Bibliography} | ||||
| \renewcommand{\indexname}{Index} | ||||
| \renewcommand{\today}{\ifcase\month\or | ||||
|   January\or February\or March\or April\or May\or June\or | ||||
|   July\or August\or September\or October\or November\or December\fi | ||||
|   \space\number\day, \number\year} | ||||
| \setlength\columnsep{10\p@} | ||||
| \setlength\columnseprule{0\p@} | ||||
| \pagestyle{headings} | ||||
| \pagenumbering{arabic} | ||||
| 
 | ||||
| \if@twoside\else\raggedbottom\fi | ||||
| \endinput | ||||
| %%% end of assignment.cls | ||||
							
								
								
									
										29
									
								
								stex/inputs/fullpage.sty
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										29
									
								
								stex/inputs/fullpage.sty
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,29 @@ | |||
| % This is FULLPAGE.STY by H.Partl, Version 2 as of 15 Dec 1988. | ||||
| % Document Style Option to fill the paper just like Plain TeX. | ||||
|       | ||||
| \typeout{Style Option FULLPAGE Version 2 as of 15 Dec 1988} | ||||
|       | ||||
| \topmargin 0pt | ||||
| \advance \topmargin by -\headheight | ||||
| \advance \topmargin by -\headsep | ||||
|       | ||||
| \textheight 8.9in | ||||
|       | ||||
| \oddsidemargin 0pt | ||||
| \evensidemargin \oddsidemargin | ||||
| \marginparwidth 0.5in | ||||
|       | ||||
| \textwidth 6.5in | ||||
|       | ||||
|       | ||||
| % For users of A4 paper: The above values are suited for american 8.5x11in | ||||
| % paper. If your output driver performs a conversion for A4 paper, keep | ||||
| % those values. If your output driver conforms to the TeX standard (1in/1in), | ||||
| % then you should add the following commands to center the text on A4 paper: | ||||
|       | ||||
| % \advance\hoffset by -3mm  % A4 is narrower. | ||||
| % \advance\voffset by  8mm  % A4 is taller. | ||||
|       | ||||
| \endinput | ||||
|       | ||||
|       | ||||
							
								
								
									
										15
									
								
								stex/inputs/grammar.hsty
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										15
									
								
								stex/inputs/grammar.hsty
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,15 @@ | |||
| %%% grammar support | ||||
| \newenvironment{grammar} | ||||
|  {\begingroup | ||||
|   \def\orbar{\raw{</td><td align=center>|</td><td nowrap>}} | ||||
|   \def\nobar{\raw{</td><td align=center></td><td nowrap>}} | ||||
|   \def\longis{\raw{</td><td align=center>}$\longrightarrow$\raw{</td><td nowrap>}} | ||||
|   \def\\{\raw{</td></tr><tr><td nowrap>}} | ||||
|   \raw{<table><tr><td nowrap>}} | ||||
|  {\raw{</td></tr></table>}\endgroup} | ||||
| 
 | ||||
| \def\bar{\raw{|}} | ||||
| \def\kplus{\raw{<sup>+</sup>}} | ||||
| \def\kstar{\raw{*}} | ||||
| \def\ang#1{\raw{<}#1\raw{>}} | ||||
| 
 | ||||
							
								
								
									
										12
									
								
								stex/inputs/grammar.sty
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										12
									
								
								stex/inputs/grammar.sty
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,12 @@ | |||
| \newenvironment{grammar} | ||||
|   {\begingroup | ||||
|     \def\orbar{\hbox to 2em{\hfil}$\vert$\hbox to .75em{\hfil}} | ||||
|     \def\nobar{\hbox to 2em{\hfil}\phantom{$\vert$}\hbox to .75em{\hfil}} | ||||
|     \def\longis{ $\longrightarrow$\hbox to .75em{\hfil}} | ||||
|    \penalty-100\vskip 6pt plus 1pt\parindent=0pt\interlinepenalty=5000} | ||||
|   {\penalty-200\vskip6pt plus 1pt\endgroup} | ||||
| 
 | ||||
| \def\bar{$\vert$} | ||||
| \def\ang#1{$\langle${\small\rm{}#1}$\rangle$} | ||||
| \def\kstar{\raise.5ex\hbox{\scheme{*}}} | ||||
| \def\kplus{\raise.5ex\hbox{\scheme{+}}} | ||||
							
								
								
									
										49
									
								
								stex/inputs/html-prep.tex
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										49
									
								
								stex/inputs/html-prep.tex
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,49 @@ | |||
| %%% html-prep.tex | ||||
| 
 | ||||
| %%% /* these don't handle nesting properly, i.e., nested \emph */ | ||||
| \def\emph#1{\raw{<i>}#1\raw{</i>}} | ||||
| \def\textit#1{\raw{<i>}#1\raw{</i>}} | ||||
| \def\textsl#1{\raw{<i>}#1\raw{</i>}} % really want slant font | ||||
| \def\textbf#1{\raw{<b>}#1\raw{</b>}} | ||||
| \def\texttt#1{\raw{<tt>}#1\raw{</tt>}} | ||||
| 
 | ||||
| \def\copyright{\raw{©}} | ||||
| 
 | ||||
| \def\protect{} | ||||
| \def\bigskip{\raw{<p>}} | ||||
| \def\medskip{\raw{<p>}} | ||||
| \def\smallskip{\raw{<p>}} | ||||
| \def\nobreak{} | ||||
| \def\noindent{} | ||||
| \def\_{\raw{_}} | ||||
| \def\par{\raw{ | ||||
| <p>}} | ||||
| \def\dots{\raw{...}} | ||||
| \def\vdots{$\vdots$} | ||||
| \def\null{} | ||||
| \def\${\raw{$}} | ||||
| \def\&{\raw{&}} | ||||
| \def\%{\raw{%}} | ||||
| \def\#{\raw{##}} | ||||
| 
 | ||||
| \newcommand{\item}[1][]{\itemoutsideoflist} | ||||
| \def\itemize{\begingroup | ||||
|  \renewcommand{\item}[1][]{\raw{<li>}##1}\raw{<ul>}} | ||||
| \def\enditemize{\raw{</ul>}\endgroup\par} | ||||
| \newcounter{enumeratecounter} | ||||
| \def\enumerate{\begingroup\setcounter{enumeratecounter}{0}% | ||||
|  \renewcommand{\item}[1][]{\refstepcounter{enumeratecounter}\raw{<li>}##1}\raw{<ol>}} | ||||
| \def\endenumerate{\raw{</ol>}\endgroup\par} | ||||
| \def\description{\begingroup | ||||
|  \renewcommand{\item}[1][]{\raw{<dt>}##1\raw{<dd>}}\raw{<dl>}} | ||||
| \def\enddescription{\raw{</dl>}\endgroup\par} | ||||
| 
 | ||||
| \newenvironment{flushleft}{}{} | ||||
| \newenvironment{thebibliography}[1] | ||||
|   {\begingroup\def\newblock{}} | ||||
|   {\endgroup} | ||||
| 
 | ||||
| \newenvironment{quotation} | ||||
|   {\raw{<blockquote>}} | ||||
|   {\raw{</blockquote>}} | ||||
| 
 | ||||
							
								
								
									
										158
									
								
								stex/inputs/monograph.cls
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										158
									
								
								stex/inputs/monograph.cls
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,158 @@ | |||
| %%% monograph.cls | ||||
| 
 | ||||
| \ProvidesClass{monograph} | ||||
| 
 | ||||
| \def\ProvidesClass#1[#2]{\relax} | ||||
| 
 | ||||
| \input article.cls | ||||
| 
 | ||||
| \def\copyrightnotice{\ifauthor\copyright~\number\year~\theauthor\fi} | ||||
| \def\ps@plain{\let\@mkboth\@gobbletwo | ||||
|      \let\@oddhead\@empty\def\@oddfoot{\reset@font | ||||
|      \footer}\let\@evenhead\@empty\let\@evenfoot\@oddfoot} | ||||
| \def\footer{\hfil\ifnum\c@page =1 \copyrightnotice\else\thepage\fi\hfil} | ||||
| 
 | ||||
| \newif\iftitle\titlefalse | ||||
| \newif\ifauthor\authorfalse | ||||
| \newif\ifdate\datefalse | ||||
| \def\title#1{\def\thetitle{#1}\titletrue} | ||||
| \def\author#1{\def\theauthor{#1}\authortrue} | ||||
| \def\date#1{\def\thedate{#1}\datetrue} | ||||
| \def\maketitle{ | ||||
| \begin{flushleft} | ||||
| \iftitle{\LARGE\textbf{\thetitle} \\[6pt]}\fi | ||||
| \ifauthor{\Large\textbf{\theauthor} \\[6pt]}\fi | ||||
| \ifdate{\large\textbf{\thedate} \\}\fi | ||||
| \end{flushleft}} | ||||
| 
 | ||||
| %%% to support hypertext index entries | ||||
| \def\hindex#1{\index} % ignore the label here---no links in printed version | ||||
| 
 | ||||
| \newcommand{\hyperlink}[3][]{#3} | ||||
| \newcommand{\href}[3][]{#3} | ||||
| \newcommand{\hpageref}[3][]{#3} | ||||
| 
 | ||||
| \newif\iflatex\latextrue | ||||
| \newif\ifhtml\htmlfalse | ||||
| 
 | ||||
| %%% table of contents | ||||
| \renewcommand{\@pnumwidth}{1.55em} | ||||
| \renewcommand{\@tocrmarg} {2.55em} | ||||
| \renewcommand{\@dotsep}{4.5} | ||||
| \setcounter{tocdepth}{2} | ||||
| \newcommand*{\l@chapter}[2]{% | ||||
|   \ifnum \c@tocdepth >\m@ne | ||||
|     \addpenalty{-\@highpenalty}% | ||||
|     \vskip 1.0em \@plus\p@ | ||||
|     \setlength\@tempdima{1.5em}% | ||||
|     \begingroup | ||||
|       \parindent \z@ \rightskip \@pnumwidth | ||||
|       \parfillskip -\@pnumwidth | ||||
|       \leavevmode \bfseries | ||||
|       \advance\leftskip\@tempdima | ||||
|       \hskip -\leftskip | ||||
|       #1\nobreak\hfil \nobreak\hbox to\@pnumwidth{\hss #2}\par | ||||
|       \penalty\@highpenalty | ||||
|     \endgroup | ||||
|   \fi} | ||||
| \renewcommand*{\l@section}[2] {\vspace{4pt}\hbox to \hsize{\bf #1\hfil#2}} | ||||
| \renewcommand*{\l@subsection}[2] {\vspace{2pt}\hbox to \hsize{\rm #1\hfill#2}} | ||||
| \def\numberline#1{#1} | ||||
| \renewcommand{\tableofcontents}{% | ||||
|   \thispagestyle{plain}% | ||||
|   \global\@topnum\z@ | ||||
|   \section*{\contentsname}% | ||||
|   \@starttoc{toc}} | ||||
| 
 | ||||
| \newcounter{exercise} | ||||
| \renewcommand{\theexercise}{\arabic{exercise}} | ||||
| \def\@startexercise{\par\bigskip | ||||
|   \refstepcounter{exercise}\goodbreak | ||||
|   \par\hrule width \hsize{\hfil}\\\nobreak | ||||
|   \textbf{Exercise \theexercise. }\ignorespaces} | ||||
| \newenvironment{exercise} | ||||
|   {\begingroup | ||||
|    \def\afterschemedisplay{\removelastskip\penalty10000\vskip5pt} | ||||
|    \let\newexercise=\@startexercise\newexercise} | ||||
|   {\par\removelastskip\penalty10000\kern6pt\hrule width \hsize{\hfil}\endgroup} | ||||
| \newcounter{subexercise}[exercise] | ||||
| \renewcommand{\thesubexercise}{\theexercise\alph{subexercise}} | ||||
| \newcommand{\subexercise}{\par\refstepcounter{subexercise}\medskip\textbf{\thesubexercise. }} | ||||
| 
 | ||||
| %%% bibliography | ||||
| \newdimen\bibindent \bibindent=1.5em | ||||
| \renewcommand{\newblock}{} | ||||
| \renewenvironment{thebibliography}[1] | ||||
|      {\section{\bibname} | ||||
|       \list{\@biblabel{\arabic{enumiv}}}% | ||||
|            {\settowidth\labelwidth{\@biblabel{#1}}% | ||||
|             \leftmargin\labelwidth | ||||
|             \advance\leftmargin\labelsep | ||||
|             \usecounter{enumiv}% | ||||
|             \let\p@enumiv\@empty | ||||
|             \renewcommand{\theenumiv}{\arabic{enumiv}}}% | ||||
|       \renewcommand{\newblock}{\hskip .11em \@plus.33em \@minus.07em}% | ||||
|       \sloppy\clubpenalty4000\widowpenalty4000% | ||||
|       \sfcode`\.=\@m} | ||||
|      {\def\@noitemerr | ||||
|        {\@latex@warning{Empty `thebibliography' environment}}% | ||||
|       \endlist} | ||||
| 
 | ||||
| %%% index | ||||
| \def\notsupposedtobehereindexname{\indexname} | ||||
| \renewenvironment{theindex} | ||||
|                {\if@openright\cleardoublepage\else\clearpage\fi | ||||
|                 \raggedright | ||||
|                 \columnseprule \z@ | ||||
|                 \columnsep 35\p@ | ||||
|                 \twocolumn[\plainchapterhead{\indexname}]% | ||||
|                 \addcontentsline{toc}{chapter}{\indexname}% | ||||
|                 \chaptermark{\indexname}{\notsupposedtobehereindexname}% | ||||
|                 \thispagestyle{plain}\parindent\z@ | ||||
|                 \parskip\z@ \@plus .3\p@\relax | ||||
|                 \let\item\@idxitem} | ||||
|                {\clearpage} | ||||
| \renewcommand{\@idxitem}  {\par\hangindent 40\p@} | ||||
| \renewcommand{\subitem}   {\par\hangindent 40\p@ \hspace*{20\p@}} | ||||
| \renewcommand{\subsubitem}{\par\hangindent 40\p@ \hspace*{30\p@}} | ||||
| \renewcommand{\indexspace}{\par \vskip 10\p@ \@plus5\p@ \@minus3\p@\relax} | ||||
| 
 | ||||
| %%% latex.ltx redefinitions | ||||
| %% leave padding page blank (no header) | ||||
| \def\cleardoublepage{\clearpage\if@twoside \ifodd\c@page\else | ||||
|     {\pagestyle{empty}\hbox{}\newpage\if@twocolumn\hbox{}\newpage\fi}\fi\fi} | ||||
| %% change section headers to "1.1. foo" instead of "1.1  foo" | ||||
| \def\@seccntformat#1{\csname the#1\endcsname. } | ||||
| %% change numbered table of contents lines to "1.1. foo" instead of "1.1  foo" | ||||
| \def\numberline#1{#1. } | ||||
| 
 | ||||
| \renewenvironment{description} | ||||
|                {\list{}{\labelwidth\z@ \itemindent-\leftmargin | ||||
|                         \let\makelabel\descriptionlabel}} | ||||
|                {\endlist} | ||||
| \renewcommand*\descriptionlabel[1]{\hspace\labelsep #1} | ||||
| 
 | ||||
| \def\itemvdots{\item[] \mbox{\vdots}} | ||||
| 
 | ||||
| \newcommand{\parheader}[2][.~\ignorespaces]{\medskip\noindent{\bf #2#1}} | ||||
| 
 | ||||
| \newcommand{\sectionstar}[1]{\section*{#1}} | ||||
| \newcommand{\subsectionstar}[1]{\subsection*{#1}} | ||||
| \newcommand{\subsubsectionstar}[1]{\subsubsection*{#1}} | ||||
| 
 | ||||
| %%% final set up | ||||
| \renewcommand{\contentsname}{Contents} | ||||
| \newcommand{\bibname}{Bibliography} | ||||
| \renewcommand{\indexname}{Index} | ||||
| \renewcommand{\today}{\ifcase\month\or | ||||
|   January\or February\or March\or April\or May\or June\or | ||||
|   July\or August\or September\or October\or November\or December\fi | ||||
|   \space\number\day, \number\year} | ||||
| \setlength\columnsep{10\p@} | ||||
| \setlength\columnseprule{0\p@} | ||||
| \pagestyle{headings} | ||||
| \pagenumbering{arabic} | ||||
| 
 | ||||
| \if@twoside\else\raggedbottom\fi | ||||
| \endinput | ||||
| %%% end of monograph.cls | ||||
							
								
								
									
										149
									
								
								stex/inputs/monograph.hcls
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										149
									
								
								stex/inputs/monograph.hcls
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,149 @@ | |||
| %%% monograph.hcls | ||||
| 
 | ||||
| \newif\iflatex\latexfalse | ||||
| \newif\ifhtml\htmltrue | ||||
| 
 | ||||
| % should be built in | ||||
| \newenvironment{center} | ||||
|   {\raw{<center>}} | ||||
|   {\raw{</center>}} | ||||
| 
 | ||||
| \def\copyrightnotice{\ifauthor\par\raw{<hr>}\copyright~\year~\theauthor\par\fi} | ||||
| \let\trueenddocument=\enddocument | ||||
| \def\enddocument{ | ||||
|  \begin{divertoutput}[toc] | ||||
|   \ifsubsubsec\raw{</table></td></tr>}\fi | ||||
|   \ifsubsec\raw{</table></td></tr>}\fi | ||||
|  \end{divertoutput} | ||||
|  \copyrightnotice\trueenddocument} | ||||
| 
 | ||||
| \newif\iftitle\titlefalse | ||||
| \newif\ifdate\datefalse | ||||
| \newif\ifauthor\authorfalse | ||||
| \def\title#1{\def\thetitle{#1}\titletrue} | ||||
| \def\date#1{\def\thedate{#1}\datetrue} | ||||
| \def\author#1{\def\theauthor{#1}\authortrue} | ||||
| \def\maketitle{% | ||||
| \iftitle\raw{<h1>}\thetitle\raw{</h1>}\fi | ||||
| \ifauthor\raw{<h2>}\theauthor\raw{</h2>}\fi | ||||
| \ifdate\raw{<h3>}\thedate\raw{</h3>}\fi | ||||
| } | ||||
| 
 | ||||
| %%% table of contents | ||||
| \newif\ifsubsec\subsecfalse | ||||
| \newif\ifsubsubsec\subsubsecfalse | ||||
| \newcommand{\tableofcontents}{ | ||||
| \raw{<table cellpadding=0 cellspacing=0>} | ||||
| \rawinput{\jobname.htoc} | ||||
| \raw{</table>} | ||||
| \openrawfile{toc}{\jobname.htoc}} | ||||
| \newcommand{\notableofcontents}{ | ||||
| \openrawfile{toc}{\jobname.htoc}} | ||||
| 
 | ||||
| %%% \section | ||||
| \newcounter{section} | ||||
| \renewcommand{\thesection}{\arabic{section}} | ||||
| \newcommand{\section}[1]{ | ||||
| \refstepcounter{section} | ||||
| \edef\templabel{\genlab} | ||||
| \sectionstar{\label{\templabel}\thesection. #1} | ||||
| \begin{divertoutput}[toc] | ||||
| \ifsubsubsec\raw{</table></td></tr>}\fi | ||||
| \subsubsecfalse | ||||
| \ifsubsec\raw{</table></td></tr>}\fi | ||||
| \subsecfalse | ||||
| \raw{<tr><td align="right">}\textbf{\thesection.~}\raw{<td>}\textbf{\href[plain]{\templabel}{#1}}\raw{</td></tr>} | ||||
| \end{divertoutput} | ||||
| } | ||||
| \newcommand{\sectionstar}[1]{ | ||||
| \raw{<h3>}#1\raw{</h3>} | ||||
| } | ||||
| 
 | ||||
| %%% \subsection | ||||
| \newcounter{subsection}[section] | ||||
| \renewcommand{\thesubsection}{\thesection.\arabic{subsection}} | ||||
| \newcommand{\subsection}[1]{ | ||||
| \refstepcounter{subsection} | ||||
| \edef\templabel{\genlab} | ||||
| \subsectionstar{\label{\templabel}\thesubsection. #1} | ||||
| \begin{divertoutput}[toc] | ||||
| \ifsubsubsec\raw{</table></td></tr>}\fi | ||||
| \subsubsecfalse | ||||
| \ifsubsec\else\raw{<tr><td></td><td><table cellpadding=0 cellspacing=0>}\fi | ||||
| \subsectrue | ||||
| \raw{<tr><td>}\textbf{\thesubsection.~}\raw{</td><td>}\textbf{\href[plain]{\templabel}{#1}}\raw{</td></tr>} | ||||
| \end{divertoutput} | ||||
| } | ||||
| \newcommand{\subsectionstar}[1]{ | ||||
| \raw{<h4>}#1\raw{</h4>} | ||||
| } | ||||
| 
 | ||||
| %%% \subsubsection | ||||
| \newcounter{subsubsection}[subsection] | ||||
| \renewcommand{\thesubsubsection}{\thesubsection.\arabic{subsubsection}} | ||||
| \newcommand{\subsubsection}[1]{ | ||||
| \refstepcounter{subsubsection} | ||||
| \edef\templabel{\genlab} | ||||
| \subsubsectionstar{\label{\templabel}\thesubsubsection. #1} | ||||
| \begin{divertoutput}[toc] | ||||
| \ifsubsubsec\else\raw{<tr><td></td><td><table cellpadding=0 cellspacing=0>}\fi | ||||
| \subsubsectrue | ||||
| \raw{<tr><td>}\textbf{\thesubsubsection.~}\raw{</td><td>}\textbf{\href[plain]{\templabel}{#1}}\raw{</td></tr>} | ||||
| \end{divertoutput} | ||||
| } | ||||
| \newcommand{\subsubsectionstar}[1]{ | ||||
| \raw{<h4>}#1\raw{</h4>} | ||||
| } | ||||
| 
 | ||||
| %%% figure | ||||
| \newcounter{figure} | ||||
| \renewcommand{\thefigure}{\arabic{figure}} | ||||
| \newcommand{\caption}[1]{\\ Figure \thefigure.~#1} | ||||
| \newenvironment{figure}[1][] | ||||
|   {\begingroup\refstepcounter{figure}} | ||||
|   {\endgroup} | ||||
| 
 | ||||
| %%% exercise | ||||
| \newcounter{exercise} | ||||
| \renewcommand{\theexercise}{\arabic{exercise}} | ||||
| \def\@startexercise{\refstepcounter{exercise} | ||||
|   \raw{<hr>} | ||||
|   \textbf{Exercise \theexercise. }} | ||||
| \newenvironment{exercise} | ||||
|   {\begingroup\def\newexercise{\@startexercise}\newexercise} | ||||
|   {\raw{<hr>}} | ||||
| \newcounter{subexercise}[exercise] | ||||
| \renewcommand{\thesubexercise}{\theexercise\alph{subexercise}} | ||||
| \newcommand{\subexercise}{\par\refstepcounter{subexercise}\textbf{\thesubexercise. }} | ||||
| 
 | ||||
| %%% alphalist | ||||
| \newcounter{alphalist} | ||||
| \def\alphalist{\begingroup\setcounter{alphalist}{0} | ||||
|  \def\endalphalistitem{}% | ||||
|  \renewcommand{\item}{\endalphalistitem | ||||
|   \def\endalphalistiem{\raw{</td></tr>}}% | ||||
|   \stepcounter{alphalist}% | ||||
|   \raw{<tr valign=top><td>}\alph{alphalist}.\raw{</td><td>}} | ||||
|  \raw{<table>}} | ||||
| \def\endalphalist{\endalphalistitem\raw{</table>}\endgroup} | ||||
| 
 | ||||
| %%% define our own (compact) description environment | ||||
| \def\description{\begingroup | ||||
|  \renewcommand{\item}[1][]{\raw{<dt>}##1\raw{<dd>}}\raw{<dl compact>}} | ||||
| \def\enddescription{\raw{</dl>}\endgroup} | ||||
| 
 | ||||
| %%% index | ||||
| \newcommand{\see}[2]{\emph{see} #1} | ||||
| \newenvironment{theindex} | ||||
|   {\begingroup\newcommand{\itemindent}{\raw{<tt>   </tt>}} | ||||
|    \renewcommand{\item}{\raw{<br>}} | ||||
|    \newcommand{\subitem}{\raw{<br>}\itemindent} | ||||
|    \newcommand{\subsubitem}{\raw{<br>}\itemindent\itemindent}} | ||||
|   {\par\endgroup} | ||||
| 
 | ||||
| \newcommand{\parheader}[2][. ]{\medskip\noindent{\bf #2#1}} | ||||
| 
 | ||||
| \def\mbox#1{#1} | ||||
| 
 | ||||
| %%% hyperlink support | ||||
| \newcommand{\hyperlink}[3][ref]{\raw{<a class=#1 href="#2">}#3\raw{</a>}} | ||||
							
								
								
									
										94
									
								
								stex/inputs/quiz.cls
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										94
									
								
								stex/inputs/quiz.cls
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,94 @@ | |||
| %%% quiz.cls | ||||
| 
 | ||||
| \ProvidesClass{quiz} | ||||
| 
 | ||||
| \def\ProvidesClass#1[#2]{\relax} | ||||
| 
 | ||||
| \input article.cls | ||||
| 
 | ||||
| \newif\iflatex\latextrue | ||||
| \newif\ifhtml\htmlfalse | ||||
| 
 | ||||
| \newif\iftitle\titlefalse | ||||
| \newif\ifauthor\authorfalse | ||||
| \def\title#1{\def\thetitle{#1}\titletrue} | ||||
| \def\author#1{\def\theauthor{#1}\authortrue} | ||||
| \def\maketitle{ | ||||
| \begin{flushleft} | ||||
| \iftitle{\LARGE\textbf{\thetitle}} \\[6pt]\fi | ||||
| \ifauthor{\Large\textbf{\theauthor}} \\\fi | ||||
| \end{flushleft}} | ||||
| 
 | ||||
| \newcounter{quiz} | ||||
| \renewcommand{\thequiz}{\arabic{quiz}} | ||||
| \newenvironment{quiz}[1] | ||||
|   {\refstepcounter{quiz} | ||||
|    \ifnum\thequiz>1\pagebreak\fi | ||||
|    \hbox to \hsize{\quizname \hfill | ||||
|      \hbox to 3in{\vtop{\noindent Name:\\Lab section: #1\\Lecture section:}}} | ||||
|      \bigskip} | ||||
|   {} | ||||
| 
 | ||||
| \newcounter{problem}[quiz] | ||||
| \renewcommand{\theproblem}{\arabic{problem}} | ||||
| \newenvironment{problem}[1][\relax] | ||||
|   {\par\bigskip\refstepcounter{problem} | ||||
|    \goodbreak | ||||
|    \par\nobreak | ||||
|    \textbf{Problem \theproblem\ifx#1\relax\else~[#1 minutes].\fi~\ignorespaces}} | ||||
|   {\removelastskip\bigskip\vfill} | ||||
| \newcounter{subproblem}[problem] | ||||
| \renewcommand{\thesubproblem}{\alph{subproblem}} | ||||
| \newcommand{\subproblem}{\par\refstepcounter{subproblem}\medskip\textbf{\theproblem\thesubproblem. }} | ||||
| 
 | ||||
| %%% latex.ltx redefinitions | ||||
| %% change section headers to "1.1. foo" instead of "1.1  foo" | ||||
| \def\@seccntformat#1{\csname the#1\endcsname. } | ||||
| 
 | ||||
| \renewenvironment{description} | ||||
|                {\list{}{\labelwidth\z@ \itemindent-\leftmargin | ||||
|                         \let\makelabel\descriptionlabel}} | ||||
|                {\endlist} | ||||
| \renewcommand*\descriptionlabel[1]{\hspace\labelsep #1} | ||||
| 
 | ||||
| \def\itemvdots{\item[] \mbox{\vdots}} | ||||
| 
 | ||||
| \def\parheader#1 {\medskip\noindent{\bf #1.}~~} | ||||
| 
 | ||||
| %%% grammar support | ||||
| \newenvironment{grammar} | ||||
|   {\begingroup | ||||
|     \def\orbar{&\bar&} | ||||
|     \def\nobar{&&} | ||||
|     \def\longis{&$\longrightarrow$&} | ||||
|    \penalty-100\vskip 4pt\begin{tabular}{lcl}} | ||||
|   {\end{tabular}\penalty-200\vskip 4pt\endgroup} | ||||
| \def\bar{$\vert$} | ||||
| \def\ang#1{$\langle${\small\rm{}#1}$\rangle$} | ||||
| \def\kstar{\raise.5ex\hbox{\scheme{*}}} | ||||
| \def\kplus{\raise.5ex\hbox{\scheme{+}}} | ||||
| 
 | ||||
| \newcounter{alphacount} | ||||
| \def\alphalabel{\textit{\alph{alphacount}}.} | ||||
| \newenvironment{alphalist} | ||||
|   {\begingroup\let\beforeschemedisplay=\relax\let\afterschemedisplay=\relax | ||||
|    \begin{list}{\alphalabel}{\usecounter{alphacount}\itemsep=0pt\parsep=0pt% | ||||
|         \topsep=0pt}} | ||||
|   {\end{list}\endgroup} | ||||
| 
 | ||||
| %%% final set up | ||||
| \renewcommand{\contentsname}{Contents} | ||||
| \newcommand{\bibname}{Bibliography} | ||||
| \renewcommand{\indexname}{Index} | ||||
| \renewcommand{\today}{\ifcase\month\or | ||||
|   January\or February\or March\or April\or May\or June\or | ||||
|   July\or August\or September\or October\or November\or December\fi | ||||
|   \space\number\day, \number\year} | ||||
| \setlength\columnsep{10\p@} | ||||
| \setlength\columnseprule{0\p@} | ||||
| \pagestyle{headings} | ||||
| \pagenumbering{arabic} | ||||
| 
 | ||||
| \if@twoside\else\raggedbottom\fi | ||||
| \endinput | ||||
| %%% end of assignment.cls | ||||
							
								
								
									
										42
									
								
								stex/inputs/scheme.hsty
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										42
									
								
								stex/inputs/scheme.hsty
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,42 @@ | |||
| \def\transerr#1{\raw{<i>}} | ||||
| \def\transin#1{\raw{<font color="##ff0000">}} | ||||
| \def\transout#1{\raw{<font color="##0000ff">}} | ||||
| \def\traceout#1{\raw{<font color="##0000ff">}} | ||||
| \def\endtranserr#1{\raw{</i>}} | ||||
| \def\endtransin#1{\raw{</font>}} | ||||
| \def\endtransout#1{\raw{</font>}} | ||||
| \def\endtraceout#1{\raw{</font>}} | ||||
| 
 | ||||
| \def\schemeblankline{{\\\\}} | ||||
| \def\schemelinestart{} | ||||
| %%% handle numbered lines in scheme.sty and scheme.hsty | ||||
| %%% ---have scheme-prep produce only \schemelinestart | ||||
| % following is probably broken until we have tables, I suspect. | ||||
| % Actually, the right way to fix this may be to use CSS | ||||
| \def\schemelinestartnumbered#1{\raw{<table><tr width=20><td>}#1\raw{</td></tr></table>}} | ||||
| 
 | ||||
| \def\scheme#1{{\tt #1}} | ||||
| \def\longcode\schemedisplay{\schemedisplay} | ||||
| \def\noskip\schemedisplay{\schemedisplay} | ||||
| \def\schemedisplay{\par\begingroup\tt\hardspaces} | ||||
| \def\endschemedisplay{\endgroup\par} | ||||
| \def\schemeindent{} | ||||
| \def\schatsign{\raw{@}} | ||||
| \def\schbackslash{\raw{\}} | ||||
| \def\schcarat{\raw{^}} | ||||
| \def\schdot{\raw{.}} | ||||
| \def\schlbrace{\raw{&##123;}} | ||||
| \def\schrbrace{\raw{&##125;}} | ||||
| \def\schtilde{\raw{~}} | ||||
| \def\schunderscore{\raw{_}} | ||||
| \def\becomes{$\rightarrow$} | ||||
| \def\is{$\Rightarrow$} | ||||
| \def\si{\raw{<img src="gifs/ghostRightarrow.gif">}} | ||||
| \def\var#1{\emph{#1}} | ||||
| 
 | ||||
| % frame="border" rules="all" makes mozilla do it right | ||||
| % border="1" makes konqueror do it right | ||||
| \def\startrepl{\raw{<table width="95%"><tr valign=top><td>}} | ||||
| \def\endrepl{\raw{</td>}} | ||||
| \def\startinteraction{\raw{<td align="right"><table rules="all" border="1"><tr><td>}} | ||||
| \def\endinteraction{\raw{</td></tr></table></td></tr></table>}} | ||||
							
								
								
									
										56
									
								
								stex/inputs/scheme.sty
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										56
									
								
								stex/inputs/scheme.sty
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,56 @@ | |||
| \usepackage{color} | ||||
| \def\transerr#1{\begingroup\slshape} | ||||
| \def\transin#1{\begingroup\color{red}} | ||||
| \def\transout#1{\begingroup\color{blue}} | ||||
| \def\traceout#1{\begingroup\color{blue}} | ||||
| \def\endtranserr#1{\endgroup} | ||||
| \def\endtransin#1{\endgroup} | ||||
| \def\endtransout#1{\endgroup} | ||||
| \def\endtraceout#1{\endgroup} | ||||
| 
 | ||||
| % this didn't work --- screwed up indentation: | ||||
| \long\def\showinteraction#1#2{\begin{minipage}[t]{4.375in}#1\end{minipage}\hfill\fbox{\begin{minipage}[t]{2in}#2\end{minipage}}} | ||||
| % so I resorted to this: | ||||
| \def\startrepl{\begin{minipage}[t]{4.3in}} % was 4.375 and 2 when interactionwindow = 28 | ||||
| \def\endrepl{\end{minipage}} | ||||
| \def\startinteraction{\begin{minipage}[t]{2.2in}\vrule\begin{minipage}[t]{2.2in}\hrule\schemeindent=2pt} | ||||
| \def\endinteraction{\hrule\end{minipage}\vrule\end{minipage}} | ||||
| 
 | ||||
| \newskip\ttglue | ||||
| \ttglue=.5em plus .25em minus .15em | ||||
| \newskip\schemeindent | ||||
| \schemeindent=0pt | ||||
| {\obeyspaces\global\let =\ } | ||||
| \def\schtilde{\raisebox{-.5ex}{\hbox{\char`\~}}} | ||||
| \def\schdot{.} | ||||
| \def\schcarat{\char`\^} | ||||
| \def\schbackslash{\char`\\} | ||||
| \def\schatsign{\char`\@} | ||||
| \def\schunderscore{\char`\_} | ||||
| \def\schlbrace{\char`\{} | ||||
| \def\schrbrace{\char`\}} | ||||
| \def\scheme#1{\mbox{\ttfamily\frenchspacing\spaceskip=\ttglue#1}} | ||||
| 
 | ||||
| \def\schemeblankline{\par\penalty-100\vskip .7\baselineskip} | ||||
| \def\schemelinestart{{\leavevmode\hbox{\hskip \schemeindent\relax}}} | ||||
| %%% handle numbered lines in scheme.sty and scheme.hsty | ||||
| %%% ---have scheme-prep produce only \schemelinestart | ||||
| \def\schemelinestartnumbered#1{{\leavevmode\hbox{\hbox to 1em {\hfil{\rm #1}} \hskip .5\schemeindent\relax}}} | ||||
| 
 | ||||
| \def\noskip\schemedisplay{\begingroup% | ||||
|   \parindent=0pt% | ||||
|   \parskip=0pt% | ||||
|   \def\becomes{\hbox to 2em{\hfil$\rightarrow$\hfil}}% | ||||
|   \def\is{\hbox to 2em{\hfil$\Rightarrow$\hfil}}% | ||||
|   \def\si{\hbox to 2em{\hfil}}% | ||||
|   \interlinepenalty=2000% | ||||
|   \tt\obeyspaces\frenchspacing} | ||||
| \def\schemedisplay{\beforeschemedisplay\noskip\schemedisplay} | ||||
| \def\longcode\schemedisplay{\penalty-200\vskip 8pt plus 4pt% | ||||
|   \kern3pt\hrule\kern5pt\nobreak\noskip\schemedisplay} | ||||
| \def\endschemedisplay{\par\endgroup\afterschemedisplay} | ||||
| \def\var#1{{\normalsize\textrm{\textit{#1}}}} | ||||
| \def\raw#1{#1} | ||||
| \def\beforeschemedisplay{\penalty-100\vskip\parskip\vskip5pt} | ||||
| \def\afterschemedisplay{\penalty-200\vskip5pt} | ||||
| 
 | ||||
							
								
								
									
										88
									
								
								stex/inputs/website.cls
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										88
									
								
								stex/inputs/website.cls
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,88 @@ | |||
| %%% website.cls | ||||
| %%% Kent Dybvig and Oscar Waddell | ||||
| %%% August 2003 | ||||
| 
 | ||||
| \ProvidesClass{website} | ||||
| \def\ProvidesClass#1[#2]{\relax} | ||||
| \LoadClass{article} | ||||
| 
 | ||||
| \def\ps@plain{\let\@mkboth\@gobbletwo | ||||
|      \let\@oddhead\@empty\def\@oddfoot{\reset@font | ||||
|      \footer}\let\@evenhead\@empty\let\@evenfoot\@oddfoot} | ||||
| \def\footer{\hfil\ifnum\c@page =1 \copyrightnotice\else\thepage\fi\hfil} | ||||
| 
 | ||||
| \newcommand{\webpage}[2][]{ | ||||
| \def\thetitle{#2} | ||||
| } | ||||
| 
 | ||||
| \newcommand{\documenttitle}[2][]{ | ||||
| \def\thetitle{#2} | ||||
| } | ||||
| 
 | ||||
| \def\maketitle{ | ||||
| \begin{flushleft} | ||||
| \LARGE\textbf{\thetitle} | ||||
| \end{flushleft}} | ||||
| 
 | ||||
| \newcommand{\hr}[1][]{\bigskip\hrule} | ||||
| 
 | ||||
| \newcommand{\copyrightnotice}{} | ||||
| 
 | ||||
| %%% to support hypertext index entries | ||||
| \def\hindex#1{\index} % ignore the label here---no links in printed version | ||||
| 
 | ||||
| \newcommand{\hyperlink}[3][]{#3} | ||||
| \newcommand{\href}[3][]{#3} | ||||
| \newcommand{\hpageref}[3][]{#3} | ||||
| \let\true@ref=\ref\renewcommand{\ref}[2][]{\true@ref{#2}} | ||||
| \let\true@pageref=\pageref\renewcommand{\pageref}[2][]{\true@pageref{#2}} | ||||
| 
 | ||||
| %%% \mailto{id}{name} | ||||
| \newcommand{\mailto}[3][]{#3} | ||||
| 
 | ||||
| %%% forms | ||||
| \newenvironment{form}[1]{}{} | ||||
| \newcommand{\formtextarea}[1]{\strut} | ||||
| \newcommand{\forminput}[1]{\strut} | ||||
| \newcommand{\formselect}[2]{\strut} | ||||
| \newcommand{\formoption}[2][]{\strut} | ||||
| 
 | ||||
| \newif\iflatex\latextrue | ||||
| \newif\ifhtml\htmlfalse | ||||
| 
 | ||||
| \newenvironment{DIV}[1] | ||||
|   {\relax} | ||||
|   {\relax} | ||||
| 
 | ||||
| \def\span#1#2{#2} | ||||
| \newcommand{\img}[3][]{#2} | ||||
| 
 | ||||
| %%% \parheader{title} | ||||
| \def\parheader#1 {\medskip\noindent{\bf #1.}~~} | ||||
| 
 | ||||
| \newcounter{alphacount} | ||||
| \def\alphalabel{\textit{\alph{alphacount}}.} | ||||
| \newenvironment{alphalist} | ||||
|   {\begingroup\let\beforeschemedisplay=\relax\let\afterschemedisplay=\relax | ||||
|    \begin{list}{\alphalabel}{\usecounter{alphacount}\itemsep=0pt\parsep=0pt% | ||||
|         \topsep=0pt}} | ||||
|   {\end{list}\endgroup} | ||||
| 
 | ||||
| %%% final set up | ||||
| \renewcommand{\contentsname}{Contents} | ||||
| \newcommand{\bibname}{Bibliography} | ||||
| \renewcommand{\indexname}{Index} | ||||
| \renewcommand{\today}{\ifcase\month\or | ||||
|   January\or February\or March\or April\or May\or June\or | ||||
|   July\or August\or September\or October\or November\or December\fi | ||||
|   \space\number\day, \number\year} | ||||
| \setlength\columnsep{10\p@} | ||||
| \setlength\columnseprule{0\p@} | ||||
| \pagestyle{headings} | ||||
| \pagenumbering{arabic} | ||||
| \parindent=0pt | ||||
| \parskip=4pt | ||||
| 
 | ||||
| \if@twoside\else\raggedbottom\fi | ||||
| \endinput | ||||
| %%% end of website.cls | ||||
							
								
								
									
										93
									
								
								stex/inputs/website.hcls
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										93
									
								
								stex/inputs/website.hcls
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,93 @@ | |||
| %%% website.hcls | ||||
| %%% Kent Dybvig and Oscar Waddell | ||||
| %%% August 2003 | ||||
| 
 | ||||
| \newif\iflatex\latexfalse | ||||
| \newif\ifhtml\htmltrue | ||||
| 
 | ||||
| \def\thetitleattributes{} | ||||
| 
 | ||||
| %%% \webpage{title} | ||||
| \newcommand{\webpage}[2][]{ | ||||
| \endwebpage | ||||
| \def\thetitleattributes{#1} | ||||
| \def\thetitle{#2} | ||||
| \begingroup\renewcommand{\hyperlink}[3][]{##3}\openhtmlfile{#2}\endgroup | ||||
| \renewcommand{\endwebpage}{\copyrightnotice | ||||
|  \closehtmlfile\renewcommand{\endwebpage}{}}} | ||||
| \newcommand{\endwebpage}{} | ||||
| 
 | ||||
| \def\maketitle{\raw{<h1} \thetitleattributes\raw{>}\thetitle\raw{</h1>}} | ||||
| 
 | ||||
| \newcommand{\hr}[1][]{\raw{<hr #1>}} | ||||
| 
 | ||||
| \def\copyright{\raw{©}} | ||||
| \newcommand{\copyrightnotice}{} | ||||
| 
 | ||||
| \let\trueenddocument=\enddocument | ||||
| \def\enddocument{ | ||||
|  \endwebpage | ||||
|  \trueenddocument} | ||||
| 
 | ||||
| %%% \section{title} | ||||
| \newcommand{\section}[1]{ | ||||
| \raw{<h2>}#1\raw{</h2>} | ||||
| } | ||||
| 
 | ||||
| %%% \subsection{title} | ||||
| \newcommand{\subsection}[1]{ | ||||
| \raw{<h3>}#1\raw{</h3>} | ||||
| } | ||||
| 
 | ||||
| %%% \subsection{title} | ||||
| \newcommand{\subsubsection}[1]{ | ||||
| \raw{<h4>}#1\raw{</h4>} | ||||
| } | ||||
| 
 | ||||
| \newenvironment{DIV}[1] | ||||
|   {\raw{<div #1>}} | ||||
|   {\raw{</div>}} | ||||
| 
 | ||||
| \def\span#1#2{\raw{<span #1>}#2\raw{</span>}} | ||||
| 
 | ||||
| \newcommand{\img}[3][]{\raw{<img alt="#2" #1 src="#3">}} | ||||
| 
 | ||||
| %%% \parheader{title} | ||||
| \def\parheader#1 {\medskip\noindent{\bf #1.}~~} | ||||
| 
 | ||||
| %%% center: should be built in | ||||
| \newenvironment{center} | ||||
|   {\raw{<div align=center>}} | ||||
|   {\raw{</div>}} | ||||
| 
 | ||||
| %%% alphalist | ||||
| \newcounter{alphalist} | ||||
| \def\alphalist{\begingroup\setcounter{alphalist}{0} | ||||
|  \def\endalphalistitem{}% | ||||
|  \renewcommand{\item}{\endalphalistitem | ||||
|   \def\endalphalistiem{\raw{</td></tr>}}% | ||||
|   \stepcounter{alphalist}% | ||||
|   \raw{<tr valign=top><td>}\textit{~~\alph{alphalist}}.\raw{</td><td>}} | ||||
|  \raw{<table>}} | ||||
| \def\endalphalist{\endalphalistitem\raw{</table>}\endgroup} | ||||
| 
 | ||||
| %%% define our own (compact) description environment | ||||
| \def\description{\begingroup | ||||
|  \renewcommand{\item}[1][]{\raw{<dt>}##1\raw{<dd>}}\raw{<dl compact>}} | ||||
| \def\enddescription{\raw{</dl>}\endgroup} | ||||
| 
 | ||||
| %%% hyperlink support | ||||
| \newcommand{\hyperlink}[3][]{\raw{<a #1 href="}\url{#2}\raw{">}#3\raw{</a>}} | ||||
| 
 | ||||
| %%% \mailto{id}{name} | ||||
| \newcommand{\mailto}[3][]{\raw{<a #1 href="/cgi-bin/tomail.cgi?name=#2">}{#3}\raw{</a>}} | ||||
| 
 | ||||
| %%% colors | ||||
| \def\textcolor#1#2{\raw{<span style="color: #1;">}#2\raw{</span>}} | ||||
| 
 | ||||
| %%% forms | ||||
| \newenvironment{form}[1]{\raw{<form #1>}}{\raw{</form>}} | ||||
| \newcommand{\formtextarea}[2]{\raw{<textarea #1>}#2\raw{</textarea>}} | ||||
| \newcommand{\forminput}[1]{\raw{<input #1>}} | ||||
| \newcommand{\formselect}[2]{\raw{<select #1>}#2\raw{</select>}} | ||||
| \newcommand{\formoption}[2][]{\raw{<option #1>}#2\raw{</option>}} | ||||
		Reference in a new issue
	
	 tmtt
						tmtt