Page 1 of 1

Color formatting (Unsupported syntax)

Posted: Tue Jul 28, 2009 5:41 pm
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.

Posted: Tue Jul 28, 2009 8:48 pm
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)

Posted: Wed Jul 29, 2009 8:13 am
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.

Posted: Wed Jul 29, 2009 1:15 pm
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)

Posted: Wed Jul 29, 2009 3:54 pm
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.

Posted: Fri Jul 31, 2009 7:46 pm
by Rick Stanich
Thanks for the info :wink: