diff options
author | Karl Berry <karl@freefriends.org> | 2018-12-29 22:50:15 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2018-12-29 22:50:15 +0000 |
commit | 120c0c49c7474dd161886fd979a0126398043d3d (patch) | |
tree | 8f5d5bc99b6c321770f388c85d30b8b775d62c6e /Master/texmf-dist/doc/latex/brandeis-problemset/brandeis-problemset.tex | |
parent | bc7aa0d51e3d33e22443fbc7eda7b5c63d58afbf (diff) |
brandeis-problemset (29dec18)
git-svn-id: svn://tug.org/texlive/trunk@49528 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/doc/latex/brandeis-problemset/brandeis-problemset.tex')
-rw-r--r-- | Master/texmf-dist/doc/latex/brandeis-problemset/brandeis-problemset.tex | 149 |
1 files changed, 101 insertions, 48 deletions
diff --git a/Master/texmf-dist/doc/latex/brandeis-problemset/brandeis-problemset.tex b/Master/texmf-dist/doc/latex/brandeis-problemset/brandeis-problemset.tex index 9a823c3cf3b..8151601a130 100644 --- a/Master/texmf-dist/doc/latex/brandeis-problemset/brandeis-problemset.tex +++ b/Master/texmf-dist/doc/latex/brandeis-problemset/brandeis-problemset.tex @@ -2,11 +2,9 @@ \usepackage{brandeis-problemset-doc} \author{Rebecca Turner\thanks{Brandeis University; \email{rebeccaturner@brandeis.edu}}} \title{The \bps\ Document Class} -\date{2018-10-24} - +\date{2018-12-20} \begin{document} \maketitle - \begin{abstract} Brandeis University's computer science (``\textsc{cosi}'') courses @@ -73,25 +71,21 @@ due date). \subsection{Class options} -\bps\ defines a limited set of key-value options that may be set at -\cs{documentclass}-time. These may be removed entirely in a future release, -as it seems ``messy'' to have three configuration methods -(\cs{documentclass} options, \cs{problemsetsetup}, and singular option -commands). +Class options are limited to configuration options which require the loading +of fonts or other packages; ``string'' settings like the assignment's due +date are configured either with the \cs{problemsetsetup} command or the +commands described in section~\ref{sss:configcommands}. \begin{Optionlist} - duedate & Assignment due date in full \\ - instructor & Instructor name in full \\ - course & Course name in full \\ - assignment & Assignment name in full \\ gantt & Load packages for the \env{ganttschedule} environment \\ + scheme & Define the \texttt{scheme} language for the \ctan{listings} + package as well as the \env{scheme} shorthand environment. \\ antonella & Use Dr.\ Antonella DiLillio's preferred styles (Courier for code) \\ + solutions & Include \env{solution} environments in compiled + document. \\ \end{Optionlist} -Given that \cs{documentclass} option parsing is much more limited than other -key-value interfaces, these options have limited capabilities. - \subsection{Setting options after loading \bps} \begin{macro}{\problemsetsetup}\marg{options}\AfterLastParam Sets global @@ -100,8 +94,7 @@ options. \begin{table}[h] \centering - \caption{Options for \cs{problemsetsetup}; many of these are just used - in document headers.} + \caption{Options for \cs{problemsetsetup}} \label{tab:problemset-options} \begin{Optionlist} course & Course name in full. \\ @@ -110,7 +103,10 @@ options. assignment & Assignment name in full. \\ number & Assignment name shorthand; use \texttt{3} for ``Problem Set 3''. \\ - duedate & Due date, e.g.\ \texttt{2018-10-18}; not parsed at all. \\ + duedate & Due date, e.g.\ \texttt{2018-10-18}; not parsed at all, + but + \href{https://en.wikipedia.org/wiki/ISO_8601}{\textsc{iso} + 8601 dates} are highly recommended. \\ instructor & Course instructor. \\ codefont & With \fontspecok, pass the given font to \cs{setmonofont} and enable Unicode shortcuts for the \env{pseudocode} @@ -120,12 +116,18 @@ options. antonella & True/false (default: false; if no value specified, assumes true); use Dr.\ Antonella DiLillio's preferred styles (Courier for code) \\ + solutions & Include \env{solution} environments in compiled + document. \\ \end{Optionlist} \end{table} \end{macro} -\bps\ additionally provides a number of configuration commands with similar -interfaces as the \TeX\ macros \cs{author}, \cs{title}, and \cs{date}. +\subsubsection{Configuration commands}% +\label{sss:configcommands} + +\bps\ additionally provides a number of configuration commands for setting a +single opption with similar interfaces as the \TeX\ macros \cs{author}, +\cs{title}, and \cs{date}. \begin{macro}{\duedate}\marg{date} sets the due date in full.\end{macro} \begin{macro}{\instructor}\marg{name} sets the instructor name.\end{macro} @@ -145,10 +147,14 @@ it for shortcuts in the \env{pseudocode} environment. \subsection{Practical usage} -You may find it useful to define a \ext{sty} file for each course. For -instance, \filename{cosi21a.sty} might read: +You may find it useful to define a customized document class for each +course. There's no reason to install these to some system-wide directory; it +makes sense for them to live in the same directory as the problem set source +files. For instance, \filename{cosi21a.cls} might read: + +\begin{latexfile}{cosi21a.cls} +\LoadClass[antonella]{brandeis-problemset} -\begin{latexfile}{cosi21a.sty} % set course/author data \problemsetsetup{ instructor=Dr.\ Antonella DiLillio, @@ -168,8 +174,8 @@ instance, \filename{cosi21a.sty} might read: and then \filename{ps1.tex} might read: \begin{latexfile}{ps1.tex} -\documentclass{problemset} -\usepackage{cosi21a} +\documentclass{cosi21a} +% stuff specific to this assignment \problemsetnumber{1} \duedate{2018-10-29} \begin{document} @@ -205,6 +211,20 @@ partlabel & Adds a custom label to this part; see \option{label} \\ Vertical material is allowed in a~\env{problem}. \end{macro} +\begin{macro}{solution} + +Defines a solution for a problem; a solution prints in blue and is excluded +from the compiled document entirely unless the \option{solutions} package +option is given. + +In this way, the same \texttt{.tex} file can serve as both a postable assignment +prompt and an answer key. + +\note{The style of solutions is customizable by redefining + \cs{solutionstyle}; it's defined to \cs{color}|{blue}| by default.} + +\end{macro} + \begin{macro}{\subproblem}\oarg{description}\AfterLastParam Prints a sub-problem, i.e.\ a \cs{subsection}. It doesn't do very much at the moment. \end{macro} @@ -216,16 +236,18 @@ specified with \meta{colspec}. \cs{Th} is backed by \cs{multicolumn}. \begin{macro}{pseudocode}\oarg{keywords}\AfterLastParam Prints pseudocode.\footnote{Designed for \cosi{21a} as taught by Dr.\ Antonella -DiLillo} Several shortcuts are defined, as shown in +DiLillo} + +Several ``shortcuts,'' which replace a source-code sequence like +\texttt{->} with a symbol like $\rightarrow$, are shown in table~\ref{tab:pseudocode}. -These shortcuts display in -\cs{pseudocodesymbolfont} (default: \cs{ttfamily}), which may be redefined -if you prefer something else. The easiest way to change -\cs{pseudocodesymbolfont} is with \cs{setcodefont}. If you use the -\option{antonella} option with \fontspecok, \bps\ will load \ctan{lm-math} -and display the symbols seen in table~\ref{tab:pseudocode}, which look -significantly better with Courier than \textsc{stix}' symbols. +These shortcuts display in \cs{pseudocodesymbolfont} (default: +\cs{ttfamily}), which may be redefined if you prefer something else. The +easiest way to change \cs{pseudocodesymbolfont} is with \cs{setcodefont}. If +you use the \option{antonella} option with \fontspecok, \bps\ will load +\ctan{lm-math} and display the symbols seen in table~\ref{tab:pseudocode}, +which look significantly better with Courier than \textsc{stix}' symbols. \begin{table}[h] \centering @@ -305,6 +327,13 @@ shorthand environment for a listing of Java code. Any extra options are passed directly to the \ctan{listings} package. \end{macro} +\begin{macro}{scheme}\oarg{extra options}\AfterLastParam Shorthand +environment for a listing of Scheme code, useful for \cosi{121b}. Requires +the \option{scheme} package option to be loaded. + +Any extra options are passed directly to the \ctan{listings} package. +\end{macro} + \begin{macro}{ganttschedule}\marg{total cell count}\oarg{title}\AfterLastParam An environment for drawing Gantt charts indicating process scheduling. The mandatory argument indicates how small the grid should be; \texttt{19} @@ -454,26 +483,50 @@ $\Rm{Foo}(a, n)$ computes $a^n$, and will run in $O(n)$ time always. \end{document} \end{latexcode} -\pagebreak -\begin{changelog} -\begin{version}{v=0.3.0, date=2018-10-24, author=Rebecca Turner} - \added changelog. - \added support for \cs{part}s and referencing problems. - \added options to \env{problem} environment: \option{part}, +\begin{changelog}[author=Rebecca Turner] + +\begin{version}[v=0.4.0] +\added + \item \env{solution} environment and \option{solutions} class + option. + \item \env{scheme} shorthand environment and \option{scheme} class + option. +\fixed + \item Boolean class options being overwritten by keys defined for + \cs{problemsetsetup}. + \item Title-formatting errors +\removed + \item Assignment- and course-specific class options + \option{duedate}, \option{assignment}, \option{instructor}, + and \option{course}. These settings should be configured + with either \cs{problemsetsetup} or their specific commands. + (\cs{duedate}, \cs{instructor}, etc.). +\end{version} + +\begin{version}[v=0.3.0, date=2018-10-24] +\added + \item changelog. + \item support for \cs{part}s and referencing problems. + \item options to \env{problem} environment: \option{part}, \option{label}, and \option{partlabel}. - \added \cs{maketitle} (contrast with \cs{maketitlepage}). + \item \cs{maketitle} (contrast with \cs{maketitlepage}). \end{version} -\begin{version}{v=0.2.0, date=2018-10-20, author=Rebecca Turner} - \item Renamed to \bps. - \added license header. - \added \env{ganttschedule} environment. - \added keywords to pseudocode environment: \texttt{and}, \texttt{or}, + +\begin{version}[v=0.2.0, date=2018-10-20] +\changed + \item Class renamed to from \ltxclass{problemset} to \bps. +\added + \item license header. + \item \env{ganttschedule} environment. + \item keywords to pseudocode environment: \texttt{and}, \texttt{or}, \texttt{nil}, and \texttt{len}. - \added \cs{ac} command for acronyms. - \added package example. + \item \cs{ac} command for acronyms. + \item package example. \end{version} -\shortversion{v=0.1.0, date=2018-10-19, author=Rebecca Turner, + +\shortversion{v=0.1.0, date=2018-10-19, changes=Initial beta as \ltxclass{problemset}.} \end{changelog} +\pagebreak\PrintIndex\listoftables \end{document} |