texlive[43516] Master: studenthandouts (16mar17)

commits+karl at tug.org commits+karl at tug.org
Thu Mar 16 22:43:23 CET 2017


Revision: 43516
          http://tug.org/svn/texlive?view=revision&revision=43516
Author:   karl
Date:     2017-03-16 22:43:23 +0100 (Thu, 16 Mar 2017)
Log Message:
-----------
studenthandouts (16mar17)

Modified Paths:
--------------
    trunk/Master/tlpkg/bin/tlpkg-ctan-check
    trunk/Master/tlpkg/tlpsrc/collection-latexextra.tlpsrc

Added Paths:
-----------
    trunk/Master/texmf-dist/doc/latex/studenthandouts/
    trunk/Master/texmf-dist/doc/latex/studenthandouts/README
    trunk/Master/texmf-dist/doc/latex/studenthandouts/samplecode/
    trunk/Master/texmf-dist/doc/latex/studenthandouts/samplecode/worksheets/
    trunk/Master/texmf-dist/doc/latex/studenthandouts/samplecode/worksheets/handout-1-1.tex
    trunk/Master/texmf-dist/doc/latex/studenthandouts/samplecode/worksheets/handout-1-2.tex
    trunk/Master/texmf-dist/doc/latex/studenthandouts/samplecode/worksheets/handout-1-3.tex
    trunk/Master/texmf-dist/doc/latex/studenthandouts/samplecode/worksheets/handout-2-1.tex
    trunk/Master/texmf-dist/doc/latex/studenthandouts/samplecode/worksheets/handout-2-2.tex
    trunk/Master/texmf-dist/doc/latex/studenthandouts/samplecode/worksheets/handout-3-1.tex
    trunk/Master/texmf-dist/doc/latex/studenthandouts/samplecode/worksheets/handout-3-2.tex
    trunk/Master/texmf-dist/doc/latex/studenthandouts/samplecode/worksheets.tex
    trunk/Master/texmf-dist/doc/latex/studenthandouts/studenthandouts-doc.pdf
    trunk/Master/texmf-dist/doc/latex/studenthandouts/studenthandouts-doc.tex
    trunk/Master/texmf-dist/tex/latex/studenthandouts/
    trunk/Master/texmf-dist/tex/latex/studenthandouts/studenthandouts.sty
    trunk/Master/tlpkg/tlpsrc/studenthandouts.tlpsrc

Added: trunk/Master/texmf-dist/doc/latex/studenthandouts/README
===================================================================
--- trunk/Master/texmf-dist/doc/latex/studenthandouts/README	                        (rev 0)
+++ trunk/Master/texmf-dist/doc/latex/studenthandouts/README	2017-03-16 21:43:23 UTC (rev 43516)
@@ -0,0 +1,55 @@
+LaTeX Package: Student Handouts 2017/03/15 v1.0
+--------------------------------------------------
+Management and styling of student handout projects
+
+
+Copyright (C) 2017, James Fennell <jamespfennell at gmail.com>
+
+
+
+Abstract:
+
+	The Student Handouts package, studenthandouts, is used to generate a single master
+	document that contains a set of individual student handouts.
+
+	The package has two main functions.
+
+	First, it provides a simple framework for organizing handout source code, and
+	supplies a set of import management tools for selectively importing a subset of the
+	handouts into the master document. Selective import is convenient when compilation
+	of all of the handouts is unnecessary, for example when working on a new handout.
+
+	As a secondary feature, the package defines a basic visual style for handouts. This
+	style can be easily changed.
+
+
+
+Files:
+  	* README         
+  	* studenthandouts.sty  
+  	* studenthandouts-doc.pdf
+  	* studenthandouts-doc.tex
+  	* samplecode/worksheets.tex	     - master file of the sample student handouts project
+  	* samplecode/worksheets/handout-n-m.tex	- individual handouts files in the sample project
+
+
+
+Installation:
+	The .sty file itself is provided with the package and should be placed
+	in the appropriate directory in your Latex installation for use globally.
+
+	To use the package in just one project, save the .sty file in the same directory
+	as the handouts master document.
+
+
+License:
+	This work may be distributed and/or modified under the conditions
+	of the LaTeX Project Public License, either version 1.3c 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.3c or later is part of all distributions of LaTeX
+	version 2005/12/01 or later.
+
+
+
+

Added: trunk/Master/texmf-dist/doc/latex/studenthandouts/samplecode/worksheets/handout-1-1.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/studenthandouts/samplecode/worksheets/handout-1-1.tex	                        (rev 0)
+++ trunk/Master/texmf-dist/doc/latex/studenthandouts/samplecode/worksheets/handout-1-1.tex	2017-03-16 21:43:23 UTC (rev 43516)
@@ -0,0 +1,44 @@
+\sethandouttitle{From First Principles}
+
+
+
+\allhandoutinfo{}
+
+\begin{enumerate}
+	\item 	Find the equation of the tangent line to the curves
+		\begin{enumerate}
+			\item $y=4x-3x^2$ ar $(2,-4)$.
+			\vfill
+			\item	$y = \sqrt{x}$ at $(1,1)$.
+			\vfill
+		\end{enumerate}
+	
+	\item 	The displacement of a particle moving in a straight line is given by the equation of motion $s=1/t^2$.
+		Find the velocity of the particle at $t=a$, $t=1$, $t=2$ and $t=3$.
+
+	\vfill
+	\newpage
+
+	\item	Each limit represents the derivative of some function $f$ at a number $a$. State such an $f$ and $a$ in each case.
+		\begin{enumerate}
+			\item	$\displaystyle\lim_{h \rightarrow 0} \frac{ (1+h)^8 - 1 }{h}$.
+			\vfill
+			\item	$\displaystyle\lim_{x \rightarrow 5} \frac{ 2^x - 32}{x-5}$.
+			\vfill
+			\item	$\displaystyle\lim_{h \rightarrow 0} \frac{ \cos(\pi + h) + 1 }{h}$.
+			\vfill
+		\end{enumerate}
+
+	\newpage
+	\item 	The cost in dollars of producing $x$ units of a certain commodity is $C(x)=  500 + 10x + 0.05 x^2$.
+		\begin{enumerate}
+			\item 	Find the average rate of change of $C$ with respect to $x$ when the production level is changed
+					from $x=100$ to $x=105$.
+			\vfill
+			\item 	Find the average rate of change of $C$ with respect to $x$ when the production level is changed
+					from $x=100$ to $x=101$.
+			\vfill
+			\item	Find the instantaneous rate of change of $C$ with respect to $x$ when $x=100$.
+			\vfill
+		\end{enumerate}
+\end{enumerate}

Added: trunk/Master/texmf-dist/doc/latex/studenthandouts/samplecode/worksheets/handout-1-2.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/studenthandouts/samplecode/worksheets/handout-1-2.tex	                        (rev 0)
+++ trunk/Master/texmf-dist/doc/latex/studenthandouts/samplecode/worksheets/handout-1-2.tex	2017-03-16 21:43:23 UTC (rev 43516)
@@ -0,0 +1,38 @@
+\sethandouttitle{}
+
+
+\begin{enumerate}
+	\item	Differentiate the function.
+		\begin{enumerate}
+			\item	$f(x) = x^3 - 4x+6$.
+			\vfill
+			\item	$f(s) = \frac{-12}{s^5} + \sin(s)$.
+			\vfill
+			\item	$f(x) = \frac{ x^2 + 4x + 3 }{\sqrt{x}}$.
+			\vfill
+		\end{enumerate}
+
+	\item	Find an equation for the tangent line of $y=3x^2 - x^3$ at $(1,2)$.
+	\vfill
+
+	\newpage
+
+	\item 	Find the first and second derivatives of $f(x) = x^4 - 3x^3 + 16x$.
+	\vfill
+	
+	\item	The position function of a particle is given by $s = t^3 - 4.5 t^2 - 7t$, $t \geq 0$.
+		\begin{enumerate}
+			\item When does the particle reach a velocity of 5m/s?
+			\vfill
+			\item When is the acceleration 0? What is the signifigance of this value of $t$?
+			\vfill
+		\end{enumerate}
+
+	\item	A spherical balloon is being inflated. 
+			Find the rate of increase of the surface area ($S= 4 \pi r^2$) 
+			with respect to the radius when $r=1$, $r=2$ and $r=3$. What conclusion can you make?
+	\vfill
+\end{enumerate}
+
+\allhandoutinfo
+

