Chris, I've faced a somewhat similar situation in the past and I
handled it by writing a script to do the following

1. export lyx to tex (in cygwin, lyx -e tex mylyxfile.lyx)
2. Use latex or pdflatex to process the resulting mylyxfile.tex
3. now the ancillary files (in your case, .log) should be created in
the same directory, so you can do your task
4. clean up the ancillary files using rm

I am really terrible at writing scripts so I'll allow someone more
adept to code up an example, but this is the basic idea and it works
for me, albeit in a fairly hacky way.

Hope this helps and good luck,
BL

On Fri, Apr 22, 2016 at 2:21 PM, Richard Heck <rgh...@lyx.org> wrote:
> On 04/22/2016 12:36 PM, Christopher Bilder wrote:
>
> Hello, I would like to have the LaTeX .log file be automatically put into
> the folder where I have my .lyx file once the LyX file is compiled. This
> behavior would be similar to what occurs with LaTeX already when compiling a
> .tex file. Currently, the .log file is put into a temporary directory by
> LyX. I understand how to change the path for the temporary directory
> (Preferences > Paths) which sort of works, but I would also like to remove
> the set of randomly generated folders that come with it, like
> “lyx_tmpdir.WrDLwXBld464\lyx_tmpbuf2”, before I can get to my .log file.
>
>
>
> I understand how to see the .log file from within LyX itself (Document >
> LaTeX Log), so this request my seem odd! The real reason that I want to be
> able to better control this LyX behavior is because I am using a LaTeX
> package (StatRep – SAS’s “equivalent” to knitr for R) which generates some
> additional files (SAS program) that I need to easily access.
>
>
> This should be possible by creating a specialized "copier". See section 3.2
> of the Customization manual for information on how to do this. There's a
> very simple example there, but you can also have a look at the ext_copy.py
> file, which is mostly used as a copier for html files.
>
> I don't totally understand how StatRep works or what kinds of files it
> generates where, but you if it is putting them in the temporary directory,
> you should be able to define a copier to extract them, too. Alternatively,
> if it's something you are running by hand after export, you should be able
> to define a "Converter" that will run the SAS program for you, in the
> temporary directory. This is how kntir works in LyX, I think. See section
> 3.3 of the Customization manual for info on that.
>
> Richard
>

Reply via email to