Task #1472: ParaShape indent IR 정답화 + 미주 페이지네이션 보정 분리(재설계)#1545
Merged
Conversation
ParaShape.indent 의 is_hwp3_variant /2 훼손을 제거해 IR 을 full HWPUNIT(HWPX 일치) 로 두고, 미주 TAC 수식 흐름의 indent_scale 을 변환본에서만 절반(2.0→1.0)으로 보정해 수식 effective indent(=full) 를 불변 유지 → 미주 한컴-PDF parity 보존. - parser/mod.rs: is_hwp3_variant 블록 indent/=2 제거 (spacing/=2 유지) - paragraph_layout.rs(2곳)/height_measurer.rs/typeset.rs: 변환본 수식 indent_scale 절반 - TypesetEngine 에 is_hwp3_variant Cell 추가(format_paragraph 핫패스 보정) 검증: 3-11월/3-09'24 ir-diff indent 0건, 미주 parity(issue_1082/1139/1256/1284) 통과, 전체 cargo test 148 타깃 0 실패, sample16 변환본 미주 세로밀도 유지.
Collaborator
|
@planet6897 감사합니다. 최신 검증 결과:
merge commit: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
요약
ParaShape.indent를 IR 에서 정답(full HWPUNIT, HWPX 일치) 로 유지하도록 재설계하고,종전
is_hwp3_variant의indent /= 2가 (의도치 않게) 수행하던 미주 페이지네이션 보정을값 훼손이 아닌 미주 TAC 수식 흐름의
indent_scale로 이전했습니다.근본 원인
-1608은parser/mod.rs의is_hwp3_variant분기ps.indent /= 2산출물이며, 이 분기는 HwpSummary 의 옛 연도(예:1997 템플릿 생성일)로 오탐됩니다. (모던 HWP5 와 진짜 HWP3 변환본은 파일 내부 신호가
동일해 탐지로 구분 불가)
line_segs를 그대로 써 indent 가 X offset 만 바꾸지만, 미주 TAC 수식 흐름은available_width(= 열폭 − effective_margin_left[indent 포함] − margin_right) 로 수식을행에 packing 하므로 indent 가 미주 높이/페이지네이션에 직접 영향을 줍니다.
indent /= 2(IR 절반) + 미주 수식indent_scale = 2.0으로수식 effective indent = (indent/2)×2 = full 을 만들어 한컴 미주 조판과 정합시켰습니다.
즉
indent /= 2는 단순 버그가 아니라 미주 페이지네이션의 load-bearing 보정이었습니다.변경 (불변식: 미주 수식 effective indent 불변, 본문 indent 만 half→full)
parser/mod.rs:is_hwp3_variant블록에서ps.indent /= 2제거(spacing/= 2는변환본 세로 밀도 한컴 정합에 필요해 유지) → IR indent = full.
indent_scale을 변환본에서만 절반(2.0→1.0, 셀 1.0→0.5)으로 보정하여effective indent(=full) 를 종전과 동일하게 유지. 적용 4 사이트:
renderer/layout/paragraph_layout.rs(수식 available_width / row base_x)renderer/height_measurer.rs(Paginator 측정 경로)renderer/typeset.rs::format_paragraph(TypesetEngine 높이/페이지네이션 핫패스;TypesetEngine에is_hwp3_variant: Cell<bool>추가)검증
ir-diffindent 차이 0건(HWPX 완전 일치).issue_1082/issue_1139/issue_1256/issue_1284.cargo test0 실패(diag_1042 · 비변환본 ·hwp3-sample16변환본 회귀 없음).hwp3-sample16-hwp5미주 세로 밀도(한컴2022 PDF 31행) 유지.Closes #1472