From mboxrd@z Thu Jan 1 00:00:00 1970 From: John Kitchin Subject: Re: Extending the Org syntax by a custom exporter - how to do it? Date: Sat, 15 Mar 2014 07:10:31 -0400 Message-ID: References: <20140315111059.00d3b8e0@aga-netbook> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=001a11343f94197a0104f4a33cd5 Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:35573) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WOmU7-0001Kg-Vi for emacs-orgmode@gnu.org; Sat, 15 Mar 2014 07:10:37 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WOmU6-0002KP-A4 for emacs-orgmode@gnu.org; Sat, 15 Mar 2014 07:10:35 -0400 Received: from mail-pa0-x232.google.com ([2607:f8b0:400e:c03::232]:38900) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WOmU5-0002KH-OV for emacs-orgmode@gnu.org; Sat, 15 Mar 2014 07:10:34 -0400 Received: by mail-pa0-f50.google.com with SMTP id kq14so3732135pab.37 for ; Sat, 15 Mar 2014 04:10:32 -0700 (PDT) In-Reply-To: <20140315111059.00d3b8e0@aga-netbook> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Marcin Borkowski Cc: Org-mode mailing list --001a11343f94197a0104f4a33cd5 Content-Type: text/plain; charset=ISO-8859-1 I suggest you look into the acrotex package (http://www.acrotex.net/) which has good support for tests. You can use the regular latex exporter with that. John ----------------------------------- John Kitchin Associate Professor Doherty Hall A207F Department of Chemical Engineering Carnegie Mellon University Pittsburgh, PA 15213 412-268-7803 http://kitchingroup.cheme.cmu.edu On Sat, Mar 15, 2014 at 6:10 AM, Marcin Borkowski wrote: > Hi list, > > I'd like to extend the LaTeX exporter to be able to prepare tests with > Org-mode. Four basic kinds of tests I'm thinking about are: single > choice test, multiple choice test, cloze test and an "open" question > (where the expected answer is, say, at most 5 lines of text). It > would enable the user to typeset both the test for students and an > answer sheet for the teacher to facilitate grading. (If - and when - I > succeed in doing this, next logical step is preparing HTML/Javascript > tests from the same Org-mode source.) I have a few questions, though. > > 1. Is it possible to employ syntax like ____{noon|midday} to denote a > cloze with two possible answers? It might get translated to LaTeX as > e.g. \cloze{{noon},{midday}} or similar, and a LaTeX package would > take care to typeset this correctly. Is there any similar thing (i.e., > an exporter built on some existing one) so that I can look at an > example of code doing such thing? > > 2. What would you suggest as the input format on the Org side of > things? My suggestion for the cloze syntax is shown above (let us > assume that at least two or three underscores are needed to > distinguish this from subscript, and some form of escaping the pipe > symbol and braces might be necessary. Alternatively, it might be > configurable to use e.g. ____[noon/midday] (or other characters). > > What about SCTs/MCTs? My idea would be to employ plain lists with > checkboxes - they seem to be pretty useless outside Org-mode anyway, > and I imagine that it could be something like this: > > #+ > - [ ] wrong answer > - [X] good answer > - [X] another good answer > - [ ] a completely stupid answer > > As for "open" questions, I have no good idea. Maybe something like > > #+LINES: 5 > > but what about example answers (for the teacher grading the test)? > Maybe it would be better to say: > #+BEGIN_ANSWER > (Here goes the right answer.) > #+END_ANSWER, > > but is it possible to pass a parameter (number of lines) to > #+BEGIN_ANSWER? > > 3. Bonus question: would there be any demand (apart from myself) for > such an exporter? > > What do you think? > > -- > Marcin Borkowski > http://octd.wmi.amu.edu.pl/en/Marcin_Borkowski > Adam Mickiewicz University > > --001a11343f94197a0104f4a33cd5 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
I suggest you look into the acrotex package (http://www.acrotex.net/) which has good support = for tests. You can use the regular latex exporter with that.

John

-----------------------------------
J= ohn Kitchin
Associate Professor
Doherty Hall A207F
Department of C= hemical Engineering
Carnegie Mellon University
Pittsburgh, PA 15213 412-268-7803
http://kitchingroup.cheme.cmu.edu



On Sat, Mar 15, 2014 at 6:10 AM, Marcin = Borkowski <mbork@wmi.amu.edu.pl> wrote:
Hi list,

I'd like to extend the LaTeX exporter to be able to prepare tests with<= br> Org-mode. =A0Four basic kinds of tests I'm thinking about are: single choice test, multiple choice test, cloze test and an "open" quest= ion
(where the expected answer is, say, at most 5 lines of text). =A0It
would enable the user to typeset both the test for students and an
answer sheet for the teacher to facilitate grading. (If - and when - I
succeed in doing this, next logical step is preparing HTML/Javascript
tests from the same Org-mode source.) =A0I have a few questions, though.
1. Is it possible to employ syntax like ____{noon|midday} to denote a
cloze with two possible answers? =A0It might get translated to LaTeX as
e.g. \cloze{{noon},{midday}} or similar, and a LaTeX package would
take care to typeset this correctly. =A0Is there any similar thing (i.e., an exporter built on some existing one) so that I can look at an
example of code doing such thing?

2. What would you suggest as the input format on the Org side of
things? =A0My suggestion for the cloze syntax is shown above (let us
assume that at least two or three underscores are needed to
distinguish this from subscript, and some form of escaping the pipe
symbol and braces might be necessary. =A0Alternatively, it might be
configurable to use e.g. ____[noon/midday] (or other characters).

What about SCTs/MCTs? =A0My idea would be to employ plain lists with
checkboxes - they seem to be pretty useless outside Org-mode anyway,
and I imagine that it could be something like this:

#+<SOME MAGICAL LINE MEANING: THIS IS A MULTIPLE CHOICE TEST>
- [ ] wrong answer
- [X] good answer
- [X] another good answer
- [ ] a completely stupid answer

As for "open" questions, I have no good idea. =A0Maybe something = like

#+LINES: 5

but what about example answers (for the teacher grading the test)?
Maybe it would be better to say:
#+BEGIN_ANSWER
(Here goes the right answer.)
#+END_ANSWER,

but is it possible to pass a parameter (number of lines) to
#+BEGIN_ANSWER?

3. Bonus question: would there be any demand (apart from myself) for
such an exporter?

What do you think?

--
Marcin Borkowski
http://octd.wmi.amu.edu.pl/en/Marcin_Borkowski
Adam Mickiewicz University


--001a11343f94197a0104f4a33cd5--