summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Master/texmf-dist/doc/latex/exam/README2
-rw-r--r--Master/texmf-dist/doc/latex/exam/exam.md54
-rw-r--r--Master/texmf-dist/doc/latex/exam/examdoc.pdfbin481243 -> 481243 bytes
-rw-r--r--Master/texmf-dist/tex/latex/exam/exam.cls375
4 files changed, 167 insertions, 214 deletions
diff --git a/Master/texmf-dist/doc/latex/exam/README b/Master/texmf-dist/doc/latex/exam/README
index fa68345e764..01b54c4184c 100644
--- a/Master/texmf-dist/doc/latex/exam/README
+++ b/Master/texmf-dist/doc/latex/exam/README
@@ -1,4 +1,4 @@
-This is version 2.6 of the exam document class, dated October 26,
+This is version 2.603 of the exam document class, dated December 17,
2017.
The exam document class, together with its user's guide examdoc.tex,
diff --git a/Master/texmf-dist/doc/latex/exam/exam.md5 b/Master/texmf-dist/doc/latex/exam/exam.md5
index 3d20ce21b91..38fd1b65a1b 100644
--- a/Master/texmf-dist/doc/latex/exam/exam.md5
+++ b/Master/texmf-dist/doc/latex/exam/exam.md5
@@ -1,3 +1,3 @@
-01d4eea329c471b4295296dff587c23a exam.cls
-831e1841882d3e05abdae653595862d6 examdoc.pdf
+08a9755a8f51d31edf6b4124c9b710f9 exam.cls
+a9273b3443c367000e4a71b572c58a62 examdoc.pdf
a9a481f4f36ec3dbf90ffe63f57ce803 examdoc.tex
diff --git a/Master/texmf-dist/doc/latex/exam/examdoc.pdf b/Master/texmf-dist/doc/latex/exam/examdoc.pdf
index 37885b7ca40..9386d25eaca 100644
--- a/Master/texmf-dist/doc/latex/exam/examdoc.pdf
+++ b/Master/texmf-dist/doc/latex/exam/examdoc.pdf
Binary files differ
diff --git a/Master/texmf-dist/tex/latex/exam/exam.cls b/Master/texmf-dist/tex/latex/exam/exam.cls
index 52b4e9d4f45..cc587b3d659 100644
--- a/Master/texmf-dist/tex/latex/exam/exam.cls
+++ b/Master/texmf-dist/tex/latex/exam/exam.cls
@@ -32,8 +32,8 @@
% from my web page: http://www-math.mit.edu/~psh/
-\def\fileversion{2.6}
-\def\filedate{2017/10/26}
+\def\fileversion{2.603}
+\def\filedate{2017/12/17}
%---------------------------------------------------------------------
%---------------------------------------------------------------------
%
@@ -86,6 +86,26 @@
% Changelog since version 2.4:
%--------------------------------------------------------------------
+% Version 2.603, 2017/12/15
+
+% No longer betatest.
+
+%--------------------------------------------------------------------
+% Version 2.602$\beta$, 2017/12/15
+
+% We changed the code for multicolumn grade and point tables to remove
+% the incompatibility with colortbl.sty and other packages that load
+% colortbl.sty (e.g., xcolor.sty with the "table" option).
+
+%--------------------------------------------------------------------
+% Version 2.601$\beta$, 2017/09/22
+
+% We changed command and environment names in the code from framed.sty
+% that's included (slightly modified) in exam.cls so that the user can
+% say \usepackage{framed} without creating conflicts. This also allows
+% the user to use packages, such as minted.sty, that load framed.sty
+
+%--------------------------------------------------------------------
% Version 2.6, 2017/09/19
% No longer betatest.
@@ -6643,83 +6663,54 @@
%--------------------------------------------------------------------
-% Here's an example of a multicolumn grade table indexed by questions,
-% to show how we're getting the \cline's to link up correctly with the
-% \vline's.
+% Here's an example of a multicolumn grade table indexed by questions.
% Every line of \cline's is followed by a
% \noalign{\vskip\arrayrulewidth} to cancel the
% \noalign{\vskip-\arrayrulewidth} that ends the definition of
% \cline.
-% \begin{tabular}{*2{@{}c|c|c@{}c}}
+% \begin{tabular}{*2{|c|c|c|c}}
% \cline{1-3} \cline{5-7}
% \noalign{\vskip\arrayrulewidth}
-% \vline \hspace*{\tabcolsep}\hspace*{\fill}%
-% Question%
-% \hspace*{\fill}%
+% Question%
% & Points%
-% & \hspace*{\fill}%
-% Score%
-% \hspace*{\tabcolsep}\hspace*{\fill}\vline
+% & Score%
% & \hspace*{-\arrayrulewidth}\hspace*{\doublerulesep}%
-% & \vline \hspace*{\tabcolsep}\hspace*{\fill}%
-% Question%
-% \hspace*{\fill}%
+% & Question%
% & Points%
-% & \hspace*{\fill}%
-% Score%
-% \hspace*{\tabcolsep}\hspace*{\fill}\vline\\
+% & Score%
+% \\
% \cline{1-3} \cline{5-7}
% \noalign{\vskip\arrayrulewidth}
-% \vline \hspace*{\tabcolsep}\hspace*{\fill}%
-% 1\hspace*{\fill}%
+% 1%
% & 5%
-% & \hspace*{\fill}%
-% \hbox to \@cellwidth{\hfill}%
-% \hspace*{\tabcolsep}\hspace*{\fill}\vline
+% & \hbox to \@cellwidth{\hfill}%
% & \hspace*{-\arrayrulewidth}\hspace*{\doublerulesep}%
-% & \vline\hspace*{\tabcolsep}\hspace*{\fill}%
-% 4%
-% \hspace*{\fill}%
+% & 4%
% & 20%
-% & \hspace*{\fill}%
-% \hbox to \@cellwidth{\hfill}%
-% \hspace*{\tabcolsep}\hspace*{\fill}\vline\\
+% & \hbox to \@cellwidth{\hfill}%
+% \\
% \cline{1-3} \cline{5-7}
% \noalign{\vskip\arrayrulewidth}
-% \vline \hspace*{\tabcolsep}\hspace*{\fill}%
-% 2%
-% \hspace*{\fill}%
+% 2%
% & 10%
-% & \hspace*{\fill}%
-% \hbox to \@cellwidth{\hfill}%
-% \hspace*{\tabcolsep}\hspace*{\fill}\vline
+% & \hbox to \@cellwidth{\hfill}%
% & \hspace*{-\arrayrulewidth}\hspace*{\doublerulesep}%
-% & \vline\hspace*{\tabcolsep}\hspace*{\fill}%
-% 5%
-% \hspace*{\fill}%
+% & 5%
% & 25%
-% & \hspace*{\fill}%
-% \hbox to \@cellwidth{\hfill}%
-% \hspace*{\tabcolsep}\hspace*{\fill}\vline\\
+% & \hbox to \@cellwidth{\hfill}%
+% \\
% \cline{1-3} \cline{5-7}
% \noalign{\vskip\arrayrulewidth}
-% \vline \hspace*{\tabcolsep}\hspace*{\fill}%
-% 3%
-% \hspace*{\fill}%
+% 3%
% & 15%
-% & \hspace*{\fill}%
-% \hbox to \@cellwidth{\hfill}%
-% \hspace*{\tabcolsep}\hspace*{\fill}\vline
+% & \hbox to \@cellwidth{\hfill}%
% & \hspace*{-\arrayrulewidth}\hspace*{\doublerulesep}%
-% & \vline\hspace*{\tabcolsep}\hspace*{\fill}%
-% Total:%
-% \hspace*{\fill}%
+% & Total:%
% & 75%
-% & \hspace*{\fill}%
-% \hbox to \@cellwidth{\hfill}%
-% \hspace*{\tabcolsep}\hspace*{\fill}\vline\\
+% & \hbox to \@cellwidth{\hfill}%
+% \\
% \cline{1-3} \cline{5-7}
% \noalign{\vskip\arrayrulewidth}
% \end{tabular}
@@ -6800,7 +6791,7 @@
% combinedgradetable, possibly partial.
% Note: We'll never use the final "c" in the format of the
% tabular, but there's no harm in that.
- \begin{tabular}{*{\value{num@cols}}{@{}c|c|c|c@{}c}}
+ \begin{tabular}{*{\value{num@cols}}{|c|c|c|c|c}}
% We need to make sure that the \cline@stuff@v commands come
% *immediately* following the \\ or \begin{tabular} (with no
% conditionals evaluated, even if those conditionals expand to
@@ -6816,7 +6807,7 @@
% combinedpointtable, possibly partial.
% Note: We'll never use the final "c" in the format of the
% tabular, but there's no harm in that.
- \begin{tabular}{*{\value{num@cols}}{@{}c|c|c@{}c}}
+ \begin{tabular}{*{\value{num@cols}}{|c|c|c|c}}
% We need to make sure that the \cline@stuff@v commands come
% *immediately* following the \\ or \begin{tabular} (with no
% conditionals evaluated, even if those conditionals expand to
@@ -6845,7 +6836,7 @@
\if@scores
% Note: We'll never use the final "c" in the format of the
% tabular, but there's no harm in that.
- \begin{tabular}{*{\value{num@cols}}{@{}c|c|c@{}c}}
+ \begin{tabular}{*{\value{num@cols}}{|c|c|c|c}}
% We need to make sure that the \cline@stuff@v commands come
% *immediately* following the \\ or \begin{tabular} (with no
% conditionals evaluated, even if those conditionals expand to
@@ -6860,7 +6851,7 @@
\else
% Note: We'll never use the final "c" in the format of the
% tabular, but there's no harm in that.
- \begin{tabular}{*{\value{num@cols}}{@{}c|c@{}c}}
+ \begin{tabular}{*{\value{num@cols}}{|c|c|c}}
% We need to make sure that the \cline@stuff@v commands come
% *immediately* following the \\ or \begin{tabular} (with no
% conditionals evaluated, even if those conditionals expand to
@@ -7003,7 +6994,6 @@
% Called by \@multicolumntable.
% multicolumngradetable or multicolumnbonusgradetable, possibly
% partial.
- \vline \hspace*{\tabcolsep}\hspace*{\fill}%
\iftbl@pgs
\if@bonus
\@bvpgword
@@ -7017,19 +7007,16 @@
\@vqword
\fi
\fi
- \hspace*{\fill}%
& \if@bonus
\@bvpword
\else
\@vpword
\fi
- & \hspace*{\fill}%
- \if@bonus
+ & \if@bonus
\@bvsword
\else
\@vsword
\fi
- \hspace*{\tabcolsep}\hspace*{\fill}\vline
\addtocounter{@iterator}{1}%
\ifnum \value{@iterator} < \value{num@cols}\relax
\hidden@ampersand
@@ -7046,7 +7033,6 @@
% Called by \@multicolumntable.
% multicolumnpointtable or multicolumnbonuspointtable, possibly
% partial.
- \vline \hspace*{\tabcolsep}\hspace*{\fill}%
\iftbl@pgs
\if@bonus
\@bvpgword
@@ -7060,14 +7046,12 @@
\@vqword
\fi
\fi
- \hspace*{\fill}%
- & \hspace*{\fill}%
+ &
\if@bonus
\@bvpword
\else
\@vpword
\fi
- \hspace*{\tabcolsep}\hspace*{\fill}\vline
\addtocounter{@iterator}{1}%
\ifnum \value{@iterator} < \value{num@cols}\relax
\hidden@ampersand
@@ -7083,18 +7067,14 @@
\def\docolumn@heads@comb@v{%
% Called by \@multicolumntable.
% multicolumncombinedgradetable, possibly partial.
- \vline \hspace*{\tabcolsep}\hspace*{\fill}%
\iftbl@pgs
\@cvpgword
\else
\@cvqword
\fi
- \hspace*{\fill}%
& \@cvpword
& \@cvbpword
- & \hspace*{\fill}%
- \@cvsword
- \hspace*{\tabcolsep}\hspace*{\fill}\vline
+ & \@cvsword
\addtocounter{@iterator}{1}%
\ifnum \value{@iterator} < \value{num@cols}\relax
\hidden@ampersand
@@ -7110,17 +7090,13 @@
\def\docolumn@heads@comb@noscores@v{%
% Called by \@multicolumntable.
% multicolumncombinedpointtable, possibly partial.
- \vline \hspace*{\tabcolsep}\hspace*{\fill}%
\iftbl@pgs
\@cvpgword
\else
\@cvqword
\fi
- \hspace*{\fill}%
& \@vpword
- & \hspace*{\fill}%
- \@bvpword
- \hspace*{\tabcolsep}\hspace*{\fill}\vline
+ & \@bvpword
\addtocounter{@iterator}{1}%
\ifnum \value{@iterator} < \value{num@cols}\relax
\hidden@ampersand
@@ -7185,13 +7161,11 @@
\ifnum \value{current@row} = \value{num@rows}\relax
% We're in the last column, last row!
% Print the total:
- \vline \hspace*{\tabcolsep}\hspace*{\fill}%
\if@bonus
\@bvtword
\else
\@vtword
\fi
- \hspace*{\fill}%
\hidden@ampersand
\if@scores
\if@bonus
@@ -7200,9 +7174,7 @@
\prt@tablepoints
\fi
\hidden@ampersand
- \hspace*{\fill}%
\hbox to \@cellwidth{\hfill}%
- \hspace*{\tabcolsep}\hspace*{\fill}\vline
\else
\hspace*{\fill}%
\if@bonus
@@ -7210,41 +7182,30 @@
\else
\prt@tablepoints
\fi
- \hspace*{\tabcolsep}\hspace*{\fill}\vline
\fi
\else
% Not last column last row; insert empty space:
- \vline \hspace*{\tabcolsep}\hspace*{\fill}%
\hbox to \@cellwidth{\hfill}%
- \hspace*{\fill}%
\if@scores
\hidden@ampersand
\hbox to \@cellwidth{\hfill}%
\fi
\hidden@ampersand
- \hspace*{\fill}%
\hbox to \@cellwidth{\hfill}%
- \hspace*{\tabcolsep}\hspace*{\fill}\vline
\fi
\else
% Not last column; insert empty space:
- \vline \hspace*{\tabcolsep}\hspace*{\fill}%
- \hbox to \@cellwidth{\hfill}%
- \hspace*{\fill}%
+ \hbox to \@cellwidth{\hfill}%
\if@scores
\hidden@ampersand
\hbox to \@cellwidth{\hfill}%
\fi
\hidden@ampersand
- \hspace*{\fill}%
\hbox to \@cellwidth{\hfill}%
- \hspace*{\tabcolsep}\hspace*{\fill}\vline
\fi
\else
% We need to do question (or page) number pq@index:
- \vline \hspace*{\tabcolsep}\hspace*{\fill}%
\refto@index{pq@index}%
- \hspace*{\fill}%
\hidden@ampersand
\if@scores
\if@bonus
@@ -7255,19 +7216,15 @@
\addto@hlfcntr{tbl@points}{\pointsof@index{pq@index}}%
\fi
\hidden@ampersand
- \hspace*{\fill}%
\hbox to \@cellwidth{\hfill}%
- \hspace*{\tabcolsep}\hspace*{\fill}\vline
\else
- \hspace*{\fill}%
- \if@bonus
- \bonuspointsof@index{pq@index}%
- \addto@hlfcntr{tbl@bonuspoints}{\bonuspointsof@index{pq@index}}%
- \else
- \pointsof@index{pq@index}%
- \addto@hlfcntr{tbl@points}{\pointsof@index{pq@index}}%
- \fi
- \hspace*{\tabcolsep}\hspace*{\fill}\vline
+ \if@bonus
+ \bonuspointsof@index{pq@index}%
+ \addto@hlfcntr{tbl@bonuspoints}{\bonuspointsof@index{pq@index}}%
+ \else
+ \pointsof@index{pq@index}%
+ \addto@hlfcntr{tbl@points}{\pointsof@index{pq@index}}%
+ \fi
\fi
\fi
\addtocounter{cols@done}{1}% Number of columns done
@@ -7297,28 +7254,20 @@
\ifnum \value{current@row} = \value{num@rows}\relax
% We're in the last column, last row!
% Print the total:
- \vline \hspace*{\tabcolsep}\hspace*{\fill}%
- \@cvtword
- \hspace*{\fill}%
+ \@cvtword
\hidden@ampersand
\prt@tablepoints
\hidden@ampersand
\if@scores
\prt@tablebonuspoints
\hidden@ampersand
- \hspace*{\fill}%
\hbox to \@cellwidth{\hfill}%
- \hspace*{\tabcolsep}\hspace*{\fill}\vline
\else
- \hspace*{\fill}%
\prt@tablebonuspoints
- \hspace*{\tabcolsep}\hspace*{\fill}\vline
\fi
\else
% Last column, but not last row; insert empty space:
- \vline \hspace*{\tabcolsep}\hspace*{\fill}%
\hbox to \@cellwidth{\hfill}%
- \hspace*{\fill}%
\hidden@ampersand
\hbox to \@cellwidth{\hfill}%
\if@scores
@@ -7326,15 +7275,11 @@
\hbox to \@cellwidth{\hfill}%
\fi
\hidden@ampersand
- \hspace*{\fill}%
\hbox to \@cellwidth{\hfill}%
- \hspace*{\tabcolsep}\hspace*{\fill}\vline
\fi
\else
% Not last column; insert empty space:
- \vline \hspace*{\tabcolsep}\hspace*{\fill}%
\hbox to \@cellwidth{\hfill}%
- \hspace*{\fill}%
\hidden@ampersand
\hbox to \@cellwidth{\hfill}%
\if@scores
@@ -7342,15 +7287,11 @@
\hbox to \@cellwidth{\hfill}%
\fi
\hidden@ampersand
- \hspace*{\fill}%
\hbox to \@cellwidth{\hfill}%
- \hspace*{\tabcolsep}\hspace*{\fill}\vline
\fi
\else
% We need to do question number pq@index:
- \vline \hspace*{\tabcolsep}\hspace*{\fill}%
\refto@index{pq@index}%
- \hspace*{\fill}%
\hidden@ampersand
\pointsof@index{pq@index}%
\addto@hlfcntr{tbl@points}{\pointsof@index{pq@index}}%
@@ -7359,14 +7300,10 @@
\bonuspointsof@index{pq@index}%
\addto@hlfcntr{tbl@bonuspoints}{\bonuspointsof@index{pq@index}}%
\hidden@ampersand
- \hspace*{\fill}%
\hbox to \@cellwidth{\hfill}%
- \hspace*{\tabcolsep}\hspace*{\fill}\vline
\else
- \hspace*{\fill}%
\bonuspointsof@index{pq@index}%
\addto@hlfcntr{tbl@bonuspoints}{\bonuspointsof@index{pq@index}}%
- \hspace*{\tabcolsep}\hspace*{\fill}\vline
\fi
\fi
\addtocounter{cols@done}{1}% Number of columns done
@@ -7823,22 +7760,22 @@
% If the user said \unframedsolutions, then both
% \if@framedsolutions and \if@shadedsolutions are false:
\if@framedsolutions
- % We'll use the default \FrameCommand
+ % We'll use the default \exam@FrameCommand
\else
\if@shadedsolutions
- \def\FrameCommand{\colorbox{SolutionColor}}%
+ \def\exam@FrameCommand{\colorbox{SolutionColor}}%
\else
% It's \unframedsolutions:
- \def\FrameCommand{}%
+ \def\exam@FrameCommand{}%
\fi
\fi
- \MakeFramed{\advance\hsize-\width}%
+ \exam@MakeFramed{\advance\hsize-\exam@width}%
\solutiontitle
\ignorespaces
}%
{%
\unskip
- \endMakeFramed
+ \endexam@MakeFramed
}%
\newif\if@framedsolutions
@@ -8019,9 +7956,9 @@
% arguments, the first being the color for the frame, and the second
% being the stuff to be framed.
-% If we had assumed that color.sty was used (instead of just color.sty),
-% then the line that saves the current color in saved@color could have
-% been just
+% If we had assumed that xcolor.sty was used (instead of just
+% color.sty), then the line that saves the current color in
+% saved@color could have been just
% \colorlet{saved@color}{.}
@@ -8049,28 +7986,37 @@
% provided that this notice is left intact.
%
% The modifications I made are marked with ``psh'' in a comment:
+%
+% Further modifications, 2017-09-21
+% I changed the names of many commands by prepending ``exam@'', so
+% that the user can use the framed.sty package with exam.cls and not
+% have conflicts. (I also renamed the framed, shaded, and leftbar
+% environments to examframed, examshaded, and examleftbar.) I didn't
+% mark these name changes.
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Create framed or shaded regions that can break across pages using
-% \begin{framed} ... \end{framed} -- ordinary frame box (box at margin)
-% \begin{shaded} ... \end{shaded} -- shaded background (into margin)
-% ... leftbar ... -- line on left side
+% \begin{examframed} ... \end{examframed} -- ordinary frame box
+% (box at margin)
+% \begin{examshaded} ... \end{examshaded} -- shaded background
+% (into margin)
+% ... examleftbar ... -- line on left side
% \begin{MakeFramed}{settings} ... \end{MakeFramed}
% -- generic frame (for new environments)
%
-% The "framed" environment puts the text into "\fbox" with the
-% settings "\fboxrule=\FrameRule" and "\fboxsep=\FrameSep".
+% The "examframed" environment puts the text into "\fbox" with the
+% settings "\fboxrule=\exam@FrameRule" and "\fboxsep=\exam@FrameSep".
% You can change these lengths (using "\setlength") and you
-% can even change the definition of "\FrameCommand" to use
+% can even change the definition of "\exam@FrameCommand" to use
% much fancier boxes.
%
-% In fact, the "shaded" environment just redefines "\FrameCommand"
+% In fact, the "shaded" environment just redefines "\exam@FrameCommand"
% to use "\colorbox{shadecolor}" (and you have to define the
% color "shadecolor": \newcolor{shadecolor}...).
%
% A page break is allowed, and even encouraged, before the framed
% environment. If you want to attach some text (a box title) to the
-% frame, then the text should be inserted by \FrameCommand
+% frame, then the text should be inserted by \exam@FrameCommand
%
% The contents of the framed regions are restricted:
% Floats, footnotes, marginpars and head-line entries will be lost.
@@ -8080,16 +8026,18 @@
%
% The MakeFramed environment does the work. Its "settings" argument
% should contain any adjustments to the text width (applied to \hsize,
-% and using the "\width" of the frame itself) as well as a `restore'
-% command -- \@parboxrestore or \FrameRestore or something similar.
+% and using the "\exam@width" of the frame itself) as well as a `restore'
+% command -- \@parboxrestore or \exam@FrameRestore or something similar.
%
% Expert commands:
-% \MakeFramed, \endMakeFramed: the "MakeFramed" environment
-% \FrameCommand: command to draw the frame around its argument
-% \FrameRestore: restore some text settings, but fewer than \@parboxrestore
-% \FrameRule: length register; \fboxrule for default "framed".
-% \FrameSep: length register; \fboxsep for default "framed".
-% \FrameHeightAdjust: macro; height of frame above baseline at top of page
+% \exam@MakeFramed, \endexam@MakeFramed: the "MakeFramed" environment
+% \exam@FrameCommand: command to draw the frame around its argument
+% \exam@FrameRestore: restore some text settings, but fewer than
+% \@parboxrestore
+% \exam@FrameRule: length register; \fboxrule for default "framed".
+% \exam@FrameSep: length register; \fboxsep for default "framed".
+% \exam@frameHeightAdjust: macro; height of frame above baseline at
+% top of page
%
% This is still a `pre-production' version because I can think of many
% features/improvements that should be made. Nevertheless, starting
@@ -8105,30 +8053,30 @@
\newdimen\saved@totalleftmargin
\newcount\@sollistdepth
-\newenvironment{framed}% using default \FrameCommand
- {\MakeFramed {\advance\hsize-\width \FrameRestore}}%
- {\endMakeFramed}
+\newenvironment{examframed}% using default \exam@FrameCommand
+ {\exam@MakeFramed {\advance\hsize-\exam@width \exam@FrameRestore}}%
+ {\endexam@MakeFramed}
-\newenvironment{shaded}{%
- \def\FrameCommand{\colorbox{shadecolor}}%
- \MakeFramed {\FrameRestore}}%
- {\endMakeFramed}
+\newenvironment{examshaded}{%
+ \def\exam@FrameCommand{\colorbox{shadecolor}}%
+ \exam@MakeFramed {\exam@FrameRestore}}%
+ {\endexam@MakeFramed}
-\newenvironment{leftbar}{%
- \def\FrameCommand{\vrule width 3pt \hspace{10pt}}%
- \MakeFramed {\advance\hsize-\width \FrameRestore}}%
- {\endMakeFramed}
+\newenvironment{examleftbar}{%
+ \def\exam@FrameCommand{\vrule width 3pt \hspace{10pt}}%
+ \exam@MakeFramed {\advance\hsize-\exam@width \exam@FrameRestore}}%
+ {\endexam@MakeFramed}
-\chardef\FrameRestore=\catcode`\| % for debug
+\chardef\exam@FrameRestore=\catcode`\| % for debug
\catcode`\|=\catcode`\% % (debug: insert space after backslash)
-\def\MakeFramed#1{\par
- % measure added width and height; call result \width and \height
+\def\exam@MakeFramed#1{\par
+ % measure added width and height; call result \exam@width and \exam@height
\setbox\z@\vbox{\vskip-1in \hbox{\hskip-1in
- \FrameCommand{\hbox{\vrule \@height .7in \@depth.3in \@width 1in}}}%
+ \exam@FrameCommand{\hbox{\vrule \@height .7in \@depth.3in \@width 1in}}}%
\vskip\z@skip}%
- \def\width{\wd\z@}\def\height{\ht\z@}%
- \edef\fb@frw{\the\width}\edef\fb@frh{\the\height}%
+ \def\exam@width{\wd\z@}\def\exam@height{\ht\z@}%
+ \edef\exam@fb@frw{\the\exam@width}\edef\exam@fb@frh{\the\exam@height}%
% insert pre-penalties and skips
\begingroup
\skip@\lastskip
@@ -8136,7 +8084,7 @@
\penalty9999 % updates \page parameters
\ifdim\pagefilstretch=\z@ \ifdim\pagefillstretch=\z@
\edef\@tempa{\the\skip@}%
- \ifx\@tempa\zero@glue \penalty-30
+ \ifx\@tempa\exam@zero@glue \penalty-30
\else \vskip-\skip@ \penalty-30 \vskip\skip@
\fi\fi\fi
\penalty\z@
@@ -8146,7 +8094,7 @@
% calculated badness is really 8192, not 10000, so the multiplier
% is 0.2301.
\advance\skip@ \z@ plus-.5\baselineskip
- \advance\skip@ \z@ plus-.231\height
+ \advance\skip@ \z@ plus-.231\exam@height
\advance\skip@ \z@ plus-.231\skip@
\advance\skip@ \z@ plus-.231\topsep
\vskip-\skip@ \penalty 1800 \vskip\skip@
@@ -8154,11 +8102,11 @@
\addvspace{\topsep}%
\endgroup
% clear out pending page break
- \penalty\@M \vskip 2\baselineskip \vskip\height
- \penalty9999 \vskip -2\baselineskip \vskip-\height
+ \penalty\@M \vskip 2\baselineskip \vskip\exam@height
+ \penalty9999 \vskip -2\baselineskip \vskip-\exam@height
\penalty9999 % updates \pagetotal
|\message{After clearout, \pagetotal=\the\pagetotal, \pagegoal=\the\pagegoal. }%
- \fb@adjheight
+ \exam@fb@adjheight
%psh: Added commands:
\advance\hsize-\@totalleftmargin
\saved@totalleftmargin=\@totalleftmargin
@@ -8169,25 +8117,26 @@
\leftmargin=0pt
%psh: end of added commands
\setbox\@tempboxa\vbox\bgroup
- #1% Modifications to \hsize (can use \width and \height)
+ #1% Modifications to \hsize (can use \exam@width and \exam@height)
\textwidth\hsize \columnwidth\hsize
%psh: added one line:
\linewidth=\hsize
}
-\def\endMakeFramed{\par
+\def\endexam@MakeFramed{\par
\kern\z@ \penalty-100 % put depth into height
\egroup
- \begingroup \put@frame \endgroup
+ \begingroup \exam@put@frame \endgroup
%psh: Added one line:
\@totalleftmargin=\saved@totalleftmargin
}
-% \put@frame takes the contents of \@tempboxa and puts all, or a piece,
-% of it on the page with a frame (\FrameCommand). It recurses until
-% all of \@tempboxa has been used up. (\@tempboxa must have zero depth.)
+% \exam@put@frame takes the contents of \@tempboxa and puts all, or a
+% piece, of it on the page with a frame (\exam@FrameCommand). It
+% recurses until all of \@tempboxa has been used up. (\@tempboxa must
+% have zero depth.)
-\def\put@frame{\relax
+\def\exam@put@frame{\relax
\ifdim\pagegoal=\maxdimen \pagegoal\vsize \fi
| \message{=============== Entering putframe ====================^^J
| \pagegoal=\the\pagegoal, \pagetotal=\the\pagetotal. }%
@@ -8195,17 +8144,17 @@
\dimen@\pagegoal \advance\dimen@-\pagetotal % natural space left on page
\ifdim\dimen@<2\baselineskip
| \message{Page has only \the\dimen@\space room left; eject. }%
- \eject \fb@adjheight \put@frame
+ \eject \exam@fb@adjheight \exam@put@frame
\else % there's appreciable room left on the page
| \message{\string\pagetotal=\the\pagetotal,
| \string\pagegoal=\the\pagegoal,
| \string\pagestretch=\the\pagestretch,
| \string\pageshrink=\the\pageshrink,
-| \string\fb@frh=\fb@frh. \space}
-| \message{Box of size \the\ht\@tempboxa\space + \fb@frh}%
+| \string\exam@fb@frh=\exam@fb@frh. \space}
+| \message{Box of size \the\ht\@tempboxa\space + \exam@fb@frh}%
\begingroup % temporarily set \dimen@ to be...
\advance\dimen@.8\pageshrink % maximum space available on page
- \advance\dimen@-\fb@frh\relax % space available for frame's contents
+ \advance\dimen@-\exam@fb@frh\relax % space available for frame's contents
\expandafter\endgroup
% restore \dimen@ to real room left on page
\ifdim\dimen@>\ht\@tempboxa % whole box does fit
@@ -8213,10 +8162,11 @@
\else % box must be split
| \message{must be split to fit in \the\dimen@. }%
\setbox\@tempboxa\vbox{% simulate frame and flexiblity of the page:
- \vskip \fb@frh \@plus\pagestretch \@minus.8\pageshrink
+ \vskip \exam@fb@frh \@plus\pagestretch \@minus.8\pageshrink
\kern137sp\kern-137sp\penalty-30
\unvbox\@tempboxa}%
- \edef\fb@resto@set{\boxmaxdepth\the\boxmaxdepth \splittopskip\the\splittopskip}%
+ \edef\exam@fb@resto@set{\boxmaxdepth\the\boxmaxdepth
+ \splittopskip\the\splittopskip}%
\boxmaxdepth\z@ \splittopskip\z@
\setbox\tw@\vsplit\@tempboxa to\dimen@
\setbox\tw@\vbox{\unvbox\tw@}% natural-sized
@@ -8230,7 +8180,7 @@
| \message{Frame is big -- Use up the full column. }%
\dimen@ii\pagegoal
\advance\dimen@ii -\topskip
- \advance\dimen@ii \FrameHeightAdjust\relax
+ \advance\dimen@ii \exam@frameHeightAdjust\relax
\else % suspect this is wrong:
% If the split-to size > feasible room_on_page, rebox it smaller.
\advance\dimen@.8\pageshrink
@@ -8242,17 +8192,18 @@
\fi
\fi
% Re-box contents to desired size \dimen@ii
- \advance\dimen@ii -\fb@frh
+ \advance\dimen@ii -\exam@fb@frh
\setbox\tw@\vbox to\dimen@ii \bgroup
% remove simulated frame and page flexibility:
- \vskip -\fb@frh \@plus-\pagestretch \@minus-.8\pageshrink
+ \vskip -\exam@fb@frh \@plus-\pagestretch \@minus-.8\pageshrink
\unvbox\tw@ \unpenalty\unpenalty
\ifdim\lastkern=-137sp % whole box went to next page
| \message{box split at beginning! }%
- \egroup \fb@resto@set \eject % (\vskip for frame size was discarded)
- \fb@adjheight
+ \egroup \exam@fb@resto@set \eject % (\vskip for frame size
+ % was discarded)
+ \exam@fb@adjheight
\else %
- \egroup \fb@resto@set
+ \egroup \exam@fb@resto@set
\ifvoid\@tempboxa % it all fit after all
| \message{box split at end! }%
\setbox\@tempboxa\box\tw@
@@ -8261,61 +8212,62 @@
\ifdim\wd\tw@>\z@
%psh: Changed the command that inserts the box:
% Instead of \centerline, we shift right by \saved@totalleftmargin:
-% \centerline{\FrameCommand{\box\tw@}}% ??? \centerline bad idea
- \hbox{\hskip \saved@totalleftmargin\FrameCommand{\box\tw@}}%
+% \centerline{\exam@FrameCommand{\box\tw@}}% ??? \centerline bad idea
+ \hbox{\hskip \saved@totalleftmargin\exam@FrameCommand{\box\tw@}}%
\else
| \message{Zero width means likely blank. Don't frame it (guess)}%
\box\tw@
\fi
\hrule \@height\z@
\eject
- \fb@adjheight
- \put@frame
+ \exam@fb@adjheight
+ \exam@put@frame
\fi\fi\fi\fi\fi
\ifvoid\@tempboxa\else
%psh: Changed the command that inserts the box:
% Instead of \centerline, we shift right by \saved@totalleftmargin:
-% \centerline{\FrameCommand{\box\@tempboxa}}%
- \hbox{\hskip\saved@totalleftmargin\FrameCommand{\box\@tempboxa}}%
+% \centerline{\exam@FrameCommand{\box\@tempboxa}}%
+ \hbox{\hskip\saved@totalleftmargin\exam@FrameCommand{\box\@tempboxa}}%
\nointerlineskip \null %{\showoutput \showlists}
\penalty-30 \vskip\topsep
\fi}
-\def\fb@adjheight{%
- \vbox to\FrameHeightAdjust{}% get proper baseline skip from above.
+\def\exam@fb@adjheight{%
+ \vbox to\exam@frameHeightAdjust{}% get proper baseline skip from above.
\penalty\@M \nointerlineskip
- \vskip-\FrameHeightAdjust
+ \vskip-\exam@frameHeightAdjust
\penalty\@M} % useful for tops of pages
-\edef\zero@glue{\the\z@skip}
+\edef\exam@zero@glue{\the\z@skip}
-\catcode`\|=\FrameRestore
+\catcode`\|=\exam@FrameRestore
% Provide configuration commands:
-%psh: Version 2.502, 2016/03/23, changed \FrameCommand so that the
+%psh: Version 2.502, 2016/03/23, changed \exam@FrameCommand so that the
% frame is printed in color if the user has said
% \colorsolutionboxes:
-%\providecommand\FrameCommand{\fboxrule=\FrameRule \fboxsep=\FrameSep \fbox}
-\def\FrameCommand{\fboxrule=\FrameRule \fboxsep=\FrameSep
+%\providecommand\exam@FrameCommand{\fboxrule=\exam@FrameRule
+%\fboxsep=\exam@FrameSep \fbox}
+\def\exam@FrameCommand{\fboxrule=\exam@FrameRule \fboxsep=\exam@FrameSep
\if@colorsolutionboxes
\def\box@it{\colorfbox{SolutionBoxColor}}%
\else
\def\box@it{\fbox}%
\fi
\box@it
-}% \FrameCommand
+}% \exam@FrameCommand
-\@ifundefined{FrameRule}{\newdimen\FrameRule \FrameRule=\fboxrule}{}
-\@ifundefined{FrameSep} {\newdimen\FrameSep \FrameSep =3\fboxsep}{}
+\@ifundefined{FrameRule}{\newdimen\exam@FrameRule \exam@FrameRule=\fboxrule}{}
+\@ifundefined{FrameSep} {\newdimen\exam@FrameSep \exam@FrameSep =3\fboxsep}{}
% Height of frame above first baseline when frame starts a page:
-\providecommand\FrameHeightAdjust{6pt}
+\providecommand\exam@frameHeightAdjust{6pt}
-% \FrameRestore has parts of \@parboxrestore. See how it is used in the
+% \exam@FrameRestore has parts of \@parboxrestore. See how it is used in the
% "settings" argument of \MakeFrame. Previous behavior can be restored by
% using \@parboxrestore there, or redefining:
-% \makeatletter \renewcommand\FrameRestore{\@parboxrestore} \makeatother
-\def\FrameRestore{%
+% \makeatletter \renewcommand\exam@FrameRestore{\@parboxrestore} \makeatother
+\def\exam@FrameRestore{%
\let\if@nobreak\iffalse
\let\if@noskipsec\iffalse
% \let\par\@@par ??
@@ -8333,7 +8285,8 @@
}
% Compatibility with previous versions (temporary!):
-\let\fram@d=\MakeFramed \let\endfram@d=\endMakeFramed
+% psh: we'll remove this 2017-09-21
+%\let\fram@d=\MakeFramed \let\endfram@d=\endMakeFramed
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%