-
Notifications
You must be signed in to change notification settings - Fork 23
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
A couple of ideas for the future of xsim (or xsim-exam) #49
Comments
The input will never match your code but you can have most of it already: \documentclass{article}
\usepackage[enable-debug]{expl3}
\usepackage[no-files]{xsim}
\xsimsetup{
load-style = layouts ,
exercise/template = runin ,
solution/template = runin
}
\usepackage{tasks,fontawesome,fmtcount,multicol}
\NewTasksEnvironment[label=\Alph*),label-width=12pt]{choices}[\choice]
\newcommand*\correct{\thetask\expanded{\SetExerciseProperty{choice}{\thetask}}}
\NewTasksEnvironment[label=\Roman*,label-width=12pt]{options}[\option]
\DeclareExerciseProperty{choice}
\newcommand*\pkg[1]{\texttt{#1}}
\newcommand*\cls[1]{\texttt{#1}}
\newcommand\EA[2]{\IfInsideSolutionTF{#2}{#1}}
\newcommand\answer[1]{\IfInsideSolutionT{#1}}
\begin{document}
\section{List of exercises}
Solve and answer the following exercises.
\begin{exercise}
Factor $x^{2}-2x+1$
\end{exercise}
\begin{solution}
$\left(x-1\right)^{2}$
\end{solution}
\begin{exercise}
Factor $3x+3y+3z$
\end{exercise}
\begin{solution}
$3(x+y+z)$
\end{solution}
\begin{exercise}[solution]
\EA{True or false?}{}
\begin{tasks}(2)
\task \EA{$\alpha > \delta$}{False}
\task \EA{\LaTeX2e\ is cool?}{Very True!}
\end{tasks}
\end{exercise}
\begin{exercise}[subtitle=Talking Linux,solution]
\begin{tasks}(2)
\task \EA{You use linux?}{Yes}
\task \EA{Usually uses the package manager?}{Yes}
\end{tasks}
\end{exercise}
\begin{exercise}[solution]
\EA{Rate the following \LaTeX\ packages and classes.}{}
\begin{tasks}(\EA{3}{1})
\task \EA{\cls{xsim-exam}}{doesn't exist for now}
\task \EA{\pkg{xsim}}{very good}
\task \EA{\pkg{exsheets}}{obsolete}
\end{tasks}
\end{exercise}
\begin{exercise}
\begin{choices}(5)
\choice value
\choice value
\choice value
\choice[\correct] correct
\choice value
\end{choices}
\end{exercise}
\begin{solution}
\GetExerciseProperty{choice}
\end{solution}
\begin{exercise}
\begin{options}(3)
\option $2\alpha+2\delta=90^{\circ}$
\option $\alpha=\delta$
\option $\angle EDF=45^{\circ}$
\end{options}
\begin{choices}(4)
\choice I only
\choice[\correct] II only
\choice I and II only
\choice I and III only
\choice I, II, and III
\end{choices}
\end{exercise}
\begin{solution}
\GetExerciseProperty{choice}
\end{solution}
\begin{exercise}
\begin{tasks}[label=(\arabic*),label-width=13pt](2)
\task $2\alpha+2\delta=90^{\circ}$
\task $\angle EDF=45^{\circ}$
\end{tasks}
\begin{choices}(3)
\choice Alternative A
\choice Alternative B
\choice[\correct] Alternative C
\choice Alternative D
\choice Alternative E
\end{choices}
\end{exercise}
\begin{solution}
\GetExerciseProperty{choice}
\end{solution}
\clearpage
\section{Solutions}
\raggedcolumns
\begin{multicols}{2}
\printsolutions[headings=false]
\end{multicols}
\end{document} |
@cgnieder Great, it's a nice approximation, unfortunately I don't use There is some way to "adapt" your code to make it more like mine, just the "List of exercise" section (without taking into account multiple choice)? |
Just out of curiosity I've been going through the
xsim.ideas
file and I've realized that maybe in the future there isxsim-exam
(which would be great). Let me explain a little, thexsim
package is powerful when it comes to writing well a text related to problems and solutions, it covers all requirements, but sometimes you need something a little simpler (simpler is relative).In my usual work (and that of many teachers in my country) I occupy lists of exercises very similar to the ones that straggled me in the practices in my years of university, of the type:
In my country this is the literal translation of "eXercise Sheets", yes, without further instructions and hopefully the answers to the odd exercises, nothing much explained as a solution, just a short answer
x=1
and ready.The second and quite common are the multiple selection tests (they are actually single selection, but that's how they're known). Where the alternatives are of the type
and other variants, where the official one is
A)
in the national tests.In both cases the design is almost always delegated to the good
enumitem
package, the difficulty is in being able to keep the keys of the alternatives and the answers.An image to be better understood:
This is where my proposal comes into play, for
xsim-exam
probably, I read in one of your comments that you want to keepxsim
as simple as possible. With the following code:I can save the answers and keys of the tests in a sequence (expl3), it is not a silver bullet and it is not written at the level of
xsim
:(. To have a functionality of this style (I think) that would be an addition to this great project.Greetings and thanks for the great contribution.
Pablo
The text was updated successfully, but these errors were encountered: