Introduction to MarkIt
Keywords : MarkIt, Presentation, LaTeX, Markdown, ReST, Markup
This is the introduction to the MarkIt markup language. MarkIt is a prototype of markup language made to balance leaks in the existing markup languages such as MarkDown1 or ReST2. MarkIt is developed with the Haskell3 programming language for a fast development and to enhance performance, reliability and portability.
The aim of MarkIt is to provide a common markup language to generate :
HTML web pages
Open document files (ODT).
Docx documents (possibly).
MarkIt can handle various of document formatting and structures such as :
The basic way to use MarkIt is :
Write a text file in the MarkIt format with any text editor.
Read the file with the parser program to test it and detect some errors.
Generate the output file with a dedicated compiler for :
LaTeX .tex file to be compiled with pdflatex or xelatex.
ODT OpenDocument readable with LibreOffice or MSOffice.
The file header is the very first part of a document.
The file header contains informations about the document creation. The common informations are :
Document title (Mandatory)
Name of the author (Mandatory)
Date of creation (Mandatory)
It is separated from the content of the document by 3 dashes
The header of this document is defined like this :
The document is made of blocks which provide a specific behaviour to the document separated by at least 1 blank line.
The main blocks are :
Titles and subtitles
Inlines are the content of blocks and can be freely used inside of them. They provide functions to :
Modify the text styles.
Make references to other elements.
Link to websites.
References to figures or titles.
Add inlines images.
Details of elements
Blocks are the basics way to organize the code. Blocks are separated by 1 or more blanklines and have a different behaviour on the output.
Blocks are made of inlines (see bellow) and must be used with the same indentation.
This is the basic block. It is composed by many lines of strings. This is a example of paragraphs:
To begin another paragraph, leave 1 or more blanklines between two paragraphs.
The header blocks are used to structure the document by defining sections.
A header is defined by giving a title underlined by a serie of unique chars. According to the char, the level of the section is different.
At this time, only three level of section can be defined in a MarkIt file. This can be changed in the future.
Bullet list blocks
A bullet list can be produced by using a succession of asterisk (
*) followed by
a incremented list of block. The asterisk musn't be indented4.
The kind of bullet is set by the style of the document in the writing process and can't be changed by the user5.
This an example of bullet list :
Numbered list blocks
A numbered list can be produced by using a succession of sharps sign (
#) followed by
a incremented list of block. The sharps musn't be indented4.
The kind of numbering is set by the style of the document in the writing process and can't be changed by the user5.
This an example of numbered list :
Replacement block are used to describe a piece of document which can be called anywhere in the document by :
A replacement block begin with
[identifier]: and is followed by an increment list of blocks.
Here is an example of substitution block :
The figure environment allow the user to place a picture inside the document with various options to tweak the final result. The allowable options are :
allow the user to set the picture width.
Set the figure title.
Set a reference to the figure.
The following code snippet is used to generate the figure bellow.
MarkIt support these commons images format6 :
PNG For non destructives images (schemes, snapshots, ...).
jpeg For photography.
eps will be available with some improvements.
Text Style (Inlines)
The text can be written with a bold font by surrounding it with two asterisks
**bold text**. It give the following result:
Normal text and some bold text
The text can be written with a emphasis font by surrounding it with one asterisks
*emphased text*. It give the following result:
Normal text and some emphased text
The text can be underlined by surrounding it with two underscores
__underlined text__. It give the following result:
Normal text and some underlined text
The text can be striked out by surrounding it with two tildes
~~underlined text~~. It give the following result:
Normal text and
some striked out text
The text can be written with a undercript font size by surrounding it with one underscore
_underscript text_. It give the following result:
Normal text and some underscript text
The text can be written with a superscript font size by surrounding it with one circumflex
^superscript text^. It give the following result:
Normal text and some superscript text
External links can be included with the command
[link](text). External links
can be websites addresses or filepaths.
The text can handled all the text styles available.
generated with the commands :
It is possible to create link to some parts of the document with the command
The reference must be a valid reference to a figure, or a section
Here are some reference to parts of this article.
Reference to figure 3 : figure 3
Reference to figure 1 : figure 1
Reference to section "Introduction" : §1
Reference to subsection "Blocks elements" : §3.1
Reference to subsubsection "Footnotes" : §3.2.10
Reference to subsubsection "Bullet list blocks" : §3.1.3
An inline image can be included in a paragraph with the command
An inline image has its height fixed to the font size and cannot be changed. This is some examples of inline image.
These image have their height fixed because they are included in a text. A specific case of inlines image exist when they are in paragraph without any text. In this case image have their width adjusted to a given width proportionally to the number of images.
This is an example of this specific case:
generated with the command :
Note that inlines images can't be referenced and linked in the document. That's another difference with figures.
Footnotes can be included by using the command
^[footnote identifier]. Footnotes identifiers
are uniques and are used to identify the footnote. The footnote must be described in a
If the footnote identifier is missing, an error is throw by the MarkIt parser
At this time, many features are missing or not fully functional.
The main goal of MarkIt is to provide a standard support of arrays for scientific and engineering purpose.
Arrays are not supported at all at this time.
The main goal of MarkIt is to provide a standard support of mathematic formulas for scientific and engineering purpose.
Math formulas are not supported at all at this time.
They will be probably used inside
$$ like LaTeX but with a language closer than
libre office than LaTeX7
Markdown is limited because it cannot handle array and internal links natively.
Haskell is truly a very powerful programming language. It is reliable, efficient, strong and statically typed and even its logo is stylish. Have a look on its website to have more informations about Haskell.
This is different from other markup languages where the asterisk must be indented.
This is different from other markup language where the kind of bullet and numbering is
set by the user (
This small number of format is due to some limitations with the output writers and the wish to homogenize the formatting of the documents.
I assume that if you're ok to deal with LaTeX math formulation, you're ok to deal with the whole LaTeX environment directly.