Skip to content

Layout

This is the part where I’ll showcase some examples. The examples are split into four levels, ranging from Beginner to Pro. Each level builds on the same core Markdown file, extending it to demonstrate increasingly advanced features.

Note

Before diving into the examples, make sure you’ve set up your system correctly as described on the System Setup page.

The structure of our sample project, called "solution", will evolve through each level. Initially, it begins as an empty directory structure that looks like this:

$ tree solution/
solution/
├── build
├── img
└── src
    ├── bib
    ├── md
    └── meta

You can create this directory structure by running the following commands in your terminal. The first cd command will make sure that you are in your home directory. If you want to place the project somewhere else, feel free to do so.

cd
mkdir -p solution/{build,img,src}
mkdir -p solution/src/{bib,md,meta}

As we progress through the levels, the src directory will gradually be populated, and corresponding PDF outputs will be generated in the build directory. In the earlier stages, some parts of the PDFs may appear incomplete or imperfect. This is intentional since I wanted to have a single main source file that contains all features that I want to showcase, but the earlier levels don't use all the command options and metadata that are needed to create the full featured output.

Levels

Here’s an overview of the four levels and what each will cover:

  • Beginner

    The beginner level uses a basic Markdown file and the simplest form of the pandoc command to generate the PDF. No additional options or parameters are used — just the bare essentials. The result will already look quite good, but it won’t be perfect yet.

  • Intermediate

    In this level, we introduce some basic command line options, front matter, and extra metadata to refine the styling of the output. This will drastically improve the document’s appearance. We'll break this level into three steps, each introducing more features.

  • Advanced

    Here, we’ll incorporate a bit of LaTeX to further enhance the document's appearance. Don’t worry — it will be simple, and I’ll walk you through each step. Afterward, you should feel confident tweaking the example to match your preferences. Additionally, we’ll explore Pandoc filters, which allow us to extend Pandoc’s functionality. Like the intermediate level, the advanced level is also split into three steps.

  • Pro

    In the Pro level, we'll make a small adjustment to Pandoc's LaTeX template. This tweak will allow us to automatically include a "Changelog" section in the output by simply providing the necessary data in an additional metadata file. This chapter will showcase how combining LaTeX with Pandoc's template engine is a powerful way to achieve virtually anything you could do with a plain LaTeX source file—and perhaps even more. While it may sound complex, don't worry — it’s simpler than you think! 😃

The following table outlines which requirements are met at each level.

Requirement Beginner Intermediate Advanced Pro
Headings ✅ ✅ ✅ ✅
Enumerated Headings ✅ ✅ ✅
Lists ✅ ✅ ✅ ✅
Table of Contents ✅ ✅ ✅
List of Figures ✅ ✅ ✅
List of Tables ✅ ✅ ✅
Code and Code Blocks ✅ ✅ ✅ ✅
Images and Tables ✅ ✅ ✅ ✅
Math ✅ ✅ ✅ ✅
References and Links ✅ ✅ ✅
Citations ✅ ✅ ✅
Footnotes ✅ ✅ ✅ ✅
Header and Footer ✅ ✅

: Partially supported.