Haris & Alan,


I apologize  ahead for the relatively long post that follows but I hope that it assists you as you continue in this process of improving these tools on our behalf. 

Thanks so much as always for your assistance.  Interestingly,  we  all seem to be going through a similar squeeze (I too being in the midst of my thesis completion) & I wonder how you guys manage to offer your attention under these circumstances .

I downloaded the revised updated Sweave bundle from the  temp link that Haris set up.

This has definitely  solved some  of  my problems. The   latex markings (scoping)  seems to have been  solved.  However,  for a reason that is not clear,  my assignment of  key activation for the "sweave in R'"  and "Typeset & View"  do NOT work  (they still open  Finder windows instead)..       The Menu options show these key activations as present  & indeed work when triggered from the menu (which is somewhat inconvenient  given that I use key activations alot).   


My current workflow is almost similar to Alan's. 

I have a central  (master)  latex file that essentially has most of the latex headers,  and brings in different latex files using the \include statement (including the *.tex file created from the *.snw from the sweave session).  This master latex file  is what has been set as my  TM_LATEX_MASTER in the sweave project.  These included latex files are edited separately & saved.  My  single *.snw file is actually my Results chapter & I spend most of my  time with this file.  Like Alan, I  will work on an R  analysis/plot etc   which I incorporate in the my sweave file  & do the "Sweave in R"  just to see that the R code is working    fine.  If is then  I do the "Typeset & View"  within this sweave file (which runs my master  latex file  - including the *.tex file that was created by the sweave session).  

So I do  still like the optional   functionality of having a separate "Sweave in R"   and "Typeset & View".   

On the other hand, I also like to have the new option introduced by Haris of  "Sweave, Typeset  & view" .    This is especially so if my edits in the Sweave file have only occurred  in the latex-only scoped parts & so I do not have to check the R output.  

But the "Sweave, Typset & view"  is not working properly for me so far.
When I make an edit in one of my  separate *.tex files that is included by the master tex file and do the    "Sweave, Typset & view"   of  the .snw file, the edits of that include tex file do not show up.  On the other hand, when simply  do  "Typeset & View" of the same *.snw file the edit shows up in the pdf view.


So the 2 major issues at the moment are the ones highlighted in red above (the failure of key activation being most important).  

I really appreciate the improvements that you 2  have made in the Sweave bundles (as well as those  made in the latex & R bundles by Haris).   My thesis has benefited from the way these 3 bundles - & the stata bundle which is still in infancy -  have been efficiently brought together  for me  by textmate.    

Thanks again for your time given your own circumstances.


To Answer some specific qns:

Are you sure you're using both the newest sweave and latex bundles? 
Yes I am.  I  updated my Latex bundle  just prior to my initial attempt to update the Sweave bundle using   snv up *.tmbundle   (to some extent because I wanted to update my R bundle with the cool tools - thanks again Haris!).  My last snv showed that I was updated  to revision 5980.


You should set a TM_LATEX_MASTER variable for your sweave project.

Yes, I have been working over the past several months with this  set & it was working fine until the update.
Actually, it   now again works when I run "Typeset & view"  on the sweave file  using the menu option (but  not my  key trigger).   


Danstan











On Nov 7, 2006, at 11:07 AM, Alan Schussman wrote:

(Re-sent to the list after replying solely to Haris the first time.)

On Nov 7, 2006, at 8:20 AM, Charilaos Skiadas wrote:

I think I might have forgotten to tell Alan about the most recent updates I've done. Here is a temporary location for the most recent bundle. Alan, perhaps you could update the bundle on your website?


Done, thanks for the updates, Haris. The archive on my site[1] is your current bundle now, and it should do the trick for Danstan.

Thinking broadly about the bundle and how I'm using sweave, it seems to me that sweave ought to work for at least a few different circumstances:

1. single .snw file sweave => typeset
2. sweave project (typeset optional; I use the sweave project to prepare data for subsequent work, and frequently do not typeset at this point.)
3. sweave current file => typeset (not really functionally different than no. 1, just switched on the basis of TM_LATEX_MASTER, probably)

My current workflow is to begin with no. 2, and then work with the R console to test code that I subsequently plug into a single sweave file. When I'm ready, I sweave and typeset that single file (which lets me avoid re-sweaving the whole big project each time I want to fiddle with a table, for instance). The trick for the bundle seems to me to be enabling smooth selection of a) master sweave, b) per-file sweave, and c) typeset, with as few overlapping key commands as possible.

Anyway, I'll be eager to really work on this as soon as I finish this little project I'm working on.

Cheers-
-Alan

[1] http://textbench.com/tm/SWeave.zip

______________________________________________________________________
For new threads USE THIS: textmate@lists.macromates.com
(threading gets destroyed and the universe will collapse if you don't)
http://lists.macromates.com/mailman/listinfo/textmate