forked from esullivanmath/AC_Chapter0
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathactivities.sty
More file actions
130 lines (117 loc) · 4.15 KB
/
activities.sty
File metadata and controls
130 lines (117 loc) · 4.15 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
%%
%% This is file `activities.sty',
%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% Activities.sty package, 2011-8-17 %%
%% Copyright (C) 2011 Clark Wells %%
%% wellsc@gvsu.edu %%
%% %%
%% This program can redistributed and/or modified under %%
%% the terms of the LaTeX Project Public License %%
%% Distributed from CTAN archives in directory %%
%% macros/latex/base/lppl.txt; either version 1 of the %%
%% License, or (at your option) any later version. %%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{activities}
[2011/08/17 v1.00 Activities with optional small hints, big hints, full
solutions, and author's notes for LaTeX/PDF package]
\DeclareOption{smallhints}{\act@show@smallhintstrue\act@show@bighintsfalse\act@show@activitysolutionsfalse}
\DeclareOption{bighints}{\act@show@smallhintsfalse\act@show@bighintstrue\act@show@activitysolutionsfalse}
\DeclareOption{activitysolutions}{\act@show@smallhintsfalse\act@show@bighintsfalse\act@show@activitysolutionstrue}
\DeclareOption{exercisesolutions}{\act@show@exercisesolutionstrue}
\DeclareOption{authornotes}{\act@show@authornotestrue}
\newif\ifact@show@smallhints \act@show@smallhintsfalse
\newif\ifact@show@bighints \act@show@bighintsfalse
\newif\ifact@show@activitysolutions \act@show@activitysolutionsfalse
\newif\ifact@show@exercisesolutions \act@show@exercisesolutionsfalse
\newif\ifact@show@authornotes \act@show@authornotesfalse
\ProcessOptions
\newcounter{acti}[chapter]
\renewcommand{\theacti}{\thechapter.\arabic{acti}}
\newenvironment{activity}[1][]
{\refstepcounter{acti}\par\noindent{\normalfont\large\bfseries{}Activity~\theacti.%
\if\relax\detokenize{#1}\relax\else{ (#1)}\fi%
}
\begin{list}{}{\setlength{\leftmargin}{0.5cm}\setlength{\topsep}{\z@}}\item[]}
{\end{list}}
\newcounter{exeri}
\newenvironment{exercises}[1][]
{\par\noindent{\normalfont\large\bfseries{}Exercises
\if\relax\detokenize{#1}\relax\else{ (#1)}\fi%
}
\begin{list}{\bfseries\arabic{exeri}.}{\usecounter{exeri}\setlength{\leftmargin}{0.5cm}\setlength{\topsep}{\z@}}}
{\end{list}}
% \newenvironment{clicker}[1][]
% {\noindent \hrulefill \par\noindent{\normalfont\large\bfseries{}Voting Questions
% \if\relax\detokenize{#1}\relax\else{ (#1)}\fi%
% }
% \begin{list}{\bfseries\arabic{exeri}.}{\usecounter{exeri}\setlength{\leftmargin}{0.5cm}\setlength{\topsep}{\z@}}}
% {\end{list}}
\newenvironment{web}[1][]
{\noindent \hrulefill \par\noindent{\normalfont\large\bfseries{}Web Resources
\if\relax\detokenize{#1}\relax\else{ (#1)}\fi%
}
\begin{list}{\bfseries\arabic{exeri}.}{\usecounter{exeri}\setlength{\leftmargin}{0.5cm}\setlength{\topsep}{\z@}}}
{\end{list}}
\ifact@show@activitysolutions
\newenvironment{activitySolution}[1][]
{\unskip\par\noindent{\bfseries{}Solution
\if\relax\detokenize{#1}\relax\else{ (#1)}\fi%
}
\newline}
{\unskip\par}
\else
\newenvironment{activitySolution}[1][]
{\setbox\z@\vbox\bgroup}
{\egroup}
\fi
\ifact@show@exercisesolutions
\newenvironment{exerciseSolution}[1][]
{\unskip\par\noindent{\bfseries{}Solution
\if\relax\detokenize{#1}\relax\else{ (#1)}\fi%
}
\newline}
{\unskip\par}
\else
\newenvironment{exerciseSolution}[1][]
{\setbox\z@\vbox\bgroup}
{\egroup}
\fi
\ifact@show@smallhints
\newenvironment{smallhint}[1][]
{\unskip\par\noindent{\bfseries{}Hint(s):
\if\relax\detokenize{#1}\relax\else{ (#1)}\fi%
}}
{\unskip\par}
\else
\newenvironment{smallhint}[1][]
{\setbox\z@\vbox\bgroup}
{\egroup}
\fi
\ifact@show@bighints
\newenvironment{bighint}[1][]
{\unskip\par\noindent{\bfseries{}Hint(s):
\if\relax\detokenize{#1}\relax\else{ (#1)}\fi%
}}
{\unskip\par}
\else
\newenvironment{bighint}[1][]
{\setbox\z@\vbox\bgroup}
{\egroup}
\fi
\ifact@show@authornotes
\newenvironment{authornote}[1][]
{\noindent\itshape{}{Note:
\if\relax\detokenize{#1}\relax\else{ (#1)}\fi%
}
\newline}
{}
\else
\newenvironment{authornote}[1][]
{\setbox\z@\vbox\bgroup}
{\egroup}
\fi
\endinput
%%
%% End of file `activities.sty'.