need help higlighting rtf syntax

General questions about using TextPad

Moderators: AmigoJack, bbadmin, helios, Bob Hansen, MudGuard

Post Reply
rwg
Posts: 1
Joined: Thu Nov 25, 2004 9:40 am

need help higlighting rtf syntax

Post by rwg »

Hi,

I'm trying to put together a syntax file for rtf (rich text format). The underlying format of an rtf file is the text of the document it represents mixed in with a bunch of keywords which all start with '\' - no problem so far, except that keywords that require parameters are immediately followed by a numeric value - for instance to select font number 14 you have

\f14

I can't seem to find a way of making this sort of keyword highlight short of actually adding \f14 to my list of keywords (obviously I just want to have \f in the list). How can I stop TextPad from treating the digits 0-9 as a possible part of keywords? Setting

KeyWordChars= a-z\

looked like a promising idea, but doesn't seem to have any effect. Having dug through a few posts here I've made sure that none of my keywords contain any digits as there seems to be an implication that textpad builds an implicit list of keyword characters from the keyword list itself, but that didn't help either.

any ideas?

cheers,

Robin

PS I am using C=1, but aside from that haven't put much else in my [Syntax] section.
charles
Posts: 20
Joined: Mon Dec 27, 2004 5:11 pm
Contact:

RTF Syntax

Post by charles »

Every RTF document I create and then open with TextPad always ends with a binary char - removing it doesn't seem to affect the readability of the document itself. Would you know why - is it a trait of Win WordPad/Word ?
User avatar
tteeples
Posts: 5
Joined: Thu Aug 27, 2009 2:02 pm

RTF Syntax

Post by tteeples »

Robin,

I too have played around with coming up with a syn file for RTF. Unfortunately, I had as bout as much success as you did. I think it would be awesome if someone could come up with one.

That was a hint for all you guru's out there :D
Post Reply