INNER CODE UNIT · Python
add_title_section
sangrokjung/claude-forge · scripts/md-to-docx/convert.py:258
def add_title_section(doc: Document, title: str, branding: str = "Your Organization"):
"""모던 타이틀 섹션"""
# Branding text (small)
brand_p = doc.add_paragraph()
brand_p.paragraph_format.space_before = Pt(20)
brand_p.paragraph_format.space_after = Pt(4)
run = brand_p.add_run(branding)
set_korean_font(run, FONT_FAMILY)
run.font.size = Pt(9)
run.font.bold = True
run.font.color.rgb = PRIMARY
# Letter spacing
rPr = run._element.get_or_add_rPr()
spacing = OxmlElement('w:spacing')
spacing.set(qn('w:val'), '60')
rPr.append(spacing)
# Main title