How do I add subscript text in a formal table
6 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
MathWorks Support Team
am 28 Jul. 2020
Beantwortet: MathWorks Support Team
am 28 Jul. 2020
How do I make subscripts in the text of the table?
I tried using this, but that doesn’t work as the mlreportgen.ppt and mlreportgen.report both have Text() objects and the report one doesn’t have a subscript property.
Akzeptierte Antwort
MathWorks Support Team
am 28 Jul. 2020
Report Generator's PPT formatting objects like 'mlreportgen.ppt.subscript' can not be used in a DOM or Report API report.
To display text as subscript in a DOM FormalTable, please make use of use 'mlreportgen.dom.VerticalAlign*'* whose documentation is linked below:
As an example, here is a sample script that creates a formal table, with the first body entry containing the subscript text:
import mlreportgen.dom.*;
d = Document('output','pdf');
para = Paragraph('A');
para.Bold = true;
text = Text('STP mean');
text.Style = {VerticalAlign('subscript')};
append(para,text);
headerContent = {'Parameter', 'Value', 'Unit'};
bodyContent = {para, '325.61541', 'N'};
tbl = FormalTable(headerContent,bodyContent);
tbl.Border = 'solid';
tbl.ColSep = 'solid';
tbl.RowSep = 'solid';
append(d,tbl);
close(d);
rptview(d);
0 Kommentare
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu MATLAB Report Generator finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!