Color formatting (Unsupported syntax)

General questions about using TextPad

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

Post Reply
Rick Stanich
Posts: 4
Joined: Tue Jul 28, 2009 3:04 pm
Location: Phoenix AZ

Color formatting (Unsupported syntax)

Post by Rick Stanich »

With the example below how can I get the highlited text to be highlited in textpad?
The text "GOMEASURE" highlites but "ABS" and "I-J-K" are ignored.
If I add "/" to "ABS" it gets highlited but if "ABS" is elsewhere without the "/" then it is ignored. I have been unsuccessful in highliting "I-J-K".
GOMEASURE/ABS,CART,3.86838,-5.47546,-4.07359,I-J-K,0.00035,0.00047,-1.00000

Code: Select all

[Keyword1]
GOMEASURE
[Keyword 2]
ABS
[Keyword 3]
I-J-K
V4.7.3 Trial

Any hints, tips and or examples are appreciated.
Regards

Rick
Rick Stanich
Posts: 4
Joined: Tue Jul 28, 2009 3:04 pm
Location: Phoenix AZ

Post by Rick Stanich »

I have resolved the issue with the "/" sign by adding "OperatorChars = /".
Still cant get the "I-J-K" text to highlite. (Keyword 1 and Keyqword 2)
Regards

Rick
User avatar
trids
Posts: 69
Joined: Wed May 07, 2003 10:16 am
Location: South Africa

Post by trids »

Try removing "-" from the OperatorChars for the document class.

And try with and without a "-" in the Other characters in words parameter of the Syntax tab of the document class.
Rick Stanich
Posts: 4
Joined: Tue Jul 28, 2009 3:04 pm
Location: Phoenix AZ

Post by Rick Stanich »

trids wrote: And try with and without a "-" in the Other characters in words parameter of the Syntax tab of the document class.
This worked!
Thanks.

Can you explain why it worked. 8)
Regards

Rick
User avatar
trids
Posts: 69
Joined: Wed May 07, 2003 10:16 am
Location: South Africa

Post by trids »

Rick Stanich wrote:Can you explain why it worked. 8)
I'm guessing that TP sees "-" as a delimiter unless and until you specify that it can be part of a word.

So until you put the "-" into the Other characters in words parameter, the best TP can do is get to the "I" in "I-J-K", and look that up in your syntax file. Same for "J" and "K" as separate words, delimited by the minus.

But when you say that a minus can be part of a word, the entire "I-J-K" registers as a word for matching in the *.SYN file.

.. well that's the way it works in my head :wink:

Helios themselves would be able to shed more light.
Rick Stanich
Posts: 4
Joined: Tue Jul 28, 2009 3:04 pm
Location: Phoenix AZ

Post by Rick Stanich »

Thanks for the info :wink:
Regards

Rick
Post Reply