fix: table layout — cap height at 5.3in to prevent footer overlap

- L_table: Inches(0.5×rows) → min(0.5×rows, 5.3) 상한 적용
  (footer y=7.05, table top y=1.7 → max 5.3" + 0.05" gap)
- 영향 슬라이드: 행 수 11+인 표 전체 (DI/DO 14행, TactTime 13행, PLC신호 12행)
- SKILL.md Notes에 table 높이 상한 규칙 문서화

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
노도연 2026-06-30 16:09:47 +09:00
parent 0cddd5d5b3
commit 12d78900cd
2 changed files with 9 additions and 2 deletions

View File

@ -132,3 +132,6 @@ for n in z.namelist() if re.match(r'ppt/slides/slide\\d+',n)]"
- Logo asset: `assets/Ubisam_logo_transparent.png`. On dark divider/closing the
colored logo has lower contrast but matches the user's original placement.
- Keep `.md` files under 200 lines (project rule 4); split if it grows.
- **`table` 높이 상한**: 표는 `_TABLE_MAX_H = 5.3"` (y 1.7" ~ 7.0")로 자동 제한.
행이 많아도 푸터(`Ubisam | <doc_title>`, y=7.05")를 절대 침범하지 않는다.
행 높이는 `min(0.5×rows, 5.3) / rows`로 균등 압축된다.

View File

@ -395,6 +395,9 @@ def _fill_cell(cell, text, size, bold, color, center=False):
_set_font(r, size=size, bold=bold, color=color)
_TABLE_TOP = 1.7 # table body starts here (inches)
_TABLE_MAX_H = 5.3 # max table height: footer y(7.05) - table top(1.7) - margin(0.05)
def L_table(prs, d):
s = blank_slide(prs)
header(s, d.get("no", "06."), d.get("title", ""), d.get("subtitle"))
@ -403,8 +406,9 @@ def L_table(prs, d):
data = d.get("rows", [])
center_cols = set(d.get("center_cols", []))
rows = len(data) + 1
tbl = s.shapes.add_table(rows, len(headers), Inches(0.55), Inches(1.7),
Inches(11.4), Inches(0.5 * rows)).table
tbl_h = min(0.5 * rows, _TABLE_MAX_H)
tbl = s.shapes.add_table(rows, len(headers), Inches(0.55), Inches(_TABLE_TOP),
Inches(11.4), Inches(tbl_h)).table
for c, w in enumerate(widths):
tbl.columns[c].width = Inches(w)
for c, hd in enumerate(headers):