수식 미주 시그마·괄호 지수 렌더 수정 (#1304, #1305)#1306
Closed
planet6897 wants to merge 2 commits into
Closed
Conversation
미주 수식 sum_k=1 ^6 (브레이스 없음, 공백 구분)에서 하한이 k 하나로 잘리고 =1/^6 이 분리되며, 첨자가 ∑ 중심보다 좌측에 정렬되던 문제 수정. - tokenizer: Token.space_before 플래그 추가 (일반 공백 유무 기록) - parser: 무브레이스 하한 전용 parse_script_operand 도입 (원자 (공백없는 관계연산자 원자)* 패턴, 위첨자/명령 body 무변경) - 시그마 상·하한 가로 정렬: big-op 연산자 중앙정렬 폭을 layout 의 estimate_text_width 로 통일 (중복 estimate_op_width 제거) - 테스트 6개, 계획서/보고서 closes edwardkim#1304
(k+1)^2 의 ^2 가 base 없는 orphan Superscript 가 되어 지수가 안 올라가던 문제 수정. 리터럴 (...) 가 느슨한 Symbol 로 파싱돼 첨자가 결합할 그룹이 없던 것이 원인. - (...) 뒤에 ^/_ 가 올 때만 EqNode::Paren 그룹으로 묶어 결합 (첨자 없는 괄호는 기존 느슨한 렌더 유지 → 회귀 0) - paren_then_script / parse_paren_group 보조 추가 - 테스트 4개 closes edwardkim#1305
edwardkim
added a commit
that referenced
this pull request
Jun 5, 2026
edwardkim
added a commit
that referenced
this pull request
Jun 5, 2026
Owner
|
확인했습니다. 이번 PR의 핵심 변경인 미주 수식 PR 브랜치 전체는 오래된 base 때문에 최근 변경을 되돌릴 위험이 있어, 수식 관련 코드 패치만 maintainer integration으로 반영했습니다. 검증:
반영 완료되어 |
edwardkim
added a commit
that referenced
this pull request
Jun 5, 2026
edwardkim
added a commit
that referenced
this pull request
Jun 5, 2026
Martinel2
pushed a commit
to Martinel2/rhwp
that referenced
this pull request
Jun 7, 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.
개요
3-10월_교육_통합_2022.hwp11쪽 문18 해설(미주)의 시그마 수식이 깨지던 문제를 수정합니다. 사용자 신고: "시그마에서 인자가 안보임 k만 보임. 시작/끝(범위가) 표시 안됨".수정 후 문18 해설이 권위 PDF(
pdf/3-10월_교육_통합_2022.pdf)와 완전 정합합니다.커밋
Task #1304 — 미주 시그마 무브레이스 첨자 공백 구분 + 상·하한 가로 정렬
sum_k=1 ^6(브레이스 없이 공백 구분)로 저장됨. HWP에서 일반 공백은 무브레이스 operand의 구문적 경계 구분자인데, 토크나이저가 공백을 버리고(CASES+EQALIGN 중첩 토폴로지에서 SVG y-scale 극단 비율(1.64x)로 글리프 왜곡 — 미적분03.hwp p5 (#175 후속) #505) 파서가 무브레이스 첨자를 단일 토큰만 취해 하한이k로 잘리고=1/^6이 분리됨.tokenizer:Token.space_before플래그 추가 (경계 토큰 없이 공백 유무만 기록).parser: 무브레이스 하한 전용parse_script_operand도입 —원자 (공백없는 관계연산자 원자)*패턴.space_before가드로x^2 = 4(공백 등식) 보호, 위첨자·명령 body 무변경.estimate_text_width로 통일(중복estimate_op_width제거) —0.6과소추정으로 ∑가 우측 치우치던 문제 해소.sum_k=1 ^6= ∑(하한k=1전체, 상한6) 확정.Task #1305 — 괄호 그룹 뒤 위첨자 orphan 수정
(...)가EqNode::Paren그룹이 아닌 느슨한Symbol로 파싱돼,)뒤^2가 결합 base 없는Superscript{base:Empty}orphan이 되어 지수가 안 올라감.(...)뒤에^/_가 올 때만EqNode::Paren그룹으로 묶어 결합(paren_then_script/parse_paren_group). 첨자 없는 괄호는 기존 느슨한 렌더 유지 → 회귀 0. 라운드 괄호 한정.검증
cargo test --lib/cargo test --tests0 failedcargo fmt --check/cargo clippy --libcleanx^2 = 4,a_n b,a_n+1,7^2,left(x)right^2, 일반 괄호 등)(k±1)^2지수, 권위 PDF 일치비범위
[...]^n(텍스트 높이에서도 path 렌더 → 외형 변화 위험, 필요 시 별도 이슈)🤖 Generated with Claude Code