Minimalist's Markup

From Esolang
Jump to navigation Jump to search

Minimalist's Markup is the markup language used in The Minimalist's Web, which is what this page is actually about. It's designed to be extremely minimal, to the point of enraging anyone who tries to use it, while still being pretty straightforward. It is completely minimal, but still decent enough to use and even comes with support for stylesheets and scripting.

Usage

To create a line of text in this markup, simply type it with the proper prefix:

text:Hello, world!

You can put any sequence of Unicode characters in that line, but it all must be on one line. You cannot have more than one line like this. Newlines will be explained shortly. Note that there can be an unbounded number of spaces after the word "text" and before the colon, and they will be ignored. This actually is true of all tags, but there is the requirement that prefixes must be exactly the same length before the colon, including spaces.

If you wish to format text, you must format it character-by-character on another line. Text is formatted by starting a line with the name of the markup you wish to apply, followed by the same colon, then a series of letter "X"es and spaces denoting whether or not to mark up that line. If you wish to greet someone but you don't know their name, you could do something like:

text  :Hello, your name here!.
italic:       XXXX XXXX XXXX

Some prefixes cannot be used together. These prefixes are written with a common property and a dot at the beginning, indicating that they are mutually exclusive- such as dec.under and dec.through, which are both forms of text decoration. If there is a conflict between two formatting options, whichever comes last in the document takes precedence.

The complete supported list of line prefixes is:

  • text: The body text of the markup
  • italic: Italicize this character
  • bold: Boldify this character
  • dec.under: Underline this character
  • dec.through: Draw a strikethrough through this character
  • fg-col(#RRGGBB): Set the foreground to the indicated hex color
  • bg-col(#RRGGBB): Set the background to the indicated hex color
  • special: The current character is a special character, not a literal. An example of a character that becomes special is "/", which when declared as special becomes a newline.

Stylesheets

To be decided

Scripting

Scripting in MinMU is done via a 32-bit brainfuck derivative. The file is marked up using the standard brainfuck commands (minus , and .), with the additional commands ^ and v. ^ goes to the above style option (wrapping to the last if this is the top) and v goes to the next (wrapping to the first if this was the last). The > and < instructions scroll on the tape as usual, but the "tape" used is actually the current style option, where each cell represents a character. When modifying the text line, it changes which character is used, while when modifying a style line, 0 means a space and nonzero means X.

System calls are also supported, triggered by the ! instruction, but are yet to be defined.