Tag Info

Hot answers tagged

10

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


7

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


7

It is possible to wrap the question environment in a \tcolorboxenvironment redefinition. \documentclass{memoir} \usepackage{graphicx} \usepackage{exsheets} \usepackage[most]{tcolorbox} \begin{document} \tcolorboxenvironment{question}{colback=yellow} % 2nd arg is for tcolorbox options. \begin{question} Exercise text in a box \end{question} ...


6

You can define a new counter lecturecount and increment it through a \lecture command. Also, if you want the question counter to be reset at each lecture, load exsheets with the option counter-within = lecturecount. Finally, redefine the question title by redefining the question-solution pair in this way \RenewQuSolPair{question}[name=Lecture ...


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


6

Edit 2015/05/16: exsheets questions have a subtitle option (since v0.10, 2013/10/11). In order to use it one needs to activate a headings instance which uses subtitles: \documentclass{article} \usepackage{exsheets} \SetupExSheets{ headings = block-subtitle , subtitle-format = \bfseries % default is \itshape } \usepackage{kantlipsum} \begin{document} ...


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


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


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

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


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

Edit With version 0.19 (2015/07/04) the hack isn't necessary anymore. The following preamble to the code below suffices: \documentclass{article} \usepackage[auto-label]{exsheets}[2015/07/04] \DeclareInstance{exsheets-heading}{myblock}{default}{ attach = { main[l,vc]title[l,vc](0pt,0pt) ; main[r,vc]points[l,vc](\marginparsep,0pt) } , ...


4

The question and solution environments use internally the __exsheets_questions_internal: and __exsheets_solution_internal: environments that are defined with \NewEnviron from the environ package. The contents of an environment defined with \NewEnviron is absorbed as a macro argument, which makes any verbatim-like command or environment illegal inside it. ...


4

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


4

I was directed to this post because I also had a verbatim problem with exsheets. Some more google directed me to the package cprotect which is supposed to solved exactly the problem we are facing (using verbatim environments where they should not be usable :-)) I got working the original example with the addition of a \usepackage{cprotect} and putting a ...


4

Set leftmargin to a suitable value, e.g. 3.5cm. Also, the vertical space can be added directly into the enumerate options (before={\vspace*{-\baselineskip}}). MWE: \documentclass[12pt]{article} \usepackage[a4paper, top=3cm, bottom=3cm]{geometry} \usepackage{exsheets} \usepackage{enumitem} \begin{document} \SetupExSheets{headings=runin} \begin{question} ...


4

The \tasks are like items and the tasks environment support the resume option. So, you can write: \documentclass{article} \usepackage[utf8]{inputenc} \usepackage[load-tasks]{exsheets} \begin{document} \begin{question} Az $ABC$ hegyesszögű... \begin{tasks} \task Számítsa ki a $BC$ oldalhoz... \task Számítsa ki az $AB$... \end{tasks} ...


4

I've just (2015/07/04) sent an update of exsheets to CTAN which allows the following (recommended) solution: \SetupExSheets{ question/pre-hook = \begin{tcolorbox} , question/post-hook = \end{tcolorbox} } The update should be available in a few days in TeX Live and MiKTeX. If you don't want to wait: the updated version (v0.19) is also available here: ...


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


4

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


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


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


3

Use the package option counter-within=section in order to get a reset of the question counter each time a section starts (See chapter 8 of the exsheets documentation) \documentclass{article} \usepackage[counter-within=section]{exsheets} \begin{document} \section{One} \begin{question} This is question number 1 in section 1. \end{question} ...


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

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



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