task 1245: 어울림 그림 및 미주 수식 배치 보정#1250
Merged
Merged
Conversation
3-09월_교육_통합_2022 7쪽 Square 그림이 누적 LINE_SEG vertical_pos를 중복 적용해 하단 밖으로 밀리던 문제를 첫 줄 대비 상대 delta로 보정했다. 검증: cargo test --test issue_1139_inline_picture_duplicate -- --nocapture; cargo fmt --all --check
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.
작업 범위
이 PR은 #1245에서 보고된
3-09월_교육_통합_2022.hwp및 후속 확인 중 발견된3-09월_교육_통합_2023.hwp렌더링 불일치를 단계별로 보정합니다.대상 문서:
samples/3-09월_교육_통합_2022.hwpsamples/3-09월_교육_통합_2023.hwp주요 영역:
Square/어울림그림 객체의 line segment 기반 세로 배치Stage1: 2022년 9월 문서 7쪽 그림 객체 위치 보정
대상:
3-09월_교육_통합_2022.hwp문25),문28)주변Square/어울림그림 객체원인:
square_wrap_first_narrow_line_vpos_px는 어울림 그림이 문단 중간부터 본문을 감싸는 경우 처음 좁아지는LINE_SEG.vertical_pos를 그림 상단 보정값으로 사용합니다.vertical_pos를 px로 변환해para_base_y에 그대로 더했습니다.vertical_pos는31648처럼 이미 누적 흐름값입니다.vertical_pos=37804를 다시 더하면para_base_y + absolute_vpos가 되어 그림이 페이지 하단 밖으로 밀립니다.수정:
vertical_pos가 아니라 첫 줄 대비 상대 delta로 계산했습니다.vertical_pos=0인 기존 문서 유형은 delta가 기존 raw 값과 같으므로 기존 동작을 유지합니다.회귀 가드:
issue_1245_2022_page7_square_pictures_use_relative_line_vpos검증한 내용:
문25)타원 그림pi=386 ci=11이 첫 좁은 줄과 같은 y에 붙는지 확인했습니다.문28)포물선 그림pi=420 ci=9도 같은 방식으로 확인했습니다.문25)그림이 페이지 하단 밖으로 밀리지 않는지 확인했습니다.Stage2: 2022년 9월 문서 10쪽
문12)수식 배치 보정대상:
3-09월_교육_통합_2022.hwp문12)본문과 수식 블록초기 증상:
따라서텍스트는x=402.52에서 시작하지만, 바로 뒤 첫lim수식은x=442.88에서 시작했습니다.따라서와 첫 수식 사이 y 간격이 한컴보다 크게 남았습니다.원인:
pi=574의 텍스트 없는 TAC 수식-only 문단입니다.effective_margin_left와 alignment offset을 다시 적용했습니다.RHWP_DEBUG_PARA_TAC=1로 확인한 결과,pi=574에는 TAC가 없는 선행LINE_SEG가 존재했습니다.char_start=0, char_end=0인 퇴화 guide 줄이고, 실제 첫 수식은 다음 줄char_start=0..1에 매핑되어 있었습니다.수정:
LINE_SEG흐름을 따르도록effective_col_x기준으로 배치합니다.회귀 가드:
issue_1209_2022_sep_page10_question12_uses_safe_vpos_backtrack검증한 내용:
문12)첫 수식 x 위치가 우측 단 왼쪽 흐름과 정렬되는지 확인했습니다.따라서와 첫 수식 사이 y 간격이 20px 이하로 유지되는지 확인했습니다.para_index가 원 문단 번호와 직접 대응하지 않는 경우가 있어, 수식 SVG 내용과 y 범위로 대상 수식을 찾도록 테스트를 보강했습니다.수정 후 확인값:
lim수식 시작 x:442.88에서402.52로 이동따라서y:564.88lim수식 y:572.71Stage3: 2023년 9월 문서 4쪽
문26)중복 표시 보정대상:
3-09월_교육_통합_2023.hwp문26)증상:
문26)제목이 정상 위치에 보이지만, 같은 영역에 작은문26)표기가 한 번 더 나타나 본문 첫 줄 부근과 겹쳤습니다.원인:
pi=258원문 문단에는문26)텍스트가 직접 들어 있지 않고, 첫 control이 미주(Endnote)입니다.layout_composed_paragraph는 미주 선두 번호를 본문 크기의 일반TextRun으로 먼저 렌더링합니다.Endnotecontrol의FootnoteMarker가 같은 줄에 위첨자로 다시 생성되어 조판부호 표시 상태에서문26)이 중복 표시되었습니다.수정:
TextRun으로 이미 렌더된 경우, 같은 위치의FootnoteMarker생성을 건너뛰도록 했습니다.FootnoteMarker는 유지하고, 미주 선두 번호 중복만 제외했습니다.회귀 가드:
issue_1245_2023_page4_question26_endnote_marker_not_duplicated검증한 내용:
3-09월_교육_통합_2023.hwp4쪽 렌더 트리에서문26이 한 번만 나타나는지 확인했습니다.PR #1241 병합 후 문12 수식 배정 회귀 보정
배경:
upstream/devel에 PR #1241이 반영된 뒤 task1245 브랜치를 rebase했습니다.문12)첫 수식이 다시따라서와 겹칠 수 있는 회귀가 발견되었습니다.원인:
수정:
equation_only_tac_line_assignment가 문단 정보를 함께 받아, TAC가 없는 선행 guide 줄을 후보에서 제외하도록 했습니다.확인:
AH수식이따라서꼬리와 겹치지 않는 위치로 이동한 것을 확인했습니다.issue_1209_2022_sep_page10_question12_uses_safe_vpos_backtrack가 다시 통과했습니다.PR #1247 병합 후 회귀 확인
upstream/devel에 PR #1247이 반영된 뒤 다시 rebase했습니다.endnote_between_notes_hu)와 task1245의 TAC guide 보정 로직이 함께 유지되는 것을 확인했습니다.cargo test --test issue_1139_inline_picture_duplicate -- --nocapture기준 43개 테스트가 통과했습니다.최종 보고서
mydocs/report/task_m100_1245_report.md를 추가했습니다.변경 파일
src/renderer/layout.rssrc/renderer/layout/paragraph_layout.rstests/issue_1139_inline_picture_duplicate.rsmydocs/plans/task_m100_1245.mdmydocs/plans/task_m100_1245_impl.mdmydocs/working/task_m100_1245_stage0.mdmydocs/working/task_m100_1245_stage1.mdmydocs/working/task_m100_1245_stage2.mdmydocs/working/task_m100_1245_stage3.mdmydocs/report/task_m100_1245_report.md검증
최종 PR 전 수행한 검증:
결과:
cargo test --tests: 통과issue_1139_inline_picture_duplicate: 43개 통과cargo fmt --all -- --check: 통과git diff --check: 통과관련 이슈
Closes #1245