When we think about writing text on a computer, the first thing that comes to mind is the Office suite and Microsoft Word, or their free equivalents (for example OpenOffice or LibreOffice). Some people probably prefer to draft descriptions in Notepad-like programs (especially Notepad++, one of the best text editors) and only later move them to more advanced applications. Others will say that tools installed on your computer are a thing of the past and go straight to Google Docs.

Is there another way to approach this? Of course: just use one of the markup languages and set up a script that builds your documents. "Wait, what?!" some of you will probably ask.

What are markup languages?

"Standard" text editors (the ones most users know) are so-called WYSIWYG editors, an acronym for What You See Is What You Get. While creating a document we already see its final form, and we have many graphical tools to help us prepare the text the way we want it. The alternative is WYWIWYG, where the "S" (See) becomes a "W" (Write). In such programs the user sees not the final form but the code of the document, which is processed later by a suitable tool into a polished form (most often a PDF file). There are also applications (including online ones) that show the code and, next to it, a live preview of the generated document. We will look at one such tool in this article.

A markup language is an agreed way of encoding a document that lets a suitable tool convert it into a polished form for the user. A marker is a specific character (sometimes a whitespace one) or group of characters that tells us unambiguously that, say, a given fragment is a separate paragraph or will be set in italics. Languages like this are used above all for better control over the text, but that is not their only advantage. For people familiar with a given technique they are faster to write and more standardized. You have surely run into a document that looked different in an older and a newer version of Word. That can happen with markup languages too, but much more rarely, because there is one standard and the tool makers try to stick to it. Encoding a document is also better for teamwork on a document: since you are working with text files, a version control system such as Git easily handles passing changes along correctly.

The simplest example of a markup language is HTML, where the markers are better known as tags. It is probably the most widespread way of writing documents, tied mainly to websites, of course. Today, though, we will focus more on languages strictly related to non-web documents. Examples are wiki notation, LaTeX, reStructuredText and the hero of today's text, Markdown.

Markup languages are most often associated with WYWIWYG editors, where the text is written in a plain text editor (for example Notepad++ or Vim) and only then do you run the right commands in a console. It should be noted, though, that convenient WYSIWYG tools have appeared over the years, so this way of writing is friendlier to users who are not on good terms with any form of programming.

Why should you know Markdown?

Markdown is tied to files with the extension .md, and programmers should know it well from the README.md file, which by default holds the instructions for a given program and is displayed in the repository by GitHub, for example in our repository. But people quickly noticed that this language is simple enough (even minimalist) to suit documents of a more general, though still technical, purpose. It is easy to imagine Markdown used for writing manuals, specifications or even a book, that is, any document where the content matters and the formatting is minimal and concerns mostly the structure of the text (headings and so on). .md files are better at this than, for example, LaTeX, which demands a lot of knowledge and is used in academic papers because it supports mathematical formulas.

People familiar with Markdown will probably keep using text editors and scripts, but this markup language is worth learning because it is used in a growing number of tools. Besides GitHub, you can write in it in Dropbox Paper (as WYSIWYG), and more recently in Google Docs too. In the latter, once you enable interpretation of Markdown instructions (Tools, then Preferences, then Automatically detect Markdown), the code you write is converted automatically into its graphical form.

An example Markdown document

Let's look at the following code:

# Kontekst i cel biznesowy

## Opis problemu

Problem opisywany przez klienta jest następujący:

* powód 1
* powód 2
* powód 3

## Kontekst

Firma klienta składa się z działu **biznesowego** i _technicznego_. Najważniejsi udziałowcy to:

1. Osoba 1
2. Osoba 2

## Opis udziałowców

### Osoba 1

Szczegóły można przeczytać [pod tym linkiem](https://wildasoftware.pl)
![A to logo firmy](https://wildasoftware.pl/img/wilda_logo_dark_blue.png)

### Osoba 2

Brak informacji

In the document above we can see the text divided into headings. These are the hashes (#), whose number shows how deeply a given heading is nested. The lines are separated by blank lines, but they weren't really needed here and are only a teaching device: in such a short text with this many headings, paragraphs are created automatically. By default, though, every empty line adds even more space between chunks of text.

The code also shows that text can be made bold or italic. Bullet points and numbered lists are possible too. Additionally, though it isn't shown here, we can mark fragments of text as code or a quote, and add links or paths to images. Not everything works in Google Docs, but you can use it all without a problem when creating a document on your own computer. These markers are presented well on the Wikipedia page.

I mentioned tools that show the source code of a document and its graphical form at the same time. An example for Markdown is StackEdit, where the document above looks like this once formatted:

View of the document generated from the code above

Summary

As you can see, Markdown is truly minimalist and doesn't take long to get into, and the results are satisfying for documents where structure matters most. What's more, markup languages of this kind will probably keep gaining importance, and the excuse "but I'm not a programmer" will work less and less. It is worth learning new ways of creating documents, especially if you write a lot of them and work with more people.

Best regards and thank you, Jakub Rojek.