0

I would like LyX to create the PDF file in the same folder as the *.lyx file. I'm using LyX 2.4 on Windows 11. Note that the 11 year old answer to the similar question "Can LyX automatically save the PDF output in the same fold?" has an unsatisfactory answer because while LyX does create a copy of the PDF file in the folder containing the *.lyx file, clicking on the "View" icon opens the wrong PDF file. It opens a PDF file in a strange temporary folder instead of the correct PDF file which should be the one in the folder containing the *.lyx file.

  • Welcome. // Are the pdf files different? If not, why is the exact location of interest? You'd export the .pdf anyway, don't you? – MS-SPO Feb 13 '24 at 18:57
  • Fran has a good answer. A separate approach (untested) might be to create a new copier. You will have to jump down a rabbit whole and read Help > Customization and read all about file formats and converters to figure this out. But in theory it should be possible to save the file in your current directory and to open the file with a PDF viewer. But let's step back: why do you want to do this? Do you want to make follow-up edits in your PDF viewer or something like that? – scottkosty Feb 15 '24 at 15:36
  • The reason to save the PDF file in the same directory as the .lyx file is that no one ever shares .lyx files with colleagues but one does share PDF files. I want there to be only one PDF file and I want it in a convenient location. I think LyX's design to put the PDF output in a temporary folder is a poor design choice. I would like the same behavior as happens when I directly edit and compile a LaTeX file. The PDF output should be in the SAME folder as the .lyx file always. – Alan C. Feb 28 '24 at 21:26

1 Answers1

1

It opens a PDF file in a strange temporary folder instead of the correct PDF file which should be the one in the folder containing the *.lyx file.

No, it should not the folder containing the .lyx file. DocumentView is only to see previews of **not saved changes in the source .lyx **, that are in a temporal file because are overwritten without ask (and to void fill your working directory the the auxiliary files of the latex compilation).

To place the PDF in the working directory (or where you want) the correct choice is FileExportPDF(several options) that have sense use only when you think that the preview deserves to be saved and overwrite any previous versión, but only if you confirm that, for security reasons.

Note that this does not save the source either, so do not forget press Ctrl+S before or you will en with a final PDF but not a final source.

If the problem is that there are not a shortcut as Ctrl+R for this: ToolsPreferences...EditingShortcutsDocument and Windowbuffer-exportModify → (your shorcut, for instance Ctrl+F12) → OKOK

Then the shorcut is there ready to use:

MWe

Fran
  • 80,769