-- Leo's gemini proxy

-- Connecting to tilde.club:1965...

-- Connected

-- Sending request

-- Meta line: 20 text/gemini; lang=en

Title: Making a resume in typst on my first time using it

Date: 2024-01-18


I decided to update my resume today, just for fun. I originally wrote it in Overleaf, the online LaTeX compiler, but for a while, I've been meaning to rewrite it in Emacs' native org mode (which has native HTML and LaTeX export capabilities), or something like JSON resume, so that I could change the content with ease.

JSON resume


However, the creator of typst-ts-mode for emacs is on my Mastodon server, and a post from them inspired me to check it out.

typst-ts-mode


Typst is a relatively new system for typesetting documents. It aims to be as powerful as LaTeX while being easier to learn. It also has scripting capabilities. I rewrote my whole resume in it on a whim.

Typst


Great things about typst


It's really fast


Both the web application and the command-line version are fast, giving almost instant updates when you change the inputs, especially when compared to LaTeX offerings like Overleaf or python PDFLaTeX.


It looks and feels simpler


Typst definitely leans more towards markdown than something like troff, where you're likely to see more markup than actual content. When you write Typst, you can write more content, with unobstrusive markup while in LaTeX it's definitely more in the way.

troff


Builtins


In LaTeX, most things you would want to do require plugins.


Typst takes more of the Python approach, giving you many of the tools that you might need. The typst reference is really useful, and looks pretty to boot!

typst reference


Hooks


You can associate every instance of an item with some functions or rules that will be executed whenever they are used.


Given is an example of styling a link. We pass a function that is executed whenever we create a link, which wraps it in a box (the equivalent of `<span>` in typst), sets the text colour to blue in the box and underlines the link (which we can refer to by the name "item" anywhere we want in this function)


This, in my opinion, is a very elegent way of adding callbacks and the like. Also cool is that the `#set` command is only valid inside the box we create, sort of like block scope in C-like languages.

block scope


#show link: item => box[
	#set text(blue)
	#underline(item)
]

My only qualm


The function syntax is confusing


If you call a function in regular text, you do it like so: `#function(parameter)`. Similarly you can set a variable and use it as `#variable`


If you want to call it inside a function, you do `function(parameter)` or `variable`


If you want to use a passed parameter in a function, you simply use it: `parameter`.


If you want to concatenate items in a function, you need to use semicolons: `parameter; line(length: 100%)`


If you want to use regular markup like _emphasis_ or **bold**, you need to wrap it in square brackets, but within square brackets you need to pass the parameter like a variable: `[*#parameter*]`


Functions also have a special way of calling it if you want them to transform text, like `function[body]`, where the body can have any regular text with inline markup.


I sort of get why they did this and understand it now, but your mileage may vary.


Resume template


You can find the resume template using which I explored typst at this link. It is also available on the typst application as a project that you can copy. Let me know if you end up using this, or if you would like some clarification.

at this link

typst application


[image: Screenshot of the resume template given above]


**You can change any of the colours to your liking!**


Acknowledgement


I used the typst CV by Alex Chi Z. as a starting point, it is well annotated and has an example of almost every syntactical feature a beginner would want to use.

typst CV

Back to index

-- Response ended

-- Page fetched on Tue May 21 05:48:30 2024