Hi!
I tried generating a highlighting definition for the Palm Markup Language PML.
It is used to format eBooks for the eReader, which can be used on most handheld devices (http://www.ereader.com)
On first sight it looks a bit like LATEX, but has some showstoppers.
Example: To underline a word, you add "\u" infront and after the word you want underlined, same with italics, you use "\i" (without the quotes).
Similar to HTML, \c\u\iCentered Underlined Italic Text\i\u\c is perfectly legal.
Adding a Space before "Centered" would underline the space.
....but he said "\iNo!\i"
is a typical example.
You see the problem - no good delimiters.
I created a definition like
The "Language" IS CaseSensitive, the "Keyword" set is not complete, as there originally are X0, X1, X2, X3, X4 for Part- and Chapter-Markers, for example. They would only work by removing 0-4 from the delimiter set, where I added all letters that aren't actually used by the language. but of course it wouldn't mark the first \B in \c\BBoldCentered\B\c ...
in \\c only the \\ should be highlighted, as it's a visible backslash followed by a normal letter, so I added \\ in the special characters "Color Group 4", but it does highlight \c anyway.
Removing \ from the delimiters makes things much worse, and I also experimented without the LATEX in the first line - no use.
From a PML example text:
all \u should be highlighted, the \\ around the first hello, and the \i around the second.
I wonder if it's at all possible to do this without regex highlighting, in which case I'd need a new editor...
Any ideas?
Greetings and thanks in advance!
Michael
P.S.: Missing whitespace anywhere? Blame mykeyboard...
P.P.S.: \a followed by 3 digits encodes a special character. Those digits should be marked, too. I can add all known legal charcodes, but would have to remove 0-9 from the delimiters then, this is why I have only \a in color group 1...
I tried generating a highlighting definition for the Palm Markup Language PML.
It is used to format eBooks for the eReader, which can be used on most handheld devices (http://www.ereader.com)
On first sight it looks a bit like LATEX, but has some showstoppers.
Example: To underline a word, you add "\u" infront and after the word you want underlined, same with italics, you use "\i" (without the quotes).
Similar to HTML, \c\u\iCentered Underlined Italic Text\i\u\c is perfectly legal.
Adding a Space before "Centered" would underline the space.
....but he said "\iNo!\i"
is a typical example.
You see the problem - no good delimiters.
I created a definition like
Code: Select all
/L15"Palm Markup" LATEX_LANG Noquote File Extensions = pml
/Delimiters = ! " $%&'()*+,-./:;<=>?@[\]^_{|}~0123456789defghjqwyzADEFGHIJKLMNOPRUVWYZ
/C1"Color Group 1"
\a
/C2"Color Group 2"
\B
\c
\i
\k
\l
\m
\n
\o
\p
\r
\s
\u
\v
/C3"Color Group 3"
\Q
\Sb
\Sp
\T
\b
\t
/C5"Color Group 4"
%
=
\-
\\
/C6"Color Group 6"
\C
\X
\x
in \\c only the \\ should be highlighted, as it's a visible backslash followed by a normal letter, so I added \\ in the special characters "Color Group 4", but it does highlight \c anyway.
Removing \ from the delimiters makes things much worse, and I also experimented without the LATEX in the first line - no use.
From a PML example text:
Code: Select all
\\i \Q="italic"
Italic text. Close the block with \\i.
\uExample:\u
He said \\iHello\\i as he came in.
\uResult:\u
He said \iHello\i as he came in.
I wonder if it's at all possible to do this without regex highlighting, in which case I'd need a new editor...
Any ideas?
Greetings and thanks in advance!
Michael
P.S.: Missing whitespace anywhere? Blame mykeyboard...
P.P.S.: \a followed by 3 digits encodes a special character. Those digits should be marked, too. I can add all known legal charcodes, but would have to remove 0-9 from the delimiters then, this is why I have only \a in color group 1...