MathGroup Archive 2003

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Comment lines in different colour or font

  • To: mathgroup at
  • Subject: [mg39589] Re: Comment lines in different colour or font
  • From: "John Jowett" <John.Jowett at>
  • Date: Tue, 25 Feb 2003 02:55:25 -0500 (EST)
  • References: <b3a6rj$1k0$> <b3ckdu$819$>
  • Sender: owner-wri-mathgroup at

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  ( ).   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:
[a-zA-Z$]    [a-zA-Z0-9_]
 paired (* *)  nest
 double backslash multiline
 [[ ]]
 (   )
 {   }
 [   ]

* We could put the whole Mathematica language in here but that
* seems excessive.
 text @
 text /@
 text @@
 text /.
 text ++
 text ==
 text =!=
 text ===
 text ->
 text ..
 text _
 class [+-=/]

* //end-of-resource//

"AES/newspost" <siegman at> wrote in message
news:b3ckdu$819$1 at
> In article <b3a6rj$1k0$1 at>,
>  "Y.A.Tesiram" <yas at> 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)

  • Prev by Date: Re: Re: Cursors in graphics
  • Next by Date: Mathematica Evaluation Process
  • Previous by thread: Re: Re: Comment lines in different colour or font
  • Next by thread: IEEE 754 Standard Help