User`s guide

Desktop Tools and Development Environment
18-25
Publish Button Moved
The Publish button, , is now located on the Editor toolbar.
Compatibility Considerations
Previously, the Publish button was located on the Editor Cell Mode toolbar. Now you find
it on the Editor toolbar.
Publish Trademark Symbols
If the comments in your M-file include trademarked terms, you can format the comment
to produce a trademark symbol (™) or registered trademark symbol (®) in the published
output. See Trademark Symbols for details.
Specifying Code for MATLAB Software to Evaluate with the publish Function
Use the codetoEvaluate option to the publish function to specify code that you want
MATLAB software to evaluate when it publishes an M-file. By default, this is the code
in the M-file. However, if you want, you can use this option to specify additional code
or alternative code for MATLAB to evaluate. For example, you might want MATLAB to
evaluate code that calls the M-file that you are publishing.
stopOnError Option No Longer Available with publish Function
The stopOnError option is no longer available for the publish function. MATLAB
software will always stop when an error occurs, unless you add code to handle the error.
Compatibility Considerations
To have MATLAB continue processing code when an error occurs, handle the error using
a try-catch statement. For more information, see The try-catch Statement.
Include Snapshot of M-file Output in Published Document
You can include snapshots of output that an M-file generates within a published
document. Select Cell > Insert Text Markup > Force Snapshot. This menu option
inserts the snapnow function into your M-file code. This is particularly useful when you
have code that generates numerous images that you want to include in the published
document. See Force a Snapshot of Output for details.