I am writing exams using the esami package. Normally, it puts every mcq (multiple choice question) inside a minipage. When the question has a figure and I use wrapfig, everything works as expected, the figure is surrounded by text. BUT, when I use the new esami configuration where the minipages are removed (this in order to use the page space more efficiently) then wrapfig does not work.
I have already contacted the authors of esami and after their help we cleaned the MWE but were not able to solve the issues, so I am turning to post the question here in case anyone with package design experience could shed some light onto this issue.
In the following I will put the MWE for the quizz and the questions. The esami configuration is on the official url esami configuration file. In order to have the no-boxes version, you will need to uncomment the last part of that configuration file where it reads "%%%% %%%%% HERE I GET RID OF THE MINIPAGE IN MULTI"
Basic question example with wrapfig put before the item (putting after item generates more problems):
\newproblem{ \begin{wrapfigure}{r}{0.4\textwidth} \begin{tikzpicture} \draw[thick] (-1, 0) -- (5.1, 0); \draw [fill, red] (0,0) circle [radius=0.1]; \draw [fill, red] (1.5, 0) circle [radius=0.1]; \draw [fill, red] (4.5, 0) circle [radius=0.1]; \node [below] at (0,-0.1) {1}; \node [below] at (1.5,-0.1) {2}; \node [below] at (4.5,-0.1) {3}; \end{tikzpicture} \end{wrapfigure} \item \PTs{1.0} question-v1 \blindtext[2] \begin{answers}{3}\bChoices[random] \Ans1 1. \eAns \Ans0 1. \eAns \eChoices \end{answers} }Example question with wrapfig after the item: quizz using boxes (old version)
\newproblem{ \item \PTs{1.0} question-v2 \blindtext[2] \begin{wrapfigure}{r}{0.4\textwidth} \begin{tikzpicture} \draw[thick] (-1, 0) -- (5.1, 0); \draw [fill, red] (0,0) circle [radius=0.1]; \draw [fill, red] (1.5, 0) circle [radius=0.1]; \draw [fill, red] (4.5, 0) circle [radius=0.1]; \node [below] at (0,-0.1) {1}; \node [below] at (1.5,-0.1) {2}; \node [below] at (4.5,-0.1) {3}; \end{tikzpicture} \end{wrapfigure} \blindtext[1] \begin{answers}{3}\bChoices[random] \Ans1 1. \eAns \Ans0 1. \eAns \eChoices \end{answers} }example quizz using the normal configuration (boxes):
\documentclass[UKenglish,a4paper]{article} \usepackage[shuffle,xyz,pointsonright,autopston,nosolutions]{esami}%%%%% TEMA \usepackage{tikz} % \usepackage{blindtext} \usepackage{wrapfig} % also for pgfmathparse \def\numcompiti{1}%%% The number of versions \date{2013/3/22}%%% THE DATE IN THE FORMAT AAAA/M/D \def\Data{\longdate}%%% or \shortdate: the date in the heading \begin{document} \whiledo{\thevers<\numcompiti}{\stepvers \begin{test}[8] \begin{questions} \esercizi{question-v1, question-v2} \end{questions} \end{test} } \end{document}example quizz using no - boxes (uncomment the section described above and save the file as xyz-n-boxes) - (this also even eliminates one question!!!):
\documentclass[UKenglish,a4paper]{article} \usepackage[shuffle,xyz-no-boxes,pointsonright,autopston,nosolutions]{esami}%%%%% TEMA \usepackage{tikz} % \usepackage{blindtext} \usepackage{wrapfig} % also for pgfmathparse \def\numcompiti{1}%%% The number of versions \date{2013/3/22}%%% THE DATE IN THE FORMAT AAAA/M/D \def\Data{\longdate}%%% or \shortdate: the date in the heading \begin{document} \whiledo{\thevers<\numcompiti}{\stepvers \begin{test}[8] \begin{questions} \esercizi{question-v1, question-v2} \end{questions} \end{test} } \end{document}
Finally, if you want to see the results I obtain they are at pdf results
So, finally, if you have any idea on how to solve the problem with no boxes (without boxes the space is used better), you are welcome to say it. Thanks in advance.
\itemso your document is not supported by the package – David Carlisle Aug 31 '17 at 21:09