Le 03.12.17 à 18:00, Aditya Mahajan a écrit :
This is a blog post I recently published:
https://jonas17b.wixsite.com/monsite/home/wysiwym-editor-on-top-of-context-lout.
It is about some ideas I have for a WYSIWYM editor like LyX, but it
would be designed for using more than 1 backend (e.g. ConTeXt, Lout),
and to give a much better user experience.
I am curious if you have looked into if it is possible to add a
ConTeXt backend to LyX. AFAIU, LyX saves the document in a "Lyx
format" and then transforms it into LaTeX. It might be simplest to
write a translator from the internal lyx format to ConTeXt and Lout.
Aditya
--
Hi Aditya,
From what I have seen, the LyX format is a LaTeX file with a thin layer
on top of it. So basically I would need to write a LaTeX to ConTeXt/Lout
converter ;-). Looks like to me that this editor that I would like to
design cannot be implemented as an incremental improvement to LyX, as it
would be a too radical change.
In regards to the translator, I have thought about implementing rules of
translations in a text file for each supported backend. Advantage would
be that it will be easy for any user to add a new backend or extend an
existing one to cover new features or to fix incompatibility issues.
Here is +/- how could look like rules of translations, with the left
expression, something described in the document format and the right
expression, the same thing described in the backend format:
<func>[<param_1> = <value_1>, <param_2> = <value_2>]{<body>} =>
@<func>(<param_1> -> <value_1>, <param_2> -> <value_2>){<body>}
At this point if we have in document:
start_section[title = Introduction, back_ground_color = green]
it will be translated to @startSection(title -> Introduction,
back_ground_color -> green)
but if it has instead to be translated to @startHeader(1, Introduction,
bgColor -> green), we will add the following in the translation file:
start_section[title = <the_title>, back_ground_color = <the_color>] =>
@startHeader(1, <the_title>, bgColor -> <the_color>)
Idea is that it starts with very general translation rules and then it
gets more and more detailled for every cases that don't follow the more
general rules.
Cheers,
Jonas
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the
Wiki!
maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage : http://www.pragma-ade.nl / http://context.aanhet.net
archive : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___________________________________________________________________________________