How do I set the Font for chapter and section ?

2 views (last 30 days)
Hi,
I want to customize my chapters and section but the number of the chapter disapear when using this code :
ch1 = Chapter;
chapitre1 = Paragraph("Chapter1");
chapitre1.Style = {FontFamily("Franklin Gothic Medium Cond"),FontSize("18pt"),Color("#28367b"),HAlign("Left"),OuterMargin("0in","0in","0in","0in")};
ch1.Numbered = true;
ch1.Title = chapitre1;
And it's not counted as a chapter in the table of contents.
So I used this code
ch1 = Chapter;
chapitre1 = Text("exemple1");
chapitre1.Style = {FontFamily("Franklin Gothic Medium Cond"),FontSize("18pt"),Color("#28367b"),HAlign("Left"),OuterMargin("0in","0in","0in","0in")};
ch1.Numbered = true;
ch1.Title = chapitre1;
It displays the number of the chapter but in a different format so it doesnt look nice.
Thank you for your help,

Answers (1)

Akash
Akash on 6 Sep 2023
Hi,
I understand that you want to achieve font customization in Chapter title, but the chapter number disappears when using the code that you provided.
To address this issue, I recommend referring to the MATLAB documentation, which provides detailed information on customizing the font of chapter headings in the Report Generator. You can find the documentation in the below link.
I encourage you to explore the below links. These discussions might provide valuable insights and solutions to help you customize the font size of your chapter headings.

Products


Release

R2022b

Community Treasure Hunt

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

Start Hunting!