This is a follow up to: Using the xr package in LyX (for cross-referencing an external LyX document)
I have two LyX documents, called
supplement.lyx. I need to compile them into separate documents and be able to cross reference from the supplement to the draft. I am attempting to use xr per the instruction linked to above.
Normally, I use a little python script to call LyX sequentially to compile each file from the command line. However, it seems that the temp folder only persists while LyX is running, so the necessary .aux file is deleted before it can be referenced. Is there a way to automatically copy the .aux file or to force the temp directory to persist?