Skip to content

Commit

Permalink
add exercise, problem, solution, and rule
Browse files Browse the repository at this point in the history
  • Loading branch information
philschatz committed Apr 27, 2014
1 parent 7fecaf7 commit 083380d
Showing 1 changed file with 79 additions and 0 deletions.
79 changes: 79 additions & 0 deletions specification.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -300,6 +300,85 @@ Did you know that in Boston, they call it "soda", and in Chicago, they call it "
</div>
----

==== Exercise

*HTML element*: +<div>+

*Attribute requirements*: +data-type="exercise"+

*Content model*: Zero or one ++<div data-type="title">++ followed by one or more Problem elements, followed by zero or more Solution elements

*Example*:

----
<div data-type="exercise">
<div data-type="title">Force on a Block</div>
<div data-type="problem">If a block has a mass of 2kg ...</div>
<div data-type="solution">3 Newtons</div>
</div>
----


===== Problem

*HTML element*: +<div>+

*Attribute requirements*: +data-type="problem"+

*Content model*: Either of the following content models is acceptable:

* text and/or zero or more Inline elements
* Zero or one ++<div data-type="title">++ followed by zero or more Block elements

*Example*:

----
<div data-type="problem">If a block has a mass of 2kg ...</div>
<div data-type="problem">
<div data-type="title">Find the Force</div>
<p>If a block has a mass of 2kg ...</p>
</div>
----

===== Solution

*HTML element*: +<div>+

*Attribute requirements*: +data-type="solution"+

*Content model*: Either of the following content models is acceptable:

* text and/or zero or more Inline elements
* Zero or more Block elements

*Example*:

----
<div data-type="solution">2 Newtons</div>
----


==== Rule

*HTML element*: +<div>+

*Attribute requirements*: +data-type="rule"+

*Content model*: Zero or one ++<div data-type="title">++ followed by zero or more Statement elements, followed by zero or more Proof elements

*Example*:

----
<div data-type="exercise">
<div data-type="title">Force on a Block</div>
<div data-type="problem">If a block has a mass of 2kg ...</div>
<div data-type="solution">3 Newtons</div>
</div>
----


==== Code listings

*HTML element*: +<pre>+
Expand Down

1 comment on commit 083380d

@kathi-fletcher
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Problem/Solution I think have some supported classes that we should add in explicitly. From the editor I see "homework", "problem", "question", "task", and "worked example". They may be a bit random.

And the example for rule is still the exercise example. And I guess also that you need to add statement and proof.

Please sign in to comment.