Create New Document Class

General questions about using TextPad

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

Post Reply
hjack
Posts: 26
Joined: Mon Apr 17, 2006 3:06 am
Location: Kentucky

Create New Document Class

Post by hjack »

Trouble creating a new document class. Here is what I have done:

Open Textpad, close all documents.
Click on Configure and New Document Class
Name the class xmlc, click next
Add class member *.xml, *.syn, click next
Click enable syntax

When I click on the arrow for Syntax definitio, no file by the name xmlc appears. I close Textpad and reopen. Under preferences, I go to Document Classes and xmlc is there. When I click on the + sign, syntax, and the Syntax definition file, xmlc is not there.

Anyone know what I am doing wrong?

Thanks
ak47wong
Posts: 703
Joined: Tue Aug 12, 2003 9:37 am
Location: Sydney, Australia

Post by ak47wong »

The answer is in the last paragraph of the help file How to->Use Document Classes->Creating a New Document Class:
If you don't see a suitable syntax definition file in the list, check if one is available from the free add-ons page on our web site. If you still can't see the one you need, you can create your own, as described in Reference Information: Syntax Definition Files, and taking an existing ".SYN" file as an example. However, do not use TEXT.SYN, nor start the file with "TEXT=1", as that is only intended for highlighting URLs in simple text files.
Check here for sample definition files: http://www.textpad.com/add-ons/synu2z.html

Once you have found or created a suitable definition file, place it in the folder specified in Configure->Preferences->Folders->Syntax.
hjack
Posts: 26
Joined: Mon Apr 17, 2006 3:06 am
Location: Kentucky

Post by hjack »

AK, thank you very much.

Jack
Post Reply