Skip to content
LarsJørgenSolberg edited this page Sep 10, 2012 · 36 revisions

Background

Work in progress: definition of the Grammar Markup Language (GML).

General Syntax

To not only allow nesting but partially overlapping spans (as we expect might be seen in HTML or LaTeX sources, for example), there is both an opening and matching closing tag; both carry their name, e.g

  ⌊i¦text¦i⌋

To not steel 'common' characters, GML utilizes three graphic characters, the left and right floor symbols and the broken vertical bar. These can be embedded in GML text, using the following escape conventions

  ⌊⌋⌋
  ⌊⌊⌋
  ⌊¦⌋

These conventions mean that there cannot be empty tags, nor can there be no content between the opening or closing bracket (⌊ and ⌋) and the separator (¦).

What about self closing tags (for instance images)? The following should work okay:

  ⌊img⌋?

List of Element Types

Name

GML markup

Comment

Mediawiki markup

Heading

⌊=¦text¦=⌋

level as an attribute or maybe use a html-style tag

Link

⌊>¦text¦>⌋

do we need different types? optional target attribute?

Template

⌊x¦text¦template-name¦par1¦par2¦x⌋

ditch the curly braces? normal or broken vertical bars?

Source code

⌊code¦text¦code⌋

List

⌊1¦⌊#¦item1¦#⌋⌊#¦item2¦#⌋¦1⌋ and ⌊•¦⌊#¦foo¦#⌋⌊#¦bar¦#⌋¦•⌋ ?

numbered and unnumbered; do we need parameters?

List item

⌊#¦item¦#⌋

Bold

⌊*¦text¦*⌋

Italics

⌊/¦text¦/⌋

Strike through

⌊-¦text¦-⌋

Tele-typed

⌊t¦text¦t⌋

Quote

⌊"¦text¦"⌋

Abbreviation

⌊.¦text¦.⌋

optional parameter for the extended term?

Underline

⌊_¦text¦_⌋

Superscript

⌊^¦text¦^⌋

Subscript

⌊,¦text¦,⌋

Small text

⌊↓¦text¦↓⌋ ?

Big text

⌊↑¦text¦↑⌋ ?

Paragraph

⌊p¦text¦p⌋

(?)

Definiton list

⌊:¦term¦definition¦:⌋(???)

The term is not obligatory in mediawiki, the definition-description (:) is often used to indent text.

;term
:definition

Variable

Merge with source code ?

Math

Merge with source code ?

Citation

⌊cite¦text¦cite⌋

Image

⌊img⌋

what about captions?

Preformatted text

⌊pre¦text¦pre⌋

Ruby (and friends)

(?)

Div

Merge with Paragraph?

span/font/center

(?)

Forced line break

(?)

List of mediawiki markup

For tags observed in collected html, see in WeSearch/DataCollection (the only elements I can see are missing are those related to tables - which won't be included as they're outside of the scope of linguistic relevance? (XHTML spec.)

We might also want to consider the Text Encoding Initiative -- though that's an awful lot of types!

Clone this wiki locally