We solve the paragraph, not the line.
Knuth-Plass optimization decides line breaks for the entire paragraph at once, reducing the uneven word spacing that greedy line breaking tends to leave behind.
A typesetting tool for writerswho shape their own pages. Free to start.

01
To move a single word to the next line,we recompute the entire paragraph.
02
Knuth-Plass optimization decides line breaks for the entire paragraph at once, reducing the uneven word spacing that greedy line breaking tends to leave behind.
Korean composes by syllable blocks, breaks lines between characters rather than at spaces, and offers little elastic word spacing for justification. We built the engine to that bar. Latin script in your text runs on the same engine.
Line breaks and page breaks in the browser preview and the PDF are computed by the same typesetting engine from the same manuscript and fonts. ATLAS, this engine included, is written in Topaz 6.0.
PDF built to Bookk and Kyobo Book Centre POD specifications
03
It suits text-first Korean books such as novels, essays, self-help, memoirs and poetry, and English can appear in the text.
You can import Word (DOCX), Hangul (HWP, HWPX), Markdown and plain text files.
One PDF with the contents, title pages and page numbers already in place.
Sign up and add your manuscript to see the typeset pages and the PDF.
Publishing our essay The Rational Optimist taught us that finishing the writing was only the beginning. Making the interior meant learning InDesign or paying a substantial fee. So we built a tool that turns a manuscript into book pages and a print-ready PDF.
04
Topaz is a general-purpose programming language with typesetting built in. ATLAS is written in Topaz 6.0, from reading a manuscript to breaking lines, composing pages and producing the PDF. Topaz 6.0 is validated in ATLAS before its public release.
View TopazBelow is one part of that code, the line-breaking rules. From prohibited breaks to optimal division, the function names are Korean typesetting terms.
import std.io
let B = 1000000let R = 100000000let CAP = 25000function 반올림나눗셈(분자: int, 분모: int) -> int { let 몫 = 분자 / 분모 let 나머지 = 분자 % 분모 if (나머지 >= (분모 + 1) / 2) { 몫 + 1 } else { 몫 }}function 첫코드포인트(텍스트: string) -> int { 텍스트.codePointAt(0) ?? -1 }function 단일스칼라(텍스트: string) -> bool { 텍스트.scalars().length == 1 }function 낱말공백인가(텍스트: string) -> bool { 단일스칼라(텍스트) && (첫코드포인트(텍스트) == 32 || 첫코드포인트(텍스트) == 160) }function U0020인가(텍스트: string) -> bool { 단일스칼라(텍스트) && 첫코드포인트(텍스트) == 32 }function CJK정렬문자인가(코드: int) -> bool { (코드 >= 4352 && 코드 <= 4607) || (코드 >= 12592 && 코드 <= 12687) || (코드 >= 13312 && 코드 <= 19903) || (코드 >= 19968 && 코드 <= 40959) || (코드 >= 44032 && 코드 <= 55203) || (코드 >= 63744 && 코드 <= 64255)}function 정렬부호코드인가(코드: int) -> bool { 코드 == 46 || 코드 == 44 || 코드 == 59 || 코드 == 58 || 코드 == 33 || 코드 == 63 || 코드 == 34 || 코드 == 39 || 코드 == 40 || 코드 == 41 || 코드 == 91 || 코드 == 93 || 코드 == 123 || 코드 == 125 || 코드 == 12290 || 코드 == 12289 || 코드 == 65292 || 코드 == 65294 || 코드 == 12300 || 코드 == 12301 || 코드 == 12302 || 코드 == 12303 || 코드 == 12298 || 코드 == 12299 || 코드 == 12296 || 코드 == 12297}function 단일CJK인가(텍스트: string) -> bool { 단일스칼라(텍스트) && CJK정렬문자인가(첫코드포인트(텍스트)) }function 정렬부호단위인가(텍스트: string) -> bool { 텍스트.scalars().reduce(false, (발견: bool, 스칼라: string) => 발견 || 정렬부호코드인가(첫코드포인트(스칼라)))}function CJK간격후보인가(왼쪽: string, 오른쪽: string) -> bool { 단일CJK인가(왼쪽) && 단일CJK인가(오른쪽) && !정렬부호단위인가(왼쪽) && !정렬부호단위인가(오른쪽) }function 한글공백간격후보인가(왼쪽: string, 공백: string, 오른쪽: string) -> bool { 단일CJK인가(왼쪽) && 낱말공백인가(공백) && 단일CJK인가(오른쪽) && !정렬부호단위인가(왼쪽) && !정렬부호단위인가(오른쪽)}function CJK간격수(텍스트들: Array<string>, 시작: int, 끝: int) -> int { let mut 간격 = 0 for i in (시작..<끝) { if (i + 1 < 끝 && CJK간격후보인가(텍스트들[i], 텍스트들[i + 1])) { 간격 += 1 } } for i in (시작..<끝) { if (i + 2 < 끝 && 한글공백간격후보인가(텍스트들[i], 텍스트들[i + 1], 텍스트들[i + 2])) { if (!CJK간격후보인가(텍스트들[i], 텍스트들[i + 1])) { 간격 += 1 } if (!CJK간격후보인가(텍스트들[i + 1], 텍스트들[i + 2])) { 간격 += 1 } } } 간격}
function 정렬벌점(진행: Array<int>, 텍스트들: Array<string>, 목표너비: int, 최소간격: int, 비율M: int, 최대조정량: int, 최대간격: int, 최대간격비율R: int, 모드: int, 마지막인가: bool) -> int { if (마지막인가) { return 0 } let 개수 = 텍스트들.length let mut 유효 = 개수 while (유효 > 0 && 낱말공백인가(텍스트들[유효 - 1])) { 유효 -= 1 } if (유효 == 0) { return CAP * B } if (목표너비 <= 0) { return CAP * B } let 원래너비 = (0..<유효).reduce(0, (합: int, i: int) => 합 + 진행[i]) if (원래너비 * 1000 < 목표너비 * 비율M) { return CAP * B } let 조정량 = 목표너비 - 원래너비 if (조정량 <= 1) { return 0 } if (조정량 > 최대조정량) { return CAP * B + 반올림나눗셈((조정량 - 최대조정량) * B, 1000) } if (모드 == 0) { let 간격 = (0..<유효).filter((i: int) => U0020인가(텍스트들[i])).length if (간격 < 최소간격 || 간격 == 0) { return CAP * B } let 초과 = 조정량 - 간격 * 최대간격 if (초과 > 간격) { return CAP * B + 반올림나눗셈(초과 * B, 간격) } } else { let 간격 = CJK간격수(텍스트들, 0, 유효) if (간격 < 최소간격 || 간격 == 0) { return CAP * B } // 대표 CJK 진행은 단일 CJK 단위의 합과 개수로 구한다. 개수가 0이거나 진행이 1 이하면 None으로 보아 CAP를 준다. let 대표인덱스 = (0..<유효).filter((i: int) => 단일CJK인가(텍스트들[i])) let 대표합 = 대표인덱스.reduce(0, (합: int, i: int) => 합 + 진행[i]) let 대표수 = 대표인덱스.length let 불량 = 대표인덱스.reduce(false, (발견: bool, i: int) => 발견 || 진행[i] <= 1) if (불량 || 대표수 == 0) { return CAP * B } let 초과 = 조정량 - 간격 * 최대간격 let 비율R = 반올림나눗셈(조정량 * 대표수 * R, 간격 * 대표합) let 비율초과 = 비율R - 최대간격비율R if (초과 > 간격 || 비율초과 > 100000) { let 초과항 = if (초과 > 0) { 반올림나눗셈(초과 * B, 간격) } else { 0 } let 비율항 = if (비율초과 > 0) { 비율초과 * 100 } else { 0 } return CAP * B + 초과항 + 비율항 } } 0}
function 처리(입력: string) -> string { let 줄들 = 입력.split("\n") let 헤더 = 줄들[0].split(" ") let 목표너비 = 헤더[0].toInt() ?? 0 let 최소간격 = 헤더[1].toInt() ?? 0 let 비율M = 헤더[2].toInt() ?? 0 let 최대조정량 = 헤더[3].toInt() ?? 0 let 최대간격 = 헤더[4].toInt() ?? 0 let 최대간격비율R = 헤더[5].toInt() ?? 0 let 모드 = 헤더[6].toInt() ?? 0 let 마지막인가 = (헤더[7].toInt() ?? 0) != 0 let mut 진행: Array<int> = [] let mut 텍스트들: Array<string> = [] for li in (1..<줄들.length) { let 부분들 = 줄들[li].split("\t") 진행.push(부분들[0].toInt() ?? 0) 텍스트들.push(if (부분들.length >= 2) { 부분들[1] } else { "" }) } "{정렬벌점(진행, 텍스트들, 목표너비, 최소간격, 비율M, 최대조정량, 최대간격, 최대간격비율R, 모드, 마지막인가)}"}
io.writeLine(처리(io.readStdin()))This is part of the ATLAS source, published for explanation. It is separate from the ATLAS typesetting engine rights notice.
05
가장 먼저 꺼내고 싶은 화두는 과학이다. 앞선 프롤로그만 보면 다분히 철학적인 에세이처럼 느껴지겠지만, 철학은 세상을 바라보는 내 시선의 절반에 불과하다.
최근 대중 과학 채널들은 앞다투어 시뮬레이션 우주론에 열을 올린다.
You can import Word (DOCX), Hangul (HWP, HWPX), Markdown and plain text files.

ATLAS optimizes the line breaks of each paragraph under Korean typesetting rules and paginates the book for you.



An interior PDF, typeset to the trim you chose.
06

The Rational Optimist · 46 trim · 12 spreads chosen from 304 pages
1 / 1207
PDF built to Bookk and Kyobo Book Centre POD specifications
| Trim presets | BOOKK | Kyobo Book Centre POD |
|---|---|---|
| Gukban | 105 × 148 | |
| 46 | 127 × 188 | 128 × 188 |
| Landscape | 254 × 188 | |
| A5 · Guk | 148 × 210 | 148 × 210 |
| Short Shinguk | 152 × 210 | |
| Square | 210 × 210 | |
| Shinguk | 152 × 225 | |
| Crown | 176 × 248 | |
| B5 | 182 × 257 | 188 × 254 |
| A4 | 210 × 297 | 210 × 297 |