substance / texture

A visual editor for research.
MIT License
1k stars 83 forks source link

Lists #1314

Open JGilbert-eLife opened 5 years ago

JGilbert-eLife commented 5 years ago

Description

Authors should be able to organise textual content into lists.

User stories

Author

  1. As an author, I want to be able to create an ordered/numbered list so that I can organise my content for ease of reading.
  2. As an author, I want to be able to create an unordered/bulleted list so that I can organise my content for ease of reading.
  3. As an author, I want to be able to change the style of bullet-point used for an unordered list so that I can pick the most appropriate option (circle, square, arrow etc).
  4. As an author, I want to be able to change the style of numbering used for an ordered list so that I can pick the most appropriate option (numbers, Roman numerals, letters etc).
  5. As an author, I want to be able to indicate when a new numbered list is a continuation of a previous list (following some normal text), so that I can organise my content for ease of reading.
  6. As an author, I want to be able to start a new list within a list item so that I can add sub-points.

But what if . . . ?

Consideration

XML requirements

The list element should be used. The list-item element should be used for each entry. The type of list is determined by the @list-type attribute. Allowed @list-type values can be seen here.

Sub-lists should be marked up by placing list as a child of list-item.

<list list-type="bullet">
        <list-item><p>First entry</p>
            <list list-type="bullet">
                <list-item><p>First sub-entry</p></list-item>
                <list-item><p>Second sub-entry</p>
                    <list list-type="bullet">
                        <list-item><p>First sub-sub-entry</p></list-item>
                        <list-item><p>Second sub-sub-entry</p></list-item>
                    </list>
                </list-item>
            </list>
        </list-item>
        <list-item><p>Second entry</p></list-item>
    </list>

List continuation

Sometimes a list may be interrupted by other material that is not part of the list. In that case, the list should be marked up as two (or more) lists, and each one except the first should use the attribute @continued-from the value being the id of the previous list.

Example:

<list id="list-1" list-type="order">
        <list-item><p>First entry</p></list-item>
</list>
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nunc faucibus</p>
<list id="list-2" list-type="order" continued-from="list-1">
        <list-item><p>second entry</p></list-item>
</list>

Mock ups

Proposal