Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Possible Bug when combining a tabular and an exercise environment #109

Closed
Sk1nk opened this issue Nov 20, 2022 · 3 comments
Closed

Possible Bug when combining a tabular and an exercise environment #109

Sk1nk opened this issue Nov 20, 2022 · 3 comments

Comments

@Sk1nk
Copy link

Sk1nk commented Nov 20, 2022

I tried to narrow it down as much as I could:

\documentclass{minimal}
\usepackage[clear-aux]{xsim}

\begin{document}
\begin{exercise}[points = 10]

\begin{tabular}{p{.7\linewidth} |c|c||c|c|c|c|}
\cline{2-7}
\textbf{Auffälligkeit} & H & B & d & r & a & g\\\cline{2-7}
\end{tabular}
\end{exercise}

\vfill 

\begin{center}
	\gradingtable[template=default*,type=exercise]
\end{center}
\end{document}

creates the following error:

Runaway argument?
\par \begin {tabular}{p{.7\linewidth } |c|c\q_stop \tl_set_rescan:Nnx \ETC.
! File ended while scanning use of \__xsim_extract_property_list_entry:NNNwww.
<inserted text> 
                \par 
<*> BUG.tex
           
! Emergency stop.
<*> BUG.tex
           
!  ==> Fatal error occurred, no output PDF file produced!
@muzimuzhi
Copy link

From sec. 5 of package doc,
image
You can try with a new separator which is more rare to appear in input, for example, |@|.

\documentclass{article} % \linewidth needs article class
\usepackage[clear-aux]{xsim}
\xsimsetup{split-aux-lists=|@|}
\begin{document}
\begin{exercise}[points = 10]

\begin{tabular}{p{.7\linewidth} |c|c||c|c|c|c|}
\cline{2-7}
\textbf{Auffälligkeit} & H & B & d & r & a & g\\\cline{2-7}
\end{tabular}
\end{exercise}

\vfill 

\begin{center}
	\gradingtable[template=default*,type=exercise]
\end{center}
\end{document}

@Sk1nk
Copy link
Author

Sk1nk commented Nov 21, 2022

This solved my problem, thank you!

@marmotghost
Copy link

It is actually a bit nontrivial to find this issue because superficially it appears to be linked to arrays. However, there are many other ways one can run into it, e.g.

\documentclass{article}
\usepackage{xsim}

\DeclareExerciseType{problem}{
 exercise-env = problem ,
 solution-env = answer ,
 exercise-name = Problem ,
 solution-name = Answer ,
 exercise-template = default ,
 solution-template = default
}
 
\begin{document}
\begin{problem}[subtitle=Absolute value]
 Show that the absolute value of the product of two complex numbers equals the product of absolute values.   
\end{problem}

\begin{answer}
   We are to show that 
   $|z_1z_2|=|z_1||z_2|$.%<- error
   %$\vert z_1z_2\vert=\vert z_1\vert\vert z_2\vert$.%<- works  
\end{answer}
\end{document}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants