# Tag Info

9

Load babel and use the desired localization (whether as a global option for the class or as local option for babel (in this case load exsheets after babel)): \documentclass[spanish]{article} \usepackage[utf8]{inputenc} \usepackage{babel} \usepackage{exsheets} \begin{document} \begin{question} ¿Cómo te llamas? \end{question} \end{document} In a ...

8

\setcounter{question}{99} You could guess it is question or it may be documented or you could look in the log where every counter allocation is logged: \c@question=\count146

7

You don't need any complicated conditionals. The “question class” concept and the option use-<classes>=... should actually suffice. If I understand correctly in the handout version you only want to print questions with user=b while in the other version both user=b and user=t may be printed? Then you can use \SetupExSheets{use-users={b}} in the ...

6

exsheets reads the body of the question environment as argument, hence you can't use &, but you can use ampersand replacement=\&. \documentclass{article} \pagestyle{empty}% for cropping \usepackage{exsheets} \usepackage{tikz} \usetikzlibrary{matrix} \begin{document} \begin{question} \begin{tikzpicture} \matrix (magic) [ampersand ...

6

With v0.11 (2013/11/20) you can retrieve the value of a class defined with \DeclareQuestionClass that a question has with the commands \GetQuestionClass{<class>} and \PrintQuestionClassTF{<class>}{<true>}{<false>}. While the first simply expands to the value (or nothing if the value is empty or doesn't exist) the second on either ...

6

You can define an interface to \vary{\SI{12345}{m}}{\SI{23456}{m}} \documentclass[a4paper]{article} \usepackage[per=frac,decimalsymbol=comma,expproduct=cdot]{siunitx} \usepackage[load-headings,load-tasks,]{exsheets} \ExplSyntaxOn \NewDocumentCommand{\varySI}{mm} {% #1 are the values, #2 is the unit \uzsolt_vary_si:nn { #1 } { #2 } } \tl_new:N ...

5

Update 2013/10/29 Since version v0.10 (2013/10/24) exsheets bundles an new package, exsheets-listings, that has been build upon the answer proposed earlier. With it the syntax of two provided environments is a little different than with the code below: \begin{lstquestion}[<options>] <listing> \end{lstquestion} The <options> allow ...

5

The problem is quite obvious once you know what it is. Suppose you define a macro \def\foo[#1](#2){...} and use it like \foo[1] (2) You get an error Runaway argument? 1] (2) ! Paragraph ended before \foo was complete. because it keeps looking for ]( and never finds it. The same thing is happening here. The lines of the join and attach keys ...

5

In order for exsheets to be able to define its solution environment you need to “delete” beamer's solution environment by letting the macro \solution to \relax: \let\solution\relax If you also want to be able to use beamer's solution environment alongside exsheets you'd need to save the macros \solution and \endsolution first: ...

4

You can take shelter under \before key and do some math: \usepackage{calc} \newlength{\mylen} \setlength{\mylen}{\widthof{1.1.~}} \usepackage[inline]{enumitem} \newlist{choices}{enumerate*}{1} \setlist[choices]{itemjoin = \hspace{0.75in},before=\noindent\hspace{\mylen},label=(\Alph*)} Code: \documentclass[11pt, twoside]{article} \usepackage[top=1in, ...

4

Indeed in \SetQuestionProperties{ section-title = \secName } the macro \secName needs to be expanded once. Otherwise the question property section-title is set to the token \secName it is only expanded when used in \printsolutions where its current definition is Answers (which is what you're seeing in your example). A usual way to expand a token before is ...

4

You can use two things: exsheets headings are defined with the help of the xtemplate package. They have lot's of hooks that can be used to customize them. Here you'll want the number-post-code hook. The options of the question environments are set in the module exsheets/question with l3keys. New options are easily added. Here's the complete code for an ...

4

I admit that the documentation of tasks doesn't make this fact very clear (I'll add something to the next version): the {tasks} environment only looks like a list environment because semantically it is a list. Internally it is no list in the LaTeX sense, i.e. it doesn't use a {list}. The main purpose of it is not to list it's items with a), b), ... That ...

4

If you want to place all appearances of points in parentheses (i.e. also those created with \pointssum and friends) you can define a command \newcommand*\pointsformat[1]{(#1)} and then set the option \SetupExSheets{ points/format = \pointsformat } If you only want to place the points in the margin in parentheses you need to modify the headings ...

4

The list you want is possible using the inline-nr headings instance and with setting \exsheets_par: equal to \scan_stop:. The second point prevents exsheets from a) inserting a \par after its environments and b) inserting vertical space after the \par. This is an undocumented feature but built-in extra for this purpose. I'll add an official user interface ...

4

There is no automatic solution. You can however define a question property subpoints and with a suitable definition of a command \subpoints and a suitable built of the grade table we can get maybe something usable. The code below gives the following grade table: Questions are entered similar to \begin{question} \begin{tasks} \task \subpoints{1} ...

3

@Jubobs keeps me busy :) Version 0.12 2013/12/02 (arrived in TeX Live today) implements the options label-format - the format of the automatically placed label when the auto-label option is used. #1 is replaced with the questions ID. Default: qu:#1 label-cmd - the command used for creating the label. This command should have one mandatory argument (and of ...

3

If I were doing something like this in ConTeXt, I would use buffers to store verbatim text, and use a key-value driven interface to specify the pre and post arguments. The gist of the following code should be understandable even if you don't use ConTeXt. \definenamespace [exercisesolution] [ name=exercisesolution, setup=yes, ] ...

3

That's a bug in exsheets. If no explicit IDs are given to the questions the option random=<num> to \includequestions currently selects no questions at all. Solution: either assign IDs to all questions, get the fixed version of exsheets.sty on the bitbucket site, or wait a few days until I uploaded it to CTAN and it is available in MiKTeX and TeX Live.

3

This is a known issue. The file unicode-math-table.tex that is loaded by unicode-math contains the following line: \UnicodeMathSymbol{"0003F}{\question}{\mathord}{question mark}% This means that at begin document \question gets defined or redefined (unicode-math does \AtBeginDocument{\um_define_math_chars:} which supposedly initiates the definition...) ...

3

You can box your listing first, and then use the box in questions and/or solutions: \documentclass{article} \usepackage{xcolor} \usepackage{listings} \usepackage{exsheets} \lstset{ frame=single, xleftmargin=20pt, numbers=left, numberstyle=\small, tabsize=2, breaklines, showspaces=false, showstringspaces=false, language=C, basicstyle=\small\ttfamily, ...

3

You want the heading instance empty: \documentclass{article} \usepackage[load-headings]{exsheets} \SetupExSheets{ headings=empty, points/name=points } \begin{document} \section*{} \begin{enumerate} \item Limits: \begin{enumerate} \item \begin{question} foo \end{question} \item \begin{question} bar ...

3

This is an “illegal” answer, as the code I propose relies on defining a variant of an internal command. The answer is so mainly aimed to give ideas to the package developer. I define a command \DeclareQuestionPropertyFixed that takes as arguments a property name and the variable from which the value should be obtained from, in this case ...

2

It is very plausible to achieve such things in LaTeX, but if you are comfortable with Unix systems, I would rather recommand to rely on shell scripts and makefiles to generate exercise sheets. Walking the TeX way I (almost) started my education in computer science with assembly language and, while it might sound surprising, I find this experience ...

2

That's not a problem of the exsheets package but an issue with the tasks package that is loaded by exsheets and is distributed as part of the exsheets bundle. It didn't take a non-zero \listparindent into account. This is fixed in tasks v0.9b 2013/12/03 (arrived in TeX Live today): \documentclass[12pt]{amsbook} \usepackage{tasks}[2013/12/02] ...

2

cgnieder has provided a good idea in comment, here is a code that implemented it: \documentclass[preview,border=12pt,varwidth]{standalone} \usepackage{mathtools} \usepackage{exsheets} \SetupExSheets { question/name=Question, solution/name=Answer, solution/print=true, } \begin{document} \newbox\solboxone \setbox\solboxone\vbox{ ...

1

You're missing a pair of braces: \printsolutions[section={\S{sec:AA}}] But unfortunately I didn't foresee the wish to print solutions section-wise in a document with chapters so this won't work... (you could make a feature request on Bitbucket, though :) ). The problem will be that in different chapters sections have the same section numbers so with the ...

1

Since version 0.10 (2013/10/24) exsheets comes with an additional package called exsheets-listings which provides the environments lstquestion and lstsolution that can be used: \documentclass{article} \usepackage{xcolor} \usepackage{listings} \usepackage{exsheets} \usepackage{exsheets-listings} \lstdefinestyle{mystyle}{ frame=single, xleftmargin=20pt, ...

1

Something like this? \documentclass{article} \usepackage{exsheets} \SetupExSheets{headings = empty} \usepackage{parskip} \settasks{ % the next two should be set to the same value so labels are aligned to the % left label-width = 1em , item-indent = 1em , before-skip = -\parskip , % undo paragraph skip after-skip = -\parskip , % undo paragraph ...

1

One possibility – the only one I can think of right now – is using \PrintSolutionT (mentioned in section 11 of the manual, the explanation there is wrong, though...). \PrintSolutionT{<true code>} and its siblings \PrintSolutionTF{<true code>}{<false code>} and \PrintSolutionF{<false code>} check if the option solution/print has been ...

Only top voted, non community-wiki answers of a minimum length are eligible