Hi, I was trying to define a pretty printing environment for matlab files. The basic requirements that I have are % Numbers should be highlighted in a different color % Identify floating point numbers 1.1 and 1e-3. % Identify brackets % ()[]{} % Identify Punctuation % ,;<=> ... % Identify Operators % ^ + - / * .^ .* % Idenfity strings (enclosed in ' ' and " ") % Identify lines starting with % as comments. Show them % a different color. Identify %{ ... %} blocks as comments % identifiers function return case if else elseif do for while end % variables gt,lt,gt,lt,amp,abs,acos,acosh,acot,acoth,acsc,acsch, [snip].... a huge list The syntax is similar to both perl and MP. I had a look at the verb-*.tex files and tried to write verb-matlab. My attempt is attached. However, it does not work correctly. There are somethings that I could not figure out. 1. How to change the comment identifier. Matlab uses % as line comments and %{ .... %} as block comments. 2. For some reason Matlab variables are not recognized. 3. The punctuations are not identified. 4. '...' is not recognized as a string. The ' is output as a right quotation mark and not _neutral_ '. What would be a good way to include tex commands in the comments? Matlab recognizes %% as a special comment (begining of a cell). Is it possible to somehow translate %% into \MATLABcell, which is \bf by default but the behaviour can be changed if desired? See attachment verb-matlab.tex for my attempt and test.tex for an example. Thanks Aditya -- Aditya Mahajan, EECS Systems, University of Michigan http://www.eecs.umich.edu/~adityam || Ph: 7342624008