[OS X TeX] OT: Applescript help

Vic Norton vic at norton.name
Tue Mar 9 23:58:12 CET 2010


Your labeling is what had me buffaloed, Alan. I assumed your "csv2latex" did what it says it does---convert "comma separated values" to tabular latex data. In fact it does almost nothing to "comma separated values". It does convert "tab separated values" (like you would copy off of a spreadsheet) to tabular latex data. An appropriate name for your routine might be "tsv2latex".

The compiled "csv2latex" does convert "comma separated values" to latex tabular data.

Now that I've figured out that I'm supposed to use "tab separated values" in TeXShop, "Paste Spreadsheet Cells" works fine---and I do appreciate having this tool at my disposal.

Regards,

A no longer perplexed Vic



On Mar 9, 2010, at 12:30 PM, Alan Munn wrote:

> 
> On Mar 9, 2010, at 11:57 AM, Vic Norton wrote:
> 
>> I'll have to say that the TeXShop "Paste Spreadsheet Cells" macro is a complete mystery to me. When I run "csv2latex" from terminal I get what I would expect. Running "Paste Spreadsheet Cells" from TeXShop with some csv data in the clipboard doesn't give me anything like tabular data. In effect it just pastes the csv data, commas and all, into the TeXShop document.
> 
> Unfortunately there's a naming problem that has arisen.  There's another csv2latex program around that converts a csv file to latex table format.  Perhaps that's what you have when you run from the command line.  My script modifies the contents of the clipboard directly, and now (as Herb notes) should reside within ~/Library/TeXShop/bin
> 
> Alan
> 
>> 
>> Obviously I am missing something.
>> 
>> Regards,
>> 
>> Vic
>> 
>> 
>> On Mar 9, 2010, at 10:42 AM, Alan Munn wrote:
>> 
>>> Hi, this is somewhat off-topic, but ultimately relates to TeXShop.
>>> 
>>> Someone has requested a change to csv2latex (the script underlying the Paste Spreadsheet Cells macro in TeXShop) so that the $ character is not escaped (currently, that is the behaviour). This is easy to implement with a command line option to the ruby script, but I'm struggling with a way of passing that option via Applescript. The current Applescript uses "choose from list" to present the list of table style options.  What I'd like to do is add a checkbox to that dialogue corresponding to the option, but this doesn't seem to be possible.  Can anyone familiar with Applescript suggest a way of implementing this?
>>> 
>>> 
>>> Thanks
>>> 
>>> Alan
>>> 
>>> -- 
>>> Alan Munn
>>> amunn at gmx.com




More information about the macostex-archives mailing list