You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
samples/exam_math_8.hwp 를 rhwp export-svg 로 내보내면, (가) 박스 안의 큰 cases 수식 a_{n+1} = { a_n-3 ... | ½a_n ... } 이 박스 좌상단(body-clip 원점)에 찍혀 박스 테두리 및 "(가) 모든 자연수 n에 대하여" 줄과 겹친다. 한컴 PDF(samples/exam_math_8.pdf)에서는 이 수식이 "(가) ..." 줄 다음 줄에 단독으로(들여쓰기 되어) 배치된다.
paragraph_layout.rs:716-729 의 has_tac_shape && raw_lh > max_fs * 1.5 조건이 TAC Shape 만 대상으로 하고 있어, TAC Equation 이 줄 높이를 키운 동일 상황을 처리하지 못함.
결과: 큰 수식의 line_height 가 폰트 기반(~18 px)으로 축소되고, ls[1] vpos 오프셋이 반영되지 않아 줄 상단이 ls[0] 과 같은 y 가 됨. eq_y = (y + baseline - layout_box.baseline).max(y) (paragraph_layout.rs:1586) 의 .max(y) clamp 가 음수 보정을 막아 y 가 col_area.y 에 고정됨.
x 축도 col_area.x 로 전파되어 박스 중앙 정렬/들여쓰기 미반영.
범위
수정 대상: src/renderer/layout/paragraph_layout.rs
has_tac_shape 판정 확장 (Equation 포함) 또는 별도 has_tac_large_equation 분기
큰 디스플레이 수식에 대한 text_y / eq_y 재계산
ls vpos 가 수식 줄에 적용되는지 파이프라인 확인
회귀 방지: samples/exam_math.hwp, samples/equation-lim.hwp 포함 기존 수식 샘플 시각 비교
증상
samples/exam_math_8.hwp를rhwp export-svg로 내보내면, (가) 박스 안의 큰 cases 수식a_{n+1} = { a_n-3 ... | ½a_n ... }이 박스 좌상단(body-clip 원점)에 찍혀 박스 테두리 및"(가) 모든 자연수 n에 대하여"줄과 겹친다. 한컴 PDF(samples/exam_math_8.pdf)에서는 이 수식이 "(가) ..." 줄 다음 줄에 단독으로(들여쓰기 되어) 배치된다.작은 인라인 수식(
n,m,3,|a_m|=|a_{m+2}|)은 정상 배치된다.재현
SVG 의 큰 수식 그룹 transform:
원인 (조사 결과 요약)
"(가) 모든 자연수 n에 대하여""이다."tac=true(인라인). 큰 수식도 인라인이지만 자기 몫의 줄 높이(4095 HU)를 가짐.paragraph_layout.rs:1574-1620(TAC 인라인 수식 분기).paragraph_layout.rs:716-729의has_tac_shape && raw_lh > max_fs * 1.5조건이 TAC Shape 만 대상으로 하고 있어, TAC Equation 이 줄 높이를 키운 동일 상황을 처리하지 못함.eq_y = (y + baseline - layout_box.baseline).max(y)(paragraph_layout.rs:1586) 의.max(y)clamp 가 음수 보정을 막아 y 가 col_area.y 에 고정됨.col_area.x로 전파되어 박스 중앙 정렬/들여쓰기 미반영.범위
src/renderer/layout/paragraph_layout.rssamples/exam_math.hwp,samples/equation-lim.hwp포함 기존 수식 샘플 시각 비교검증
exam_math_8.hwpSVG 가 PDF 와 시각적으로 동일 배치exam_math.hwp16개 수식 회귀 없음equation-lim.hwp회귀 없음cargo test --lib전수 통과, clippy clean관련