Undefined function or variable 'TOC' in DOM API

조회 수: 15 (최근 30일)
Amruta
Amruta 2016년 9월 2일
편집: Adam 2016년 9월 2일
when i run following code.. i got error "Undefined function or variable 'TOC'
import mlreportgen.dom.*;
d = Document('mydoc','docx');
open(d);
title = append(d, Paragraph('My TOC Document'));
title.Bold = true;
title.FontSize = '28pt';
toc = append(d,TOC(2,' '));
toc.Style = {PageBreakBefore(true)};
h1 = append(d,Heading1('Chapter 1'));
h1.Style = {PageBreakBefore(true)};
p1 = append(d,Paragraph('Hello World'));
h2 = append(d,Heading2('Section 1.1'));
h2.Style = {PageBreakBefore(true)};
p2 = append(d,Paragraph('Another page'));
h3 = append(d,Heading3('My Subsection 1.1.a'));
p3 = append(d, Paragraph('My Level 3 Heading Text'));
close(d);
rptview(d.OutputPath);
what should i do to use TOC class in DOM API?**

답변 (0개)

카테고리

Help CenterFile Exchange에서 MATLAB Report Generator Task Examples에 대해 자세히 알아보기

태그

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by