I want to create a Matlab markup using publish. I am using "showCode = false" because I do not want to print the entire code, only what I write with comments, and all the plots. One thing that I want to do is have a cover page, sections, and sub-sections. Here are two questions: (1) Sub-sections: I understand sections start with two percent signs: %% SECTION NAME How can I write sub-sections within this section? (2) Is it possible to have a document cover page using publish? Thanks Monica
asked Aug 7, 2017 at 19:21 135 2 2 silver badges 10 10 bronze badgesWith regard to sub-sections, you can add them using HTML Markup, but this won't be added to the Contents menu generated from the section titles. For a cover page, you could add an external graphic (note: you'll want to put the image files in the folder with your published output and link to there). Here's a sample script illustrating both of the above:
%% Title % % <> % % Description. %% Section 1 % Some text. %% Section 2 % Some more text. %% % Sub-section
% % Some subtext. %% Section 3 % Final text.
And here's the published HTML output:
answered Aug 7, 2017 at 20:44 126k 16 16 gold badges 257 257 silver badges 361 361 bronze badges Thanks gnovice! This works for html output, but not so far for pdf. Commented Aug 7, 2017 at 21:46@shadowfax: Which part doesn't work? The subsections or images? For a PDF, you may only be allowed to use certain image types, BMP and JPG I think.