1

I know how to put \foreach loops into tikz code, but that isn't super helpful here. I'm building a rubric and I'd like to be able to say "there are this many items in the rubric and the first one should say ..., the second one..., etc." Here's what i have currently:

    \newcommand{\rubricTwo}[2]
    {\vspace{3mm}
    \begin{enumerate}[label = ]
    \item \line(1,0){25} \ /1 \ #1
    \item \line(1,0){25} \ /1 \ #2
    \end{enumerate}}

I'd like it to do something like this where \ItemNumber is the number of items to enumerate and \RubricItems is a list of what each item says.

    \newcommand{\rubric}[\ItemNumber][\RubricItems]
    {\vspace{3mm}
    \begin{enumerate}[label = ]
    \item \line(1,0){25} \ /1 \ #1 (first RubricItem)
    \item \line(1,0){25} \ /1 \ #2 (second RubricItem)
    .
    .
    \item \line(1,0){25} \ /1 \ \ItemNumber (last RubricItem)
    \end{enumerate}}
1

Maybe not what you want, but something close can be achieved with \foreach

\documentclass[11pt, a4paper]{article}
\usepackage[utf8]{inputenc}
\usepackage{pgffor}
\begin{document}

\begin{itemize}
\foreach \ItemNumber/\RubricItem in { 1/bla, 2/blabla, 3/blablabla}{
\item \line(1,0){25} \ /1 \ \ItemNumber \ \RubricItem
}
\end{itemize}

\end{document}

enter image description here

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.