[Proposal] Simpler but expanded TML standard #2

Closed
opened 2022-10-10 12:13:55 +00:00 by emma · 0 comments

Introduction

TML should lessen the number of elements it uses. The way to do that is to implement markdown.

Markdown should have no effect outside of quotes. Only text that would be displayed or read with a screen reader should be placed in quotes.

Elements

The meta element should be implemented, which contains pertinent metadata about the document:

(meta :title "[Proposal] Simpler but expanded TML standard" :author "Emma Tebibyte" :lang en :license CC0)

If paragraph elements contain multiple quoted sections, they should concatenate:

(p "These " "parts " "all" " " "come" " together" ".")

Full paragraphs could be written with multiple separate elements:

(p "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut
    labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco
    laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in
    voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat
    non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.")
(p "Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque
    laudantium, totam rem aperiam, eaque ipsa quae ab illo inventore veritatis et quasi architecto
    beatae vitae dicta sunt explicabo. Nemo enim ipsam voluptatem quia voluptas sit aspernatur aut
    odit aut fugit, sed quia consequuntur magni dolores eos qui ratione voluptatem sequi nesciunt.
    Neque porro quisquam est, qui dolorem ipsum quia dolor sit amet, consectetur, adipisci velit,
    sed quia non numquam eius modi tempora incidunt ut labore et dolore magnam aliquam quaerat
    voluptatem. Ut enim ad minima veniam, quis nostrum exercitationem ullam corporis suscipit
    laboriosam, nisi ut aliquid ex ea commodi consequatur? Quis autem vel eum iure reprehenderit qui
    in ea voluptate velit esse quam nihil molestiae consequatur, vel illum qui dolorem eum fugiat
    quo voluptas nulla pariatur?")

or grouped into one:

(p ("Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut
     labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco
     laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in
     voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat
     non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.")
   ("Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque
     laudantium, totam rem aperiam, eaque ipsa quae ab illo inventore veritatis et quasi architecto
     beatae vitae dicta sunt explicabo. Nemo enim ipsam voluptatem quia voluptas sit aspernatur aut
     odit aut fugit, sed quia consequuntur magni dolores eos qui ratione voluptatem sequi nesciunt.
     Neque porro quisquam est, qui dolorem ipsum quia dolor sit amet, consectetur, adipisci velit,
     sed quia non numquam eius modi tempora incidunt ut labore et dolore magnam aliquam quaerat
     voluptatem. Ut enim ad minima veniam, quis nostrum exercitationem ullam corporis suscipit
     laboriosam, nisi ut aliquid ex ea commodi consequatur? Quis autem vel eum iure reprehenderit
     qui in ea voluptate velit esse quam nihil molestiae consequatur, vel illum qui dolorem eum
     fugiat quo voluptas nulla pariatur?"))

However, paragraph elements would never contain any named elements.

List elements should not require item elements:

(ul
    "item"
    "item"
    "item")

(ol
    "item1"
    "item2"
    "item3")

Definition lists should therefore be written as unordered lists with paragraph elements:

(ul
    (p :def "item")
    (p "definition")
    (p :def "item")
    (p "definition")
    (p :def "item")
    (p "definition"))

Styling of lists should be implicit in the layout of the element so an inline list without item decorations could be written as (ul "item" "item" "item") instead of the above. The source code for these could wrap as long as the first item starts on the first line of the element:

(ul "item that is very very long so that it forces the writer to line break for the next one"
    "item" "item" "item")

Some elements should be supported for accessibility.

For example, a contact element should be written like this:

(@ <user@example.com> +1(555)555-5555 "1 Example Lane, Somewhere, USA 11111")
E-mail addresses should be placed inside carets, phone numbers after a plus and the country code, and physical addresses within quotes.

Citation elements should be used to cite sources for information:

((p :id quote """
    Let us take two commodities such as a coat and 10 yards of linen, and let the former be double
    the value of the latter, so that, if 10 yards of linen = W, the coat = 2W.

    The coat is a use value that satisfies a particular want. Its existence is the result of a
    special sort of productive activity, the nature of which is determined by its aim, mode of
    operation, subject, means, and result. The labour, whose utility is thus represented by the
    value in use of its product, or which manifests itself by making its product a use value, we
    call useful labour. In this connection we consider only its useful effect.

    As the coat and the linen are two qualitatively different use values, so also are the two forms
    of labour that produce them, tailoring and weaving. Were these two objects not qualitatively
    different, not produced respectively by labour of different quality, they could not stand to
    each other in the relation of commodities. Coats are not exchanged for coats, one use value is
    not exchanged for another of the same kind.
    """)
(cite :label quote <https://www.marxists.org/archive/marx/works/1867-c1/ch01.htm> "Economic Manuscripts: Capital Vol. I - Chapter One"))

Note that the citation element should be placed below its :label target. If one shares its immediate parent with its :label target, that attribute could be left out.

Footer-style citations should be written using the same citation element:

(p "There is at least [one example][1] of HTML being used on a web page.")
((p "## Sources")
(cite [1] <https://example.com/> "Example Domain"))

Styling

Unique styling elements should be replaced with markdown:

(p "This text is ~~struckthrough~~, *italicized*, and _bold_.")

Hyperlinks and anchors should also be replaced:

(p "See [here](https://example.com "Title") for an example.")

As should headings:

(p "# Heading 1")

Since underlines cannot be made in markdown without HTML, I recommend styling as anchors without links:

(p "[This text is underlined]")

Code blocks should be a paragraph element with backticks instead of quotes:

(p "First, define a variable `var` with a value of `val`."
(p `let var = val`)
(p "Then, pass `var` into `func`, comparing the result to `foo`.")
(p ```
    if func(var) == foo {
        bar()
    }
   ```)

Block quotations should similarly be p elements but with triple quotes:

((p """
    Time am I, wreaker of the world’s destruction,
    Matured,—\[grimly\] resolved here to swallow up the worlds.
    Do what you will, all these warriors shall cease to be,
    Drawn up \[there\] in their opposing ranks.
    """
    (cite <https://www.waggish.org/2020/now-i-am-become-death-the-destroyer-of-worlds/>)
    (p "– R. C. Zaehner's 1966 translation of the *Bhagavad Gita*"))

Note that captions can be made by creating a paragraph element within the same group as the other elements.

Inline quotations should be written within two single quotes.

(p 'I\'m sorry, Dave. I\'m afraid I can\'t do that.')

Groups, such as heading groups, should be written without any explicit element declaration:

((p "# Heading 1")
 (p "This is a subheading!"))

Operators

Directional overrides are an important part of a markup language if it hopes to support multiple languages; these should be written using carets to mark the direction change:

(p "\"Oh I do like to be beside the seaside\" in Hebrew is written \"" < "אה, אני אוהב להיות ליד חוף הים" > "\" and is an example of a seaside song.")

A horizontal rule is the only kind of markdown supported outside of quotes. One is drawn between elements (or inside them) if three hyphens are placed in a row:

(p "text")
---
(p ("### heading3")
   ("text"))

Attributes

Identification of specific elements is important in any markup language that use anchors. In order to be identified, an element should have an :id attribute:

(p :id thing "This text is has the " (p :abbr "ID" "identification") " \"thing\"!")

Labels are an important part of the screen reader user's experience. They expand text's association with other elements from purely visual to programmatic; therefore, any paragraph element can have the :label attribute:

((p :id object "## Example Object")
 (p :label object "This sure is a thing!"))

When terms are being defined in-text, use the definition attribute to notate what word is being defined in the context:

(p "An ")(p :def "example")(p ", according to [Merriam-Webster](https://merriam-webster.com/), is \"a parallel or closely similar case especially when serving as a precedent or model\".")

When abbreviating, use the :abbr attribute to expand the abbreviation in metadata:

((p :abbr "GNU" "GNU's Not Unix")(p "'s ")(p :def :abbr "AGPL" "Affero General Public License")(p " is a copyleft license, which mandates server owners conveying covered software over a network provide a method to acquire the source code to remote users.")

When citing a source for a quotation, the :cite attribute may be used in place of the element. This allows for citations to be hidden but still present in the markup metadata:

(p :cite <https://piped.mint.lgbt/watch?v=GM-e46xdcUo> 'This one was invented by a writer.')

# Introduction TML should lessen the number of elements it uses. The way to do that is to implement markdown. Markdown should have no effect outside of quotes. Only text that would be displayed or read with a screen reader should be placed in quotes. ## Elements The meta element should be implemented, which contains pertinent metadata about the document: ``` (meta :title "[Proposal] Simpler but expanded TML standard" :author "Emma Tebibyte" :lang en :license CC0) ``` If paragraph elements contain multiple quoted sections, they should concatenate: `(p "These " "parts " "all" " " "come" " together" ".")` Full paragraphs could be written with multiple separate elements: ``` (p "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.") (p "Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam, eaque ipsa quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt explicabo. Nemo enim ipsam voluptatem quia voluptas sit aspernatur aut odit aut fugit, sed quia consequuntur magni dolores eos qui ratione voluptatem sequi nesciunt. Neque porro quisquam est, qui dolorem ipsum quia dolor sit amet, consectetur, adipisci velit, sed quia non numquam eius modi tempora incidunt ut labore et dolore magnam aliquam quaerat voluptatem. Ut enim ad minima veniam, quis nostrum exercitationem ullam corporis suscipit laboriosam, nisi ut aliquid ex ea commodi consequatur? Quis autem vel eum iure reprehenderit qui in ea voluptate velit esse quam nihil molestiae consequatur, vel illum qui dolorem eum fugiat quo voluptas nulla pariatur?") ``` or grouped into one: ``` (p ("Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.") ("Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam, eaque ipsa quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt explicabo. Nemo enim ipsam voluptatem quia voluptas sit aspernatur aut odit aut fugit, sed quia consequuntur magni dolores eos qui ratione voluptatem sequi nesciunt. Neque porro quisquam est, qui dolorem ipsum quia dolor sit amet, consectetur, adipisci velit, sed quia non numquam eius modi tempora incidunt ut labore et dolore magnam aliquam quaerat voluptatem. Ut enim ad minima veniam, quis nostrum exercitationem ullam corporis suscipit laboriosam, nisi ut aliquid ex ea commodi consequatur? Quis autem vel eum iure reprehenderit qui in ea voluptate velit esse quam nihil molestiae consequatur, vel illum qui dolorem eum fugiat quo voluptas nulla pariatur?")) ``` However, paragraph elements would never contain any named elements. List elements should not require item elements: ``` (ul "item" "item" "item") (ol "item1" "item2" "item3") ``` Definition lists should therefore be written as unordered lists with paragraph elements: ``` (ul (p :def "item") (p "definition") (p :def "item") (p "definition") (p :def "item") (p "definition")) ``` Styling of lists should be implicit in the layout of the element so an inline list without item decorations could be written as `(ul "item" "item" "item")` instead of the above. The source code for these could wrap as long as the first item starts on the first line of the element: ``` (ul "item that is very very long so that it forces the writer to line break for the next one" "item" "item" "item") ``` Some elements should be supported for accessibility. For example, a contact element should be written like this: `(@ <user@example.com> +1(555)555-5555 "1 Example Lane, Somewhere, USA 11111")` E-mail addresses should be placed inside carets, phone numbers after a plus and the country code, and physical addresses within quotes. Citation elements should be used to cite sources for information: ``` ((p :id quote """ Let us take two commodities such as a coat and 10 yards of linen, and let the former be double the value of the latter, so that, if 10 yards of linen = W, the coat = 2W. The coat is a use value that satisfies a particular want. Its existence is the result of a special sort of productive activity, the nature of which is determined by its aim, mode of operation, subject, means, and result. The labour, whose utility is thus represented by the value in use of its product, or which manifests itself by making its product a use value, we call useful labour. In this connection we consider only its useful effect. As the coat and the linen are two qualitatively different use values, so also are the two forms of labour that produce them, tailoring and weaving. Were these two objects not qualitatively different, not produced respectively by labour of different quality, they could not stand to each other in the relation of commodities. Coats are not exchanged for coats, one use value is not exchanged for another of the same kind. """) (cite :label quote <https://www.marxists.org/archive/marx/works/1867-c1/ch01.htm> "Economic Manuscripts: Capital Vol. I - Chapter One")) ``` Note that the citation element should be placed below its `:label` target. If one shares its immediate parent with its `:label` target, that attribute could be left out. Footer-style citations should be written using the same citation element: ``` (p "There is at least [one example][1] of HTML being used on a web page.") ((p "## Sources") (cite [1] <https://example.com/> "Example Domain")) ``` ## Styling Unique styling elements should be replaced with markdown: `(p "This text is ~~struckthrough~~, *italicized*, and _bold_.")` Hyperlinks and anchors should also be replaced: `(p "See [here](https://example.com "Title") for an example.")` As should headings: `(p "# Heading 1")` Since underlines cannot be made in markdown without HTML, I recommend styling as anchors without links: `(p "[This text is underlined]")` Code blocks should be a paragraph element with backticks instead of quotes: ``` (p "First, define a variable `var` with a value of `val`." (p `let var = val`) (p "Then, pass `var` into `func`, comparing the result to `foo`.") (p ``` if func(var) == foo { bar() } ```) ``` Block quotations should similarly be p elements but with triple quotes: ``` ((p """ Time am I, wreaker of the world’s destruction, Matured,—\[grimly\] resolved here to swallow up the worlds. Do what you will, all these warriors shall cease to be, Drawn up \[there\] in their opposing ranks. """ (cite <https://www.waggish.org/2020/now-i-am-become-death-the-destroyer-of-worlds/>) (p "– R. C. Zaehner's 1966 translation of the *Bhagavad Gita*")) ``` Note that captions can be made by creating a paragraph element within the same group as the other elements. Inline quotations should be written within two single quotes. `(p 'I\'m sorry, Dave. I\'m afraid I can\'t do that.')` Groups, such as heading groups, should be written without any explicit element declaration: ``` ((p "# Heading 1") (p "This is a subheading!")) ``` ## Operators Directional overrides are an important part of a markup language if it hopes to support multiple languages; these should be written using carets to mark the direction change: `(p "\"Oh I do like to be beside the seaside\" in Hebrew is written \"" < "אה, אני אוהב להיות ליד חוף הים" > "\" and is an example of a seaside song.")` A horizontal rule is the only kind of markdown supported outside of quotes. One is drawn between elements (or inside them) if three hyphens are placed in a row: ``` (p "text") --- (p ("### heading3") ("text")) ``` ## Attributes Identification of specific elements is important in any markup language that use anchors. In order to be identified, an element should have an `:id` attribute: `(p :id thing "This text is has the " (p :abbr "ID" "identification") " \"thing\"!")` Labels are an important part of the screen reader user's experience. They expand text's association with other elements from purely visual to programmatic; therefore, any paragraph element can have the `:label` attribute: ``` ((p :id object "## Example Object") (p :label object "This sure is a thing!")) ``` When terms are being defined in-text, use the definition attribute to notate what word is being defined in the context: `(p "An ")(p :def "example")(p ", according to [Merriam-Webster](https://merriam-webster.com/), is \"a parallel or closely similar case especially when serving as a precedent or model\".")` When abbreviating, use the `:abbr` attribute to expand the abbreviation in metadata: `((p :abbr "GNU" "GNU's Not Unix")(p "'s ")(p :def :abbr "AGPL" "Affero General Public License")(p " is a copyleft license, which mandates server owners conveying covered software over a network provide a method to acquire the source code to remote users.")` When citing a source for a quotation, the `:cite` attribute may be used in place of the element. This allows for citations to be hidden but still present in the markup metadata: `(p :cite <https://piped.mint.lgbt/watch?v=GM-e46xdcUo> 'This one was invented by a writer.')`
mars was assigned by emma 2022-10-10 12:13:55 +00:00
emma closed this issue 2022-10-10 21:28:14 +00:00
Sign in to join this conversation.
No Label
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: mars/tml#2
No description provided.