Skip to content

Commit 8eaf231

Browse files
Peter WangPeter Wang
authored andcommitted
Increase type size ~28% for readability; commit PDF build tooling
Site: body 14px -> 18px, h1 28px -> 36px via style.scss theme override (em-based elements scale with body). PDF: body 11.5pt -> 15pt, headings scaled proportionally; now 87 pages. Build script and stylesheet moved to tools/ so the PDF is regenerable from the repo.
1 parent 3ea35bb commit 8eaf231

5 files changed

Lines changed: 115 additions & 1 deletion

File tree

assets/css/style.scss

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
---
2+
---
3+
4+
@import "{{ site.theme }}";
5+
6+
/* Readability bump: theme default is 14px body / 28px h1 / 11px small.
7+
Scaled ~28% per operator preference (2026-07-09). Em-based elements
8+
(h2-h6, p, li) inherit from body and scale automatically. */
9+
body {
10+
font-size: 18px;
11+
}
12+
13+
h1 {
14+
font-size: 36px;
15+
}
16+
17+
small,
18+
a small {
19+
font-size: 14px;
20+
}

index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ essay's argument as a spoken piece.
2323
version; everything else derives from it.
2424

2525
**If you prefer one file:** the
26-
[**self-contained PDF**](unmoored-self.pdf) (60 pages) collects the essay,
26+
[**self-contained PDF**](unmoored-self.pdf) (87 pages) collects the essay,
2727
the briefing suite, the audio mini-book, and the sources index.
2828

2929
## The briefing suite

tools/build-pdf.sh

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
#!/bin/bash
2+
# Build the self-contained PDF edition of The Unmoored Self.
3+
# Requires: pandoc, Google Chrome. Run from the repo root:
4+
# bash tools/build-pdf.sh
5+
set -euo pipefail
6+
7+
mkdir -p build
8+
9+
python3 - <<'EOF'
10+
import re, os
11+
12+
SITE = "https://pzwang.github.io/unmoored-self/"
13+
order = [
14+
("the-unmoored-self.md", None),
15+
("briefing/00-overview.md", "PART TWO — THE BRIEFING"),
16+
("briefing/01-the-collapse-of-distance.md", None),
17+
("briefing/02-the-self-without-a-floor.md", None),
18+
("briefing/03-the-simulacrum-engine.md", None),
19+
("briefing/04-interventions-and-their-limits.md", None),
20+
("briefing/05-the-choice-trap.md", None),
21+
("briefing/06-the-convergence.md", None),
22+
("briefing/07-design-implications.md", None),
23+
("briefing/transcript-audio-minibook.md", "PART THREE — THE AUDIO MINI-BOOK"),
24+
("references/README.md", "APPENDIX — SOURCES"),
25+
]
26+
27+
def rewrite_links(text, srcdir):
28+
def repl(m):
29+
label, link = m.group(1), m.group(2)
30+
if link.startswith(("http", "mailto:", "#")):
31+
return m.group(0)
32+
path = os.path.normpath(os.path.join(srcdir, link.split("#")[0]))
33+
frag = "#" + link.split("#")[1] if "#" in link else ""
34+
if path.endswith(".md"):
35+
path = path[:-3] + ".html"
36+
if path in ("index.html",):
37+
path = ""
38+
return f"[{label}]({SITE}{path.replace(' ', '%20')}{frag})"
39+
return re.sub(r"\[([^\]]*)\]\(([^)]+)\)", repl, text)
40+
41+
parts = []
42+
for f, part in order:
43+
text = open(f).read()
44+
text = rewrite_links(text, os.path.dirname(f))
45+
if part:
46+
parts.append(f'\n\n<div class="part-divider">{part}</div>\n\n')
47+
parts.append('\n\n<div class="chapter"></div>\n\n' + text)
48+
49+
front = """<div class="titlepage">
50+
<h1 class="book-title">The Unmoored Self</h1>
51+
<p class="book-subtitle">Media, Meaning, and the Crisis of Modern Communal Life</p>
52+
<p class="book-author">Peter Wang</p>
53+
<p class="book-note">The essay, the briefing suite for builders of social software,
54+
and the audio mini-book — self-contained edition, 2026.<br>
55+
Live version: <a href="https://pzwang.github.io/unmoored-self/">pzwang.github.io/unmoored-self</a></p>
56+
</div>
57+
"""
58+
open("build/combined.md", "w").write(front + "".join(parts))
59+
print("combined:", len("".join(parts).split()), "words")
60+
EOF
61+
62+
cp tools/pdf.css build/pdf.css
63+
pandoc build/combined.md -f gfm -t html5 -s --css=pdf.css \
64+
--metadata title="The Unmoored Self" -o build/unmoored-self.html
65+
66+
"/Applications/Google Chrome.app/Contents/MacOS/Google Chrome" \
67+
--headless --disable-gpu --no-pdf-header-footer \
68+
--print-to-pdf="$PWD/unmoored-self.pdf" \
69+
"file://$PWD/build/unmoored-self.html"
70+
71+
ls -lh unmoored-self.pdf

tools/pdf.css

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
@page { size: letter; margin: 2.2cm 2.4cm; }
2+
body { font-family: "Palatino", "Georgia", serif; font-size: 15pt; line-height: 1.55;
3+
color: #1a1a1a; max-width: 100%; margin: 0; }
4+
.titlepage { text-align: center; padding-top: 28vh; page-break-after: always; }
5+
.book-title { font-size: 44pt; margin-bottom: 0.2em; border: none; }
6+
.book-subtitle { font-size: 20pt; font-style: italic; color: #444; }
7+
.book-author { font-size: 18pt; margin-top: 3em; }
8+
.book-note { font-size: 12pt; color: #666; margin-top: 6em; }
9+
.part-divider { page-break-before: always; text-align: center; padding-top: 40vh;
10+
font-size: 21pt; letter-spacing: 0.25em; color: #555; page-break-after: always; }
11+
.chapter { page-break-before: always; }
12+
h1 { font-size: 27pt; margin-top: 0.5em; line-height: 1.25; }
13+
h2 { font-size: 19pt; margin-top: 1.6em; }
14+
h3 { font-size: 16pt; }
15+
blockquote { border-left: 3px solid #999; margin-left: 0; padding-left: 1.2em;
16+
color: #333; font-style: italic; }
17+
code, pre { font-family: "Menlo", monospace; font-size: 12pt; }
18+
pre { white-space: pre-wrap; background: #f6f6f6; padding: 0.8em; }
19+
table { border-collapse: collapse; font-size: 12pt; }
20+
th, td { border: 1px solid #bbb; padding: 0.35em 0.6em; text-align: left; }
21+
a { color: #1a4a7a; text-decoration: none; }
22+
hr { border: none; border-top: 1px solid #ccc; margin: 2em 20%; }
23+
img { max-width: 100%; }

unmoored-self.pdf

-70 KB
Binary file not shown.

0 commit comments

Comments
 (0)