Tag Info

Hot answers tagged

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

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 ...


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

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 ...


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

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

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

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

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

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

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

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

@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

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 ...


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{ ...


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 ...


1

You can adapt the code from the linked question to get something similar to the table you posted. I commented the code below so it hopefully becomes clear what everything does. It produces this grade table: \documentclass[10pt,a4paper]{scrartcl} \usepackage[utf8]{inputenc} \usepackage[T1]{fontenc} \usepackage{lmodern} \usepackage[pass,showframe]{geometry} ...


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

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

Here is a possible workaround: the idea is to include the questions but hide them, i.e., print nothing. exsheets question properties then allow to print the needed parts selectively. Caution: The code below is a hack that uses internal functions so it may break in future versions of exsheets... In order to hide the questions when included a few hacks ...


1

The question is quite unclear to me. A basic example of what I think you want would look like this: \documentclass{article} \usepackage{exsheets} % declare a class `difficulties': \DeclareQuestionClass{difficulty}{difficulties} % the external file that holds the exercises \usepackage{filecontents} \begin{filecontents*}{my-exercises.tex} ...


1

Since v0.12 exsheets provides a possibility: a leading bang in the points argument to the question environment prevents parsing of the points: \documentclass{article} \usepackage{exsheets} \SetVariations{2} \begin{document} \variant{1} \section{Group A} \begin{question}{!\vary{2}{4}} What is the result of \vary{$2+3$}{$1231+4431$}? \end{question} ...



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