emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Marcin Borkowski <mbork@wmi.amu.edu.pl>
To: "emacs-orgmode@gnu.org" <emacs-orgmode@gnu.org>
Subject: How to extend the HTML exporter for e-learning stuff
Date: Sun, 28 Sep 2014 01:07:05 +0200	[thread overview]
Message-ID: <87ppegirxi.fsf@wmi.amu.edu.pl> (raw)

Hi list,

some time ago i asked about extending the exporter, but I did not
experiment with it yet.  Now the time has come - I'll need to generate
some HTML + CSS + JS e-learning materials, and I want to do it with
Org-mode.  I think I'll manage the CSS and JS parts, but what gets
tricky is the HTML part: I'd like to minimize hassle.

Assume that I want to have a multiple choice test.  What I want to
obtain is e.g. this:

<div class="mct" id="q1">
  <div class="question">
    Which text editors are reasonable?
  </div>
  <div class="answer-right">
    Emacs
  </div>
  <div class="answer-right">
    Vim
  </div>
  <div class="answer-wrong">
    Notepad
  </div>
  <div class="answer-wrong">
    Microsoft Word
  </div>
</div>

Now I know that I can obtain all of this using properties like
:HTML_CONTAINER_CLASS: and :CUSTOM_ID:, but this seems very cumbersome.

So, my question is twofold.  First, what would you suggest as the input
(on the Org side)?  In other words, are there any ideas of how to
mark-up the semantics of a mct in Org-mode?  Here's one of my attempts:

================================================================
* Which text editors are reasonable?					:mct:
** Emacs								:yes:
** Vim									:yes:
** Notepad								 :no:
** Microsoft Word							 :no:
================================================================

(based on tags).  (I think tags are better than properties here, since
they are more easily visible in the Org source.)

Here's another one:

================================================================
* Which text editors are reasonable?
:PROPERTIES:
:test-type: mct
:END:
- [X] Emacs
- [X] Vim
- [ ] Notepad
- [ ] Microsoft Word
================================================================

Both seem to have one disadvantage: long questions = long headings,
which looks bad.

And yet another, completely different:

================================================================
* Question on text editors						:mct:
** Question
Which text editors are reasonable?
** Right answer
Emacs
** Right answer
Vim
** Wrong answer
Notepad
** Wrong answer
Microsoft Word
================================================================

Any other ideas?

Second, how to extend the exporter to get what I want?  (I don't want
anyone to code that for me, just a general reading guideline so that I
can get my hands dirty and ask more specific questions later.)

TIA,

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

                 reply	other threads:[~2014-09-27 23:07 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87ppegirxi.fsf@wmi.amu.edu.pl \
    --to=mbork@wmi.amu.edu.pl \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).