4.0

4.0 | 1 rating Rate this file 7 Downloads (last 30 days) File Size: 2.36 KB File ID: #3060

Word Syntax Highlighter for Matlab

by David Francis

 

02 Mar 2003 (Updated 20 Mar 2003)

Provides syntax highlighting for MATLAB m-file code segments included in a Word document.

| Watch this File

File Information
Description

A syntax highlighting Word macro for MATLAB m-files. This program provides syntax highlighting for MATLAB m-file code segments included in a Word document. This macro does not provide highlighting as-you-type, highlighting is performed for the selected code segment following user initiation of the macro. The macro assumes that all text quotes are balanced and does not highlight syntax errors.

MATLAB release MATLAB 6.5 (R13)
Other requirements Microsoft Word
Tags for This File  
Everyone's Tags
Tags I've Applied
Add New Tags Please login to tag files.
Comments and Ratings (3)
03 Mar 2003 Jim River

It's a useful utility. Thanks. Some comments though:

1. Keyword "end" is mistakenly highlighted in situations, such as A(10:end).
2. In Matlab 5.3, when the codes are copied from the Matlab Editor to Word, the codes are shown in color. Why is this feature lost in version 6.1 and above? Does Mathworks plan to resurrect this feature? (You wonder why good things do not last)
3. A Matlab code, which copies .m file to Word with proper syntax highlight, would also be useful.

07 Mar 2003 Michael Robbins

My company restricts this link, please correct it:

Reason:
 The Websense category "Malicious Web Sites" is filtered.

04 Jun 2003 Matthew Simoneau

Mr. Robbins,

You should try to right-click on "Download this file" link and do a "Save target as". That will keep your browser from trying to run this macro.

Please login to add a comment or rating.
Updates
04 Mar 2003

Updated to exclude instances of end keyword in brackets from highlighting according to comments received

10 Mar 2003

Updated to exclude instances of end keyword in brackets from highlighting according to comments received

12 Mar 2003

Modified code to distinguish single quote for transpose operator from string literal

20 Mar 2003

Added persistent to syntax list

Tag Activity for this File
Tag Applied By Date/Time
development environment David Francis 22 Oct 2008 06:57:20
microsoft David Francis 22 Oct 2008 06:57:20
word David Francis 22 Oct 2008 06:57:20
syntax David Francis 22 Oct 2008 06:57:20
highlight David Francis 22 Oct 2008 06:57:20
macro David Francis 22 Oct 2008 06:57:20

Contact us at files@mathworks.com