1

I might be wrong, but as far as I understand Matlab does not have a "subsection" option when publishing.

However, if I go for instance here (-mkdir- documentation), under the Examples section there are three "subsections". How would you obtain this? If it's through HTML only and not through direct Matlab options, is it possible to assign a shortcut or button to create the HTML fragment?

Stefano Lombardi
  • 1,581
  • 2
  • 22
  • 48

2 Answers2

2

When publishing to html, you can use html-code:

%%
% <html>
% <h3>subsection</h3>
% </html>
% 
Daniel
  • 36,610
  • 3
  • 36
  • 69
  • Thanks @Daniel. About the second part of the question, do you know whether I can automatically type, say, the above fragment by using a shortcut? – Stefano Lombardi Sep 27 '15 at 12:15
  • @Stezzo MATLAB has an option to [Insert HTML Markup](http://blogs.mathworks.com/community/2008/01/21/marking-up-m-with-html/) to which you can assign a keyboard shortcut in preferences. However, a better approach would be to use use a text expansion tool but recommendations for a tool are off-topic for StackOverflow so you are on your own. – IKavanagh Sep 27 '15 at 12:40
0

This does what I was looking for: it creates a subsection title the same color of the main title.

%%
% <html><h3 style="color:C45400"> 
%       This will produce a Matlab-orange subsection 
% </h3></html>
%
%%
Stefano Lombardi
  • 1,581
  • 2
  • 22
  • 48