fix(equation): quote rm, it and bold as identifiers, and read bare braces back - #360
Merged
Merged
Conversation
…aces back
latex_to_eqedit wrote identifiers spelled rm, it or bold as they were (e^{it} as e ^{it}). Hancom reads
those words as font switches, so alone in a script they draw nothing; they are now quoted like the other
reserved words (e ^{"it"}), and eqedit_to_latex reads them back as letters. \lbrace and \rbrace convert
like \{ and \} (also after \left and \right), and eqedit_to_latex reads a bare LBRACE or RBRACE outside
LEFT/RIGHT as \{ or \}. The equation size notes say that Hancom on Windows keeps the stored box and
baseLine when it saves and lays the page out with them.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ds-and-brace-aliases # Conflicts: # CHANGELOG.md
Owner
Author
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.
바뀐 점
수식 변환(실험,
latex_to_eqedit·eqedit_to_latex)의 남은 틈 셋을 메운다.latex_to_eqedit가e^{it},x_{rm},a_{bold}를e ^{it}처럼 그대로 썼다.rm·it·bold를 글꼴 전환으로 읽는다. 그래서 첨자에 홀로 오면 아무것도 그리지 않는다(e ^{it}는 e만 남는다).T _{"int"})처럼 따옴표로 감싼다(e ^{"it"}). 따옴표 글은 기울임으로 그려져 LaTeX의 글자와 같아 보인다.eqedit_to_latex는 따옴표로 감싼 그 낱말을 다시 글자로 읽는다._RESERVED_WORDS)에rm·it·bold(대문자 포함)를 더했다.\lbrace·\rbrace\{·\}처럼LBRACE·RBRACE로 옮긴다.\left·\right뒤에서도 그렇다.LBRACE·RBRACE되읽기eqedit_to_latex가LEFT·RIGHT밖의LBRACE x RBRACE를\{ x \}로 읽는다. 전에는 낱말 그대로 남았다.latex_to_eqedit가\{ x \}를 이렇게 쓰므로, 이제 되돌아온다.measure.py머리,estimate_equation_size)에 한 줄을 더한다. Windows의 한/글은 저장할 때 상자(hp:sz)와baseLine을 그대로 두고, 그 상자로 쪽을 배치한다.테스트
tests/test_equation_authoring.py:e^{it},x_{rm} + a_{bold},\lbrace x \rbrace,\left\lbrace x \right\rbracetests/test_equation_converter.py"it"·"rm"·"bold"를 글자로 되읽기LBRACE·RBRACE와LEFT·RIGHT안의 것🤖 Generated with Claude Code