A great tip with a great detailed explanation.
Thanks very much!
------- Original Message -------
On Wednesday, July 27th, 2022 at 10:47 PM, Andrew Parsloe <ajpars...@gmail.com>
wrote:
> On 27/07/2022 10:27 pm, tush via lyx-users wrote:
>
>> When I export a lyx file to pdf, the tex output files (.aux, .lof, .synctex
>> etc. as well as the pdf) are all located not in the project’s directory but
>> in
>> “/private/var/folders/vw/ry_x0fbs7rb3qz7v3_cmb_4h0000gn/T/lyx_tmpdir.ndQoOCZFjkaB/lyx_tmpbuf0/”
>> on my macOS.
>>
>> 1. What is the reason that LyX developers decided to put those files there
>> and not in the “intuitive” place - the project’s root directory?
>> 2. And how can I change it to export the files to the project’s directory?
>>
>> This answer:https://tex.stackexchange.com/a/126747 says that one can achieve
>> that by changing the preferences, but is there another way to do it? A less,
>> “techy” way?
>
> I'm working on a windows system and have no idea how things are arranged on a
> mac, but this works on windows.
>
> LyX has a copying mechanism for getting files out of the temporary directory
> and into the document directory when a document is exported. To copy back the
> log file for instance, go to Tools > Preferences > File Handling > File
> Formats and find PDF (pdflatex), if you are exporting with pdflatex, in the
> list of formats. (If its LuaTex, choose PDF (LuaTeX).) In the Copier slot of
> the dialogue insert the following line of code:
>
> python -tt $$s/scripts/ext_copy.py -e log,pdf -d $$i $$o
>
> ext_copy.py is a python script that is supplied with LyX. The -e log,pdf -d
> part of the line tells ext_copy.py that on export to pdf to copy any files
> with the extensions .log or .pdf from the temporary directory where LyX does
> its work back to the document directory – the -d option (which became
> available with LyX 2.3.0). If you wanted to also copy the aux file, just add
> that to the list: aux,log,pdf.
>
> The "documentation" that comes with ext_copy.py is found in the opening
> comments of the script itself which can be found in the scripts subdirectory
> of the Resources directory of the LyX directory.
>
> Also check "Copiers" in the Customization manual.
>
> Andrew
--
lyx-users mailing list
lyx-users@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-users