Added: trunk/Master/texmf-dist/doc/latex/studenthandouts/samplecode/worksheets/handout-1-3.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/studenthandouts/samplecode/worksheets/handout-1-3.tex	                        (rev 0)
+++ trunk/Master/texmf-dist/doc/latex/studenthandouts/samplecode/worksheets/handout-1-3.tex	2017-03-16 21:43:23 UTC (rev 43516)
@@ -0,0 +1,23 @@
+\sethandouttitle{The Product Rule}
+
+
+
+\begin{enumerate}
+	\item	Find the derivative of $f(x) = (1+2x^2)(x-x^2)$ in two ways: by using the Product Rule and 
+			by performing the multiplication first. Do your answers agree?
+		\vfill
+
+	\item	Differentiate the function.
+		\begin{enumerate}
+			\item	$f(x) = t^3 \cos(t)$.
+		\vfill
+			\item	$f(x) = \sin(x) \cos(x)$.
+		\vfill
+		\end{enumerate}
+
+	\item	If $f$ is a differentiable function find an expresion for the derivative of $y = x^2 f(x)$.
+	\vfill
+
+\end{enumerate}
+
+

Added: trunk/Master/texmf-dist/doc/latex/studenthandouts/samplecode/worksheets/handout-2-1.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/studenthandouts/samplecode/worksheets/handout-2-1.tex	                        (rev 0)
+++ trunk/Master/texmf-dist/doc/latex/studenthandouts/samplecode/worksheets/handout-2-1.tex	2017-03-16 21:43:23 UTC (rev 43516)
@@ -0,0 +1,55 @@
+\sethandouttitle{The Exponential and Logarithm Functions}
+
+
+\begin{enumerate}
+
+	\item	Evaluate $f(x) = x^2$ and $g(x) = 2^x$ at $x=-3,-2,-1,0,1,2,3,4,5$. Graph both functions on the same graph.
+
+	\item   Find the domain of $\displaystyle f(x) = \frac{ 1 - e^{x^2} }{ 1 - e^{1-x^2} }$ and $\displaystyle g(x) = \frac{ 1+x }{ e^{\cos x} }$.
+
+	\item	Find the limit.
+		\begin{enumerate}
+			\item $\displaystyle\lim_{ x \rightarrow \infty } (1.0001)^x $.
+			\item $\displaystyle\lim_{x \rightarrow \infty} \frac{ e^{3x} - e^{-3x} }{ e^{3x} + e^{-3x} }$.
+			\item $\displaystyle \lim_{x \rightarrow \infty} ( e^{-2x} \cos x)$.
+		\end{enumerate}
+
+	\item 	Is $g(x) = 1/x$ one-to-one?
+
+	\item 	If $g(x) = 3 +x + e^x$, find $g^{-1}(4)$.
+
+	\newpage
+
+	\item	The formula $C = \frac{5}{9}(F-32)$ expresses Celsius $C$ as a function of Fahrenheit $F$. 
+			Find a formula for the inverse function and interpret it.
+
+	\item 	Find the inverse of the function $f(x) = 1 + \sqrt{ 2 + 3x }$.
+
+	\item 	Find the inverse of the function $f(x) = e^{2x-1}$.
+
+	\item 	Find $ (f^{-1})'(a)$ using the inverse derivative formula.
+		\begin{enumerate}
+			\item $f(x) = x^3$.
+			\item $f(x) = 9-x^2$.
+		\end{enumerate}
+		Then, find the inverse function first and differentiate it. Do your answers agree?
+
+
+	\item 	Find the exact value of each expression (without a calculator).
+		\begin{enumerate}
+			\item	$\log_5(125)$.
+			\item 	$\displaystyle \log_3\left( \frac{1}{27} \right)$.
+			\item	$\log_2 6 - \log_2 15 + \log_2 20$.
+		\end{enumerate}
+		
+	\item	Solve for $x$:
+		\begin{enumerate}
+			\item $e^{7-4x}=6$.
+			\item $\ln(3x-10) = 2$.
+			\item $\ln x + \ln (x-1) = 1$.
+		\end{enumerate}
+
+\end{enumerate}   
+
+
+

Added: trunk/Master/texmf-dist/doc/latex/studenthandouts/samplecode/worksheets/handout-2-2.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/studenthandouts/samplecode/worksheets/handout-2-2.tex	                        (rev 0)
+++ trunk/Master/texmf-dist/doc/latex/studenthandouts/samplecode/worksheets/handout-2-2.tex	2017-03-16 21:43:23 UTC (rev 43516)
@@ -0,0 +1,26 @@
+\sethandouttitle{Trignometric Functions}
+
+\begin{enumerate}
+
+	\item	Differentiate the function.
+		\begin{enumerate}
+			\item	$f(x) = \sin(\ln x)$.
+			\item 	$f(x) = \sin(x) \ln(5x)$.
+			\item	$g(x) = \ln\left( \frac{ (2y+1)^5 }{ \sqrt{ y^2+1} } \right)$.
+			\item	$y = \frac{x}{e^x}$.
+			\item	$F(t) = e^{t \sin(2t) }$.
+		\end{enumerate}
+
+	\item 	Without simplfiying, find the derivative of $f(x) = \ln( e^{3x} )$. 
+			Then simply $f(x)$ and differentiate. Do your answers agree?
+
+	\item 	Use logarithmic differentiation to differentiate the function.
+		\begin{enumerate}
+			\item	$f(x) = (x^2+2)^2(x^4+4)^4$.	
+			\item	$f(x) = x^x$.
+		\end{enumerate}
+
+
+\end{enumerate}   
+
+

Added: trunk/Master/texmf-dist/doc/latex/studenthandouts/samplecode/worksheets/handout-3-1.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/studenthandouts/samplecode/worksheets/handout-3-1.tex	                        (rev 0)
+++ trunk/Master/texmf-dist/doc/latex/studenthandouts/samplecode/worksheets/handout-3-1.tex	2017-03-16 21:43:23 UTC (rev 43516)
@@ -0,0 +1,48 @@
+\sethandouttitle{Maximum and Minimum Values}
+
+\allhandoutinfo{}
+
+\begin{enumerate}
+
+
+	\item	Sketch the graph of a function $f$ that is continous on $[1,5]$ and has an absolute minimum at 2,
+			absolute maximum at 3, and a local minimum at 4.
+
+	\item 	\begin{enumerate}
+			\item	Sketch the graph of a function that has a local maximum at 2 and is differentiable at 2.
+			\item	Sketch the graph of a function that has a local maximum at 2 and is continuous but not differentiable at 2.
+			\item	Sketch the graph of a function that has a local maximum at 2 and is not continuous at 2.
+		\end{enumerate} 
+
+
+	\item	Sketch the graph of $f$ and use your sketch to find the absolute and local maximum and minimum values of $f$.
+		\begin{enumerate}
+			\item	$\displaystyle f(x) = \frac{1}{2}(3x-1), \quad x \leq 3$.
+			\item	$f(x) = \sin(x), \quad 0 \leq x < \pi/2$.
+			\item	$f(x) = \ln(x), \quad 0<x \leq 2$.
+			\item	$f(x) = 1 - \sqrt{x}$.
+		\end{enumerate}
+
+	\item	Find the critical numbers of the function.
+		\begin{enumerate}
+			\item	$\displaystyle f(x) = 4+ \frac{1}{3}x - \frac{1}{2}x^2$.
+			\item	$\displaystyle g(y) = \frac{y-1}{ y^2 - y + 1 }$.
+			\item	$f(\theta) = 2 \cos \theta + \sin^2 \theta$.
+			\item	$f(\theta) = x^2 e^{-3x}$.
+		\end{enumerate}
+
+	\item	Find the absolute maximum and minimum values of $f$ on the given interval.
+		\begin{enumerate}
+			\item	$f(x) = 12+4x-x^2$ on $[0,5]$.
+			\item	$f(t) = t \sqrt{4-t^2}$ on $[-1,2]$.
+			\item	$f(t) = 2 \cos t + \sin 2t$ on $[0,\pi/2]$.
+			\item	$f(x) = x e^{-x^2/8}$ on $[-1,4]$.
+			\item	$f(x) = \ln(x^2+x+1)$ on $[-1,1]$.	
+		\end{enumerate}
+
+
+
+\end{enumerate} 
+
+
+

