# add_heading4


添加四级标题

函数库: TyReportGenerator

# 语法

add_heading4(obj, text)

# 说明

add_heading4(obj, text)添加四级标题。示例

# 示例

添加四级标题

创建 Word 文档,添加三级标题和四级标题,生成报告并查看。

using TyReportGenerator

doc = create_document()
pkg_dir = pkgdir(TyReportGenerator)

add_heading3(doc, "三级标题")
add_heading4(doc, "四级标题")

doc_file = joinpath(tempdir(), "Add Heading4.docx");
tpl_file = joinpath(pkg_dir, "examples/Resources/文档模板-空.docx");

#生成文档报告
generate_report(doc, doc_file, tpl_file)
rptview(doc_file)

# 输入参数

obj — 文档对象
document 对象

指定为文档对象(document 对象)。

text — 标题文本内容
字符串

文本内容,指定为字符串。