Tommaso Cucinotta wrote:
Darren Freeman ha scritto:
just in the generated output, you would be suggesting a basic embedded
spreadsheet within LyX..
Exactly. I was of course thinking of a way to latexify the connections
among numbers, rather than simply calculating them in LyX. So that,
after export LaTeX -> reimport, the spreadsheet would still work.
I don't know if latex have much spreadsheet capability.
The latex roundtrip problem can be fixed another way:
Have the "simple spreadsheet" implemented in LyX,
export calculated numbers to latex,
and put the formulas in latex comments. The latex import can then
get the formulas back from such comments.

And, needless to say, I felt so stupid when, while writing my last paper,
I was so afraid of having not only to update a few numbers within a
couple of tables, but also to update some totals around (both in the
table, and in the text). I confess I missed the spreadsheet embedding
feature of other editors.
Embedding a gnumeric spreadsheet:
http://www.aitel.hist.no/~helgehaf/gnumeric.lyx
http://www.aitel.hist.no/~helgehaf/spreadsheet.gnumeric
http://www.aitel.hist.no/~helgehaf/spreadsheet.tex

Turning this into a external inset is easy, and gets rid of
the latex commands in the preamble. But there will be
one thing missing - I see no way of forcing gnumeric
to export a .tex file, other than to use the gnumeric GUI.
So LyX can't convert gnumeric to tex automatically, the
user still have to "Save As..."  whenever he updates the spreadsheet.
Actually, gnumeric supports plugins, so there _may_ be a way
of auto-exporting latex.

The openoffice spreadsheet can save a pdf file, which also
is easy to import in LyX. Openoffice also have an API for
"remote control" so I guess it is possible to make LyX
control oocalc in order to update the PDF automatically.
The one problem here is that
oocalc exports a whole page, so you have to experiment
with the graphichs clipping in LyX in order to  trim off
the excess whitespace. Example:
http://www.aitel.hist.no/~helgehaf/spreadsheet.ods
http://www.aitel.hist.no/~helgehaf/oocalc.lyx

Helge Hafting

Reply via email to