Added: trunk/Master/texmf-dist/doc/latex/studenthandouts/samplecode/worksheets/handout-3-2.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/studenthandouts/samplecode/worksheets/handout-3-2.tex	                        (rev 0)
+++ trunk/Master/texmf-dist/doc/latex/studenthandouts/samplecode/worksheets/handout-3-2.tex	2017-03-16 21:43:23 UTC (rev 43516)
@@ -0,0 +1,48 @@
+\sethandouttitle{The Mean Value Theorem}
+
+
+\begin{enumerate}
+
+
+	\item 	Verify that the function satisfies the three hypotheses of Rolle's Theorem on the given interval.
+		Then find all numbers $c$ that satisfy the conclusion of Rolle's Theorem.
+		\begin{enumerate}
+			\item	$f(x) = 5 - 12x + 3x^2$ on $[1,3]$.
+			\item	$f(x) = \sqrt{x} - \frac{1}{3}x$ on $[0,9]$.
+		\end{enumerate}
+
+	\item	Let $f(x) = 1 - x^{2/3}$. Show that $f(-1)=f(1)$ but there is no number $c$ in $(-1,1)$ such that $f'(c)=0$.
+		Why does this not contradict Rolle's Theorem?
+
+	\item 	Verify that the function satisfies the hypotheses of the Mean Value Theorem on the given interval.
+		Then find all numbers $c$ that satisfy the conclusion of the Mean Value Theorem.
+		\begin{enumerate}
+			\item	$f(x) = 2x^2 - 3x +1$ on $[0,2]$.
+			\item	$f(x) = \ln(x)$ on $[1,4]$.
+		\end{enumerate}
+
+	\item	Let $f(x) = 2 - |2x-1|$. Show that there is no value of $c$ such that
+		\[
+			f(3)-f(0) = f'(c)(3-0).
+		\]
+		Why does this not contradict the Mean Value Theorem?
+
+	\item	Show that the equation $2x + \cos(x)$ has exactly one real root.
+
+	\item	If $f(1)=10$ and $f'(2) \geq 2$ for $1 \leq x \leq 4$, how small can $f(4)$ possibly be?
+
+	\item	Does there exist a function $f$ such that $f(0) = -1$, $f(2) = 4$ and $f'(x) \leq 2$?
+
+
+	\item	Prove that
+		\[
+			\arcsin \left( \frac{x-1}{x+1} \right) = 2 \arctan \sqrt{x} - \frac{\pi}{2}.
+		\]
+
+
+
+\end{enumerate} 
+
+
+
+

Added: trunk/Master/texmf-dist/doc/latex/studenthandouts/samplecode/worksheets.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/studenthandouts/samplecode/worksheets.tex	                        (rev 0)
+++ trunk/Master/texmf-dist/doc/latex/studenthandouts/samplecode/worksheets.tex	2017-03-16 21:43:23 UTC (rev 43516)
@@ -0,0 +1,73 @@
+\documentclass[10pt,oneside,letterpaper]{article}
+
+\usepackage{studenthandouts}
+
+
+
+\title{Sample Student Handouts output}
+\author{James Fennell}
+
+\begin{document}
+
+
+\maketitle
+
+
+\noindent
+This is a sample collection of student worksheets compiled using the Student Handouts package.
+	In this sample project there are seven underlying handouts -- 1.1, 1.2, 1.3, 2.1, 2.2, 3.1, and 3.2 -- 
+	but not all are compiled initially in order to illustrate the functionality of the handout import management commands.
+
+Some of the handouts contain the output of \verb$\allhandoutinfo$.
+	This is to show you the specific handout information that can be used when styling the handouts.
+This information can also be used in the handouts themselves, as here.
+
+If you wish to use the package, one option would be to copy the sample code over and use that as the basis for your project.
+	However, as you will see from looking at the sample code itself, very little is required to get a handouts project up and running from scratch.
+
+\vspace{\baselineskip}
+\noindent
+Regarding formatting: the sample handouts here illustrate two possibilities in terms of the function of a handout.
+	The handouts in unit 1 are meant to be written on by students, whereas the handouts in units 2 and 3 are not. 
+	The unit 1 handouts do this by judicious use of the \verb$\vfill$ command which spreads the questions evenly down the page.
+	Inspecting the source will make it clear how this is done.
+
+
+
+
+\tableofcontents
+
+
+
+\renewcommand{\thehandoutsdirectory}{worksheets/}
+\renewcommand{\thehandoutscredit}{NYU Calculus 1 Summer 2015}
+
+\setunittitle{1}{Introduction to Differentiation}
+\setunittitle{3}{Advanced Differentiation}
+
+
+\importhandout{1}{1}
+\importhandout{1}{2}
+\importhandout{1}{3}
+\importhandout{2}{1}
+
+
+% Some random handout import management instructions.
+% Note that 2.2 will not be imported. Even though 2.2 is in the list of admissible handouts, its unit is not in the list of admissible units.
+\importonlyunits{3}
+\importonlyhandouts{2.2,3.2}
+
+
+\importhandout{2}{2}
+\importhandout{3}{1}
+\importhandout{3}{2}
+
+
+
+
+\end{document}
+
+
+
+
+

Added: trunk/Master/texmf-dist/doc/latex/studenthandouts/studenthandouts-doc.pdf
===================================================================
(Binary files differ)

Index: trunk/Master/texmf-dist/doc/latex/studenthandouts/studenthandouts-doc.pdf
===================================================================
--- trunk/Master/texmf-dist/doc/latex/studenthandouts/studenthandouts-doc.pdf	2017-03-16 21:42:31 UTC (rev 43515)
+++ trunk/Master/texmf-dist/doc/latex/studenthandouts/studenthandouts-doc.pdf	2017-03-16 21:43:23 UTC (rev 43516)

