On 29/05/2016 11:50 p.m., Ron Stone wrote:
Hi,

One of the documented features of the spreadtab module is the ability to save 
calculated values (see section 1.6 of the SpreadtabWithLyx.pdf)

The method described is not working either in LyX 2.1 or 2.2. The instructions say 
to insert > Short Title before the table, but it does not exist in these 
versions, and the source file of the instructions (SpreadtabWithLyx.lyx) throws an 
error on section 1.6 when building:

\sLRetrieve{\Balance}
.\label{If-we-wish} It is tempting to put this
The control sequence at the end of the top line
of your error message was never \def'ed. If you have
misspelled it (e.g., `\hobx'), type `I' and the correct
spelling (e.g., `I\hbox'). Otherwise just continue,
and I'll forget about whatever was undefined.

Does anyone know if there is currently a way to save cell results for reuse 
outside the table? This is important for the situation I’m working with.

Thanks,

Ron
I'm the author of this module Ron. I was alerted to this failure just a week ago by another frustrated user. I'm in the process of updating the module and documentation. In the meantime you can do the following. Open spreadtab.module in a text editor. Scan down until you come to the line

InsetLayout Flex:sLSaveCell

In the definition of sLSaveCell, scan down to the line PassThru 0. Change the 0 to 1 so it reads PassThru 1. Save and close the module. (The 0 can have got there only through some kind of brain fade on my part. The 1 is essential if a backslash, as occurs in \Balance, is to be interpreted correctly. Alternatively, it's possible I intended \Balance to be entered in an ERT inset but forgot to document the fact.)

The other complication is the changed handling of LaTeX arguments in styles and insets in LyX from (was it?) 2.1.4. Because of this change, some areas of the documentation are no longer accurate. To save the contents of a cell you need to put the sLSaveCell inset into the Required argument inset that should be visible in the example tables when you click the cursor in them, and can also be inserted from the Insert menu (located in the area of that rather long menu where Short Title lurks) when the cursor is in an sLTable environment.

Finally, when using saved results later in a document, you need to be aware of the limitations of instant preview, which doesn't know about values calculated in earlier previews, except when the document is first opened, so you may want to save, close and re-open the document to see a saved value used later. (The pdf is unaffected by this limitation.)

Having not heard a peep about the spreadtab module for years (hence its neglect), it's disconcerting but cheering to find two people, within 10 days, have actually had a look at it.

Andrew

---
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus

Reply via email to