Skip to content

レイアウトの差異が発生する問題を修正 - #58

Merged
Ryoga-exe merged 1 commit into
mainfrom
fix/layout-diff
Jun 18, 2026
Merged

Ryoga-exe merged 1 commit into
mainfrom
fix/layout-diff

Conversation

@Ryoga-exe

Copy link
Copy Markdown
Member

Resolve: #27
Resolve: #51

@Ryoga-exe Ryoga-exe self-assigned this Jun 18, 2026
@Ryoga-exe Ryoga-exe changed the title 全体コンパイル時と個別コンパイル時で結果が異なる問題および最初の記事と2番目以降の記事でレイアウトが異なる問題を修正 レイアウトの差異が発生する問題を修正 Jun 18, 2026
@Ryoga-exe
Ryoga-exe requested a review from oka4shi June 18, 2026 08:12

@oka4shi oka4shi left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

コンパイル結果を見た感じ直ってそう
OKです!

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR fixes subtle layout differences between compiling the whole book (root main.typ) vs compiling an individual article under articles/, addressing issues #27 and #51 by making initialization deterministic per scope.

Changes:

  • Split initialization into initialize-page (page settings) and initialize-body (text/layout + CJK break handling), removing the previous global “initialized” state.
  • Apply page initialization at the project level, and body initialization explicitly for TOC/backcover sections.
  • Insert a weak page break at the start of each article so included articles begin on a fresh page without creating an initial blank page in single-article builds.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

File Description
template/project.typ Uses initialize-page globally and scopes initialize-body to TOC/backcover to avoid cross-compilation layout drift.
template/init.typ Removes global init state; introduces initialize-page/initialize-body and composes them in initialize.
template/article.typ Adds pagebreak(weak: true) before the article heading to stabilize pagination when included in a full build.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@Ryoga-exe

Copy link
Copy Markdown
Member Author

マージします

@Ryoga-exe
Ryoga-exe merged commit 6acdd7a into main Jun 18, 2026
4 checks passed
@Ryoga-exe
Ryoga-exe deleted the fix/layout-diff branch June 18, 2026 09:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

3 participants