* ConTeXt syntax file for KDE Kate
@ 2002-04-03 17:20 Henning Hraban Ramm
2002-04-04 8:48 ` Hans Hagen
0 siblings, 1 reply; 5+ messages in thread
From: Henning Hraban Ramm @ 2002-04-03 17:20 UTC (permalink / raw)
Ahoi!
I'd like to adapt the syntax highlighting of the Kate editor.
But my understanding of XML is too poor...
I just changed some things from the LaTeX mode, as far as I understood.
--- context.xml ---------
<?xml version="1.01" encoding="UTF-8"?>
<!DOCTYPE language SYSTEM "language.dtd">
<language name="ConTeXt" section="Markup"
extensions="*.tex;*.TEX" mimetype="text/x-tex" casesensitive="1">
<highlighting>
<list name="keywords">
<item> start</item>
<item> itemize</item>
<item>TeX</item>
<!-- missing long list of items -- is there a way to get all ConTeXt commands
as list? -->
</list>
<contexts>
<context attribute="0" lineEndContext="0">
<StringDetect String="\start" attribute="4" context="1"
insensitive="FALSE"/>
<StringDetect String="\stop" attribute="4" context="1"
insensitive="FALSE"/>
<DetectChar char="\" attribute="2" context="2" />
<RegExpr String="%.*$" attribute="3" context="0"/>
</context>
<!-- What must I do here above? -->
<context attribute="0" lineEndContext="1">
<keyword String="keywords" attribute="1" context="1"/>
<DetectChar char="}" attribute="4" context="0"/>
</context>
<context attribute="0" lineEndContext="0">
<keyword String="keywords" attribute="2" context="0" />
</context>
</contexts>
<itemDatas>
<itemData name="Normal Text" defStyleNum="dsNormal"/>
<itemData name="Keyword" defStyleNum="dsNormal" color="#0000ff"
selColor="#ff0000" bold="1" italic="1"/>
<itemData name="Comment" defStyleNum="dsComment"/>
<itemData name="Begin End" defStyleNum="dsNormal" color="#000000"
selColor="#ffffff" bold="1" italic="1"/>
</itemDatas>
</highlighting>
<general>
<comments>
<comment name="singleLine" start="%" />
</comments>
</general>
</language>
------------------ end of context.xml ----
---- language.dtd ----
<!ELEMENT language (highlighting, general?)>
<!ATTLIST language
name CDATA #REQUIRED
section (Sources|Markup|Other|Scripts) #REQUIRED
extensions CDATA #REQUIRED
mimetype CDATA #REQUIRED
casesensitive (0|1) #IMPLIED
>
<!ELEMENT general (comments?, keywords?)>
<!ATTLIST general
>
<!ELEMENT comments (comment)+>
<!ATTLIST comments
>
<!ELEMENT comment EMPTY>
<!ATTLIST comment
name (singleLine|multiLine) #REQUIRED
start CDATA #REQUIRED
end CDATA #IMPLIED
>
<!ELEMENT keywords EMPTY>
<!ATTLIST keywords
casesensitive CDATA #IMPLIED
weakDeliminator CDATA #IMPLIED
>
<!ELEMENT highlighting (list*, contexts, itemDatas)>
<!ATTLIST highlighting
>
<!ELEMENT list (item)+>
<!ATTLIST list
name (types|keywords|attribute-definitions|literals|definitions) #REQUIRED
>
<!ELEMENT item (#PCDATA)>
<!ELEMENT contexts (context)+>
<!ELEMENT context (keyword | Float | HlCOct | HlCHex | Int | DetectChar |
Detect2Chars | AnyChar | StringDetect | RegExpr | LineContinue |
HlCStringChar | RangeDetect | HlCChar)*>
<!ATTLIST context
attribute CDATA #REQUIRED
lineEndContext NMTOKEN #REQUIRED
lineBeginContext NMTOKEN #IMPLIED
name CDATA #IMPLIED
>
<!ELEMENT keyword EMPTY>
<!ATTLIST keyword
attribute CDATA #REQUIRED
context NMTOKEN #REQUIRED
String (types|keywords|attribute-definitions|literals|definitions) #REQUIRED
weakDelimiter CDATA #IMPLIED
>
<!ELEMENT Float (AnyChar)*>
<!ATTLIST Float
attribute CDATA #REQUIRED
context NMTOKEN #REQUIRED
>
<!ELEMENT HlCOct EMPTY>
<!ATTLIST HlCOct
attribute CDATA #REQUIRED
context NMTOKEN #REQUIRED
>
<!ELEMENT HlCHex EMPTY>
<!ATTLIST HlCHex
attribute CDATA #REQUIRED
context NMTOKEN #REQUIRED
>
<!ELEMENT HlCChar EMPTY>
<!ATTLIST HlCChar
attribute CDATA #REQUIRED
context NMTOKEN #REQUIRED
>
<!ELEMENT Int (StringDetect)*>
<!ATTLIST Int
attribute CDATA #REQUIRED
context NMTOKEN #REQUIRED
>
<!ELEMENT DetectChar EMPTY>
<!ATTLIST DetectChar
attribute CDATA #REQUIRED
context NMTOKEN #REQUIRED
char CDATA #REQUIRED
>
<!ELEMENT Detect2Chars EMPTY>
<!ATTLIST Detect2Chars
attribute CDATA #REQUIRED
context NMTOKEN #REQUIRED
char CDATA #REQUIRED
char1 CDATA #REQUIRED
>
<!ELEMENT AnyChar EMPTY>
<!ATTLIST AnyChar
attribute CDATA #REQUIRED
context NMTOKEN #REQUIRED
String CDATA #REQUIRED
>
<!ELEMENT StringDetect EMPTY>
<!ATTLIST StringDetect
attribute CDATA #REQUIRED
context NMTOKEN #REQUIRED
String CDATA #REQUIRED
insensitive (TRUE|FALSE) #REQUIRED
>
<!ELEMENT RegExpr EMPTY>
<!ATTLIST RegExpr
attribute CDATA #REQUIRED
context NMTOKEN #REQUIRED
String CDATA #REQUIRED
>
<!ELEMENT LineContinue EMPTY>
<!ATTLIST LineContinue
attribute CDATA #REQUIRED
context NMTOKEN #REQUIRED
>
<!ELEMENT HlCStringChar EMPTY>
<!ATTLIST HlCStringChar
attribute CDATA #REQUIRED
context NMTOKEN #REQUIRED
>
<!ELEMENT RangeDetect EMPTY>
<!ATTLIST RangeDetect
attribute CDATA #REQUIRED
context NMTOKEN #REQUIRED
char CDATA #REQUIRED
char1 CDATA #REQUIRED
>
<!ELEMENT itemDatas (itemData)+>
<!ATTLIST itemDatas
>
<!ELEMENT itemData EMPTY>
<!ATTLIST itemData
name CDATA #REQUIRED
defStyleNum CDATA #REQUIRED
color CDATA #IMPLIED
selColor CDATA #IMPLIED
italic CDATA #IMPLIED
bold CDATA #IMPLIED
>
---- end of DTD -----------
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: ConTeXt syntax file for KDE Kate
2002-04-03 17:20 ConTeXt syntax file for KDE Kate Henning Hraban Ramm
@ 2002-04-04 8:48 ` Hans Hagen
2002-04-04 10:17 ` Patrick Gundlach
0 siblings, 1 reply; 5+ messages in thread
From: Hans Hagen @ 2002-04-04 8:48 UTC (permalink / raw)
Cc: ntg-context
At 07:20 PM 4/3/2002 +0200, you wrote:
>Ahoi!
>
>I'd like to adapt the syntax highlighting of the Kate editor.
>But my understanding of XML is too poor...
>I just changed some things from the LaTeX mode, as far as I understood.
maybe you can convince patrick to write you an xslt transformation from the
(still experimental) xml definition of the context syntax as generated by
"texexec setupe",
Hans
-------------------------------------------------------------------------
Hans Hagen | PRAGMA ADE | pragma@wxs.nl
Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: +31 (0)38 477 53 69 | fax: +31 (0)38 477 53 74 | www.pragma-ade.com
-------------------------------------------------------------------------
fall-back web server:
www.pragma-ade.nl
-------------------------------------------------------------------------
^ permalink raw reply [flat|nested] 5+ messages in thread
* ConTeXt syntax file for KDE Kate
2002-04-04 8:48 ` Hans Hagen
@ 2002-04-04 10:17 ` Patrick Gundlach
2002-04-04 12:17 ` Taco Hoekwater
0 siblings, 1 reply; 5+ messages in thread
From: Patrick Gundlach @ 2002-04-04 10:17 UTC (permalink / raw)
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset="us-ascii", Size: 608 bytes --]
Hallo Hans, Henning et al.
> >I'd like to adapt the syntax highlighting of the Kate editor.
> >But my understanding of XML is too poor...
> >I just changed some things from the LaTeX mode, as far as I understood.
>
> maybe you can convince patrick to write you an xslt transformation from
> the (still experimental) xml definition of the context syntax as
> generated by "texexec setupe",
since I have to do some other transformations as well and I want to look
closer into the subject of transformations... Henning, what do I need?
Kate? I this a free program?
--
Viele Grüße,
Patrick Gundlach
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: ConTeXt syntax file for KDE Kate
2002-04-04 10:17 ` Patrick Gundlach
@ 2002-04-04 12:17 ` Taco Hoekwater
2002-04-07 19:05 ` Henning Hraban Ramm
0 siblings, 1 reply; 5+ messages in thread
From: Taco Hoekwater @ 2002-04-04 12:17 UTC (permalink / raw)
Cc: ntg-context
On Thu, 4 Apr 2002 12:17:48 +0200
"Patrick Gundlach" <pg@levana.de> wrote:
> Hallo Hans, Henning et al.
>
> > >I'd like to adapt the syntax highlighting of the Kate editor.
> > >But my understanding of XML is too poor...
> > >I just changed some things from the LaTeX mode, as far as I understood.
> >
> > maybe you can convince patrick to write you an xslt transformation from
> > the (still experimental) xml definition of the context syntax as
> > generated by "texexec setupe",
>
> since I have to do some other transformations as well and I want to look
> closer into the subject of transformations... Henning, what do I need?
> Kate? I this a free program?
Yes. Homepage is kate.sourceforge.net
You basically need a list of static keywords, without the leading \, enclosed
in <item> tags. The homepage also has a 'howto' section on highlighting
(just checked).
How good is this editor anyway? Anybody knows?
--
groeten,
Taco
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: ConTeXt syntax file for KDE Kate
2002-04-04 12:17 ` Taco Hoekwater
@ 2002-04-07 19:05 ` Henning Hraban Ramm
0 siblings, 0 replies; 5+ messages in thread
From: Henning Hraban Ramm @ 2002-04-07 19:05 UTC (permalink / raw)
Am Donnerstag, 4. April 2002 14:17 schrieb Taco Hoekwater:
> How good is this editor anyway? Anybody knows?
Well, I work with it, 'cause I couldn't find a better one. (I know, I should
use Emacs, but I will not!) And it's one of the few editors that can handle
Mac line endings (and convert between Win/Mac/Unix).
It does some syntax highlighting (you know, I try to enhance it) and it looks
similar to Crimson, that I use on WinNT: The "normal" view of a modern
programmer's editor with a directory tree and a console. And there's a usable
(even if not complete) project plug-in.
But Kate has some mis-features (at least at the moment):
-- word wrapping is on or off for all files, and there's only hard wrapping.
-- no line numbering
-- no sort
-- no macros (one could make plugins, but i can't)
-- some strange crashes (but no data loss until now)
Editors are a matter of taste.
I used to use Nedit, that has a nice search bar, but I like german menus and
a directory tree...
Grüßlis vom Hraban!
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2002-04-07 19:05 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-04-03 17:20 ConTeXt syntax file for KDE Kate Henning Hraban Ramm
2002-04-04 8:48 ` Hans Hagen
2002-04-04 10:17 ` Patrick Gundlach
2002-04-04 12:17 ` Taco Hoekwater
2002-04-07 19:05 ` Henning Hraban Ramm
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).