HWP5 수식-only 셀 z-표 행 압축 수정 — tac 순서매핑 (closes #1221)#1225
Merged
edwardkim merged 1 commit intoJun 1, 2026
Conversation
근본 원인: 수식-only 셀 문단은 텍스트가 없어 모든 LINE_SEG.text_start=0 →
composed 줄 char_start 전부 0(degenerate). paragraph_layout 빈-runs 줄 tac 블록이
char 범위로 매핑해 line0=빈범위, line1이 모든 수식 흡수 → 1.0/1.1 같은 줄 겹침
("1.01."), 첫 행 비고.
수정: 모든 줄 빈 runs + char_start degenerate + 줄수==tac수 이면 tac→줄 매핑을
순서(line_idx) 1:1 로 전환. 그 외(일반 텍스트+수식)는 기존 char-범위 유지(불변).
검증: 3-09월_교육_통합_2023 4쪽 문26 z-표 1.0~1.3 각 행 분리·P열 정렬(PDF 정합),
전체 cargo test 1896 passed/0 failed(svg_snapshot 회귀 0), rustfmt clean.
closes edwardkim#1221
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
04bbb9a to
b76ab20
Compare
edwardkim
added a commit
that referenced
this pull request
Jun 1, 2026
@planet6897. index_based_tac 4조건 가드, 전체 23쪽 diff 4쪽만 변화(z-표 세로 분리), 1925 passed. 시각 판정 통과. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Owner
|
머지했습니다(devel 수식-only 셀 문단의 degenerate char_start(모든 줄 0) 때문에 char-범위 tac 매핑이 무너져 두 수식이 한 줄에 흡수되던 근본 원인을 계측으로 정확히 짚으셨습니다. 검증:
#1220(wrap=Square 답안)·#1223(수식 줄 한글)에 이어 4쪽 문26 영역의 z-표 결함까지 마무리되었습니다. 셀 렌더 경로 변경이라 WASM 을 재빌드했습니다. 감사합니다. |
This was referenced Jun 2, 2026
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.
문제 (closes #1221)
samples/3-09월_교육_통합_2023.hwp4쪽 문26 표준정규분포표(z-표): z-열 "1.0"/"1.1" 이 겹쳐 "1.01." 로 표시되고 첫 행 z 가 비며 P-열과 정렬이 어긋남. 한글 2022 PDF 4쪽은 z=1.0/1.1/1.2/1.3 각 행 분리.근본 원인 (계측 확정)
z값은 인라인 수식. 수식-only 셀 문단은
paragraph_layout.rs의 빈-runs 줄 tac 렌더 블록에서 tac 를 줄 char 범위[comp_line.char_start, next.char_start)로 줄에 매핑한다.그러나 수식-only 문단은 텍스트가 없어 모든 LINE_SEG.text_start=0 → 모든 composed 줄 char_start=0(degenerate). 그 결과:
[0,0)= 빈 범위 → 수식 0개[0,MAX)→ 같은 문단의 모든 수식 흡수→ p[0] 의 두 수식(1.0/1.1)이 둘 다 line1 에 같은 y 로 가로 인접 렌더 → "1.01." 겹침, line0(행1) 비고.
(배제: line-height 클램프·셀 valign centering·
table_layout:2661·table_partial:1095·shape 경로 — z값은 모두 미통과. 실제 경로는paragraph_layout빈-runs 줄 블록.)수정
src/renderer/layout/paragraph_layout.rs빈-runs 줄 tac 블록:index_based_tac).23줄, 단일 블록.
검증
cargo test --release: 1896 passed / 0 failed (svg_snapshot 다수 표/수식 회귀 0).