DEV Community

Michael Wilson
Michael Wilson

Posted on Edited on

Writing a resume in VS Code with Typst: what the snippets type and what the package lays out

A Typst resume is a plain text file, so it diffs cleanly and sits in git next to everything else. On my Mac, the sample resume below took 0.40 seconds to compile the first time and 0.12 and 0.10 seconds on the next two runs. I used Typst 0.15.1 in VS Code with two pieces of tooling. A package sets the page layout, and a set of snippets fills in the Typst code for a whole resume or a single entry. Below is what each one handled when I tried them, and what was still left to me.

Starting from the package

I used the readable-classic resume package on Typst Universe, whose sample uses one column, puts Education first and centers the section headings. You don't have to download anything by hand. typst init fetches the package if it isn't cached yet and copies its sample into a new folder:

typst init @preview/readable-classic:0.1.0 my-resume
cd my-resume
typst watch main.typ
Enter fullscreen mode Exit fullscreen mode

main.typ is a filled-in sample resume, so you replace text rather than build structure. Unlike the package code, the template folder is MIT-0, so your finished resume doesn't need to carry a license notice.

The snippets

The snippets give you another way to start, and a faster way to add entries later. VS Code snippets for the readable-classic Typst package have 13 prefixes, all starting with rc-. In VS Code's Extensions view, install Tinymist, which gives .typ files the Typst language mode, and ReadableResume Snippets. Then type rc-resume in an empty .typ file and pick it from the suggestions.

rc-resume writes out a complete file with 20 tab stops: name, four contact items, a paper-size dropdown (us-letter or a4), one job, one school and two skill lines. Unlike the package's sample, it puts Experience before Education. I accepted every default and compiled it without touching anything. It came out as a one-page PDF with a working email link, so you can start from that and fix the content as you go.

The smaller ones (rc-experience, rc-education, rc-activity, rc-project, rc-skills) each insert one entry with the argument names already spelled the way the package expects.

The repository also has a check script. I ran scripts/check-snippets.mjs against readable-classic 0.1.0 and atsresume, a LaTeX class with the same resume layout. It checks the Typst import's package name and version, along with the function and argument names the snippets use. It reported 29 snippets OK: the 13 Typst snippets and 16 for atsresume.

What the package lays out for you

The layout rules live in the package's 162-line lib.typ.

Section headings. You type = experience in any case. The PDF gets EXPERIENCE, centered and bold, over a 0.75 pt rule. The capitals are real text, not a visual effect: when I pulled the text out with pypdf, it read EXPERIENCE.

Places and dates on the right. In a job entry, the location sits at the right margin on the company's line, and the dates sit at the right margin on the job title's line. There's no table behind it. I gave one entry a company name long enough to wrap onto a second line. "Minneapolis, MN" stayed in one piece at the right margin instead of breaking after the comma.

Contact links. The contact line is a list of plain strings. A bare sam@example.com became a mailto: link and github.com/samlee became https://github.com/samlee. The links aren't colored on the page, so I checked the PDF's link annotations to confirm both were there.

Page breaks. If your resume goes to two pages, a job title shouldn't sit alone at the bottom of page 1 with its bullets on page 2. I compiled 21 versions of a 15-job resume, adding 0 to 40 pt of space above the jobs in 2 pt steps. Each one ran to two pages. In every one, page 1 ended on a bullet and page 2 started with a company name. In another test file the break fell in the middle of a bullet list, which is fine.

Margins, hyphenation and PDF metadata. Margins switch from 0.6 in on US Letter to 15 mm on A4 when you change paper. Hyphenation is off, so a word like "infrastructure" doesn't get split across lines. The PDF's title field is set to "Sam Lee – Resume" and the author to your name, instead of being left empty.

A misspelled argument also stops the build. If you type compnay:, Typst prints error: assertion failed: unknown argument: compnay instead of quietly leaving the company off the page.

En dashes in date strings

The date placeholders in the snippets already contain an en dash inside the quotes: rc-experience inserts date: "Jun 2024 – Present". That sounds cosmetic until you type a date yourself. In Typst markup, -- turns into an en dash, so bullets typed with -- come out fine. Inside a quoted string, it doesn't. My test file with date: "Jun 2024 -- Present" printed two hyphens in the PDF, and a bullet in the same file that used -- printed an en dash.

What neither one does

Dollar signs. $ starts math in Typst. A bullet like Cut cloud costs by $25,000 a year stops the build with error: unclosed delimiter, pointing at the $. Write \$25,000.

Page count. My 15-job test file came out as two pages, and Typst printed no warning. If you need one page, check the PDF yourself after each round of edits.

Fonts on Linux. The default font is Georgia, which comes with Windows and macOS. When I compiled with --ignore-system-fonts to mimic a machine without it, Typst warned unknown font family: georgia and used Libertinus Serif, which ships with Typst. The PDF still builds, but the lines break differently. In the package's sample, three bullets that wrap in Georgia fit on one line in Libertinus Serif, so the page went from 36 lines of text to 33. Check the length again after switching machines.

What goes on the page. Neither tool tells you which job to lead with or how many bullets an internship deserves.

Top comments (0)