미주(해설) 다줄 문단 줄간격 간헐적 좁음 수정 (closes #1236)#1240
Merged
edwardkim merged 1 commit intoJun 2, 2026
Merged
Conversation
## 문제 풀이(미주) 페이지에서 줄간격이 간헐적으로 좁아짐(예: 3-11월_실전 12쪽 문19 "하면→f'(x)" 14.1px vs 정상 20px). 전역이 아니라 특정 줄 전환에서만 발생. ## 원인 paragraph_layout.rs 의 다줄 미주 문단(endnote_line_vpos_base, end>start_line+1) 줄 배치에서 마지막 줄의 trailing 줄간격(line_spacing)을 0으로 떨어뜨림. 단일줄· 일반 문단은 줄간격을 항상 더해 정상 → 다줄 미주 문단 경계에서만 간헐적 좁음. ## 수정 (조건 게이트) 무조건 줄간격 추가는 issue_1139/1189(문제-사이 margin, 페이지네이션) 회귀를 유발 (미주 문단 높이가 페이지네이션과 결합). 따라서 "다음 문단이 같은 미주(문제) 내 연속 문단"일 때만 마지막 줄 줄간격을 적용: - layout.rs: endnote_para_has_same_endnote_successor() — endnote_para_sources 의 (section,para,control)_index 비교로 같은 미주 연속 판별. - paragraph_layout.rs: 마지막 줄 게이트 line_idx+1<end || 같은_미주_연속. 문제 경계(미주 마지막 문단, between-notes margin)는 0 유지 → 회귀 차단. ## 검증 - 문19 14.1→20.1px(PDF 정합). 지적 페이지 narrow(13~16px): 10쪽 1→0, 11쪽 3→0, 12쪽 4→0, 14쪽 3→1. - 전체 cargo test 1933 passed 0 failed(issue_1139/1189 미주 테스트 포함), 골든 스냅샷 8 passed, 페이지수 불변. ## 후속 이슈(별개 root cause) - edwardkim#1238 미주 문제 제목 앞 between-notes margin 누락(문22 등). - edwardkim#1239 수식 다행(S=…) 줄 병합(문20).
Owner
|
메인테이너 검증 완료했습니다. 확인 내용:
미주 다줄 문단의 줄간격 압축 문제가 해결된 것으로 확인되어 기여 감사합니다. |
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.
요약
풀이(미주) 페이지에서 줄간격이 간헐적으로 좁아지는 문제(#1236)를, 다줄 미주 문단 마지막 줄의 trailing 줄간격을 조건 게이트로 적용하여 수정.
원인
paragraph_layout.rs의 다줄 미주 문단(endnote_line_vpos_base,end>start_line+1) 줄 배치에서 마지막 줄의 trailing 줄간격(line_spacing)을 0으로 떨어뜨림. 단일줄·일반 문단은 줄간격을 항상 더해 정상 → 다줄 미주 문단 경계에서만 간헐적 좁음(예: 12쪽 문19 "하면→f'(x)" 14.1px vs 정상 20px).수정 (조건 게이트)
무조건 줄간격 추가는 issue_1139/1189(문제-사이 margin·페이지네이션) 회귀를 유발(미주 문단 높이가 페이지네이션과 결합, 메모리 #1022 경고). 따라서 "다음 문단이 같은 미주(문제) 내 연속 문단"일 때만 적용:
layout.rsendnote_para_has_same_endnote_successor()—endnote_para_sources의(section,para,control)_index비교paragraph_layout.rsline_idx+1 < end || 같은_미주_연속문제 경계(미주 마지막 문단, between-notes margin) → 0 유지 → 중복 가산·회귀 차단.
검증
cargo test후속 이슈 (별개 root cause)
closes #1236