c65efa32ac
A Chinese manuscript indents the first line of every paragraph by two characters, and the paragraph body carried `text-indent: 2em` for it. CSS indents only the *first line of a block*, and the body was one block — so the opening line was indented and every line the writer broke (with 另起一行, or after a display formula) started flush against the margin, where a new paragraph should be indented. The bug was invisible until the break flag existed, because until then a paragraph had no interior line starts. The renderer now groups a paragraph into printed lines and makes each one its own block, with the indent on the line rather than on the paragraph: * the paragraph's first line — indented, as before; * a line the writer broke — indented, which is the fix; * a line after a display formula — **not** indented, because that text continues the same paragraph and a Chinese manuscript does not indent a continuation; * a display formula's own line — centred, no indent. Measured in the browser on a paper built for it: the first line starts 30px in (2em at 15px), the broken line starts 30px in, the formula sits on its own centred line, and the text after it returns to 0. Paper 96 is unchanged at 21 paragraphs, all 21 still indented 30px, 28 display formulas, no render failures. 54 paper checks, 61 reference checks and 99 MCP checks pass, with the build clean.
frontend
This template should help get you started developing with Vue 3 in Vite.
Recommended IDE Setup
VS Code + Vue (Official) (and disable Vetur).
Recommended Browser Setup
- Chromium-based browsers (Chrome, Edge, Brave, etc.):
- Firefox:
Type Support for .vue Imports in TS
TypeScript cannot handle type information for .vue imports by default, so we replace the tsc CLI with vue-tsc for type checking. In editors, we need Volar to make the TypeScript language service aware of .vue types.
Customize configuration
See Vite Configuration Reference.
Project Setup
pnpm install
Compile and Hot-Reload for Development
pnpm dev
Type-Check, Compile and Minify for Production
pnpm build