Problems related to custom AMS theorem module

Andrew Parsloe ajparsloe at gmail.com
Sat Jul 24 20:52:03 UTC 2021


On 24/07/2021 9:00 am, Paul A. Rubin wrote:
> On 7/23/21 4:14 PM, Rudi Gaelzer wrote:
>>
>> Is there a way to instruct Lyx to write certain auxiliary files into 
>> the local directory, instead of in /tmp/lyx_tmpdirxxx?
>>
>>
> Is it LyX or LaTeX (pdflatex?) that writes the auxiliary files? I 
> suspect the latter, in which case I'm pretty sure the answer to your 
> question is no. You could create a custom export format and tell LyX 
> to invoke a shell script (written by you) that would run whatever 
> LaTeX commands were needed and then copy the selected files to the 
> local directory (which I believe you can convince LyX to pass as an 
> argument to the script). That's complicated enough that you might be 
> better off just writing a script that copies the target files to the 
> local directory and run it manually after compiling documents.
>
I haven't followed this thread with any attention so may well have 
missed the point, but I wonder if LyX's copier mechanism is what you 
want? I'm thinking of the script ext_copy.py that comes with LyX (in 
Resources/scripts). For example, to copy the *.aux files back to your 
document directory from the temp directory,  in Tools>Preferences>File 
Handling>File Formats select the format PDF (pdflatex) and in the Copier 
slot put

python -tt $$s/scripts/ext_copy.py -e pdf,aux -d $$i $$o

then click OK. Now when you export to pdf by the pdflatex route, not 
only will you get the pdf in your document directory but also any aux 
files.

If you want to look at the aux files without the burden of compiling to 
pdf, a good trick is to export to Plain text, which is quick even for 
large complex documents, and in the Copier slot under Plain text to enter

python -tt $$s/scripts/ext_copy.py -e aux -d $$i $$o

Notice that only files with the extension aux are to be copied back. 
That means the plain text file resulting from the export, which you are 
unlikely to be interested in, stays in the temp directory and doesn't 
clutter your document directory, but the aux files do get copied back to 
there.

Andrew

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lyx.org/pipermail/lyx-users/attachments/20210725/7f94989b/attachment.html>


More information about the lyx-users mailing list