VimStar ships with several templates for exporting Markdown files into various formats:

  • Article/Handout
  • Business Letter
  • Book
  • Submission Format
  • Planner Page

More templates are planned; if you have an idea for a template, submit an issue for it.

To make these work, you must have installed either LaTeX or Typst, along with Pandoc.

Currently, templates are formatted via both LaTeX and Typst. LaTeX has been around a lot longer and has a lot more features, but Typst is catching up. LaTeX, however, is a gigantic download and sometimes difficult to install and configure. Because of this, I’m in the process of migrating the templates to Typst. My hope is since Typst is smaller and easier to install, it’ll be a better prerequisite for people to get going than LaTeX is. Once I’m done, I’ll remove the LaTeX prerequisite, and only Pandoc and Typst will be necessary. For now, however, you’ll see <Space>p menu items for both the Typst and LaTeX templates.

Using Templates

Templates format your Markdown document in useful ways. Type one command in VimStar, and your Markdown file is turned into an article, formatted for submission to a publication, formatted for use with a paper-based planner, or laid out as a paperback book. You write your Markdown as you would any Markdown file; the only difference is in the YAML headers.

Exporting your Markdown file to a PDF using the templates requires using the <Space>p (Print Controls) menu. Commands for the various templates appear there. Note that if you’re using images in your Markdown files, before exporting via a template, change the working directory to the location of the currently open file with <Space>kl.

YAML Header Snippets

Rather than typing out an entire YAML header from memory, VimStar ships with snippets that insert a pre-filled header for each template. Start typing a trigger in an empty Markdown file, select it from the completion menu, and the whole front matter appears with placeholder values. Tab through the placeholders to fill in your own details; each tab moves you to the next field, and the final tab places your cursor in the body of the document.

Trigger Template Fields
yaml-article Article/Handout title, subtitle, author
yaml-letter Business Letter date, from-name, from-address-1, from-address-2, to-company-name, to-name, to-address-1, to-address-2, salutation, complimentary-close
yaml-book Book title, subtitle, author, copyright-holder, dedication, isbn, body-font, heading-font
yaml-submission Submission Format title, author, surname, shorttitle, wordcount, name, address, city, phone, email, affiliation
yaml-planner Planner Page title, subtitle, author

Article/Handout

This, along with the planner, is the simplest template. At the top of your Markdown file, place a YAML header containing these fields:

---
title: Your Title
subtitle: Your Subtitle
author: Firstname Lastname
---

The rest of your Markdown file goes here. Use headings and other Markdown features normally. 

When you’re ready to produce your article or handout, in Normal mode hit <Space>pp (LaTeX) or <Space>pP (Typst). It produces a document suitable as an article or handout:

The article/handout is a basic format with a title, subtitle, author, headings, and page numbers.

Business Letter

The business letter template formats your Markdown file as a simple business letter on US-Letter paper. The body of the letter is just the text of your Markdown document; all of the letterhead, addressing, salutation, and signature details come from YAML headers:

---
date: "September 9, 2026"
from-name: "Jane Doe"
from-address-1: "123 Main Street"
from-address-2: "Springfield, IL 62701"
to-company-name: "Acme Corporation"
to-name: "John Smith"
to-address-1: "456 Oak Avenue"
to-address-2: "Chicago, IL 60601"
salutation: "Dear Mr. Smith"
complimentary-close: "Sincerely"
---

Thank you for taking the time to review my application. I look forward to hearing from you.

Please contact me if you need any further information.

This produces the classic business-letter layout:

The letter template creates a business letter.

To use it, hit <Space>pL. Note that you can write the date in any way you like-—-date is just a string-—-and any field you leave out is skipped, so minimalist letters with fewer headers render fine.

Planner Page

The Planner Page template takes the exact same YAML headers as the Article/Handout, but it lays out the page horizontally:

The planner page is suitable for cutting in half and inserting into a planner.

This way, you can cut the page in half or fold it and stick it in your paper-based planner. To use the planner page, use <Space>pe.

Book

The book template formats your document as a digest-sized paperback book. If you are a writer who self-publishes your work, you could write your entire novel in VimStar, use this template to lay it out, and upload it to Amazon, IngramSpark, Lulu, or any other self-publishing platform.

The book template accepts the same YAML headers as the Article/Handout (title, subtitle, author), with optional headers for an alternate copyright holder, the dedication, the ISBN, and the book typefaces:

---
title: "My Great Book"
subtitle: "A Story of Greatness"
author: "Firstname Lastname"
copyright-holder: "Publisher Name"
dedication: "For my family, who endured the writing process."
isbn: "978-1234567890"
body-font: "Alegreya"
heading-font: "Alegreya Sans"
---

# Chapter One

The rest of your Markdown file goes here. Each level-1 heading begins a new chapter.

The dedication, if present, appears on its own page after the copyright page. The ISBN, if present, appears on the copyright page. If copyright-holder is provided, it is used instead of author on the copyright page.

body-font sets the serif font used for the body text.

heading-font sets the sans font used for the chapter headings (level 1), the sub-headings (levels 2–4), the figure captions, and the running header.

Both are optional. The value is the name of a font installed on the computer doing the compilation. If you leave a header out or name a font that isn’t installed there, the template walks down a fallback list of common, cross-platform fonts (Windows, macOS, and Linux) and uses the first one it can find, so the PDF always renders with a sensible typeface. If you set a font that is installed, it takes precedence over the built-in defaults. Note that Typst shows warnings when fonts aren’t installed; these are normal and don’t affect the PDF output.

The book template formats your Markdown file as a paperback book.

Submission Format

If you’re a writer who submits stories for publication, this template can format your story for you perfectly. It needs a lot more metadata to do that, in the form of these YAML headers:

---
title: "A Great Story"
author: "Dude Dud"
surname: "Dud"
shorttitle: "Story"
wordcount: "about 12,000 words"
name: "Dudeness M. Dud"
address: "123 Main Street"
city: "Anywhere, XX  00000"
phone: "123-456-7890"
email: "dude@place.com"
affiliation: ""
---

Set these headers and then hit one of the commands below. This produces a manuscript in the proper format for a publication:

The submission format is for submitting a story or article to a publication.

Command Output
Space-ps Submission in PDF format
Space-pS Submission in .odt (LibreOffice) format

Submission in .docx format (exported from LibreOffice) coming soon!