Local layout syntax highlight foundation
Lorenzo Bertini
lorenzobertini97 at gmail.com
Thu Oct 20 08:17:02 UTC 2022
Il 19/10/22 18:58, Pavel Sanda ha scritto:
> On Fri, Oct 07, 2022 at 07:22:30PM +0200, Lorenzo Bertini wrote:
>> 2. LyXHighlighter differs a lot from LaTeXHighlighter: doesn't rely on regex
>> as much. I was wondering if a merge could be possible, considering local
>> layout can include Latex bits.
>
> If merging possible that's always good. If they differ too much one of them
> is likely inferior in its design? :)
Eh, this time around is not easy to determine; Latex has to account to
math and other stuff, and the general syntax is very different.
>
>> 3. Generic regex based on position or keyword recognition. Which one?
>
> What are the implications?
| regex | keywords |
|-----------------------------------|----------------------------------|
| *X* harder to maintain | *V* easier to maintain |
|-----------------------------------|----------------------------------|
| *V* fewer lines, no database | *X* needs extensive keyword db |
|-----------------------------------|----------------------------------|
| *X* relies on position only | *V* only highlights |
| highlights wrong keywords | working keywords |
But then again this was more of a proof of concept. Thanks for the insights.
--
Lorenzo
More information about the lyx-devel
mailing list