octave-maintainers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: mcode.sty for LaTeX


From: Abbott, Ben
Subject: Re: mcode.sty for LaTeX
Date: Thu, 30 May 2013 01:16:31 +0000

On May 30, 2013, at 1:53 AM, c. wrote:

> On 29 May 2013, at 17:46, address@hidden wrote:
> 
>> Message: 2
>> Date: Wed, 29 May 2013 16:17:43 +0100
>> From: Richard Crozier <address@hidden>
>> To: address@hidden
>> Subject: Re: mcode.sty for LaTeX
>> Message-ID: <address@hidden>
>> Content-Type: text/plain; charset=ISO-8859-1; format=flowed
>> 
>> On 29/05/2013 15:12, Ben Abbott wrote:
>>> Does this look useful for us?
>>> 
>>>     
>>> http://www.howtotex.com/tips-tricks/how-to-include-matlab-code-in-latex-documents/
>>> 
>>> Modifying to suit Octave's syntax looks straight forward.
>>> 
>>> Ben
>> 
>> I use this a lot, very handy, but since the ultimate source is the ML 
>> file exchange, you should maybe ask the author to email a copy to the 
>> list or upload to CTAN if Octave is going to use it.
>> 
>> Richard
> 
> What does it do differently than
> 
> \usepackage{listings}
> 
> \begin{lstlisting}[language=Octave]
> a = 1;    # Octave comment
> b = 2;
> c = a^2 + b^2;
> for i = 1:10
> disp (i)
> endfor
> \end{lstlisting}
> 
> it seems it only defines a different set of default styles for matlab 
> language than is defined in listings.sty
> but that package already contains a set of defaults for Octave that I like 
> and use a lot, and it also takes care 
> of Octave-only keywords like "endif", "endfor", "endfunction" etc….
> 
> c.

>From the link ...

[mcode.sty] includes some predefined setup such that the markup and color is 
according to the MATLAB standard.

I assume he is referring to the Matlab editor's markup.  I any event, I was 
unaware that the listings package supported Octave.

Ben



reply via email to

[Prev in Thread] Current Thread [Next in Thread]