0

The following conditional is not working; when I use \def\Assignment{Examples}, the file \input{\code/Assessment/#1/#2/#2} is not read.

  \ifx\Assignment Examples
 \qformat{\underline{\textbf{#5 \thequestion } }}
         \loop      
\input{\code/Assessment/#1/#2/#2}
    \addtocounter{int}{1}\ifnum\value{int}<#4  \repeat
  \else
    \if\Assignment Quiz
  \scriptsize{\textbf{This assessment instrument assesses the following Course Learning Outcomes (CLO) and grading scheme: }} \vspace{-0.25em}
\qformat{\underline{\textbf{#5 \thequestion } }\droptotalpoints}
        \loop      
 \input{\code/Assessment/#1/#2/CLO}
\input{\code/Assessment/#1/#2/#2}
    \addtocounter{int}{1}\ifnum\value{int}<#4  \repeat
  \fi
\fi

} \rmfamily}{\medskip}

Diana
  • 1,285
  • 7
  • 12
  • no it didn't answer my question – Diana May 15 '21 at 12:11
  • 1
    Maybe I should have put it as normal comment instead of a duplicate comment - however it shows that \ifx\Assignment Examples will fail because it compares the token \Assignment to the token E. Also later on \if\Assignment Quiz does not have the x in \ifx and if it would it would fail for the same reason (comparing \Assignment to Q). – Marijn May 15 '21 at 12:15
  • \ifx\Assignment E is always false as \Assignment is not E also \scriptsize{ makes the rest of the document script size, latex size commands do not take an argument. – David Carlisle May 15 '21 at 12:30
  • also you can not nest \loop macros. – David Carlisle May 15 '21 at 12:36
  • based on your suggestion I added the following \def\Examples{Examples} \def\Quiz{Quiz} and I adjusted the code to \ifx\Assignment \Examples, but still I didn't get any output – Diana May 15 '21 at 12:47

0 Answers0