I have a macro called \task which formats the text in a specific way. Now for every task I have to add the taskname as a column and an empty cell underneath.

So how can I achieve the following?


\newcommand{\task}[1]{\par \bigskip \noindent {\bf{Task {#1}}}}
  % For every \task do:
  %   echo taskname &
  % done
  1.1 & 1.2 & 1.3 \\
  % For every \task do:
  %   echo &
  % done
  & &



\task{1.1} Foo
\task{1.2} Bar
\task{1.3} Baz


  • I do not understand your question. If you don't get an answer maybe you should add the desired output (hand drawing or use PowerPoint etc). Could you use a list like description? If yes, have a look at the enumitem package. – Dr. Manuel Kuehner Apr 22 '17 at 23:44
  • 1
    Unrelated, \bf is outdated -- use \textbf{Text} or \bfseries (switch). – Dr. Manuel Kuehner Apr 22 '17 at 23:45
  • neither \noindent nor \bf take an argument in {..} – David Carlisle Apr 23 '17 at 0:11
  • Packages like exsheets or the exam class (and others) provide ready made and customizable commands to create what you want, an exam sheet and a point table. Why do you want to reinvent thte wheel? – Johannes_B Apr 23 '17 at 4:53

Using package exsheets. The grade table even comes as an example file, copy/paste and done.





  Task & \ForEachQuestion{\QuestionNumber{#1}\iflastquestion{}{&}} & Total \\ \hline
  Points   & \ForEachQuestion{\GetQuestionProperty{points}{#1}\iflastquestion{}{&}} & \pointssum* \\ \hline
  Reached  & \ForEachQuestion{\iflastquestion{}{&}} & \\ \hline


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.