Markup Languages
A lot of the information here is gleaned from this talk of the History of Markup Languages by Tony Ibbs and his slides.
Introduction: Why We Need Markup Languages
- Presentational use: Define how text should look.
- Semantic use: Define the meaning of the text.
Early Markup Languages
RUNOFF (1964)
Capable of pagination, alignment, abbreviation, etc. Used on IBM machines for documents and machine to machine messages.
Example (source: Wikipedia):
When you're ready to order,
call us at our toll free number:
.BR
.CENTER
1-800-555-xxxx
.BR
Your order will be processed
within two working days and shipped
Render:
When you're ready to order, call us at our toll free number:
1-800-555-xxxx
Your order will be processed within two working days and shipped
roff, nroff, troff, groff (1970s)
Evolved from RUNOFF. These variants can be used on terminals, typesetters, and other devices. Has macros.
TeX (1978) and LaTeX (1983)
Donald Knuth was a computer scientist at Stanford who was sick of the current system for formatting his equations and paragraphs on his articles and books, so he made his own system called TeX.
Example (source: Wikipedia):
The quadratic formula is $-b \pm \sqrt{b^2 - 4ac} \over 2a$
\bye
$$ $$
LaTeX, a superset of TeX developed by Leslie Lamport, is still used today in academia for typesetting scientific documents.
The Anti-Tag Movement
setext (1991)
A markup language originally for newsletters and Macintosh programs, then also for emails and other communications.
Example (source: Wikipedia):
Title
=====
Body text is indented 2 spaces
**Bold Words**
_Underlined_words_
`Backquoted words` are comments
* Bulleted listWikiWikiWeb (1995)
The first wiki, very simple, meant to support limited features like bold, italic, and lists.
Example (source: Wikipedia):
* List Item
** Nested List Item
This text is '''bold'''.
reStructuredText and AsciiDoc (2002)
These are similar languages built with the intent to be easily readable without getting bogged down in tags. reStructuredText was invented to document Python, and AsciiDoc was invented as a terse analog to DocBook.
Markdown (2004)
Markdown is John Gruber’s attempt at a way to write HTML more easily. Has lots of flavors/dialects (i.e. GitHub-flavored Markdown for documenting GitHub repositories, Jekyll Markdown was used to write this page, Discord, Reddit, etc.). Many flavors support HTML tags alongside Markdown syntax. Markdown is processed into HTML and then that HTML can be rendered.
Example (source: Wikipedia)
Heading
=======
Sub-heading
-----------
# Alternative heading #
Paragraphs are separated
by a blank line.
Two spaces at the end of a line
produce a line break.
Text attributes _italic_, **bold**, `monospace`.
Horizontal rule:
---
Bullet lists nested within numbered list:
1. fruits
* apple
* banana
2. vegetables
- carrot
- broccoliConclusion
As a developer, you’ll probably only need to focus on these three:
- HTML for web-based interfaces
- XML for other non-web interfaces or data serialization
- Markdown for writing documentation
Good luck!