Re: Comment lines in different colour or font
- To: mathgroup at smc.vnet.net
- Subject: [mg39589] Re: Comment lines in different colour or font
- From: "John Jowett" <John.Jowett at cern.ch>
- Date: Tue, 25 Feb 2003 02:55:25 -0500 (EST)
- References: <b3a6rj$1k0$1@smc.vnet.net> <b3ckdu$819$1@smc.vnet.net>
- Sender: owner-wri-mathgroup at wolfram.com
I presume you want to do this in the Front End. I don't know how (although I imagine it's possible) but I did once implement it (with other syntax-colouring features) in the KEDIT text editor ( http://www.kedit.com/ ). This can be very helpful for editing Mathematica .m files or for manually recovering corrupted notebooks. (Normal package development is best done in the notebook environment in my opinion.) Just in case it's useful to someone, the contents of my math.kld file are included below. It could certainly be improved. John Jowett ------------------------------ * math.kld * KEDIT (Windows version 1.5ß4) Language Definition for Mathematica, * started from tex.kld, John Jowett 15/12/97 * * Problems: * :case respect :identifier [a-zA-Z$] [a-zA-Z0-9_] :number decimal :comment paired (* *) nest :string double backslash multiline :match [[ ]] ( ) { } [ ] :keyword * We could put the whole Mathematica language in here but that * seems excessive. Map Apply Table List If Which Thread Flatten :postcompare text @ text /@ text @@ text /. text ++ text == text =!= text === text -> text .. text _ class [+-=/] * //end-of-resource// "AES/newspost" <siegman at stanford.edu> wrote in message news:b3ckdu$819$1 at smc.vnet.net... > In article <b3a6rj$1k0$1 at smc.vnet.net>, > "Y.A.Tesiram" <yas at pcomm.hfi.unimelb.edu.au> wrote: > > > Is there any way of specifying different colours comments wrapped in (* > > comment *) ? > > I would love something like this, e.g., as a way of highlighting comment > or seporator lines within Modules. > > -- > "Power tends to corrupt. Absolute power corrupts absolutely." > Lord Acton (1834-1902) > "Dependence on advertising tends to corrupt. Total dependence on > advertising corrupts totally." (today's equivalent) >