## LaTeX forum ⇒ General ⇒ Formatting a page with many small math problems Topic is solved

LaTeX specific issues not fitting into one of the other forums of this category.
Johannes_B
Site Moderator
Posts: 3551
Joined: Thu Nov 01, 2012 4:08 pm

### Re: Formatting a page with many small math problems

Did i understand you correct? You want the numbering scheme to be question.task)?

Certainly doable, but it will make everything look crowded and i guess your students will get the grips with current numbering scheme.
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.

Tags:

Stefan Kottwitz
Posts: 8460
Joined: Mon Mar 10, 2008 9:44 pm
Location: Hamburg, Germany
Contact:
Xiphias wrote:that did not do anything it seems.

I don't have your code so I cannot test it. Your code example from above is different and it doesn't contain a question counter. Perhaps post an updated minimal example with the current status.

Stefan

Xiphias
Posts: 12
Joined: Thu Aug 13, 2015 9:02 am
I want the nice environment of tasks in terms of spacing and being able to sort problems without having to change any numbers, but I would like to be able to have the questions be numbered according to sections as this will end up as a longer compendium.

Here is some current minimal code:

\documentclass[14pt,norsk,a4paper,twoside,article]{memoir}\usepackage{libertine}\usepackage[utf8]{inputenc}\usepackage[T1]{fontenc}\usepackage{babel,graphicx,varioref}\usepackage{libertine}\usepackage{exsheets}\usepackage{amsmath}\numberwithin{question}{section}\renewcommand*{\thequestion}{\thesection.\arabic{question}}\SetupExSheets{headings-format={\normalsize\sffamily}}\usepackage{tasks}\settasks{label-format={\sffamily}}\DeclareSymbolFont{letters}{OML}{ztmcm}{m}{it}\DeclareSymbolFontAlphabet{\mathrm}{letters}\title{Oppgaver 2P}\begin{document}\chapter{Potenser og tall på Standardform}\section{Negative tall}\subsection{Addisjon}\begin{question}\begin{tasks}(3)\task  $2+(-1)$ \task $2-3$\task $1-3$ \task $-3+4$\task $-5+2$ \task $-1-4$ \end{tasks}\end{question} \begin{question}\begin{tasks}(3)\task $-2+3-2$ \task $5-1-2$ \task $3-4-1$ \task $-5+1-5$ \task $3+2-1-3$ \task $-3+(-1)-2+5$\end{tasks}\end{question} \subsection{Multiplikasjon}\begin{question}\begin{tasks}(3)\task $3\cdot(-2)$ \task $(-2)\cdot 2$ \task $(-4)\cdot (-2)$\task $(-3)\cdot 2\cdot (-1)$ \task $3\cdot 1 \cdot (-1)$ \task $(-1)\cdot (-2) \cdot (-3)$\end{tasks}\end{question} \end{document}

(maybe not so minimal after all...)

Johannes_B
Site Moderator
Posts: 3551
Joined: Thu Nov 01, 2012 4:08 pm
Like this?
\documentclass[14pt,norsk,a4paper,twoside,article]{memoir}\usepackage{libertine}\usepackage[utf8]{inputenc}\usepackage[T1]{fontenc}\usepackage{babel,graphicx,varioref}\usepackage{libertine}\usepackage{exsheets}\SetupExSheets{headings-format={\normalsize\sffamily},counter-within=section}%\DeclareTranslation{Norsk}{exsheets-exercise-name}{}\usepackage{tasks}\settasks{label-format={\sffamily}}\DeclareSymbolFont{letters}{OML}{ztmcm}{m}{it}\DeclareSymbolFontAlphabet{\mathrm}{letters}\title{Oppgaver 2P}\begin{document}\chapter{math stuff} \section{Addisjon} Regn ut% \\%Don't do that \begin{question}\begin{tasks}(4)\task  $2+(-1)$ \task $2-3$\task $1-3$ \task $-3+4$\task $-5+2$ \task $-1-4$ \end{tasks}\end{question} \begin{question}{6}\begin{tasks}(3)\task $-2+3-2$ \task $5-1-2$ \task $3-4-1+1-1+1-1+1-1$ \task $-5+1-5$ \task $3+2-1-3$ \task $-3+(-1)-2+5$%\\%Don't do that\end{tasks}\end{question} \section{Multiplikasjon} Regn ut% \\%Argh\begin{question}\begin{tasks}\task $3\cdot(-2)$ \task $(-2)\cdot 2$ \task $(-4)\cdot (-2)$\task $(-3)\cdot 2\cdot (-1)$ \task $3\cdot 1 \cdot (-1)$ \task $(-1)\cdot (-2) \cdot (-3)$\end{tasks}\end{question} \end{document}
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.

cgnieder
Site Moderator
Posts: 1974
Joined: Sat Apr 16, 2011 7:27 pm
Location: Germany
Contact:
Stefan_K wrote:
\numberwithin{question}{section}

The exsheets package also has
\SetupExSheets{   counter-within = section}

In order to see the questions/exercises numbered 1.1, 1.2, etc one also needs to set the counter format accordingly:

\documentclass{article}\usepackage{exsheets} \SetupExSheets{   counter-within = section ,   counter-format = se.qu} \begin{document} \section{Foo}\begin{question}   first one\end{question}\begin{question}   second one\end{question} \end{document}

The tasks environment could be used to get sub-questions inside a main question:
\documentclass{article}\usepackage{exsheets,tasks} \SetupExSheets{   counter-within = section ,   counter-format = se.qu} \begin{document} \section{Foo} \begin{question}   \begin{tasks}(4)     \task one     \task two     \task three     \task four   \end{tasks}\end{question} \begin{question}   \begin{tasks}(4)     \task one     \task two     \task three     \task four   \end{tasks}\end{question} \end{document}

exsheets.png (12.23 KiB) Viewed 2103 times

Regards
Clemens
------------------------------
chemmacros · chemformula · leadsheets · xsim

Xiphias
Posts: 12
Joined: Thu Aug 13, 2015 9:02 am
That worked

Thanks for all the help from all of you!