In this article, we’ll compare AsciiDoc, Markdown, and LaTeX based on the number of characters needed for basic formatting, while also touching upon some of Markdown’s limitations.

For the character comparison, we will include all required characters. This may also include whitespaces (e.g. for lists). Let’s have a look at the results first:

Character count comparison table for AsciiDoc, Markdown, and LaTeX

1. Setup Overhead

  • AsciiDoc: No setup required.
  • Markdown: No setup required.
  • LaTeX: Requires significant setup, with at least 101 characters to initialize the document with \documentclass{article}, \usepackage{hyperref}, as well as \begin{document} and \end{document}. For basic use, LaTeX incurs a setup cost that neither AsciiDoc nor Markdown has.

2. Headings and Subheadings

Headings in all three languages are fairly straightforward:

Heading

  • AsciiDoc: = (1 character)
  • Markdown: # (1 character)
  • LaTeX: \section{} (10 characters)

Subheading

  • AsciiDoc: == (2 characters)
  • Markdown: ## (2 characters)
  • LaTeX: \subsection{} (13 characters)

3. Basic Text Formatting: Bold, Italic, Underline

Text formatting syntax for bold, italic, and underline across markup languages

Bold, italic, and underline formatting varies in character length:

Bold

  • AsciiDoc: *...* (2 characters)
  • Markdown: **...** (4 characters)
  • LaTeX: \textbf{...} (9 characters)

Italic

  • AsciiDoc: _..._ (2 characters)
  • Markdown: *...* (2 characters)
  • LaTeX: \textit{...} (9 characters)

Underline

  • AsciiDoc: [.underline]#...# (14 characters)
  • LaTeX: \underline{...} (15 characters)
  • Markdown: Underlining text shows the first example when Markdown requires further extensions (also called dialects or flavors) to display underlined text as it is not supported natively. Here are three ways to underline text in Markdown, based on different approaches and dialects:

    1. Using HTML Tags: You can directly embed HTML tags within Markdown to underline text: <u>...</u>
    HTML Tags are supported in most Markdown dialects like GitHub-Flavored Markdown and CommonMark.

    2. Using Pandoc’s Markdown Extensions: Pandoc allows for underlining with specific extensions. You can use the following syntax: [...]{.underline}

    3. Using CSS Styling: You can apply inline CSS to underline text in Markdown: <span style="text-decoration:underline;">...</span>

    Each method relies on specific Markdown dialects or renderers, so check which one fits your environment. These workarounds require 7 (HTML Tags), 14 (Pandoc) or 48 (CSS) characters to display underlined text.

4. Lists and Subitems

Handling lists across these languages:

  • AsciiDoc: * ... for a list item and ** ... for a subitem (5 characters total)
  • Markdown: * ... for a list item and - ... for a subitem (6 characters total)
  • LaTeX:
\begin{itemize}

  \item ...

  \subitem ...

\end{itemize}

(50 characters total)

Both links and images are crucial in documentation:

Links

  • AsciiDoc: www.test.com[...] (2 characters)
  • Markdown: [...](www.test.com) (4 characters)
  • LaTeX: \href{www.test.com}{...} (9 characters)

Images

  • AsciiDoc: image:...[] (8 characters)
  • Markdown: ![...](...) (11 characters)
  • LaTeX: \includegraphics[...]{...} (38 characters)

Total Character Count Comparison

Summary chart of total characters needed per markup language

Let’s tally up the total characters used for these elements. We compare the tags with and without setup, as well as including and excluding underlining, which requires markdown dialects:

Without Setup Overhead

  • AsciiDoc: 36 characters
  • Markdown: min. 37 characters (using HTML tags for underlining)
  • LaTeX: 153 characters

Including Setup

  • AsciiDoc: 36 characters
  • Markdown: min. 37 characters (using HTML tags for underlining)
  • LaTeX: 254 characters

Excluding Underline and Setup

  • AsciiDoc: 22 characters
  • Markdown: 30 characters
  • LaTeX: 138 characters

Conclusion:

Lightweight Markup Languages Truly Deserve Their Name

Bar graph comparing character counts of AsciiDoc, Markdown, and LaTeX

In terms of raw character count, AsciiDoc tends to require fewer characters than both Markdown and LaTeX. Especially LaTeX, although powerful and flexible, is much more verbose. Each language has its strengths depending on your needs, but for brevity and ease of use, AsciiDoc shines in this comparison.

Markdown is undoubtedly one of the most popular markup languages due to its simplicity and ease of use. However, Markdown’s elegance comes at a cost: limited feature support without extensions.

As mentioned in the comparison, underlining is not available in standard Markdown. Similarly, Markdown’s native support for complex features like tables, footnotes, and text and image alignment is minimal or non-existent, requiring extensions like GitHub Flavored Markdown or Pandoc Markdown. While Markdown can handle basic formatting with ease, when it comes to creating more advanced or structured documents (e.g., with complex tables, custom numbering in lists, or detailed image placement), it quickly becomes evident that Markdown alone may not suffice. Users often find themselves reaching for other dialects, plugins, or embedding raw HTML to achieve their goals.

In summary, AsciiDoc offers a happy medium—combining the conciseness of Markdown with the advanced capabilities of LaTeX—making it a strong choice for technical documentation without the need for extensions.

Have we piqued your interest? Then take a look at adoc Studio. With our app, you can organize, write and export AsciiDoc documents in no time at all.