On 04/26/2016 11:25 PM, Christopher Bilder wrote: > Thank you all for your suggestions. With the additional help of Tim Arnold > (SAS Institute; author of the StatRep package for LaTeX), here's a somewhat > hardcoded way to move the log file on a Windows 7 system with LyX 2.1.1: > > 1) Select Preferences > File Handling > File Formats and then choose a format > of PDF (pdflatex) > 2) In the Copier field, enter > > python "C:\Program Files (x86)\LyX 2.1"\\Resources\\scripts\\ext_copy.py > -e log -t. $$i c:\\myfolder > > where myfolder would be the location where your LyX file is located > 3) Select Save > 4) Reconfigure (Select Tools > Reconfigure) and exit LyX > 5) Re-open the LyX file and select File > Export > PDF (pdflatex) > > This works but it is not necessarily idea. Does anyone have ideas for > improvement? For example, is there a way to get around hard coding the path > to ext_copy.py
Use: $$s/scripts/ext_copy.py, as in the copier for HTML files. $$s is the LyX system directory, in your case, C:\Program Files (x86)\LyX 2.1\Resources\. Note that you can use / instead of \. > or myfolder? You can probably pass $$o, as in the copier for HTML files. This is replaced by the name of the output file, but ext_copy.py uses it to figure out the directory in which the output file is to be placed > Also, is there a way to do this by selecting the document viewer icon on the > View/Update toolbar (equivalent to Document > View [PDF (pdflatex)] or > Ctrl-R) rather than File > Export > PDF (pdflatex)? No, the copier is only invoked when the file is output. But you could add an export icon, if you wanted. > The main reason again for my original question is to actually do this moving > with .sas files that are created automatically by the StatRep package when a > LyX/LaTeX file is compiled. Not everyone necessarily knows what a SAS file is > or has access to SAS to run a SAS file, so that's why I chose to phrase the > question in terms of the LaTeX log file. I have not tried yet the previous > suggestion of using the LyX Converter to automatically run these SAS files. > The potential for doing it is very interesting and would be a nice addition > to the reproducibility of research area, like knitr is for R programs. A similar command would at least copy the sas file, too. Richard