Ben M. wrote:
On Tue, Jul 7, 2009 at 4:42 PM, Pavel Sanda<sa...@lyx.org> wrote:
i think the real point is that there is no code implementing it.
Would any "new code" really be involved? I don't know any details
about LyX's implementation of insets, but both math and "Input" child
documents support instant preview. So I might hope this could be
simply achieved by connecting the ERT inset with a preview handler?
(And then adding an item in the right-click menu.) Or is this a gross
oversimplification?
ERT preview can't be that hard. It can be done similiar to
math insets. And if latex fails (you edit the document on a computer
not equipped to render it, or the ERT depend on a previous ERT)
then just flag that ERT it as "un-previewable" and show the
latex code instead. (Like today.)
Other problems:
* There is lots of ERT that will render blank. Example:
\thispagestyle{empty}
Seeing this command is much more informational than a
blank rendering.
Possible solution: User has to right-click an ERT and select
"preview" in order to get preview for that inset.
* A single ERT may be invalid latex, because it combines
with another ERT to become valid. Example:
ERT \somecommand{ END-ERT "some plain lyx text" ERT } END-ERT
Here the ERTs has unbalanced braces.
Solutions: The "un-previewable" mechanism above. And users
aren't likely to request a preview of such things either.
Helge Hafting