On 02/01/2010 03:44 PM, Tommaso Cucinotta wrote:
rgheck wrote:
Ah yes, I did that in an equation and it is almost exactly what I want
- just need to be able to edit the text. Without looking at the code,
it doesn't look like you'd have to do much to make it editable. I
might have a go some time.
It's harder than you think, in the general case, because *reading*
the LaTeX back is not trivial. In the math case, however, it isn't so
hard, and it'd be easier to do it in the editing pane. All you have
to do is have a special mode where LyX displays the raw LaTeX, which
it knows how to generate. This would be kind of like the "preview"
mode, where it displays a little picture. Switching back to "LyX"
mode would then read the LaTeX---LyX knows how to do this in the math
case---and display the LyX form.
One question: isn't it possible to handle this case like the other
external-material objects ?
I mean, imagine you define another kind of external-material object,
the "External Equation" type (e.g., a '*.eq' file), imagine you
associate a text editor to such a type, and imagine you define a set
of filters which just invoke externally LaTeX for computing the .eps
of the file for both preview and print purposes. This way, for
example, clicking on the image of the equation, would pop-up the
external text editor on the .eq file, and after exiting it would be
updated on the screen.
Wouldn't you achieve exactly what this user is looking for ?
I think this might be useful in some cases, assuming you just included
the LaTeX, rather than an image. But my thought was that it should
actually be fairly easy to switch back and forth between LaTeX mode and
LyX mode, which many people might like. And then you can do this right
inside LyX.
Richard