Getting started

Typ turns plain Markdown into a formatted PDF, ready for print. It is accessed through a command line interface.

Your first document

We're going to make a PDF that looks like this:


(See the sample project for the full PDF file)

First install Typ. See Installation.

Open a command line terminal. If Typ is not on your PATH, navigate to the installation folder from the terminal.

Create a file called

Open and write something in Markdown. If you need inspiration, copy this:

# Types, variables, and values

C# is a strongly-typed language. Every variable and constant has a type, as does every expression that evaluates to a value. Every method signature specifies a type for each input parameter and for the return value.

Here's an example of some C# code:

int a = 5;
int b = a + 2; //OK

bool test = true;

// Error. Operator '+' cannot be applied to operands of type 'int' and 'bool'.
int c = a + test;

Try and run it in your favorite IDE.

Run typ typeset --inputFilepaths

Using, Typ will then create a formatted PDF called output.pdf.

Notes for Linux users 🚨

Changing the output file

You can use the --outputFilepath argument to change the output file name and location.

Run typ typeset --inputFilepaths --outputFilepath myDoc.pdf

Typ will now produce a file called myDoc.pdf instead of output.pdf.


Some command line arguments have short-hand aliases.

--inputFilepaths is aliased by -i. --outputFilepath is aliased by -o.

Run typ typeset -i -o myDoc.pdf to see the aliases in action.

Multiple files

Typ can use multiple Markdown files to create a PDF.

Files are combined in the order specified by the --inputFilepaths (-i) command line argument.

Create a new file, and add the contents:

# Post script

Thanks for reading!

Run typ typeset -i -o myDoc.pdf.

myDoc.pdf should contain content from and

Long filepaths

Note that longer paths may need to be escaped with double quotes, e.g:

typ typeset -i "C:\path\to the file\" -o myDoc.pdf

Configure the formatting

Typ gives you control over how your PDF is created through a set of configuration options.

Let's use the --fontSize option from the command line.

Run typ typeset -i -o myDoc.pdf --fontSize 36pt.

You should see the difference by the way myDoc.pdf looks.

Configuration files

Typ can read configuration options from a file also.

Create a new file called config.yaml and paste in the following:

title: C# docs
fontFamily: Arial
pageSize: A5
pageMargin: 70pt 60pt 70pt
textLineHeight: 150%
fontSize: 18pt
generateTableOfContents: false
printPageNumbers: false
printTitleMarginals: false

Run typ typeset -i -o myDoc.pdf

You should see the difference by the way myDoc.pdf looks.

Note that options specified as command line arguments take precedence over those in configuration files.


Typ supports images using the standard Markdown syntax. Currently only .png format images are supported.

Let's include this image in our document:


Download the image somewhere on your machine.

Add the following line to, using the path to the image you downloaded:


Run typ typeset -i -o myDoc.pdf.

You should see the image appear in the document.


For a work that consists of multiple files (front cover, multiple chapter files, preamble, etc), these should be stored in a single folder, termed a Project.

A Project is just a normal folder on your file system that contains files that Typ can work with.

By following this guide, you have created a Project already.

Run typ typeset. Note the absence of command line arguments.

Typ will create a PDF, output.pdf, with the combined contents of and

Notice the contents of now appears before

In Projects, typ typeset will look for all the Markdown files in the working directory. The files are sorted in alphabetical order using the file name, and then combined. The combined text is then used to produce a formatted PDF.

You'll have to use a naming convention to ensure the files appear in the correct order. For instance, rename to, and to

Run typ typeset again, and the text will be in the correct order.

Do more with Typ

Typ has other features, such as:

Read these pages to find out more:


Typ is still in an early stage of development. For the latest news, follow Typ on Twitter @typ_set.

You can view the entire source code for this site on it's GitHub page. If you have a bug report, feature request, or question, feel free to open a GitHub issue. Pull Requests are also welcome if you'd like to contribute your own changes.