From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/70885 Path: news.gmane.org!not-for-mail From: Alasdair McAndrew Newsgroups: gmane.comp.tex.context Subject: Matlab formatting? Date: Fri, 26 Aug 2011 15:42:33 +1000 Message-ID: Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1422031773==" X-Trace: dough.gmane.org 1314337374 10855 80.91.229.12 (26 Aug 2011 05:42:54 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Fri, 26 Aug 2011 05:42:54 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Fri Aug 26 07:42:48 2011 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from balder.ntg.nl ([195.12.62.10]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1QwpBj-0001fk-Ge for gctc-ntg-context-518@m.gmane.org; Fri, 26 Aug 2011 07:42:43 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 1B8C2CAE56; Fri, 26 Aug 2011 07:42:42 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at balder.ntg.nl Original-Received: from balder.ntg.nl ([127.0.0.1]) by localhost (balder.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id Jo9mJjQ9XoEW; Fri, 26 Aug 2011 07:42:39 +0200 (CEST) Original-Received: from balder.ntg.nl (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 4A8CDCAEAA; Fri, 26 Aug 2011 07:42:39 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 60126CAEAA for ; Fri, 26 Aug 2011 07:42:37 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at balder.ntg.nl Original-Received: from balder.ntg.nl ([127.0.0.1]) by localhost (balder.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 1rlvwiK4zpEu for ; Fri, 26 Aug 2011 07:42:34 +0200 (CEST) Original-Received: from filter2-til.mf.surf.net (filter2-til.mf.surf.net [194.171.167.218]) by balder.ntg.nl (Postfix) with ESMTP id D0C69CAE56 for ; Fri, 26 Aug 2011 07:42:34 +0200 (CEST) Original-Received: from mail-bw0-f41.google.com (mail-bw0-f41.google.com [209.85.214.41]) by filter2-til.mf.surf.net (8.14.3/8.14.3/Debian-5+lenny1) with ESMTP id p7Q5gX2o026286 for ; Fri, 26 Aug 2011 07:42:34 +0200 Original-Received: by bkbzt4 with SMTP id zt4so3099096bkb.14 for ; Thu, 25 Aug 2011 22:42:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; bh=kT99GtlRyUdlruXey1tbJ7Ao9WMaWGpBMVg9D+sxCqo=; b=XEKxCSK/m8RfZY9smDsExMU45e9xetsyN8G4pFDEOVWcDVVJ4wNHujpTBmOhdDiZiK Yv+Cxu/DyxtT6Yw0PWnm4De1IiupaY3FI11cIG6g4A6T/Eip5AIKjhWU6QCkkBQw1d1s gcvzbb3zXjXPANCTZKqvi0TcndID9JON+J2B4= Original-Received: by 10.204.140.13 with SMTP id g13mr352563bku.65.1314337353411; Thu, 25 Aug 2011 22:42:33 -0700 (PDT) Original-Received: by 10.205.83.5 with HTTP; Thu, 25 Aug 2011 22:42:33 -0700 (PDT) X-Bayes-Prob: 0.0001 (Score 0, tokens from: @@RPTN) X-CanIt-Geo: ip=209.85.214.41; country=US; region=CA; city=Mountain View; postalcode=94043; latitude=37.4192; longitude=-122.0574; metrocode=807; areacode=650; http://maps.google.com/maps?q=37.4192,-122.0574&z=6 X-CanItPRO-Stream: uu:ntg-context@ntg.nl (inherits from uu:default, base:default) X-Canit-Stats-ID: 0bFoRGxu4 - 56a8a2b4fe51 - 20110826 X-Scanned-By: CanIt (www . roaringpenguin . com) on 194.171.167.218 X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.12 Precedence: list List-Id: mailing list for ConTeXt users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: ntg-context-bounces@ntg.nl Errors-To: ntg-context-bounces@ntg.nl Xref: news.gmane.org gmane.comp.tex.context:70885 Archived-At: --===============1422031773== Content-Type: multipart/alternative; boundary=0015174c3b8610abfa04ab620319 --0015174c3b8610abfa04ab620319 Content-Type: text/plain; charset=ISO-8859-1 Hello, I'm writing up some student notes about Matlab, and I'm including examples of Matlab functions. I'd like all the functions to be typeset in typewriter font (which means using a "typing" environment), but I'd also like some colorization. For example, I want to display a function such as function out = add(a,b) % % ADD(A,B) returns the sum of A and B % out = a+b; in a frame, and with the three lines beginning with % all colored green. (If I can color reserved words like "function" that's even better.) What's the easiest way to achieve this? Thanks, Alasdair -- Blog: http://amca01.wordpress.com Web: http://bit.ly/Alasdair Facebook: http://www.facebook.com/alasdair.mcandrew --0015174c3b8610abfa04ab620319 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Hello,

I'm writing up some student notes about Matlab, and I'= ;m including examples of Matlab functions.=A0 I'd like all the function= s to be typeset in typewriter font (which means using a "typing" = environment), but I'd also like some colorization.=A0 For example, I wa= nt to display a function such as

function out =3D add(a,b)
%
% ADD(A,B) returns the sum of A and B=
%
out =3D a+b;

in a frame, and with the three lines beginning= with % all colored green.=A0 (If I can color reserved words like "fun= ction" that's even better.)=A0 What's the easiest way to achie= ve this?

Thanks,
Alasdair

--
Blog: http://amca01.wordpress.com
Web:=A0 http://bit.ly/Alasdair
Facebook: http://www.facebook.com/alas= dair.mcandrew
--0015174c3b8610abfa04ab620319-- --===============1422031773== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline ___________________________________________________________________________________ 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 ___________________________________________________________________________________ --===============1422031773==--