Questions tagged [typography]

Challenges related to the arrangement, layout, or formatting of monospace plain text.

Filter by
Sorted by
Tagged with
13 votes
3 answers
477 views

Layout Text in Columns

Write a program or function that given some text, a number of columns, and the column width, formats the text into columns. This is plain text typography. Rules Input The text will be a string of ...
41 votes
26 answers
4k views

Center The Text!

Center The Text! In this challenge you will be centering various lines. Examples Foo barbaz Foo barbaz ...
39 votes
54 answers
4k views

Boustrophedonise

Related but very different. A boustrophedon is a text where every other line of writing is flipped or reversed, with reversed letters. In this challenge, we will just reverse every other line, but ...
9 votes
3 answers
420 views

Interpret control characters like a terminal

Given a ASCII string containing control characters, compute what it should look like when printed to a terminal. Imagining the behaviour of a cursor, this is how to treat each character in the input: ...
29 votes
6 answers
1k views

Fully-justify & hyphenate a block of text

Given a width and a block of text containing possible hyphen- ation points, format it fully- justified (in monospace). Fully justified means it is aligned ...
50 votes
8 answers
4k views

Avoiding Rivers

Background In typography, rivers are visual gaps in a block of text, which occur due to coincidental alignment of spaces. These are particularly annoying since your brain seems to pick them up more ...
16 votes
8 answers
741 views

Normal and inverted exclamation and question mark pairs

Challenge ¡We're going to give exclamation and question marks inverted buddies! Given a body of text containing sentences ending in ., ...
15 votes
11 answers
793 views

Easier communication means… ○ circular edition!

Based on this, but I was asked[​1​],[​2​] to do a graphical edition. Task Generate a circular display of the text ...
33 votes
9 answers
2k views

Between the Lines

While doodling around on square-ruled paper the other day, I came up with the above negative-space font for digits. In case you haven't spotted it yet, the spaces between the above shapes yield the ...
5 votes
2 answers
241 views

Alignment of a string

This is similar to the alignment used in word. Task 3 inputs: A 1 line string, a positive integer k, and direction (left or middle or right) Your job is to insert ...
25 votes
9 answers
3k views

Take CR and LF literally

As a celebration of good old Notepad, we are going to treat carriage returns and line feeds as what they originally meant, rather than what they are (ab-)used for today. Given a string consisting of ...
7 votes
3 answers
421 views

LaTeX Table Generator

Write a function or program which, given a number of lines and columns, generates a corresponding tabular environment for LaTeX with no data in it. Table format ...
18 votes
6 answers
949 views

Reverse Boustrophedon Text

Boustrophedon is a type of bi-directional text where successive lines alternate between reading left-to-right and right-to-left. Character direction was also mirrored with respect to reading direction....
11 votes
5 answers
271 views

Implement LaTeX accent macros

Introduction The LaTeX typesetting system uses macros for defining accents. For example, the letter ê is produced by \hat{e}. In this challenge, your task is to ...
9 votes
4 answers
400 views

Align the text to a block

Task Your task is to write whole program, which will align given input to a block of given size. Input: ...
15 votes
3 answers
357 views

Remove the hyphenation

Time for a new typography challenge! It’s a common problem when copy-pasting between various document formats: hyphenation. While it reduces the raggedness of a left-aligned layout or evens spacing in ...
14 votes
1 answer
252 views

A most excellent proof, too small to fi—!

You sit at home, rubbing your hands in a most evil fashion. This time, I'll be able to set the community A-SPIN! I'll merely claim that I have proven this problem (which is of no doubt improvable) ...
21 votes
2 answers
277 views

Format a Drop Capital

Introduction Write a program or function that adds a drop capital to a paragraph. The program will input the text to format, the column width, and the number of lines to drop the capital. The drop ...
11 votes
2 answers
543 views

Justify a text by adding spaces

Given this text Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ...