Skip to content

monapdx/Modular-Markup-Language

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

35 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

title README
category documentation

Modular Markup (MML)

A meaning-first markup language that remains readable as plain text.

A semantic alternative to Markdown that compiles to HTML. Instead of describing formatting, MML describes meaning through structured tags like claim, evidence, argument, timeline, and event.


Goals

  • Human-readable source documents
  • Explicit semantic structure
  • Strong parent-child validation
  • Meaning-first document modeling
  • Plain text as the authoring format
  • Automatic structure generation
  • Compiler-friendly AST representation
  • Extensible semantic schemas

MML

argument

claim
Markdown introduces an unnecessary abstraction layer.

evidence
The final rendered output is already HTML.
/evidence

/claim

/argument

Compiled Output

<argument>
  <claim>
    <text>Markdown introduces an unnecessary abstraction layer.</text>

    <evidence>
      <text>The final rendered output is already HTML.</text>
    </evidence>

  </claim>
</argument>

Core Philosophy

MML is built around semantic objects rather than formatting instructions.

For example:

argument
claim
evidence
timeline
event
comparison
entity
image
caption

represent meaningful concepts.

By contrast, generic containers such as:

<div>
<span>

have no direct equivalent in MML.

Every element should represent something recognizable and meaningful.


Syntax

Opening Tags

Opening tags are written as plain keywords.

claim
section title="Background"

Closing Tags

Closing tags use a slash prefix.

/claim
/section

Text Content

Anything that is not recognized as valid markup is treated as text.

claim

Arguments are not always unhealthy.

/claim

The word "Arguments" is content, not a tag.


Validation

MML validates semantic structure, not just syntax.

Example:

evidence
The final output is already HTML.
/evidence

Produces:

Error:
evidence requires parent claim.

Valid:

argument

claim

evidence
The final output is already HTML.
/evidence

/claim

/argument

Automatic Text Nodes

Plain text is automatically wrapped in text nodes.

Source:

claim
Markdown is unnecessary.
/claim

Internal representation:

<claim>
  <text>Markdown is unnecessary.</text>
</claim>

Authors rarely need to write explicit text tags.


Semantic Schemas

Argument

argument
└── claim
    └── evidence

Rules:

  • argument requires at least one claim
  • claim may exist standalone
  • evidence requires parent claim

Timeline

timeline
├── year-start
├── event
└── year-end

Rules:

  • timeline requires year-start
  • timeline requires year-end
  • event requires date

Calendar

calendar
├── year-month
└── event

Rules:

  • calendar requires year-month
  • event requires date

Comparison

Before / After

comparison
├── before
└── after

Entity Comparison

comparison
├── entity
│   └── unique
├── entity
│   └── unique
└── shared

Scenario Comparison

comparison
├── scenario
│   └── conditions
└── scenario
    └── conditions

Media

media
├── image
├── video
├── audio
├── caption
└── source

Rules:

  • media requires at least one image, audio, or video
  • caption typically belongs to media

Design Principles

Text Wins

If something is not valid markup, it is text.

The parser should never aggressively reinterpret ordinary writing as structure.


Singular Elements

Element names are singular.

Valid:

claim
event
entity
image

Invalid:

claims
events
entities
images

Explicit Closure

Every opened element must be explicitly closed.

Valid:

claim
Text.
/claim

Invalid:

claim
Text.

Semantic Necessity

A tag should only exist if it represents a meaningful concept that cannot already be expressed using existing tags.


Project Status

Early specification and parser prototype.

The language is actively evolving and many schemas, validation rules, and compilation targets remain under discussion.


CONTRIBUTE

Have an issue? GET IN TOUCH.

Have an idea for a tag we should add? SUBMIT A TAG here.

Do you have a more advanced tag idea? SUBMIT A SCHEMA instead!


SUPPORT

You can read the full SPEC here.

Try the PARSER.


TAGS

Here is the list of TAGS.

Looking for the SHORTHAND version?

Check out a list of PROPOSED TAGS.

Curious about how the tags can be used together? Find out here ---> DEPENDENCIES.

Did you know that you can use the tag CHAPTER instead of SECTION, if you want? SYNONYMS make it fine to replace one with the other!

#readme #markup #grammar #syntax #semantic #data-structure #schemas #official #tags

About

A semantic alternative to Markdown that compiles to HTML. Instead of describing formatting, MML describes meaning through structured tags like claim, evidence, argument, timeline, and event.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors