* Recommendation for including MATLAB-scripts
@ 2012-04-19 19:03 Xenia
2012-04-19 19:11 ` Aditya Mahajan
0 siblings, 1 reply; 4+ messages in thread
From: Xenia @ 2012-04-19 19:03 UTC (permalink / raw)
To: mailing list for ConTeXt users
Dear context-folks,
I have to write some short protocols including some matlab-code. Do you
have a recommendation for an easy way to include '.m'-files and diaries
as code?
Thanks,
Xenia
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage : http://www.pragma-ade.nl / http://tex.aanhet.net
archive : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Recommendation for including MATLAB-scripts
2012-04-19 19:03 Recommendation for including MATLAB-scripts Xenia
@ 2012-04-19 19:11 ` Aditya Mahajan
2012-04-22 19:35 ` Xenia
0 siblings, 1 reply; 4+ messages in thread
From: Aditya Mahajan @ 2012-04-19 19:11 UTC (permalink / raw)
To: mailing list for ConTeXt users
On Thu, 19 Apr 2012, Xenia wrote:
> Dear context-folks,
>
> I have to write some short protocols including some matlab-code. Do you
> have a recommendation for an easy way to include '.m'-files and diaries
> as code?
I'd recommend to use the vim module, which uses vim to generate syntax
highlighted source code.
\usemodule[vim]
\definevimtyping[MATLAB][syntax=matlab]
\starttext
\includeMATLABfile{filename.m}
and
\startMATLAB
....
\stopMATLAB
\stoptext
You need both the filter module and the vim module for this to work, and
also need the vim binary in your path.
Aditya
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage : http://www.pragma-ade.nl / http://tex.aanhet.net
archive : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Recommendation for including MATLAB-scripts
2012-04-19 19:11 ` Aditya Mahajan
@ 2012-04-22 19:35 ` Xenia
2012-04-22 23:33 ` Aditya Mahajan
0 siblings, 1 reply; 4+ messages in thread
From: Xenia @ 2012-04-22 19:35 UTC (permalink / raw)
To: ntg-context
[-- Attachment #1: Type: text/plain, Size: 774 bytes --]
On 19.04.2012 21:11, Aditya Mahajan wrote:
> On Thu, 19 Apr 2012, Xenia wrote:
>
>> Dear context-folks,
>>
>> I have to write some short protocols including some matlab-code. Do you
>> have a recommendation for an easy way to include '.m'-files and diaries
>> as code?
>
> I'd recommend to use the vim module, which uses vim to generate syntax
> highlighted source code.
[...]
> You need both the filter module and the vim module for this to work, and
> also need the vim binary in your path.
Thank you.
I get the following error message:
! Undefined control sequence.
system > tex > error on line 5 in file 2.tex: Undefined control
sequence ...
All files are attached. I use the current version: 2012.04.19 23:18.
What is the problem here?
Thanks,
Xenia
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 2.log --]
[-- Type: text/x-log; name="2.log", Size: 0 bytes --]
[-- Attachment #3: 2.tex --]
[-- Type: text/x-tex, Size: 108 bytes --]
\usemodule[vim]
\definevimtyping[MATLAB][syntax=matlab]
\starttext
\includeMATLABfile{aufg1.m}
\stoptext
[-- Attachment #4: 2.top --]
[-- Type: text/plain, Size: 458 bytes --]
% runtime options files (command line driven)
\unprotect
% feedback and basic job control
% handy for special styles
\startluacode
document = document or { }
document.arguments={
}
document.files={
"2",
}
\stopluacode
% process info
\setupsystem[inputfile=2]
\setupsystem[\c!n=1,\c!m=1]
% modes
% options (not that important)
\startsetups *runtime:options
\stopsetups
% styles and modules
\startsetups *runtime:modules
\stopsetups
% done
\protect \endinput
[-- Attachment #5: Type: text/plain, Size: 485 bytes --]
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage : http://www.pragma-ade.nl / http://tex.aanhet.net
archive : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Recommendation for including MATLAB-scripts
2012-04-22 19:35 ` Xenia
@ 2012-04-22 23:33 ` Aditya Mahajan
0 siblings, 0 replies; 4+ messages in thread
From: Aditya Mahajan @ 2012-04-22 23:33 UTC (permalink / raw)
To: mailing list for ConTeXt users
On Sun, 22 Apr 2012, Xenia wrote:
> On 19.04.2012 21:11, Aditya Mahajan wrote:
>> On Thu, 19 Apr 2012, Xenia wrote:
>>
>>> Dear context-folks,
>>>
>>> I have to write some short protocols including some matlab-code. Do you
>>> have a recommendation for an easy way to include '.m'-files and diaries
>>> as code?
>>
>> I'd recommend to use the vim module, which uses vim to generate syntax
>> highlighted source code.
>
> [...]
>
>> You need both the filter module and the vim module for this to work, and
>> also need the vim binary in your path.
>
> Thank you.
> I get the following error message:
>
> ! Undefined control sequence.
>
> system > tex > error on line 5 in file 2.tex: Undefined control
> sequence ...
Sorry, that should be \typeMATLABfile{...}
See the vim module documentation for details:
https://github.com/adityam/filter/blob/master/vim-README.md
> All files are attached. I use the current version: 2012.04.19 23:18.
> What is the problem here?
The log file was empty.
Aditya
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage : http://www.pragma-ade.nl / http://tex.aanhet.net
archive : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2012-04-22 23:33 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-04-19 19:03 Recommendation for including MATLAB-scripts Xenia
2012-04-19 19:11 ` Aditya Mahajan
2012-04-22 19:35 ` Xenia
2012-04-22 23:33 ` Aditya Mahajan
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).