RogerBW's Blog

The Joy Of Text 26 June 2025

I have noticed the same thing happening twice in my interaction with software, and two data points makes a straight line.

When one is doing something that is about layout and space and positions, the standard modern paradigm is to use a graphical program: grab that thing and drag it over here, drag the edge to resize it so that it fits, and so on. Which obviously works well for many people, but it doesn't for me. In most of the things I do, I want this to be exactly lined up with that, and I don't want to judge that by eye.

So first in 3d object design (with OpenSCAD), and now in page layout (with Typst), I've found software that does it in a different way: create one or more plain-text files with actual numbers in them to specify where things are, then go through a cycle of changing the file and then rendering the output to see if it's what's wanted. (In the case of Typst, you can use their web app and get an instant preview, which may well be great for many people; but I would much rather run it locally, and I do.)

I think it's not a coincidence that the inputs to both of these systems are also programming languages (with a large subclass of functions that do something specific, like creating a cube or putting an image on a page). Yes, one can lay something out in a simple way: this, then this, then that. But there quickly come to be cross-references: this should be at the same base height as that, this shape is a cylinder pierced by a rotated cube except the cube has a cone cut out of it, everything should change size to keep proportions but make the total height that, and so on, and as things get more complex the task effectively becomes something like programming anyway (the value of this is given by some calculation based on other values), and conventional text-mode programming is something I feel I understand pretty well.

All right, I was already disposed to like the concept of programming language as layout engine by my love for PostScript. But Typst's language is much more conventional than that, and it's still good fun to write.

I might have used TeX for the layout job, but while I'm sure there are packages to get round the various problems I've found with it (wanting to use its own fonts, poor UTF-8 support), I've always found its means of control rather arcane; and, perhaps because it's grown a programming language as the need for one became apparent rather than having that as an initial design goal, it's quite clunky to get in and change stuff.

With Typst in particular, doing layout for a publication that I'd previously been doing in LibreOffice, it's very welcome to be able to say not just "these grid lines are this thick" but "this is now our house style of grid, so use it for every article unless I override it". And similarly with tweaks to footnotes, page headers, and so on. Do I want to transplant a bit of formatting from that other document? Here is the specific chunk of plain text where I (or someone else) set it up, no need to go down lots of different menu hierarchies and copy the settings individually.

Not for everyone. But very much for me, and you may find it suits you too.

See also:
The Path of Cunning Issue 6

Add A Comment

Your Name
Your Email
Your Comment

Note that I will only approve comments that relate to the blog post itself, not ones that relate only to previous comments. This is to ensure that the blog remains outside the scope of the UK's Online Safety Act (2023).

Your submission will be ignored if any field is left blank, but your email address will not be displayed. Comments will be processed through markdown.

Search
Archive
Tags 1920s 1930s 1940s 1950s 1960s 1970s 1980s 1990s 2000s 2010s 2300ad 3d printing action advent of code aeronautics aikakirja anecdote animation anime army astronomy audio audio tech base commerce battletech bayern beer boardgaming book of the week bookmonth chain of command children chris chronicle church of no redeeming virtues cold war comedy computing contemporary cornish smuggler cosmic encounter coup covid-19 crime crystal cthulhu eternal cycling dead of winter disaster doctor who documentary drama driving drone ecchi economics en garde espionage essen 2015 essen 2016 essen 2017 essen 2018 essen 2019 essen 2022 essen 2023 essen 2024 existential risk falklands war fandom fanfic fantasy feminism film firefly first world war flash point flight simulation food garmin drive gazebo genesys geocaching geodata gin gkp gurps gurps 101 gus harpoon historical history horror horrorm science fiction hugo 2014 hugo 2015 hugo 2016 hugo 2017 hugo 2018 hugo 2019 hugo 2020 hugo 2021 hugo 2022 hugo 2023 hugo 2024 hugo-nebula reread in brief avoid instrumented life javascript julian simpson julie enfield kickstarter kotlin learn to play leaving earth linux liquor lovecraftiana lua mecha men with beards mpd museum music mystery naval noir non-fiction one for the brow openscad opera parody paul temple perl perl weekly challenge photography podcast politics postscript powers prediction privacy project woolsack pyracantha python quantum rail raku ranting raspberry pi reading reading boardgames social real life restaurant review reviews romance rpg a day rpgs ruby rust scala science fiction scythe second world war security shipwreck simutrans smartphone south atlantic war squaddies stationery steampunk stuarts suburbia superheroes suspense television the resistance the weekly challenge thirsty meeples thriller tin soldier torg toys trailers travel type 26 type 31 type 45 typst vietnam war war wargaming weather wives and sweethearts writing about writing x-wing young adult
Special All book reviews, All film reviews
Produced by aikakirja v0.1