merge(800): sub2 800-1 변수 기호 기본값 · sub3 800-2~4 수식 영역 / 정의 영역 합침
- master_equation.export: 기호 씌움(msym.apply) 먼저 → 정의(view.definitions)는 기호 씌운 줄로 · _clean 마지막 - test_800_2: 800-1 기호로 중간 · 표 찾기가 다른 기호 = 다른 정의(옛 「한 줄로 합침」 기대 낡음) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -31,6 +31,7 @@ import master_cut as mcut
|
||||
import master_equation_view as view
|
||||
import master_formula as mf
|
||||
import master_material as mm
|
||||
import master_symbol as msym
|
||||
|
||||
from common_util.common_util_money import fmt
|
||||
|
||||
@@ -461,12 +462,7 @@ def export(master, key: str, given: dict | None = None, depth: int = 0) -> dict:
|
||||
total = {k: cut.get(k) for k in mf.BUNDLE}
|
||||
if depth == 0:
|
||||
sub = {"소계": subtotals(row, cut, total)}
|
||||
defs = (
|
||||
{"정의": view.definitions(out_lines, row, table(row, master), _unused(row))}
|
||||
if depth == 0
|
||||
else {}
|
||||
)
|
||||
return _clean(
|
||||
out = msym.apply( # 기호 먼저(800-1) → 정의는 기호 씌운 줄로(800-2)
|
||||
{
|
||||
"열쇠": row.get("키"),
|
||||
"이름": row.get("이름") or "",
|
||||
@@ -476,9 +472,11 @@ def export(master, key: str, given: dict | None = None, depth: int = 0) -> dict:
|
||||
"변수표": table(row, master),
|
||||
"합계": total,
|
||||
**sub,
|
||||
**defs,
|
||||
}
|
||||
)
|
||||
if depth == 0:
|
||||
out["정의"] = view.definitions(out_lines, row, out["변수표"], _unused(row))
|
||||
return _clean(out)
|
||||
|
||||
|
||||
def _unused(row: dict):
|
||||
|
||||
Reference in New Issue
Block a user