 *Minimum Profit: the mptxt format* 

 Ángel Ortega <angel@triptico.com> 

The mptxt format is a very lightweight text formatting markup that can be converted by the Minimum Profit text editor to other text formats. This document describes version 1.03 of the mptxt format.

Output formats supported are: rtf, troff and html.

Default paragraphs are delimited by blank lines; line breaks can be used arbitrarily and treated the same as spaces. On output they follow the de-facto Spanish literary convention: first line is indented unless it's the first paragraph of the text or if it follows a special section, like centered text or a section break.

Paragraphs with a leading space are treated as _verbatim_ text; in this kind of text, line breaks are meaningful and no justification is done. This is an example:

 From: Ángel Ortega <angel@triptico.com>
 To: <biohazard laboratory staff>
 Subject: Release the virus
  
 This is an example email.
     Line breaks are shown as written.

These kind of paragraphs will be shown in a monospaced font if the output format makes it possible. In the example above, the line between the subject and the body has *two* spaces: one to mark it as a paragraph to be centered and another one to include some content, as leading spaces are deleted on output. Otherwise, they will be treated as two different paragraphs.

If a paragraph is made of lines with a leading space *and* a trailing space, it's treated as text that must be shown centered. This is an example:

 INTERREGNO EVIL CORPORATION 
 NO ENTRY 
 TRESPASSERS WILL BE SHOT ON SIGHT 

Alternatively, centered lines can be marked between > and <, like in the following example:

>***<

If a line is prepended with a > symbol, it's rendered right-aligned, like in the following stanza:

>And on the pedestal these words appear:
>"My name is Ozymandias, king of kings:
>Look on my works, ye Mighty, and despair!"

Left-aligned text can be entered by appending the < character at the end of each line, like this:

And on the pedestal these words appear:<
"My name is Ozymandias, king of kings:<
Look on my works, ye Mighty, and despair!"<

Text that must be shown emphasized can be surrounded by underscores, like in _this example_. As well, strong text can be surrounded by asterisks, like in *this very attention-demanding text*.

Unicode is accepted wherever possible; some output formats have encoding limitations, though, so be reasonable. As it's important for Spanish writing, special treatment for m-dashes (—) is included. Also, if a form feed character (ASCII 0C HEX) is found, a page break is inserted according to the target format.

If the output format supports it somehow, URLs shall be made clickable, as when writing one like https://triptico.com or similar.

There is also basic support for JPG and PNG images, that can be inserted by using the _pseudo-url_ img:// followed by the file name:

>img://mp.png<

A set of more than one empty lines are respected as empty lines, as following:



Some output formatting can be tweaked via configuration variables, see mp.config for details.

Version log:<

• 1.03: PNG and JPG images can be inserted using the img:// pseudo-url (MP 5.58).<
• 1.02: Left-aligned text with < at the end of each line (MP 5.56).<
• 1.01: Center lines with > and <, right-aligned lines with > (MP 5.54).<
• 1.00: First implementation (MP 5.32).<
