On 05/05/2011 12:22 AM, Andrew Parsloe wrote:
On 5/05/2011 12:32 p.m., Charlie wrote:

If a vote is being taken on this feature request.

I would rather that it doesn't happen, so please put me down as a "no".

Please don't do it.

There are plenty of spreadsheet programs and if you haven't completed
your work in the program you use, why would you place it into a LyX
document and edit it anyway? LyX is great as is.

Thank you,
Charlie

I think I have confused people, perhaps because I used the phrase 'LyX
office suite' (but in quotes -- it was meant with a certain
tongue-in-cheek quality) and mentioned the word spreadsheet.

I meant something more on these lines: you have a table in LyX with a
few columns of figures; you want the totals of the columns, perhaps a
grand total. The numbers aren't at this point fixed. New data may arise
as you work on your document. Yes you could open a spreadsheet program
but it's just two or three columns and there's a certain overkill about
that.

Alternatively, you can put \usepackage{spreadtab} in your preamble and,
as things are at present, open an ERT inset, write
\begin{spreadtab}{{tabular}{|c|c|c|}}, construct the table with the
figures, ampersands, newline markers \\, spreadtab's sum() command, and
finish with \end{spreadtab}. It's now there in your document easily
accessible for any adjusted figures to be entered. This is what I do
now. LyX doesn't do any calculating.

But it is easier to enter figures and text into a table in LyX proper
rather than ERT. My request was for a button on the table toolbar that
would change LyX's \begin{tablular}{|c|c|c|} into
\begin{spreadtab}{{tabular}{|c|c|c|}}, and \end{tabular} into
\end{spreadtab}, and a few 'tidying up' operations like replacing
\tabularnewline with \\. Again, no request that LyX acquire calculating
abilities. Rather, the ability to replace one environment, tabular, with
another, spreadtab. The calculational abilities are in spreadtab and, as
far as LyX is concerned, are a side-effect of the environment change.
LyX doesn't need to acquire spreadsheet capabilities. I have no wish to
see it heading down the road of OpenOffice.

Andrew


Being able to customize the output of a tabular like this is in my opinion a valid request and more general than just this particular case (spreadtab, which I did not know). There are a number of latex environment which use tab alignment &. All of them would benefit from the nice interface that LyX provides. I can think of tikz \matrix{}, or customizing a table using the booktabs package, for example.

The proper way to implement this is not obvious, but extending the layout syntax would be the most flexible, with the specifics about spreadtab in a spreadtab.module file.

--
Julien

Reply via email to