0

I have a problem with the line breaks using \blank from the xsim package.

As shown in the following picture the line breaks, even if there would be way enough space to finish it at both questions (and I do have way more in my document with the same problem so solving it by putting in \\ per hand isn't my preferred solution).

Also I was wondering if it shouldn't be able for \blank to break the lines between the words (not somewhere in the word)as it is possible to teach it to gap the underline at those points? (see for example here Is there a command for separated lines for each word in a \blank in xsim?) So that a blank for a single word doesn't break at all and blanks for more then one word break between the words.

MWE:

\documentclass[11pt,fleqn]{book}
\usepackage[clear-aux]{xsim}

\DeclareExerciseEnvironmentTemplate{item}
  {\item[\GetExerciseProperty{counter}]}
  {}

\xsimsetup{
    exercise/the-counter = \arabic{exercise}. , 
    blank/scale = {2},
    exercise/template=item,
    solution/template=item,
    path = {exercises}
}

\newenvironment{frag}
  {\description}
  {\enddescription}


\begin{document}


 \begin{frag}

     \begin{exercise} 
        The blind master acts as a \blank{happy bunny} to the whole team and kindergarden, advocating a holistic and longword approach to replacement.
    \end{exercise}

     \begin{exercise} 
         The blind scholar \blank{provides}, \blank{provides}, \blank{teaches}, and \blank{provides}.
     \end{exercise}



\end{frag}
\end{document}

  • The problem is using \blank inside a list like description and it is arguably a bug in the implementation of the command – clemens Sep 18 '17 at 14:00
  • @clemens I use it in the description as that is the way shown in the handbook and/or examples to get the look of a list for the exercises without the name. I tried it by declaring a template like \DeclareExerciseEnvironmentTemplate {test} {\GetExerciseProperty {counter} \nobreakspace}{} (not a nice look yet) instead of using the description environment. But trying this I have still similar line breaking problems. So to me it seems like having nothing to do with the description (even in the default environment is the same problem) (not with the first but with the second and others) – acep Sep 19 '17 at 15:02
2

This is fixed in v0.10 (2017/09/19) of xsim (at the cost of a somewhat cluttered log file):

\documentclass[11pt]{book}
\usepackage{xsim}

\xsimsetup{
  blank/scale = 2
}

\begin{document}

\begin{description}
  \item[1.] The blind master acts as a \blank{happy bunny} to the whole team and
    kindergarden, advocating a holistic and longword approach to replacement.
  \item[2.] The blind scholar \blank{provides}, \blank{provides}, \blank{teaches}, and
    \blank{provides}.
\end{description}

The blind master acts as a \blank{happy bunny} to the whole team and
kindergarden, advocating a holistic and longword approach to replacement.

The blind scholar \blank{provides}, \blank{provides}, \blank{teaches}, and
\blank{provides}.

\end{document}

enter image description here

  • super, that solves the first part of the problem. Thanks so far, do you have a solution for the second part of the question as well? Or should I perhaps post that as a separate question? – acep Oct 1 '17 at 15:41
  • The second “problem” sounds like a feature request but to be honest I didn't really understand it. Anyway, feature requests should be discussed on the github repository. – clemens Oct 1 '17 at 16:44
  • I specified the problem a bit, but yes it is rather a feature request and not shown in the examples. I will prepare a MWE and all when I have more time again. - But sorry I don't know anything about the github repository, what and where is that, that I can ask my question there? – acep Oct 7 '17 at 15:26
  • @acep it is the url on the first page of the manual and is also mentioned on CTAN's entry for xsim – clemens Oct 7 '17 at 16:18

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.