Honour the centering paragraph declaration

This commit is contained in:
gloamxun committed 2026-10-19 14:18:42 +08:00
1 parent 2c8d5e12d8
commit 1b0ce27ed3
8 files changed
+55 -10

No files matched your search

+6 -5
View File
@@ -298,10 +298,11 @@ block.
The `center` environment is a block: its content wraps at the text width and
every line is centered without justification (natural spaces), so
`\begin{center}\url{...}\end{center}` and centered short text match LaTeX.
`\centering` inside a paragraph is still a no-op. `\raggedright` and
`\raggedleft` are paragraph-level declarations: the affected runs use natural
space widths, the declaration is scoped by groups and the `raggedright`/
`raggedleft` environments, and the final line is not stretched to the margin.
`\centering`, `\raggedright`, and `\raggedleft` are paragraph-level
declarations: the affected runs use natural space widths, the declaration is
scoped by groups and the matching environments, centered lines are offset by
half the leftover width, and ragged-left/right lines are not stretched to the
margin.
`\rule[raise]{width}{height}` is rendered as a filled rectangle in both the
PDF and the SVG preview, including raised and dropped rules; a zero-thickness
@@ -485,7 +486,7 @@ advisory breaks, starred `\vspace`/`\hspace`, `center`, `\hrule`, `\fbox`,
| --- | --- | --- |
| Boxes | `\rule`, inline framed `\fbox`, block `\parbox`/`\minipage`, `\vbox`/`\vtop` (as full-width block), inline `\mbox`/`\makebox`, `\raisebox`, `center`, `\hrule` | true nested VBox material |
| Fonts | serif/sans/mono faces, bold/italic/mono/sans declarations, group scoping, true scaled small caps | — |
| Paragraphs | Knuth-Plass breaking, TeX hyphenation, justification, centering, `\raggedright`/`\raggedleft`, `\parindent` (17pt default), `\hfill`/`\hfil` | `\centering` in running text |
| Paragraphs | Knuth-Plass breaking, TeX hyphenation, justification, `\centering`/`\raggedright`/`\raggedleft`, `\parindent` (17pt default), `\hfill`/`\hfil` | — |
| Notes/floats | footnotes with page-bottom insertion area, title/author `\thanks`, figure/table `[htbp]` placement (top/bottom/page/here approximations) | deferred float queue, `\textfraction` |
| Contents | `\tableofcontents`, `\listoffigures`, `\listoftables` generated from numbered headings and captions, page numbers resolved after pagination | dotted leaders, per-chapter book/report contents |
| Pages | A4/Letter/... page sizes, margins/geometry, automatic pagination, `\newpage`, `\pagebreak`, plain/fancy page styles, `\thispagestyle`, fancyhdr L/C/R headers and footers | — |