각주 및 미주 작업
Aspose.Words는 또한 각주 및 미주 작업을 위한 몇 가지 클래스, 메서드 및 속성을 제공합니다.
미주 삽입 및 번호 매기기 옵션 설정
Word 문서에 각주나 미주를 삽입하려면 insert_footnote 방식을 사용하세요. 이 방법은 문서에 각주나 미주를 삽입합니다.
EndnoteOptions 및 FootnoteOptions 클래스는 각주와 미주의 번호 매기기 옵션을 나타냅니다.
다음 코드 예제에서는 문서에 미주를 삽입하고 번호 매기기 옵션을 설정하는 방법을 보여줍니다
# For complete examples and data files, please go to https://github.com/aspose-words/Aspose.Words-for-Python-via-.NET | |
doc = aw.Document(docs_base.my_dir + "Document.docx") | |
builder = aw.DocumentBuilder(doc) | |
builder.write("Some text") | |
builder.insert_footnote(aw.notes.FootnoteType.ENDNOTE, "Footnote text.") | |
option = doc.endnote_options | |
option.restart_rule = aw.notes.FootnoteNumberingRule.RESTART_PAGE | |
option.position = aw.notes.EndnotePosition.END_OF_SECTION | |
doc.save(docs_base.artifacts_dir + "WorkingWithFootnotes.set_endnote_options.docx") |
각주 레이아웃 열 수 설정
columns 속성을 사용하여 각주 레이아웃 열 수를 설정할 수 있습니다. 이 속성의 값이 0이면 표시된 페이지의 열 수에 따라 여러 열로 각주 영역의 서식이 지정됩니다.
다음 코드 예제에서는 각주 레이아웃의 열 수를 설정하는 방법을 보여줍니다
# For complete examples and data files, please go to https://github.com/aspose-words/Aspose.Words-for-Python-via-.NET | |
doc = aw.Document(docs_base.my_dir + "Document.docx") | |
# Specify the number of columns with which the footnotes area is formatted. | |
doc.footnote_options.columns = 3 | |
doc.save(docs_base.artifacts_dir + "WorkingWithFootnotes.set_foot_note_columns.docx") |
각주 및 EndNote 위치 설정
각주 위치는 각 페이지의 하단이나 각 페이지의 텍스트 아래에 있을 수 있습니다. 미주 위치는 섹션 끝이나 문서 끝일 수 있습니다.
다음 코드 예제에서는 각주와 미주의 위치를 설정하는 방법을 보여줍니다
# For complete examples and data files, please go to https://github.com/aspose-words/Aspose.Words-for-Python-via-.NET | |
doc = aw.Document(docs_base.my_dir + "Document.docx") | |
doc.footnote_options.position = aw.notes.FootnotePosition.BENEATH_TEXT | |
doc.endnote_options.position = aw.notes.EndnotePosition.END_OF_SECTION | |
doc.save(docs_base.artifacts_dir + "WorkingWithFootnotes.set_footnote_and_end_note_position.docx") |