LaTeX forum ⇒ GeneralFormatting a page with many small math problems Topic is solved

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

Re: Formatting a page with many small math problems

Postby Johannes_B » Fri Aug 14, 2015 1:14 pm

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:

User avatar
Stefan Kottwitz
Site Admin
Posts: 8460
Joined: Mon Mar 10, 2008 9:44 pm
Location: Hamburg, Germany
Contact:

Postby Stefan Kottwitz » Fri Aug 14, 2015 1:20 pm

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
Site admin

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

Postby Xiphias » Fri Aug 14, 2015 2:43 pm

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:

  1. \documentclass[14pt,norsk,a4paper,twoside,article]{memoir}
  2. \usepackage{libertine}
  3. \usepackage[utf8]{inputenc}
  4. \usepackage[T1]{fontenc}
  5. \usepackage{babel,graphicx,varioref}
  6. \usepackage{libertine}
  7. \usepackage{exsheets}
  8. \usepackage{amsmath}
  9. \numberwithin{question}{section}
  10. \renewcommand*{\thequestion}{\thesection.\arabic{question}}
  11. \SetupExSheets{headings-format={\normalsize\sffamily}}
  12. \usepackage{tasks}
  13. \settasks{label-format={\sffamily}}
  14. \DeclareSymbolFont{letters}{OML}{ztmcm}{m}{it}
  15. \DeclareSymbolFontAlphabet{\mathrm}{letters}
  16. \title{Oppgaver 2P}
  17. \begin{document}
  18. \chapter{Potenser og tall på Standardform}
  19. \section{Negative tall}
  20. \subsection{Addisjon}
  21. \begin{question}
  22. \begin{tasks}(3)
  23. \task $2+(-1) $
  24. \task $2-3 $
  25. \task $1-3 $
  26. \task $-3+4 $
  27. \task $-5+2 $
  28. \task $-1-4 $
  29. \end{tasks}
  30. \end{question}
  31.  
  32. \begin{question}
  33. \begin{tasks}(3)
  34. \task $-2+3-2 $
  35. \task $5-1-2 $
  36. \task $3-4-1 $
  37. \task $-5+1-5 $
  38. \task $3+2-1-3 $
  39. \task $-3+(-1)-2+5 $
  40. \end{tasks}
  41. \end{question}
  42.  
  43. \subsection{Multiplikasjon}
  44. \begin{question}
  45. \begin{tasks}(3)
  46. \task $3\cdot(-2) $
  47. \task $(-2)\cdot 2 $
  48. \task $(-4)\cdot (-2) $
  49. \task $(-3)\cdot 2\cdot (-1) $
  50. \task $3\cdot 1 \cdot (-1) $
  51. \task $(-1)\cdot (-2) \cdot (-3)$
  52. \end{tasks}
  53. \end{question}
  54.  
  55. \end{document}


(maybe not so minimal after all...)

User avatar
Johannes_B
Site Moderator
Posts: 3551
Joined: Thu Nov 01, 2012 4:08 pm

Postby Johannes_B » Fri Aug 14, 2015 3:49 pm

Like this?
  1. \documentclass[14pt,norsk,a4paper,twoside,article]{memoir}
  2. \usepackage{libertine}
  3. \usepackage[utf8]{inputenc}
  4. \usepackage[T1]{fontenc}
  5. \usepackage{babel,graphicx,varioref}
  6. \usepackage{libertine}
  7. \usepackage{exsheets}
  8. \SetupExSheets{headings-format={\normalsize\sffamily},counter-within=section}
  9. %\DeclareTranslation{Norsk}{exsheets-exercise-name}{}
  10. \usepackage{tasks}
  11. \settasks{label-format={\sffamily}}
  12. \DeclareSymbolFont{letters}{OML}{ztmcm}{m}{it}
  13. \DeclareSymbolFontAlphabet{\mathrm}{letters}
  14. \title{Oppgaver 2P}
  15. \begin{document}
  16. \chapter{math stuff}
  17.  
  18. \section{Addisjon} Regn ut% \\%Don't do that
  19.  
  20. \begin{question}
  21. \begin{tasks}(4)
  22. \task $2+(-1) $
  23. \task $2-3 $
  24. \task $1-3 $
  25. \task $-3+4 $
  26. \task $-5+2 $
  27. \task $-1-4 $
  28. \end{tasks}
  29. \end{question}
  30.  
  31. \begin{question}{6}
  32. \begin{tasks}(3)
  33. \task $-2+3-2 $
  34. \task $5-1-2 $
  35. \task $3-4-1+1-1+1-1+1-1 $
  36. \task $-5+1-5 $
  37. \task $3+2-1-3 $
  38. \task $-3+(-1)-2+5 $
  39. %\\%Don't do that
  40. \end{tasks}
  41. \end{question}
  42.  
  43. \section{Multiplikasjon} Regn ut% \\%Argh
  44. \begin{question}
  45. \begin{tasks}
  46. \task $3\cdot(-2) $
  47. \task $(-2)\cdot 2 $
  48. \task $(-4)\cdot (-2) $
  49. \task $(-3)\cdot 2\cdot (-1) $
  50. \task $3\cdot 1 \cdot (-1) $
  51. \task $(-1)\cdot (-2) \cdot (-3)$
  52. \end{tasks}
  53. \end{question}
  54.  
  55. \end{document}
  56.  
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.

User avatar
cgnieder
Site Moderator
Posts: 1974
Joined: Sat Apr 16, 2011 7:27 pm
Location: Germany
Contact:

Postby cgnieder » Fri Aug 14, 2015 3:57 pm

Stefan_K wrote:
  1. \numberwithin{question}{section}


The exsheets package also has
  1. \SetupExSheets{
  2. counter-within = section
  3. }


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

  1. \documentclass{article}
  2. \usepackage{exsheets}
  3.  
  4. \SetupExSheets{
  5. counter-within = section ,
  6. counter-format = se.qu
  7. }
  8.  
  9. \begin{document}
  10.  
  11. \section{Foo}
  12. \begin{question}
  13. first one
  14. \end{question}
  15. \begin{question}
  16. second one
  17. \end{question}
  18.  
  19. \end{document}


The tasks environment could be used to get sub-questions inside a main question:
  1. \documentclass{article}
  2. \usepackage{exsheets,tasks}
  3.  
  4. \SetupExSheets{
  5. counter-within = section ,
  6. counter-format = se.qu
  7. }
  8.  
  9. \begin{document}
  10.  
  11. \section{Foo}
  12.  
  13. \begin{question}
  14. \begin{tasks}(4)
  15. \task one
  16. \task two
  17. \task three
  18. \task four
  19. \end{tasks}
  20. \end{question}
  21.  
  22. \begin{question}
  23. \begin{tasks}(4)
  24. \task one
  25. \task two
  26. \task three
  27. \task four
  28. \end{tasks}
  29. \end{question}
  30.  
  31. \end{document}


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

Postby Xiphias » Sun Aug 16, 2015 10:30 pm

That worked :)

Thanks for all the help from all of you!


Return to “General”

Who is online

Users browsing this forum: No registered users and 7 guests