PAPERSIZE(5)

๐Ÿ“ฆ
version 1.1.29build1 ยท 3 versions
, in debian bookworm, ubuntu noble

๐Ÿ‘‘ PAPERSIZE(5) โ€” the one and only File Formats Manual glow-up ๐Ÿ‘‘

okay bestie, sit down, hydrate, because we're about to talk about the literal tiniest, cutest, most chaotic config file on your whole system: papersize. yes it's a File Formats Manual page. yes it's five lines long. and yes it's still gonna eat. ๐Ÿ“


โœจ NAME โœจ

papersize โ€” specify preferred paper size ๐ŸŽ€

like. that's it. that's the whole job. she tells everyone what size paper you want. icon behaviour.


๐Ÿ“„ SYNOPSYS ๐Ÿ“„

/etc/papersize

(side note: yes, the section is spelled SYNOPSYS in the original and we are respecting our elders ๐Ÿ’…)


๐Ÿ’– DESCRIPTION ๐Ÿ’–

so the papersize file is literally just there to say which paper size you prefer, and the commands and programs that generate documents go peek at it. that's the whole vibe. one file, one job, main character energy. โœจ

and the format? babygirl it is extremely simple:

  • whitespace is ignored ๐Ÿซถ
  • anything starting with # is ignored (hello comments, we love you)
  • the name of the paper is the first string found
  • the case in the name of the paper does not import โ€” wait, matter โ€” though pls do check the CAVEATS section, because it's not always that simple ๐Ÿ˜ญ

๐ŸŒˆ PAPER NAMES ๐ŸŒˆ

these are the names programs commonly understand, no cap:

a3, a4, a5, b5, letter, legal, executive, note and 11x17

and then there are the additional names you might run into out in the wild, and there are a LOT of them, she's got range:

a0, a1, a2, a6, a7, a8, a9, a10, b0, b1, b2, b3, b4, tabloid, statement, note, halfletter, halfexecutive, folio, quarto, ledger, archA, archB, archC, archD, archE, flsa, flse, csheet, dsheet, esheet and 10x14

(and yes note really does show up in both lists, that's not me being messy, that's just the original being iconic ๐Ÿงš)


๐Ÿฆ‹ how the override chain works ๐Ÿฆ‹

the value in the papersize file can get overridden, and the lookup order is:

  1. the PAPERSIZE environment variable ๐Ÿ‘€
  2. then the contents of the file specified by the PAPERCONF environment variable ๐Ÿ“‚

and if the papersize file doesn't exist at all? programs using the paper library just default to using letter as a fall-back value. safety net, bestie. ๐Ÿ’œ


๐Ÿ’€ CAVEATS ๐Ÿ’€

okay this is the important part, do NOT scroll past, I'm serious.

this manual page documents the format of the papersize file as read by the libpaper library. that's the key detail.

some programs that read this file do not yet use the library, and those programs may have trouble ignoring whitespace and comments in the file. they may also require that the paper names use a specific capitalization. ๐Ÿ˜ญ

so like. lowercase a4 might slay in one program and get fully rejected by another. it's giving "not all readers are built the same." write carefully, check your case, know your audience. periodt. ๐Ÿ’…


๐Ÿ“š DOCUMENTATION ๐Ÿ“š

Yves Arrouye <arrouye@debian.org> ๐Ÿ‘‘


๐Ÿ”ฅ SEE ALSO ๐Ÿ”ฅ


and that's the page, bestie! ๐ŸŽ€ go forth and tell your system what size your paper is. and hey โ€” this was PAPERSIZE(5) from the File Formats Manual, so if you see that same title floating at the bottom of a terminal near you, that's just her signing off. mwah. ๐Ÿซถ๐Ÿ’–โœจ

๐Ÿ“ฆ where this page comes from