각주 및 미주 작업

Aspose.Words 또한 각주 및 미주 작업을위한 일부 클래스,메서드 및 속성을 제공합니다.

미주 삽입 및 번호 매기기 옵션 설정

당신은 워드 문서에 각주 또는 미주를 삽입 할 경우,사용하시기 바랍니다 InsertFootnote 방법 이 방법은 각주 또는 미주를 문서에 삽입합니다.

EndnoteOptions 그리고 FootnoteOptions 클래스는 각주 및 미주에 대한 번호 매기기 옵션을 나타냅니다.

다음 코드 예제에서는 미주를 문서에 삽입하고 번호 매기기 옵션을 설정하는 방법을 보여 줍니다:

For complete examples and data files, please go to https://github.com/aspose-words/Aspose.Words-for-C
System::SharedPtr<Document> doc = System::MakeObject<Document>(inputDataDir + u"TestFile.docx");
System::SharedPtr<DocumentBuilder> builder = System::MakeObject<DocumentBuilder>(doc);
builder->Write(u"Some text");
builder->InsertFootnote(FootnoteType::Endnote, u"Eootnote text.");
System::SharedPtr<EndnoteOptions> option = doc->get_EndnoteOptions();
option->set_RestartRule(FootnoteNumberingRule::RestartPage);
option->set_Position(EndnotePosition::EndOfSection);
System::String outputPath = outputDataDir + u"WorkingWithFootnote.SetEndnoteOptions.docx";
// Save the document to disk.
doc->Save(outputPath);

각주 레이아웃 열 수 설정

다음을 사용하여 각주 레이아웃 열의 수를 설정할 수 있습니다 Columns 재산. 이 속성의 값이 0,각주 영역은 표시된 페이지의 열 수에 따라 열 수로 포맷됩니다.

다음 코드 예제에서는 각주 레이아웃의 열 수를 설정하는 방법을 보여 줍니다:

For complete examples and data files, please go to https://github.com/aspose-words/Aspose.Words-for-C
System::SharedPtr<Document> doc = System::MakeObject<Document>(inputDataDir + u"TestFile.docx");
//Specify the number of columns with which the footnotes area is formatted.
doc->get_FootnoteOptions()->set_Columns(3);
System::String outputPath = outputDataDir + u"WorkingWithFootnote.SetFootNoteColumns.docx";
// Save the document to disk.
doc->Save(outputPath);

각주의 위치를 설정하고 EndNote

각주 위치는 각 페이지의 맨 아래 또는 각 페이지의 텍스트 아래에 있을 수 있습니다. 미주 위치는 섹션의 끝이나 문서의 끝에있을 수 있습니다.

다음 코드 예제에서는 각주 및 미주의 위치를 설정하는 방법을 보여 줍니다:

For complete examples and data files, please go to https://github.com/aspose-words/Aspose.Words-for-C
System::SharedPtr<Document> doc = System::MakeObject<Document>(inputDataDir + u"TestFile.docx");
//Set footnote and endnode position.
doc->get_FootnoteOptions()->set_Position(FootnotePosition::BeneathText);
doc->get_EndnoteOptions()->set_Position(EndnotePosition::EndOfSection);
System::String outputPath = outputDataDir + u"WorkingWithFootnote.SetFootnoteAndEndNotePosition.docx";
// Save the document to disk.
doc->Save(outputPath);