+ % Point values go here!
+ \@chpword
+ \setcounter{cols@done}{0}%
+ \do@ptloop@h
+ % When we finish \do@ptloop@h, either we've finished a complete
+ % row of point values, or we've done all the question (or page)
+ % numbers through \last@pq@index, or both:
+ \ifnum \value{cols@done} < \value{num@cols}\relax
+ % We've inserted all the point values, and there's room
+ % remaining on the current line for Total Points:
+ \ifnum \value{current@row} = \value{num@rows}\relax
+ % This is the last row; put in the total:
+ \do@totalpts@h
+ \else
+ % This isn't the last row. We insert (\value{num@cols} -
+ % \value{cols@done}) ampersands.
+ \setcounter{@iterator}{\value{num@cols}}%
+ \addtocounter{@iterator}{-\value{cols@done}}%
+ \do@emptycols@h
+ \fi
+ \fi
+ \\
+ \hline
+ % Bonus point values go here!
+ \@chbpword
+ \setcounter{cols@done}{0}%
+ \do@bptloop@h
+ % When we finish \do@bptloop@h, either
+ % we've finished a complete row of point values, or we've done all
+ % the question (or page) numbers through \last@pq@index, or both:
+ \ifnum \value{cols@done} < \value{num@cols}\relax
+ % We've inserted all the point values, and there's room
+ % remaining on the current line for Total Points:
+ \ifnum \value{current@row} = \value{num@rows}\relax
+ % This is the last row; put in the total:
+ \do@totalbpts@h
+ \else
+ % This isn't the last row. We insert (\value{num@cols} -
+ % \value{cols@done}) ampersands.
+ \setcounter{@iterator}{\value{num@cols}}%
+ \addtocounter{@iterator}{-\value{cols@done}}%
+ \do@emptycols@h
+ \fi
+ \fi
+ % We hold off on putting in the "\\ \hline" because we may want to
+ % immediately follow it with either an "\end{tabular}" or another
+ % "\hline".
+ % Scores?
+ \if@scores
+ \\
+ \hline
+ \@chsword \hidden@ampersand
+ \setcounter{cols@done}{0}%
+ \do@sloop@h
+ \fi
+ \ifnum \value{current@row} = \value{num@rows}\relax
+ % This is the last line! End the tabular:
+ \\
+ \hline
+ \end{tabular}%
+ \else
+ % Don't end the tabular:
+ \\
+ \hline\hline
+ \fi
+ % Check if we should repeat:
+ \ifnum \value{current@row} < \value{num@rows}\relax
+ \let\nextdo@comblines@h=\do@comblines@h
+ \else
+ \let\nextdo@comblines@h=\relax
+ \fi
+ \nextdo@comblines@h
+}% do@comblines@h
+
+\def\do@pq@indexloop@h{%
+ % Called by both \do@lines@h and \do@comblines@h.
+ % We insert at most one row of pq@index:
+ \increment@index{pq@index}%
+ \ifnum \value{pq@index} > \last@pq@index\relax
+ % Do nothing!
+ \else
+ \hidden@ampersand
+ \refto@index{pq@index}%
+ \addtocounter{cols@done}{1}%
+ \fi
+ \ifnum \value{pq@index} < \last@pq@index\relax
+ \ifnum \value{cols@done} < \value{num@cols}\relax
+ \let\nextdo@pq@indexloop@h=\do@pq@indexloop@h
+ \else
+ \let\nextdo@pq@indexloop@h=\relax
+ \fi
+ \else
+ \let\nextdo@pq@indexloop@h=\relax
+ \fi
+ \nextdo@pq@indexloop@h
+}% do@pq@indexloop@h
+
+\def\do@ptloop@h{%
+ % Called by both \do@lines@h and \do@comblines@h.
+ % We insert at most one row of non-bonus point values:
+ \increment@index{pq@index@pts}%
+ \ifnum \value{pq@index@pts} > \last@pq@index\relax
+ % Do nothing!
+ \else
+ \hidden@ampersand
+ \addtocounter{cols@done}{1}%
+ \pointsof@index{pq@index@pts}%
+ \addto@hlfcntr{tbl@points}{\pointsof@index{pq@index@pts}}%
+ \fi
+ \ifnum \value{pq@index@pts} < \last@pq@index\relax
+ \ifnum \value{cols@done} < \value{num@cols}\relax
+ \let\nextdo@ptloop@h=\do@ptloop@h
+ \else
+ \let\nextdo@ptloop@h=\relax
+ \fi
+ \else
+ \let\nextdo@ptloop@h=\relax
+ \fi
+ \nextdo@ptloop@h
+}% do@ptloop@h
+
+\def\do@bptloop@h{%
+ % Called by both \do@lines@h and \do@comblines@h.
+ % We insert at most one row of bonus point values:
+ \increment@index{pq@index@bpts}%
+ \ifnum \value{pq@index@bpts} > \last@pq@index\relax
+ % Do nothing!
+ \else
+ \hidden@ampersand
+ \addtocounter{cols@done}{1}%
+ \bonuspointsof@index{pq@index@bpts}%
+ \addto@hlfcntr{tbl@bonuspoints}{\bonuspointsof@index{pq@index@bpts}}%
+ \fi
+ \ifnum \value{pq@index@bpts} < \last@pq@index\relax
+ \ifnum \value{cols@done} < \value{num@cols}\relax
+ \let\nextdo@bptloop@h=\do@bptloop@h
+ \else
+ \let\nextdo@bptloop@h=\relax
+ \fi
+ \else
+ \let\nextdo@bptloop@h=\relax
+ \fi
+ \nextdo@bptloop@h
+}% do@bptloop@h
+
+\def\do@htword@h{%
+ % Called by both \do@lines@h and \do@comblines@h.
+ % We insert (\value{num@cols} - \value{cols@done}) ampersands,
+ % and then either \@htword or \@bhtword or \@chtword:
+ \setcounter{@iterator}{\value{num@cols}}%
+ \addtocounter{@iterator}{-\value{cols@done}}%
+ \do@emptycols@h
+ \if@combined
+ \@chtword
+ \else
+ \if@bonus
+ \@bhtword
+ \else
+ \@htword
+ \fi
+ \fi
+}% do@htword@h
+
+\def\do@totalpts@h{%
+ % Called by both \do@lines@h and \do@comblines@h.
+ % We insert (\value{num@cols} - \value{cols@done}) ampersands
+ % and then the total points:
+ \setcounter{@iterator}{\value{num@cols}}%
+ \addtocounter{@iterator}{-\value{cols@done}}%
+ \do@emptycols@h
+ \prt@tablepoints
+}% do@totalpts@h
+
+\def\do@totalbpts@h{%
+ % Called by both \do@lines@h and \do@comblines@h.
+ % We insert (\value{num@cols} - \value{cols@done}) ampersands,
+ % and then the total bonus points:
+ \setcounter{@iterator}{\value{num@cols}}%
+ \addtocounter{@iterator}{-\value{cols@done}}%
+ \do@emptycols@h
+ \prt@tablebonuspoints
+}% do@totalbpts@h
+
+\def\do@emptycols@h{%
+ % Called by \do@lines@h, \do@comblines@h, \do@htword@h,
+ % \do@totalpts@h, and \do@totalbpts@h.
+ % We insert \value{@iterator} ampersands:
+ \ifnum \value{@iterator} > 0\relax
+ \hidden@ampersand
+ \addtocounter{@iterator}{-1}%
+ \let\nextdo@emptycols@h=\do@emptycols@h
+ \else
+ \let\nextdo@emptycols@h=\relax
+ \fi
+ \nextdo@emptycols@h
+}% do@emptycols@h
+
+\def\do@sloop@h{%
+ % Called by both \do@lines@h and \do@comblines@h.
+ % We assume that cols@done has been set to zero.
+ % We insert num@cols \hbox to \@cellwidth,
+ % separated by ampersands.
+ \addtocounter{cols@done}{1}%
+ \hbox to \@cellwidth{\hfill}%
+ \ifnum \value{cols@done} < \value{num@cols}\relax
+ \hidden@ampersand
+ \let\nextdo@sloop@h=\do@sloop@h
+ \else
+ \let\nextdo@sloop@h=\relax
+ \fi
+ \nextdo@sloop@h
+}% do@sloop@h
+
+
+%--------------------------------------------------------------------
+%--------------------------------------------------------------------
+% Multicolumn tables
+
+
+%--------------------------------------------------------------------
+% 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}}
+% \cline{1-3} \cline{5-7}
+% \noalign{\vskip\arrayrulewidth}
+% Question%
+% & Points%
+% & Score%
+% & \hspace*{-\arrayrulewidth}\hspace*{\doublerulesep}%
+% & Question%
+% & Points%
+% & Score%
+% \\
+% \cline{1-3} \cline{5-7}
+% \noalign{\vskip\arrayrulewidth}
+% 1%
+% & 5%
+% & \hbox to \@cellwidth{\hfill}%
+% & \hspace*{-\arrayrulewidth}\hspace*{\doublerulesep}%
+% & 4%
+% & 20%
+% & \hbox to \@cellwidth{\hfill}%
+% \\
+% \cline{1-3} \cline{5-7}
+% \noalign{\vskip\arrayrulewidth}
+% 2%
+% & 10%
+% & \hbox to \@cellwidth{\hfill}%
+% & \hspace*{-\arrayrulewidth}\hspace*{\doublerulesep}%
+% & 5%
+% & 25%
+% & \hbox to \@cellwidth{\hfill}%
+% \\
+% \cline{1-3} \cline{5-7}
+% \noalign{\vskip\arrayrulewidth}
+% 3%
+% & 15%
+% & \hbox to \@cellwidth{\hfill}%
+% & \hspace*{-\arrayrulewidth}\hspace*{\doublerulesep}%
+% & Total:%
+% & 75%
+% & \hbox to \@cellwidth{\hfill}%
+% \\
+% \cline{1-3} \cline{5-7}
+% \noalign{\vskip\arrayrulewidth}
+% \end{tabular}
+%--------------------------------------------------------------------
+%--------------------------------------------------------------------
+% Check that the number of cols is OK, and compute the number of rows:
+
+\def\check@num@cols@v{%
+ % We get here from \tbl@v@or@h.
+ % We make sure the number of cols is between 1 and 10 (since we
+ % can't handle more than 10 cols in a multicolumn table).
+ % If it is, we go on to \@computenumrows@v
+ \ifnum \value{num@cols} < 1\relax
+ \ClassError{exam}{%
+ The number of columns in a table must be positive.\MessageBreak
+ }{%
+ The number of columns must be a positive integer.\MessageBreak
+ }%
+ \fbox{\textbf{Error:} Multicolumn table with no columns!}%
+ \else
+ \ifnum \value{num@cols} > 10\relax
+ \ClassError{exam}{%
+ Multicolumn tables can have at most 10 columns.\MessageBreak
+ }{%
+ Multicolumn tables can have at most 10 columns.\MessageBreak
+ }%
+ \fbox{\textbf{Error:} Multicolumn table with more than 10 columns!}%
+ \else
+ \@computenumrows@v
+ \fi
+ \fi
+}% check@num@cols@v
+
+\def\@computenumrows@v{%
+ % We get here from \check@num@cols@v.
+ % Compute the number of rows.
+ % First: set num@rows to one more than the number of either
+ % (questions) or (pages with the appropriate type of points), to
+ % have slots for the total along with the questions or page numbers:
+ \iftbl@pgs
+ \count@pgswpts{num@rows}%
+ \addtocounter{num@rows}{1}%
+ \else
+ \setcounter{num@rows}{\last@pq@index}%
+ \addtocounter{num@rows}{-\first@pq@index}%
+ \addtocounter{num@rows}{2}%
+ \fi
+ % Save the number of slots needed, using pq@index@bpts as a scratch
+ % counter, to check for truncation on division:
+ \setcounter{pq@index@bpts}{\value{num@rows}}%
+ % Divide the number of slots needed by num@cols:
+ \divide \csname c@num@rows\endcsname by
+ \csname c@num@cols\endcsname
+ % Division truncates: See if there was truncation.
+ % Use the counter @iterator as a scratch counter:
+ \setcounter{@iterator}{\value{num@rows}}%
+ \multiply \csname c@@iterator\endcsname by
+ \csname c@num@cols\endcsname
+ \ifnum \value{@iterator} < \value{pq@index@bpts}\relax
+ % There was truncation; add one to num@rows:
+ \addtocounter{num@rows}{1}%
+ \fi
+ \@multicolumntable
+}% @computenumrows@v
+
+%--------------------------------------------------------------------
+% Construct the actual table:
+
+\def\@multicolumntable{%
+ % We get here from \@computenumrows@v.
+ % Set \cline@stuff@v equal to the line of \cline's:
+ \create@cline@stuff@v
+ \renewcommand\arraystretch{\@gtblstretch}%
+ \set@hlfcntr{tbl@points}{0}%
+ \set@hlfcntr{tbl@bonuspoints}{0}%
+ \if@combined
+ \if@scores
+ % 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}}
+ % 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
+ % the empty string)!
+ % Put in the row of column headings, with \cline@stuff@v above and
+ % below:
+ \cline@stuff@v
+ \setcounter{@iterator}{0}%
+ \docolumn@heads@comb@v
+ \\
+ \cline@stuff@v
+ \else
+ % 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}}
+ % 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
+ % the empty string)!
+ % Put in the row of column headings, with \cline@stuff@v above and
+ % below:
+ \cline@stuff@v
+ \setcounter{@iterator}{0}%
+ \docolumn@heads@comb@noscores@v
+ \\
+ \cline@stuff@v
+ \fi
+ % pq@index@pts will hold the question number (or page number) in
+ % the first column of the row.
+ \setcounter{pq@index@pts}{\first@pq@index}%
+ \iftbl@pgs
+ % If we're indexed by pages, we need to make sure there are
+ % points of the appropriate type on the first page listed:
+ \addtocounter{pq@index@pts}{-1}%
+ \find@nextpagewithpoints{pq@index@pts}%
+ \fi
+ \setcounter{current@row}{0}%
+ \do@lines@v
+ \else
+ % It's not combined:
+ \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}}
+ % 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
+ % the empty string)!
+ % Put in the row of column headings, with \cline@stuff@v above and
+ % below:
+ \cline@stuff@v
+ \setcounter{@iterator}{0}%
+ \docolumn@heads@v
+ \\
+ \cline@stuff@v
+ \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}}
+ % 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
+ % the empty string)!
+ % Put in the row of column headings, with \cline@stuff@v above and
+ % below:
+ \cline@stuff@v
+ \setcounter{@iterator}{0}%
+ \docolumn@heads@noscores@v
+ \\
+ \cline@stuff@v
+ \fi
+ % pq@index@pts will hold the question number (or page number) in
+ % the first column of the row.
+ \setcounter{pq@index@pts}{\first@pq@index}%
+ \iftbl@pgs
+ % If we're indexed by pages, we need to make sure there are
+ % points of the appropriate type on the first page listed:
+ \addtocounter{pq@index@pts}{-1}%
+ \find@nextpagewithpoints{pq@index@pts}%
+ \fi
+ \setcounter{current@row}{0}%
+ \do@lines@v
+ \fi
+}% @multicolumntable
+
+%--------------------------------------------------------------------
+% \create@cline@stuff@v
+
+% The function \create@cline@stuff@v defines \cline@stuff@v to be whatever's
+% appropriate given the values of num@cols, \if@bonus, \if@combined, and
+% \if@scores.
+
+% We wimped out of generating \cline@stuff@v on the fly because we didn't
+% see how to get the correct expansions/nonexpansions without using a
+% primitive of e-TeX.
+
+% \clines@ii@whatever is for tables in which a logical column consists
+% of two columns; it's used for pointtable and bonuspointtable.
+
+\def\clines@ii@i{\cline{1-2}}
+\def\clines@ii@ii{\cline{1-2} \cline{4-5}}
+\def\clines@ii@iii{\cline{1-2} \cline{4-5} \cline{7-8}}
+\def\clines@ii@iv{\cline{1-2} \cline{4-5} \cline{7-8} \cline{10-11}}
+\def\clines@ii@v{\cline{1-2} \cline{4-5} \cline{7-8} \cline{10-11}
+ \cline{13-14}}
+\def\clines@ii@vi{\cline{1-2} \cline{4-5} \cline{7-8} \cline{10-11}
+ \cline{13-14} \cline{16-17}}
+\def\clines@ii@vii{\cline{1-2} \cline{4-5} \cline{7-8} \cline{10-11}
+ \cline{13-14} \cline{16-17} \cline{19-20}}
+\def\clines@ii@viii{\cline{1-2} \cline{4-5} \cline{7-8} \cline{10-11}
+ \cline{13-14} \cline{16-17} \cline{19-20} \cline{22-23}}
+\def\clines@ii@vix{\cline{1-2} \cline{4-5} \cline{7-8} \cline{10-11}
+ \cline{13-14} \cline{16-17} \cline{19-20} \cline{22-23}
+ \cline{25-26}}
+\def\clines@ii@x{\cline{1-2} \cline{4-5} \cline{7-8} \cline{10-11}
+ \cline{13-14} \cline{16-17} \cline{19-20} \cline{22-23}
+ \cline{25-26} \cline{28-29}}
+
+% \clines@iii@whatever is for tables in which a logical column consists
+% of three columns; it's are used for gradetable, bonusgradetable, and
+% combinedpointtable:
+
+\def\clines@iii@i{\cline{1-3}}
+\def\clines@iii@ii{\cline{1-3} \cline{5-7}}
+\def\clines@iii@iii{\cline{1-3} \cline{5-7} \cline{9-11}}
+\def\clines@iii@iv{\cline{1-3} \cline{5-7} \cline{9-11} \cline{13-15}}
+\def\clines@iii@v{\cline{1-3} \cline{5-7} \cline{9-11} \cline{13-15}
+ \cline{17-19}}
+\def\clines@iii@vi{\cline{1-3} \cline{5-7} \cline{9-11} \cline{13-15}
+ \cline{17-19} \cline{21-23}}
+\def\clines@iii@vii{\cline{1-3} \cline{5-7} \cline{9-11} \cline{13-15}
+ \cline{17-19} \cline{21-23} \cline{25-27}}
+\def\clines@iii@viii{\cline{1-3} \cline{5-7} \cline{9-11} \cline{13-15}
+ \cline{17-19} \cline{21-23} \cline{25-27} \cline{29-31}}
+\def\clines@iii@ix{\cline{1-3} \cline{5-7} \cline{9-11} \cline{13-15}
+ \cline{17-19} \cline{21-23} \cline{25-27} \cline{29-31}
+ \cline{33-35}}
+\def\clines@iii@x{\cline{1-3} \cline{5-7} \cline{9-11} \cline{13-15}
+ \cline{17-19} \cline{21-23} \cline{25-27} \cline{29-31}
+ \cline{33-35} \cline{37-39}}
+
+
+% \clines@iv@whatever is for tables in which a logical column
+% consists of four columns; it's used for combinedgradetable.
+
+\def\clines@iv@i{\cline{1-4}}
+\def\clines@iv@ii{\cline{1-4} \cline{6-9}}
+\def\clines@iv@iii{\cline{1-4} \cline{6-9} \cline{11-14}}
+\def\clines@iv@iv{\cline{1-4} \cline{6-9} \cline{11-14} \cline{16-19}}
+\def\clines@iv@v{\cline{1-4} \cline{6-9} \cline{11-14} \cline{16-19}
+ \cline{21-24}}
+\def\clines@iv@vi{\cline{1-4} \cline{6-9} \cline{11-14} \cline{16-19}
+ \cline{21-24} \cline{26-29}}
+\def\clines@iv@vii{\cline{1-4} \cline{6-9} \cline{11-14} \cline{16-19}
+ \cline{21-24} \cline{26-29} \cline{31-34}}
+\def\clines@iv@viii{\cline{1-4} \cline{6-9} \cline{11-14} \cline{16-19}
+ \cline{21-24} \cline{26-29} \cline{31-34} \cline{36-39}}
+\def\clines@iv@ix{\cline{1-4} \cline{6-9} \cline{11-14} \cline{16-19}
+ \cline{21-24} \cline{26-29} \cline{31-34} \cline{36-39}
+ \cline{41-44}}
+\def\clines@iv@x{\cline{1-4} \cline{6-9} \cline{11-14} \cline{16-19}
+ \cline{21-24} \cline{26-29} \cline{31-34} \cline{36-39}
+ \cline{41-44} \cline{46-49}}
+
+% The definition of \cline ends with \noalign{\vskip-\arrayrulewidth},
+% and so we want to throw in a \noalign{\vskip\arrayrulewidth} to
+% cancel that.
+\def\cline@correction{\noalign{\vskip\arrayrulewidth}}
+
+\def\create@cline@stuff@v{%
+ % Called by \@multicolumntable.
+ \if@combined
+ \if@scores
+ \edef\cline@stuff@v{\expandafter\noexpand\csname
+ clines@iv@\romannumeral \c@num@cols\endcsname
+ \noexpand\cline@correction}%
+ \else
+ \edef\cline@stuff@v{\expandafter\noexpand\csname
+ clines@iii@\romannumeral \c@num@cols\endcsname
+ \noexpand\cline@correction}%
+ \fi
+ \else
+ \if@scores
+ \edef\cline@stuff@v{\expandafter\noexpand\csname
+ clines@iii@\romannumeral \c@num@cols\endcsname
+ \noexpand\cline@correction}%
+ \else
+ \edef\cline@stuff@v{\expandafter\noexpand\csname
+ clines@ii@\romannumeral \c@num@cols\endcsname
+ \noexpand\cline@correction}%
+ \fi
+ \fi
+}% create@cline@stuff@v
+
+%--------------------------------------------------------------------
+% The various \docolumn@heads@something@v
+
+\def\docolumn@heads@v{%
+ % Called by \@multicolumntable.
+ % multicolumngradetable or multicolumnbonusgradetable, possibly
+ % partial.
+ \iftbl@pgs
+ \if@bonus
+ \@bvpgword
+ \else
+ \@vpgword
+ \fi
+ \else
+ \if@bonus
+ \@bvqword
+ \else
+ \@vqword
+ \fi
+ \fi
+ & \if@bonus
+ \@bvpword
+ \else
+ \@vpword
+ \fi
+ & \if@bonus
+ \@bvsword
+ \else
+ \@vsword
+ \fi
+ \addtocounter{@iterator}{1}%
+ \ifnum \value{@iterator} < \value{num@cols}\relax
+ \hidden@ampersand
+ \hspace*{-\arrayrulewidth}\hspace*{\doublerulesep}%
+ \hidden@ampersand
+ \let\nextdocolumn@heads@v=\docolumn@heads@v
+ \else
+ \let\nextdocolumn@heads@v=\relax
+ \fi
+ \nextdocolumn@heads@v
+}% docolumn@heads@v
+
+\def\docolumn@heads@noscores@v{%
+ % Called by \@multicolumntable.
+ % multicolumnpointtable or multicolumnbonuspointtable, possibly
+ % partial.
+ \iftbl@pgs
+ \if@bonus
+ \@bvpgword
+ \else
+ \@vpgword
+ \fi
+ \else
+ \if@bonus
+ \@bvqword
+ \else
+ \@vqword
+ \fi
+ \fi
+ &
+ \if@bonus
+ \@bvpword
+ \else
+ \@vpword
+ \fi
+ \addtocounter{@iterator}{1}%
+ \ifnum \value{@iterator} < \value{num@cols}\relax
+ \hidden@ampersand
+ \hspace*{-\arrayrulewidth}\hspace*{\doublerulesep}%
+ \hidden@ampersand
+ \let\nextdocolumn@heads@noscores@v=\docolumn@heads@noscores@v
+ \else
+ \let\nextdocolumn@heads@noscores@v=\relax
+ \fi
+ \nextdocolumn@heads@noscores@v
+}% docolumn@heads@noscores@v
+
+\def\docolumn@heads@comb@v{%
+ % Called by \@multicolumntable.
+ % multicolumncombinedgradetable, possibly partial.
+ \iftbl@pgs
+ \@cvpgword
+ \else
+ \@cvqword
+ \fi
+ & \@cvpword
+ & \@cvbpword
+ & \@cvsword
+ \addtocounter{@iterator}{1}%
+ \ifnum \value{@iterator} < \value{num@cols}\relax
+ \hidden@ampersand
+ \hspace*{-\arrayrulewidth}\hspace*{\doublerulesep}%
+ \hidden@ampersand
+ \let\nextdocolumn@heads@comb@v=\docolumn@heads@comb@v
+ \else
+ \let\nextdocolumn@heads@comb@v=\relax
+ \fi
+ \nextdocolumn@heads@comb@v
+}% docolumn@heads@comb@v
+
+\def\docolumn@heads@comb@noscores@v{%
+ % Called by \@multicolumntable.
+ % multicolumncombinedpointtable, possibly partial.
+ \iftbl@pgs
+ \@cvpgword
+ \else
+ \@cvqword
+ \fi
+ & \@vpword
+ & \@bvpword
+ \addtocounter{@iterator}{1}%
+ \ifnum \value{@iterator} < \value{num@cols}\relax
+ \hidden@ampersand
+ \hspace*{-\arrayrulewidth}\hspace*{\doublerulesep}%
+ \hidden@ampersand
+ \let\nextdocolumn@heads@comb@noscores@v=\docolumn@heads@comb@noscores@v