Reputation: 1473
I want to use orgmode for writing a simple exam with a bunch of multiple choice questions. The structure I thought of was something like this:
* Multiple Choice
1. Who was the founder of rationalism?
a) Locke
b) Copernicus
c) Descartes
d) Plato
- C
2. Locke believed that simple ideas, as opposed to complex ideas, came from?
a) sensation
b) memory
c) reflection
d) faith
- A
Where the lowest level (after the dash) is the correct answer. My ideas was that I should be able to fold those up, and export only the visible text to have the test, and then export with the invisible text included to have an exam with a key. However, I have only been able to accomplish this by manually putting the cursor on the d) item and hitting tab. This is no problem for five or ten, but is tedious for hundreds. Is there a procedure to do this?
What I have tried so far is to set the org-cycle-include-plain-lists
to integrate, and then use various hide (or show) sublevels, but I never quite get the result I am looking for which would be like this:
* Multiple Choice
1. Who was the founder of rationalism?
a) Locke
b) Copernicus
c) Descartes
d) Plato...
2. Locke believed that simple ideas, as opposed to complex ideas, came from?
a) sensation
b) memory
c) reflection
d) faith...
Thanks,
Upvotes: 0
Views: 369
Reputation: 1473
While @MisterSpock 's answer works it removes the numbering of the questions, which is desirable in a test. Therefore, an alternative approach is to use drawers, which can be toggled for export in the options, e.g.
#+Options: d:nil
* Multiple Choice
1. Who was the founder of rationalism?
a) Locke
b) Copernicus
c) Descartes
d) Plato
:answer:
- C
:END:
2. Locke believed that simple ideas, as opposed to complex ideas, came from?
a) sensation
b) memory
c) reflection
d) faith
:answer:
- A
:END:
Upvotes: 1
Reputation: 1056
I was able to get what you were looking for by using tags. I had to place answers in different headline and tag them by doing C-c-C-q
#+EXCLUDE_TAGS: answer
* Multiple Choice
** Who was the founder of rationalism?
a) Locke
b) Copernicus
c) Descartes
d) Plato
*** C :answer:
** Locke believed that simple ideas, as opposed to complex ideas, came from?
a) sensation
b) memory
c) reflection
d) faith
*** A :answer:
Upvotes: 1