The Typesetting Machine

by Ethan A. Chi and Alex Gotsis


This is a blackbox puzzle where words are typeset in an unusual way. We can type in (almost) any English word (from the Scrabble dictionary); any word we type in will be measured along several metrics. Additionally, the interface reports maximum (and in one case, minimum) values for each metric. We have to solve each subtask by finding the unique words that achieve all 7 of these extreme values.

As clued by the use of Computer Modern, the words are typeset in LaTeX. However, they use \usepackage{times} rather than Computer Modern.


We have to optimize the following six targets, one of which has both a maximization and minimization objective:

Widthmax, minWidth reported by LaTeX
HeightmaxHeight reported by LaTeX
CursednessmaxNumber of unique diacritics
RatingmaxNumber of special bigrams (see below) that appear in the word
OutliningBinary yes/noWhether the word matches the red background outline
ColorsBinary yes/noWhether the word is rainbow colored


The blackbox applies the following rules sequentially:

  • Letters after f have their effective identities replaced with the letter before f, if the f is not word-initial.
  • Words ending in n have their first (up to two) letters converted to Hangul. (Note that possible three-hangul syllables like neu () don't occur.)
  • d increases the power of the next but one letter by a factor of 1.15.
  • m inverts the power of the previous letter by a factor of -1.7.
  • Hangul syllables increase the power of the next letter by a factor of 2.
  • Letters 2 before c are struckout.
  • Letters 2 after j get a cedilla.
  • Letters after n get a bar underneath.
  • Letters before t get a tilde.
  • Note that letters with ascenders can't get tildes, and letters with descenders can't get cedillas or bars. Also, vowels can't get accent marks (not counting y).
  • Letters after r get their kerning reduced.
  • Letters after s are superscripted.
  • Letters after i are italicized by rotating to the left.
  • Letters before g shrink.
  • Letters before l are duplicated.
  • Letters after u are duplicated.
  • Words shorter than 6 letters have space characters inserted at the beginning. (Note that these get colorized too!)
  • Words longer than 9 letters have all excess letters stacked on top of each other.


Duplicated letters are colorized, too. Padding space characters are considered consonants.
  • If the letter is z, it's red.
  • If the letter starts the word, it's red if the word ends with -ng, and orange otherwise.
  • If the letter is a vowel and the previous letter is also a vowel, the color is orange if both letters are the same, and red otherwise.
  • If the letter is a vowel and the previous letter is not a vowel, it is green.
  • If the letter is not a vowel and the previous letter is a vowel, it is yellow if the next character is also a vowel, and blue otherwise.
  • If both the letter and the previous letter are not vowels, it is purple.

Solving Each Subtask

Width (max):

Words are truncated after 9 letters, hinting that our target word needs to be 9 letters. At first, this seems hard, since the only effects that increase width are duplication (u, l) and italicization (i). However, we can reverse the effects of r by putting it before m, so that it increases kerning instead. Also, we can use f to repeat a spacing effect twice.

Looking at 9-letter words that contain (u, l, i, r, m, f) in some order, some trial and error reveals: uniformly.

Width (min):

Since words shorter than 6 letters get padded with (relatively wide) space characters, we should pick a word that's 6 letters. Since Hangul counts as its inherent letter count for spacing purposes, we need a word that ends in n. We also clearly want to use r (reduce kerning) and g (shrink). Since all Hangul characters are of equal width, it doesn't matter what the first two letters are, so the word must look like:


where <> is the anagram operator. English phonotactics rule out ???RGN and ???GRN, so the answer must be one of ??RG?N, ??GR?N, ??R?GN, ??G?RN. Some trial and error returns: margin.

Height (max):

Latin-script letters (at least in Times) fall into three height classes: those with ascenders, those with descenders, and j, which has both. Also, there is one effect which modifies height, s (superscript), and we can make it more effective by putting it 2 after a d (boost effect of next but one letter). Therefore, the word must contain the subsequence: D?S[ascender]. The only phonotactically suitable letter with an ascender is i, so we have D?SI as a substring. Finally, to fully maximize height, there must also be a descender somewhere in the word.

The only words that match these conditions are design and words which contain it as a substring, which are met with a message to "think simpler."

Cursedness (max):

The target word must clearly use j, c, n, and t. Also, since only consonants can be affected by diacritics, the letters must be in such a position that they affect other consonants, rather than vowels.

Since j and c both affect letters at distance 2 and n and t both affect letters at distance 1, the most logical way to go about it is to use a word that includes J?C and NT. Some trial and error reveals that the only two words that match these conditions are adjacent and adjacently, the latter of which is met with a message to "think simpler."

Rating (max):

After some trial and error, we can see that the rating is the number of unique bigrams from the following list that are in the word: [te, ex, xt, tu, ua, al]. (A simple way to do this is to try a large number of words and form minimal pairs with the words that score 1 or 2).

The target word is clearly textual; any other word that contains "textual" is met with a message to "think simpler."


The word that fits the blurred background image is material.


The colorization of the "Colors:" row hints that the word has to have 6 colors and be a sequential rainbow. We can work out the conditions using minimal pairs, observing that consonants behave identically (hat/bat/cat/rat are all colored identically). This means that the vowel/consonant structure has to be VVCVng.

At first glance, there are no words that fit this sequence of letters. However, we note that duplicated letters are colorized as well. If the word is inherently 5 letters and the consonant C is l, then the colors will match. Therefore, we're looking for a word that matches VlVng, the only such word of which is along.

Clue Phrase

When all 7 words are correctly guessed, an image with 7 a's appears, each representing one of the 7 targets. This provides the ordering:


which clues the final answer, JUSTIFY.