Property changes on: trunk/Master/texmf-dist/doc/latex/studenthandouts/studenthandouts-doc.pdf
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Added: trunk/Master/texmf-dist/doc/latex/studenthandouts/studenthandouts-doc.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/studenthandouts/studenthandouts-doc.tex	                        (rev 0)
+++ trunk/Master/texmf-dist/doc/latex/studenthandouts/studenthandouts-doc.tex	2017-03-16 21:43:23 UTC (rev 43516)
@@ -0,0 +1,614 @@
+\documentclass[10pt,oneside,letterpaper]{article}
+
+%
+%	TABLE OF CONTENTS STUFF
+%
+\usepackage{tocloft}
+\tocloftpagestyle{empty}
+\renewcommand{\cftsubsecfont}{\it}
+\renewcommand{\cftsecleader}{\hspace{0.25cm}}%\textbullet\hspace{0.25cm}}
+\renewcommand{\cftsecafterpnum}{\cftparfillskip}
+\renewcommand{\cftsubsecleader}{\hspace{0.25cm}}%$\cdot$\hspace{0.25cm}}
+\renewcommand{\cftsubsecafterpnum}{\cftparfillskip}
+\renewcommand{\cftsubsubsecleader}{\hspace{0.25cm}}%$\cdot$\hspace{0.25cm}}
+\renewcommand{\cftsubsubsecafterpnum}{\cftparfillskip}
+\renewcommand{\cftpnumalign}{l}
+
+
+
+
+
+%
+%	INDEXING STUFF
+%
+\usepackage{makeidx}
+\usepackage[columns=1,initsep=20pt,totoc=true]{idxlayout}
+\makeindex
+
+\newcommand{\indexcommand}[1]{
+	\index{\texttt{#1}}%
+	\marginpar{\texttt{\textbackslash#1}}%
+}
+\renewcommand\indexname{Index of commands}
+
+
+%
+%	TIKZ
+%
+\usepackage{tikz}
+\usetikzlibrary{decorations.pathreplacing}
+
+
+%
+%	HEADER AND FOOTER STYLING
+%
+\usepackage{fancyhdr}
+\pagestyle{fancy}
+	\renewcommand{\headrulewidth}{0pt}
+\fancyfoot{}
+\fancyhead{}
+\fancyhead[R]{\it The Student Handouts Package $\cdot$ \thepage}
+\newcommand{\pdf}{\textsc{pdf} }
+\newcommand{\Latex}{La\textsc{t}e\textsc{x} }
+
+
+
+
+%
+%	FONT STUFF
+%
+\frenchspacing
+\usepackage[oldstyle]{libertine}
+\usepackage[T1]{fontenc}
+\linespread{1.1}
+\usepackage{verbatim}
+%The mono spaced font
+\usepackage{inconsolata}
+
+\title{\vspace{-2\baselineskip}The Student Handouts Package}
+\author{James Fennell\\{\normalsize jamespfennell at gmail.com}}
+
+
+\begin{document}
+
+
+\maketitle
+
+\noindent
+The Student Handouts package, \texttt{studenthandouts}, is used to generate a single master document that contains a set of individual student handouts.
+
+
+The package has two main functions.
+
+First, it provides a simple framework for organizing handout source code, and supplies a set  of
+	import management tools for selectively importing a subset of the handouts into the master document.
+Selective import is convenient when compilation of all of the handouts is unnecessary, for example when working on a new handout.
+
+As a secondary feature, the package defines a basic visual style for handouts.
+This style can be easily changed.
+
+
+
+\tableofcontents
+
+%\section{Managing handouts with the studenthandouts package}
+
+
+
+
+
+\vfill
+
+\noindent
+[\emph{Student handouts version 1.0; this documentation compiled \today.}]
+
+
+
+\section{Basic usage of the package}
+
+
+
+This package is used as an aid in managing and compiling student handouts.
+When using this package, the \Latex source for the handouts project as a whole is divided between a 
+	single master file and individual handout files, one for each handout.
+This section describes the details of this structure and the basic method for importing handouts into the master document.
+All of these features can be seen in the sample code that is distributed with the package.
+
+
+
+
+The handouts master file, into which all of the handouts are imported during compilation, is a standard \Latex file that includes this
+	package.
+Place the usual command in the preamble of this file:
+\begin{verbatim}
+    \usepackage{studenthandouts}
+\end{verbatim}
+For options that may be passed through \texttt{usepackage}, see section \ref{sec:options} below.
+
+The source for the handouts themselves is stored in a subdirectory of the directory containing the master document.
+By default, this subdirectory is \texttt{./handouts/}.
+This directory can be changed; see subsection \ref{sec:variables} below.
+
+The package imposes a one-level organizational structure on the handouts.
+Each handout is a member of a numbered \emph{unit} and within that unit has a unique handout number.
+Handout 1.1 is the first handout in unit one.
+The source for handout 1.1 is, by default, stored in
+\begin{verbatim}
+    ./handouts/handout-1-1.tex
+\end{verbatim}
+Handout 3.4 is the fourth handout in unit three and its source is stored in
+\begin{verbatim}
+    ./handouts/handout-3-4.tex
+\end{verbatim}
+The work `unit' is intentionally generic.
+When working on a specific project units may represent, for example, individual lessons, or chapters in the textbook the handouts are based on.
+
+The organizational structure is loose.
+For example, there is no requirement that handouts begin at the beginning and proceed sequentially: the first handout can be handout 10.521 if desired.
+
+
+The source file\indexcommand{sethandouttitle}%
+ for a specific handout begins with a \texttt{sethandouttitle} command and is followed by the \Latex code for the handout proper.
+Place this line at the start:
+\begin{verbatim}
+	    \sethandoutitle{<Title of the handout>}
+\end{verbatim}
+If the handout does not have a title, execute the command with an empty argument:
+\begin{verbatim}
+	    \sethandouttitle{} 
+\end{verbatim}
+%The command \texttt{handouttitle} must be executed in all cases.
+
+
+Once\indexcommand{importhandout}%
+there is a  source file for handout \emph{n.m}, it is imported into the master document through the  \texttt{importhandout} command. % in the master document.
+Place this command in the master document at the point the handout is to appear:
+\begin{verbatim}
+	    \importhandout{n}{m}
+\end{verbatim}
+Again, \emph{n} is the unit number and \emph{m} is the unique number of the handout within the unit.
+
+
+\section{Handout import management}
+
+
+After writing a number of handouts, the master document will have many handout import  commands. 
+However at a given time it may not be desirable to compile all of the handouts in the project.
+For example, if working on a new handout it is faster to only compile the new work when error checking.
+If collaborating, it may be necessary to compile just a certain subset of the handouts to share.
+
+The import management tools are designed for these situations.
+The basic mechanism is that when handout \emph{n.m} is set to be imported the package first checks, based on previous instructions, whether 
+	unit \emph{n} is to be imported, and if so whether handout \emph{n.m} specifically is to be imported.
+By default all units and handouts are imported.
+
+The instructions for which handouts are to be imported are given through the commands that follow.
+The instructions may be changed at any point in the master file, even after some of the handouts have already been imported.
+
+\begin{itemize}
+
+	\item \verb$\importall$	\indexcommand{importall}
+
+		Import all handouts.
+		This is the default behavior. 
+		The \texttt{importall} command is used to reset to the default behavior after other instructions have been given.
+
+	\item \verb$\importnone$ \indexcommand{importnone}
+	
+		Import none of the handouts.
+
+	\item \verb$\importonlyunits{$\emph{<unit numbers>}\verb$}$ \indexcommand{importonlyunits} 
+
+		Import only those units whose unit numbers appear in \emph{<unit numbers>}. The argument \emph{<unit numbers>} is a comma separated list of numbers with no spaces.
+		Example usage: 
+		\begin{verbatim}
+		  \importonlyunits{1,2,4}
+		\end{verbatim}
+
+
+	\item \verb$\importallunits$	\indexcommand{importallunits}
+
+		Reverse the last command by removing any unit importing restrictions.
+		The difference between this command and \texttt{importall} is that if any specific handout restrictions have been imposed then
+			those restrictions still stand.
+	
+
+	\item \verb$\importonlyhandouts{$\emph{<handout numbers>}\verb$}$		\indexcommand{importonlyhandouts}
+
+		Import only those handouts whose full handout number \emph{n.m} appears in \emph{<unit numbers>}. 
+		The argument \emph{<unit numbers>} is a comma separated list of handout numbers with no spaces.
+		Example usage: 
+		\begin{verbatim}
+		  \importonlyhandouts{5.2,6.5,6.6}
+		\end{verbatim}
+
+	
+	\item \verb$\importallhandouts$		\indexcommand{importallhandouts}
+
+		Reverse the last command by removing any specific handout importing restrictions.
+		The difference between this command and \texttt{importall} is that if any specific unit restrictions have been imposed then
+			those restrictions still stand.
+
+	
+\end{itemize}
+
+An important feature is that the import instructions can be changed on the fly.
+For example with the following code
+\begin{verbatim}
+    	\importnone
+    	\importhandout{1}{1}
+    	\importhandout{1}{2}
+    	\importonlyhandouts{1.3,2.1}
+    	\importhandout{1}{3}
+    	\importhandout{2}{1}
+    	\importhandout{2}{2}
+    	\importhandout{2}{3}
+    	\importall
+    	\importhandout{2}{4}
+\end{verbatim}
+handouts 1.3, 2.1 and 2.4 will be imported.
+
+In particular, in the import context the \texttt{importnone} and \texttt{importall} commands work similarly to 
+	\verb$\begin{comment}$ and \verb$\end{comment}$ respectively.
+
+
+\section{Options and variables}
+
+
+\subsection{The blanks option}
+
+\label{sec:options}
+
+
+The package has one option: \texttt{blanks} or \texttt{noblanks}, with \texttt{blanks} as default.
+
+The \texttt{blanks} option places a blank page after every handout that has an odd number of pages. 
+That way, the compiled handouts document can be printed double sided, and handouts with an odd number of pages will still be on their own sheet.
+
+To see how the \texttt{blanks} options achieves this, see Figure \ref{fig:blanks}.
+In this example there are three handouts: 1.1 with one page, 1.2 with two pages, and 1.3 with one page.
+It is required that 1.2 be distributed double-sided.
+
+
+In the first case in Figure \ref{fig:blanks}, the handouts are compiled one after another with the \texttt{noblanks} option.
+If the resulting document is printed at once double-sided,
+the back of handout 1.1 will contain the first page of handout 1.2, and the next sheet will contain the second page of handout 1.2 with handout 1.3 on the reverse.
+In order to print the handouts correctly with this \pdf file, separate print calls for each of the three handouts are required.
+
+On the other hand, with the \texttt{blanks} option, the resulting \pdf document can just be printed double sided at once.
+The first sheet will contain handout 1.1 on the front, and the blank page after 1.1 on the back.
+The next sheet will have the two pages of handout 1.2 back-to-back, and the last sheet will have handout 1.3 by itself.
+
+
+
+
+
+\newcommand{\handoutimage}[3]{
+	\draw[white] #1 -- ++(-0.05,0.15) coordinate(hib) -- ++(-0.03,1) coordinate(hia) {};
+	\draw[white] #1 -- ++(0.5,0.8) coordinate (hic) {};
+	\node[anchor=west] at (hia) {\footnotesize #2};
+	\node[anchor=west] at (hib) {\tiny p.#3};
+	%\draw (hic) rectangle ++ (0.5,0.5);
+	\draw #1 rectangle ++ (1,1.3);
+}
+
+
+\newcommand{\handoutimageb}[3]{
+	\draw[white] #1 -- ++(-0.05,0.15) coordinate(hib) -- ++(-0.03,1) coordinate(hia) {};
+	\draw[white] #1 -- ++(0.5,0.8) coordinate (hic) {};
+	%\draw (hic) rectangle ++ (0.5,0.5);
+	\draw #1 rectangle ++ (1,1.3);
+}
+
+
+\newcommand{\handoutimagedbl}[5]{
+	\draw[white] #1 -- ++(-0.05,0.15) coordinate(hib) -- ++(-0.03,1) coordinate(hia) {};
+	\draw[white] #1 -- ++(0.5,1.3) coordinate (hic) {};
+
+	\node[anchor=west] at (hia) {\footnotesize #2};
+	\node[anchor=west] at (hib) {\tiny p.#3};
+
+
+	\node[anchor=west,rotate around={65:(hic)}] at (hia) {\footnotesize #4};
+	%\node[anchor=west,rotate around={65:(hic)}] at (hib) {\tiny p.#5};
+
+	\fill[white] (hic) -- ++(0.5,-0.75) -- ++(0,0.75) -- cycle;
+
+	\draw (hic) -- ++(0.5,-0.75);
+	%\draw #1 -- ++(1,0) -- ++(0,0.1) -- ++(-0.85,0.85) -- ++(0.35,0.35) -- ++(-0.5,0) -- cycle;
+	\draw #1 -- ++(1,0) -- ++(0,0.55) -- ++(-0.725,0.30) -- ++(0.225,0.45) -- ++(-0.5,0) -- cycle;
+}
+
+\begin{figure}
+\begin{tikzpicture}[scale=0.95]
+	%\draw[blue] (0,0) grid (12,5);
+
+	\handoutimage{(0,3)}{1.1}{1}
+	\handoutimage{(1.2,3)}{1.2}{1}
+	\handoutimagedbl{(0.6,1)}{1.1}{1}{1.2}{1}
+
+
+	\handoutimage{(2.4,3)}{1.2}{2}
+	\handoutimage{(3.6,3)}{1.3}{1}
+	\handoutimagedbl{(3,1)}{1.2}{2}{1.3}{1}
+
+	\handoutimage{(5.4,3)}{1.1}{1}
+	\handoutimageb{(6.6,3)}{}{1}
+	\handoutimagedbl{(6,1)}{1.1}{1}{}{}
+
+	\handoutimage{(7.8,3)}{1.2}{1}
+	\handoutimage{(9,3)}{1.2}{2}
+	\handoutimagedbl{(8.4,1)}{1.2}{1}{1.2}{2}
+
+
+	\handoutimage{(10.2,3)}{1.3}{1}
+	\handoutimageb{(11.4,3)}{}{}
+	\handoutimagedbl{(10.8,1)}{1.3}{1}{}{}
+
+	\draw [decorate,decoration={brace,amplitude=6pt}] (2.2,2.8) -- (0,2.8) node {};
+	\draw [decorate,decoration={brace,amplitude=6pt}] (4.6,2.8) -- (2.4,2.8) node {};
+
+	\draw [decorate,decoration={brace,amplitude=6pt}] (7.6,2.8) -- (5.4,2.8) node {};
+	\draw [decorate,decoration={brace,amplitude=6pt}] (10,2.8) -- (7.8,2.8) node {};
+	\draw [decorate,decoration={brace,amplitude=6pt}] (12.4,2.8) -- (10.2,2.8) node {};
+
+	\node at (2.3,4.8){\texttt{noblanks}};
+	\node at (8.8,4.8){\texttt{blanks}};
+\end{tikzpicture}
+	\caption{Comparison of the outcome of printing the compiled handouts document double-sided. 
+		On the left is the handouts document compiled with the option \texttt{noblanks}; on the right
+		is the same document compiled with the option \texttt{blanks}.}
+	\label{fig:blanks}
+\end{figure}
+
+\subsection{Variables}
+\subsubsection{The handouts subdirectory}
+
+\label{sec:variables}
+
+By default
+\indexcommand{thehandoutsdirectory}%
+the handouts are stored in the subdirectory \texttt{handouts/} of the directory that contains the master document.
+Change this be redefining
+% the variable
+ \texttt{thehandoutsdirectory}:
+\begin{verbatim}
+    \renewcommand{\thehandoutsdirectory}{worksheets/}
+\end{verbatim}
+It is necessary to place a forward slash at the end.
+
+If the handouts files are to be stored in the same directory as the master file, set the variable \texttt{thehandoutsdirectory} to be empty:
+\begin{verbatim}
+    \renewcommand{\thehandoutsdirectory}{}
+\end{verbatim}
+
+
+\subsubsection{The handouts label}
+
+\label{sec:label}
+By default
+\indexcommand{thehandoutslabel}%
+ the package deals with `handouts', and uses that word in the handouts output itself.
+For example, the default style prints `Handout 1.1' in the header of handout 1.1.
+A different term like `Student worksheet' might be desired instead.
+To achieve this, redefine the variable \texttt{thehandoutlabel}:
+\begin{verbatim}
+	    \renewcommand{\thehandoutlabel}{Student worksheet}
+\end{verbatim}
+
+
+\subsubsection{The credit/copyright line}
+\label{sec:credit} 
+\indexcommand{thehandoutscredit}
+The default handouts style contains a space in left side of the footer where a credit or copyright line can appear.
+By default it is empty.
+Set it by redefining the variable \texttt{thehandoutcredit}:
+\begin{verbatim}
+	    \renewcommand{\thehandoutcredit}{NYU Calulus I; Summer 2015}
+\end{verbatim}
+
+
+
+
+\section{Auxiliary package features}
+
+\subsection{A table of contents for the compiled document}
+
+While each handout has its own page numbering -- the first page of a handout is always page one --
+ having a table of contents which references the page numbers of the handouts as they appear in the compiled \pdf document
+	can be convenient for determining which pages of the \pdf document need to be printed to get certain handouts. 
+
+To generate this type of table of contents in the compiled document, place usual command in the master file:
+\begin{verbatim}
+	   \tableofcontents
+\end{verbatim}
+The resulting table of contents will have some custom styling defined by the package.
+
+
+
+\subsection{Setting unit titles}
+
+When
+using this package handouts are organized under generic `units'.
+In a given project these units might represent something concrete;
+	for example, each unit might refer to a specific chapter in a book.
+In this case individual units might also have titles, like 
+	`Introduction to Differentiation',
+	and it may be useful to use these titles in the handouts.
+
+\indexcommand{setunittitle}
+Set the title of a unit with the command\texttt{setunittitle}:
+\begin{verbatim}
+	    \setunittitle{<unit number>}{<unit title>}
+\end{verbatim}
+
+When changing the handout style, or writing a specific handout, the title of the current unit may be printed with the command \verb$\theunittitle$.
+If the current unit's title is not set, \verb$\theunittitle$ will do nothing.
+
+In addition, if the title of a unit is set, the title will appear in the compiled document's table of contents.
+This will likely make the compiled \pdf easier to navigate, and for this reason alone it is worth setting unit titles if they're available.
+
+
+
+\section{Modifying the handout style}
+
+
+
+
+The package defines a basic handouts style.
+The style is implemented by changing the page margins (using the \texttt{geometry} package)
+	and editing the headers and footers of the handouts (using the \texttt{fancyhdr} package).
+
+
+\subsection{Editing the page layout}
+
+When
+\indexcommand{thehandoutsgeometry}%
+a new handout is loaded the page layout is temporarily changed using the \texttt{geometry} package.
+In general handouts do not have large paragraphs of text, so by default the margins are made smaller so that the whole page can be more efficiently used.
+
+When the package needs to change the page layout to that of the handouts it calls the command
+\begin{verbatim}
+	    \thehandoutsgeometry
+\end{verbatim}
+By default, the command \texttt{thehandoutsgeomtry} calls the command \texttt{newgeometry} \linebreak(from the \texttt{geometry} package)
+	which implements the desired changes.
+The exact command that the command \texttt{thehandoutsgeometry} executes by default is
+\begin{verbatim}
+	    \newgeometry{top=3cm,left=2cm,right=2cm,bottom=2.5cm}
+\end{verbatim}
+Any desired geometry for the handouts can thus be achieved by setting the command $\texttt{thehandoutsgeometry}$ 
+	to execute the \texttt{newgeometry} command with appropriate options.
+The possible options that can be sent to \texttt{newgeometry} are extensive and 
+ may be discovered in the documentation for the \texttt{geometry} package.
+
+For example, to have uniform margins of four centimeters, use the following:
+\begin{verbatim}
+	    \renewcommmand{\thehandoutsgeometry}{
+	        \newgeometry{margins=4cm}
+	    }
+\end{verbatim}
+
+To make no changes to the geometry -- that is, to have the handouts use the same layout as the rest of the document -- 
+	just set the command to do nothing:
+\begin{verbatim}
+	    \renewcommmand{\thehandoutsgeometry}{}
+\end{verbatim}
+
+
+
+\subsection{Editing the header and footers}
+
+
+The design of the handouts is implemented by editing the headers and footers using the \texttt{fancyhdr} package.
+All of the handouts are within the \texttt{studenthandout} fancy page style.
+This way, the headers and footers of the handouts can be styled without affecting the rest of the document.
+
+To change the default handout style, use the appropriate commands from the \texttt{fancyhdr} package.
+Make the changes to the fancy page style \texttt{studenthandout}.
+For example, the following code removes the horizontal lines of the headers and footers and removes
+	all of the handout information, except for the handout's full title which is placed in the center of the header.
+\begin{verbatim}
+	    \fancypagestyle{studenthandout}{
+	        \renewcommand{\headrulewidth}{0pt}
+	        \renewcommand{\footrulewidth}{0pt}
+	        \fancyhf{}
+	        \fancyhead[C]{\thehandoutfulltitle}
+	    }
+\end{verbatim}
+When changing the handout style the handout output commands in the next section will likely be needed.
+
+\subsection{Handout output commands}
+When editing the style there are a number of commands available that print information such as the current handout's title.
+None of these commands take an argument.
+As is commonplace in \Latex{}, using a command with no argument can result in the whitespace that follows being gobbled up.
+If this happens use the command with braces after; for example \verb$\thehandoutnumber{}$.
+
+
+\vspace{\baselineskip}
+\noindent
+The commands that print information specific to a given handout are as follows.
+\begin{itemize}
+
+	\item \verb$\thehandoutnumber$		\indexcommand{thehandoutnumber}
+
+		Print the number of the current handout.
+		This is the unique number of the handout within the unit.
+		To print the full handout number, write
+	
+		\begin{verbatim}
+			    \theunitnumber.\thehandoutnumber
+		\end{verbatim}
+
+	\item \verb$\thehandoutitle$		\indexcommand{thehandouttitle}
+
+		Print the title of the current handout.
+	\item \verb$\thehandoutfulltitle$	\indexcommand{thehandoutfulltitle}
+
+		Print the full title of the current handout.
+		This will read something like `Handout 3.4: Handout Title', or, if the handout has no title, simply `3.4'.
+
+	\item \verb$\thehandoutpage$		\indexcommand{thehandoutpage}
+
+		Print the current handout page number.
+		This is distinct from the document page number as each handout begins at Page 1.
+		To print the document page number use the usual command \verb$\thepage$.
+
+\end{itemize}
+
+\vspace{\baselineskip}
+\noindent
+The commands that print information about the current unit or the handouts as a whole are as follows.
+\begin{itemize}
+	\item	\verb$\theunitnumber$		\indexcommand{theunitnumber}
+
+		Print the number of the current unit.
+	
+	\item 	\verb$\theunittitle$		\indexcommand{theunittitle}
+
+		Print the title of the current unit, as set through the \texttt{setunittitle} command.
+		If the current unit's title has not been set, this command will do nothing.
+
+	\item 	\verb$\theunitfulltitle$		\indexcommand{theunitfulltitle}
+
+		Print the full title of the current unit.
+		This will read something like `1: Unit Title'.	
+		If the unit's title has not been set the full title will just read `1`.
+
+	\item	\verb$\thehandoutslabel$	\indexcommand{thehandoutslabel}
+
+		Print the handouts label -- that is, the word or phrase that says what the handouts are.
+		By default this is `Handout' but it can be changed;
+			see section \ref{sec:label} above.
+
+	\item 	\verb$\thehandoutscredit$	\indexcommand{thehandoutscredit}
+
+		Print the handouts credit.
+		This is by default blank but may be set to include information like the teacher's name or the institution's name; see section \ref{sec:credit} above.
+\end{itemize}
+
+\vspace{\baselineskip}
+\noindent
+Finally, the package provides a command
+\indexcommand{fullhandoutinfo}
+\begin{verbatim}
+	    \fullhandoutinfo
+\end{verbatim}
+which outputs a table containing all nine pieces of information from above, as well as the output of the command \verb$thepage$. 
+This command is intended for debugging and is not designed to be used in the final document.
+
+
+
+\newpage
+
+\printindex
+
+
+
+
+\end{document}
+
+
+
+
+

Added: trunk/Master/texmf-dist/tex/latex/studenthandouts/studenthandouts.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/studenthandouts/studenthandouts.sty	                        (rev 0)
+++ trunk/Master/texmf-dist/tex/latex/studenthandouts/studenthandouts.sty	2017-03-16 21:43:23 UTC (rev 43516)
@@ -0,0 +1,426 @@
+\NeedsTeXFormat{LaTeX2e}
+\ProvidesPackage{studenthandouts}[2017/03/15 Handouts Package]
+
+%
+%	THE STUDENT HANDOUTS PACKAGE: studenthandouts
+%
+%	Author: James Fennell <jamespfennell at gmail.com>
+%
+%	License: 
+%		This work may be distributed and/or modified under the conditions
+%		of the LaTeX Project Public License, either version 1.3c 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.3c or later is part of all distributions of LaTeX
+%		version 2005/12/01 or later.
+%
+
+%
+%	HOW THIS CODE IS ORGANIZED
+%
+% In order:
+%
+%	- Required packages
+%	- The blanks/noblanks option processing
+%	- General Latex code required for the rest of the code
+%
+%	- Then code appears in the order its functionality appears in the documentation.
+%
+
+
+
+%	
+%		REQUIRED PACKAGES
+%
+
+
+\RequirePackage{changepage}
+\RequirePackage{ifthen}
+\RequirePackage{fmtcount}
+\RequirePackage{tocloft}
+\RequirePackage{geometry}
+\RequirePackage{fancyhdr}
+
+
+
+%
+%		THE BLANKS/NOBLANKS OPTION PROCESSING
+%
+
+
+% The blanks/noblanks switch is in @handoutsBlanksFlag
+\newboolean{@handoutsBlanksFlag}
+
+\DeclareOption{blanks}{
+	\setboolean{@handoutsBlanksFlag}{true}
+}
+
+\DeclareOption{noblanks}{
+	\setboolean{@handoutsBlanksFlag}{false}
+}
+
+\ExecuteOptions{blanks}
+
+\ProcessOptions\relax
+
+
+
+%
+%		GENERAL LATEX CODE
+%
+
+% These commands are used to define global variables.
+% They are needed because a lot of the handout output commands are redefined in an if statement scope but need to be defined also outside of this scope.
+\def\gnewcommand{\g at star@or at long\new at command}
+\def\grenewcommand{\g at star@or at long\renew at command}
+\def\g at star@or at long#1{% 
+  \@ifstar{\let\l at ngrel@x\global#1}{\def\l at ngrel@x{\long\global}#1}}
+
+
+%Checks if element #1 is the comma separated list of elements in #2
+%Kudos to Werner on Tex.SE for this modified version: http://tex.stackexchange.com/questions/353559/how-to-convert-macro-output-to-string
+\newcommand\@ifmemberthenelse[2]{%
+  \begingroup
+  \edef\x{\endgroup\noexpand\in@{,#1,}{,#2,}}\x%
+  \ifin@
+    \expandafter\@firstoftwo%
+  \else
+    \expandafter\@secondoftwo%
+  \fi
+}
+
+
+
+%
+%	1	BASIC IMPORT FUNCTIONALITY
+%	
+
+
+
+% Every handout must start with this command, which sets the handout title. If no handout title is required, write \sethandouttitle{}
+\newcommand{\sethandouttitle}[1]{
+	% Set the page style (for the headers and footers)
+	\pagestyle{studenthandout}
+	% Set the handout title
+	\grenewcommand{\thehandouttitle}{#1}
+	
+	% We want the handout's full title to appear in the table of contents.	
+	% However becuase the way Latex handles TOCs we can't use the command \thehandoutfulltitle directly.
+	% So the following just manually adds the full title to the TOC.
+	\ifthenelse{\equal{#1}{}}{
+		\addcontentsline{toc}{subsection}{{\theunitnumber.\thehandoutnumber}}
+	}{
+		\addcontentsline{toc}{subsection}{{\theunitnumber.\thehandoutnumber}: \thehandouttitle}
+	}
+}
+
+
+% This command imports handout #1.#2 - that is, unit #1, handout #2
+\newcommand{\importhandout}[2]{
+
+	% Set the page layout and headers and footers to be that of the handouts
+	% For some reason it's better to do it at this point rather than when the handout is about to be imported.
+	\thehandoutsgeometry
+	\pagestyle{studenthandout}
+
+	% Use the \@ifimporting then command to check if this handout is supposed to be imported.
+	% If it is, continue
+	% The \@ifimporting command is defined below, in section 2
+	\@ifimportingthen{#1}{#2}{
+		% Importing #1.#2!
+
+		%Start new page
+		\clearpage
+
+
+		% The following determines whether or not to insert a blank page.
+		% First, if the handout that just concluded has an odd number of pages then a blank page should be put in.
+		% Actually do this if the blanks option is set.
+		\ifodd\value{@handoutsHandoutPageNumber}
+			\ifthenelse{\boolean{@handoutsBlanksFlag}}{
+				\thispagestyle{empty}
+				\hspace{1cm}
+				\clearpage
+			}{}
+		\else
+		\fi
+
+
+
+		% Set some of the current handout information
+		\grenewcommand{\@handoutsThisUnit}{#1}
+		\grenewcommand{\theunitnumber}{#1}
+		\grenewcommand{\thehandoutnumber}{#2}
+		\setcounter{@handoutsHandoutPageNumber}{0}
+
+		% This next line checks if the unit has changed.
+		% If it has, a unit line will be added to the TOC
+		\ifthenelse{\equal{\@handoutsPrevUnit}{\@handoutsThisUnit}}{}{%
+			% Add the full unit title to the TOC
+			% Because of the way Latex handles TOCs, this is done manually rather than relying on the \thefullunittitle command
+			\ifcsname @handoutsUnitTitle@#1\endcsname%
+				\addcontentsline{toc}{section}{Unit #1: {\csname @handoutsUnitTitle@#1\endcsname}}
+			\else%
+				\addcontentsline{toc}{section}{Unit #1}
+			\fi%
+	
+			%Change some of the unit information
+			\grenewcommand{\theunittitle}{\csname @handoutsUnitTitle@#2\endcsname}
+			\grenewcommand{\@handoutsPrevUnit}{#1}%
+		}
+		% No actually import Handout #1.#2
+		\input{\thehandoutsdirectory handout-#1-#2.tex}
+	}
+
+	% At the conclusion of the handout restore the page layout and headers and footers
+	\restoregeometry
+	\pagestyle{empty}
+
+}
+
+
+
+%
+%	2	HANDOUT IMPORT MANAGEMENT COMMANDS
+%
+
+
+
+
+% PRIVATE VARIABLES
+% All of these are preceded by \@handouts.
+
+\newcommand{\@handoutsUnitsToImport}{all}
+\newcommand{\@handoutsHandoutsToImport}{all}
+\newcommand{\@handoutsPrevUnit}{}
+\newcommand{\@handoutsThisUnit}{}
+
+\newboolean{@handoutsImportFlag}
+\newcounter{@handoutsHandoutPageNumber}
+\setcounter{@handoutsHandoutPageNumber}{0}
+\newcounter{@handoutsPNAtLastHPNChange}
+\setcounter{@handoutsPNAtLastHPNChange}{0}
+
+
+\newcommand{\importall}{
+	\importallunits
+	\importallhandouts
+}
+
+\newcommand{\importnone}{
+	\renewcommand{\@handoutsUnitsToImport}{}
+	\renewcommand{\@handoutsHandoutsToImport}{}
+}
+
+\newcommand{\importonlyunits}[1]{
+	\ifthenelse{\equal{\@handoutsHandoutsToImport}{}}{\renewcommand{\@handoutsHandoutsToImport}{all}}{}
+	\renewcommand{\@handoutsUnitsToImport}{#1}
+}
+
+\newcommand{\importonlyhandouts}[1]{
+	\ifthenelse{\equal{\@handoutsUnitsToImport}{}}{\renewcommand{\@handoutsUnitsToImport}{all}}{}
+	\renewcommand{\@handoutsHandoutsToImport}{#1}
+}
+
+\newcommand{\importallunits}{
+	\renewcommand{\@handoutsUnitsToImport}{all}
+}
+
+\newcommand{\importallhandouts}{
+	\renewcommand{\@handoutsHandoutsToImport}{all}
+}
+
+\newcommand{\theunittitle}
+
+
+
+
+%Given a handout unit #1 and handout number #2, uses the importing rules to determine if #1.#2 is should be imported and if so, runs #3 (via \@firstofone, not directly.)
+\newcommand{\@ifimportingthen}[2]{
+
+	%Checks if the current unit is in the list of units to be imported.
+	%Note that if importing all units this will next line will return False, but this isn't a problem as the all condition is manually considered.
+	\@ifmemberthenelse{#1}{\@handoutsUnitsToImport}{\setboolean{@handoutsImportFlag}{true}}{\setboolean{@handoutsImportFlag}{false}}
+
+	%Checks IF the current unit should be imported THEN continues ELSE stops
+	\ifthenelse
+	{%
+		\equal{\@handoutsUnitsToImport}{all}%	IF importing all units
+		\or%					OR
+		\boolean{@handoutsImportFlag}%		IF importing the current unit
+	}{
+		%The current unit should be imported. Now see if the current handout should be.
+
+		%Checks if the current handout is in the list of handouts to be imported.
+		%Note that if importing all handouts the next line will return False, but this isn't a problem as the all condition is manually considered.
+		\@ifmemberthenelse{#1.#2}{\@handoutsHandoutsToImport}{\setboolean{@handoutsImportFlag}{true}}{\setboolean{@handoutsImportFlag}{false}}
+		
+		\ifthenelse
+		{%
+			\equal{\@handoutsHandoutsToImport}{all}%	IF importing all handouts
+			\or%						OR
+			\boolean{@handoutsImportFlag}%			IF importing the current handout
+		}{
+			%The current handout SHOULD be imported
+		}{
+			%The current handout should not be imported.
+			\expandafter\@gobble%
+		}
+	}{
+		%The current unit should not be imported.
+		\expandafter\@gobble%
+	}%
+}
+
+
+
+
+
+
+%
+%	3.2.1	THE HANDOUTS SUBDIRECTORY
+%
+
+%The directory in which the individual Latex files for each handout are stored
+\newcommand{\thehandoutsdirectory}{handouts/}
+
+
+%
+%	4.1	TABLE OF CONTENTS STYLING
+%
+
+
+% This is the styling for the handouts table of contents.
+% Styling done through the tocloft package.
+
+% Set the TOC page to have empty page style
+\tocloftpagestyle{empty}
+
+% UNIT TOC ENTRIES
+% Unit TOC entries in bold
+\renewcommand{\cftsecfont}{\bfseries}
+% This sets the bit that comes between the unit full title and the page number
+\renewcommand{\cftsecleader}{\hspace{0.25cm}\textbullet\hspace{0.25cm}}
+% Align the page numbers to the left, next to the unit full title
+\renewcommand{\cftsecafterpnum}{\cftparfillskip}
+
+% HANDOUT TOC ENTRIES
+% Handout TOC entries in italic
+\renewcommand{\cftsubsecfont}{\it}
+% This sets the bit that comes between the handout full title and the page number
+\renewcommand{\cftsubsecleader}{\hspace{0.25cm}$\cdot$\hspace{0.25cm}}
+% Align the page numbers to the left, next to the handout full title
+\renewcommand{\cftsubsecafterpnum}{\cftparfillskip}
+
+% Align numbers on the left
+\renewcommand{\cftpnumalign}{l}
+
+
+
+%
+%	4.2	SETTING UNIT TITLES
+%
+
+% This command saves the title #2 of unit #1.
+% It works by saving the title in the command \@handoutsUnitTitle at X, where X is the title. 
+\newcommand{\setunittitle}[2]{
+	\expandafter\def\csname @handoutsUnitTitle@#1\endcsname{#2}
+}
+
+
+
+
+
+%
+%	5.1	HANDOUT OUTPUT COMMANDS
+%
+
+%The following \the_ commands are used to output information about the current handout being handled. These are primarily used to generate the handout header and footer.
+
+\newcommand{\thehandoutslabel}{Handout}		%What `handouts' are referred to in the output. Alternative options include `student worksheets' and 'funsheets'
+\newcommand{\theunitnumber}{}
+\newcommand{\thehandoutnumber}{}
+\newcommand{\thehandouttitle}{}
+\newcommand{\thehandoutscredit}{}
+
+\newcommand{\thehandoutfulltitle}{%
+	\ifthenelse{\equal{\thehandouttitle}{}}{%
+		{{\theunitnumber.\thehandoutnumber}}%
+	}{%
+		{{\theunitnumber.\thehandoutnumber}: \thehandouttitle}%
+	}%
+}
+
+\newcommand{\theunitfulltitle}{%
+	\ifthenelse{\equal{\theunittitle}{}}{%
+		{{\theunitnumber}}%
+	}{%
+		{{\theunitnumber}: \theunittitle}%
+	}%
+}
+
+\newcommand{\thehandoutpage}{%
+	%If the page number has changed since the handout page number last change, change nothing.
+	%Otherwise, increment the handout page number
+	\ifthenelse{\equal{\value{page}}{\value{@handoutsPNAtLastHPNChange}}}{}{%
+		\stepcounter{@handoutsHandoutPageNumber}%
+	}%
+	\arabic{@handoutsHandoutPageNumber}%
+	\setcounter{@handoutsPNAtLastHPNChange}{\value{page}}
+}
+
+
+\newcommand{\@somehandoutinfo}[1]{
+	\texttt{\@backslashchar#1}&\csname #1\endcsname{}	\\
+}
+\newcommand{\allhandoutinfo}{
+	\begin{tabular}{rl}
+		\@somehandoutinfo{thehandoutnumber}
+		\@somehandoutinfo{thehandouttitle}
+		\@somehandoutinfo{thehandoutfulltitle}
+		\@somehandoutinfo{thehandoutpage}
+		\@somehandoutinfo{thepage}
+		\@somehandoutinfo{theunitnumber}
+		\@somehandoutinfo{theunittitle}
+		\@somehandoutinfo{theunitfulltitle}
+		\@somehandoutinfo{thehandoutslabel}
+		\@somehandoutinfo{thehandoutscredit}
+	\end{tabular}
+
+}
+
+
+
+
+
+
+
+
+%
+%	5	CODE RELATED TO THE STYLING
+%
+
+
+
+% The command is executed when the package wants to change to the page layout of the handouts.
+\newcommand{\thehandoutsgeometry}{
+	\newgeometry{top=3cm,left=2cm,right=2cm,bottom=2.5cm}
+}
+
+
+% This defines the default styling of the handout's headers and footers.
+\fancypagestyle{studenthandout}{%
+	\renewcommand{\headrulewidth}{0.5pt}
+	\renewcommand{\footrulewidth}{0.5pt}
+	\fancyhf{}
+	\fancyhead[L]{{\Large \textit{\thehandoutslabel{}  \thehandoutfulltitle}}}
+	\fancyfoot[L]{\thehandoutscredit}
+	\fancyfoot[R]{Page \thehandoutpage}
+	\fancyhead[R]{}
+}
+
+
+
+
+
+

Modified: trunk/Master/tlpkg/bin/tlpkg-ctan-check
===================================================================
--- trunk/Master/tlpkg/bin/tlpkg-ctan-check	2017-03-16 21:42:31 UTC (rev 43515)
+++ trunk/Master/tlpkg/bin/tlpkg-ctan-check	2017-03-16 21:43:23 UTC (rev 43516)
@@ -566,7 +566,7 @@
     statistik statex statex2 staves
     stdclsdv stdpage steinmetz
     stellenbosch stex stix stmaryrd storebox storecmd stringstrings struktex
-    sttools stubs sty2dtx suanpan subdepth subeqn subeqnarray
+    sttools stubs studenthandouts sty2dtx suanpan subdepth subeqn subeqnarray
     subfig subfigmat subfigure subfiles subfloat substances
     substitutefont substr subsupscripts
     sudoku sudokubundle suftesi sugconf

Modified: trunk/Master/tlpkg/tlpsrc/collection-latexextra.tlpsrc
===================================================================
--- trunk/Master/tlpkg/tlpsrc/collection-latexextra.tlpsrc	2017-03-16 21:42:31 UTC (rev 43515)
+++ trunk/Master/tlpkg/tlpsrc/collection-latexextra.tlpsrc	2017-03-16 21:43:23 UTC (rev 43516)
@@ -951,6 +951,7 @@
 depend stringstrings
 depend sttools
 depend stubs
+depend studenthandouts
 depend subdepth
 depend subeqn
 depend subeqnarray

Added: trunk/Master/tlpkg/tlpsrc/studenthandouts.tlpsrc
===================================================================


More information about the tex-live-commits mailing list