image thumbnail

Prettify MATLAB html

version 6.5 (1.35 MB) by Harry Dymond
Provides additional features when exporting .m files to html using MATLAB's "publish" feature


Updated 21 May 2021

View License

Editor's Note: This file was selected as MATLAB Central Pick of the Week

prettify_MATLAB_html gives you additional features when publishing an .m file to html using MATLAB's publish function:
1. With a few easy-to-use "tags" in your source .m file, you can:
— Create collapsible sections, similar to those seen in "official" MATLAB help pages.
— Create internal page links to jump to other parts of the page.
— Insert line breaks.
— Insert spacing of specified pixel height.
— Specify size for any text.
— Specify colour for any text.
— Insert your own CSS classes to style text however you wish.
— Optionally, give the user a choice to display the page with a “dark” theme.
— Easily switch between elements in the page according to which theme (“light” or “dark”) is selected by the user.
2. Provides Quick-Access Toolbar buttons to insert the prettify_MATLAB_html tags when editing your .m file.
3. Provides a built-in table style to use when embedding an html table.
4. Automatically ensures that images do not exceed page width (images that would be wider than the page at their full size, scale with the width of the page).
5. Gives inline code and execution results a horizontal scroll bar if they do not fit in the width of the page.
Please see the examples tab above for a full description of prettify_MATLAB_html's usage and features.

Cite As

Harry Dymond (2021). Prettify MATLAB html (, MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R2018a
Compatible with R2016b to R2020a
Platform Compatibility
Windows macOS Linux

Community Treasure Hunt

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

Start Hunting!

publish overload

prettify documentation