Re: Importing into LaTeX



On 01/23/2013 09:40 PM, Andreas Guelzow wrote:
On Thu, 2013-01-24 at 10:34 +1000, David Crosswell wrote:
Greetings all.
I've looked through all the documentation, but can find no reference to
this.
Is there any way, other than turning the whole lot into an image, of
importing a composite Gnumeric spreadsheet into a LaTeX document?
You can export the spreadsheet content to a Latex file (dependeing on
the version via 'file->save-as' in 1.10.17 and earlier, or
'Data->exportData->...' in 1.12.x). THat Latex file will not contain the
sheet objects such as graphs since there is no standard way to save them
in a Latex file.
I can't see any reference to an `export to ,pdf' feature either, which
would be nice.
If you select file->print you can specify to output to a pdf or ps file.

Andreas

Here is another approach that I have used successfully (in plain TeX).

Create the TeX code for the desired result in a separate column. If you want to export a table, concatenate cell references with strings of "&" and "\\cr" at the end (note that the "\" needs to be escaped in the gnumeric string to have a backslash in the result). The resulting column can be copied into the TeX source file.

Alternatively, a "tableline" macro can be defined in TeX. Then, your entry in gnumeric will look something like this:

="\\tableline{"&$M341&"}{"&$C341&"}{"&D341&"}{"&F341&"}{"&G341&"}{"&I341&"}{"&J341&"}"

Each tool should concentrate on doing what it does best instead of overloading a program with external features.

--RTB




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]