INNER CODE UNIT · Python
create_styled_document
sangrokjung/claude-forge · scripts/md-to-docx/convert.py:153
def create_styled_document() -> Document:
"""스타일이 적용된 문서 생성"""
doc = Document()
# Page margins
for section in doc.sections:
section.top_margin = Cm(2.5)
section.bottom_margin = Cm(2)
section.left_margin = Cm(2.5)
section.right_margin = Cm(2.5)
# Normal style
style = doc.styles['Normal']
style.font.name = FONT_FAMILY
style.font.size = Pt(10.5)
style.font.color.rgb = TEXT_COLOR
style.paragraph_format.line_spacing = 1.6
style.paragraph_format.space_after = Pt(6)