[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: mcode.sty for LaTeX
From: |
c. |
Subject: |
Re: mcode.sty for LaTeX |
Date: |
Wed, 29 May 2013 19:53:21 +0200 |
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.
- Re: mcode.sty for LaTeX,
c. <=