I don't believe you can achieve this as easily as you want. The only way I can think of is:
- Publish the markup file separately, then include the html output instead of the m file. However MATLAB will automatically escape the html tags when printing and will publish "[ampersand]lt;" and "[ampersand]gt;" instead of "<" and ">" which will break formatting.
- You will then have to write a third function that reads the final published html as text and replaces "[ampersand]lt;" occurrences with "<" and so forth.