|
From: Tim H. <hof...@hi...> - 2012-05-09 18:26:23
|
> -----Ursprüngliche Nachricht----- > Von: Tim Hoffmann [mailto:hof...@hi...] > Gesendet: Mittwoch, 9. Mai 2012 20:16 > An: tex...@li... > Betreff: Re: [TeXstudio-list] [Texstudio-list] How to create a new syntax hl file > for dtx files > > > -----Ursprüngliche Nachricht----- > > Von: Matthias Pospiech [mailto:mat...@gm...] > > Gesendet: Mittwoch, 9. Mai 2012 19:13 > > An: tex...@li... > > Betreff: Re: [TeXstudio-list] [Texstudio-list] How to create a new > > syntax > hl file > > for dtx files > > > > Am 08.05.2012 22:20, schrieb Benito van der Zander: > > > Since the qnfa is a xml file itself,< is not allowed in text (see > > > also xml.qnfa). > > > > > > <word parenthesis="block:open@nocomplete" parenthesisWeight="30" > > > fold="1" indent="1" ambiguous="true" > > > format="dtxMacrocode"><\*[A-Za-z]></word> > > > <word parenthesis="block:close@nocomplete" parenthesisWeight="30" > > > fold="1" indent="1" format="dtxMacrocode"></[A-Za-z]></word> > > > > > > > > > should work (not tested). > > I added your code and recompiled, but the xml like statements are not > > highlighted. > Add a + behind [A-Za-z]. The present code will just match single character > commands like <*A> Btw, if there is only a fixed set of commands, you could highlight only them and not all commands that match your regex. See e.g. the picture environment for an implementation using a for loop to define the allowed commands. |