I can't answer your questions a and b because I don't rely on the LyX gui to generate PDFs. The reason I don't rely on the LyX gui is because back when I did, stuff like what you describe happened all the time. I'm not implying that these problems are intermittent or that your questions have no answer, I'm just saying they can get pretty complicated, which is why nobody has yet come up with an answer.
What I do with all my books is use a generator script so *I* control
where intermediate files go and *I* determine which files to delete and
when. The following is one of my shellscripts to make a PDF:
===========================================================
#!/bin/sh
##################################################################
tempfn=$1
cp -pf index_style.ist $tempfn.ist
StyleFile=$tempfn.ist
LyxCmd=lyx
### REMOVE ALL INTERMEDIATE FILES
rm -f $tempfn.aux
rm -f $tempfn.dvi
rm -f $tempfn.ps
rm -f $tempfn.pdf
rm -f $tempfn.idx
rm -f $tempfn.ilg
rm -f $tempfn.ind
rm -f $tempfn.log
rm -f $tempfn.tex
rm -f $tempfn.toc
### EXPORT TO LATEX AND COMPILE
$LyxCmd --export latex $tempfn.lyx
latex $tempfn.tex
### RUN makeindex TO CONSTRUCT INDEX INTERMEDIATE FILES
if test -f $StyleFile; then
makeindex -s $StyleFile $tempfn.idx
else
makeindex $tempfn.idx
fi
### AT THIS POINT, MANUALLY INSPECT $tempfn.ilg FOR ERRORS.
### IF THERE ARE ERRORS, USE $tempfn.ilg AND $tempfn.ind TO
### TROUBLESHOOT THOSE ERRORS. DO NOT GO FARTHER UNTIL
### makeindex RUNS CLEANLY WITHOUT ERRORS.
### ONCE AGAIN COMPILE WITH LATEX TO INCORPORATE INDEXING FILES
### LATEX TWICE TO INCORPORATE ALL INDEX STUFF. ONCE IS NOT ENOUGH
latex $tempfn.tex
latex $tempfn.tex
### CHECK TO MAKE SURE THE PRECEDING COMPILE WORKED,
### IF NOT TROUBLESHOOT
### CONVERT TO PDF. CAREFUL, FOLLOWING LINE WRAPS IN EMAIL
dvips -o $tempfn.ps $tempfn.dvi
ps2pdf12 -dPDFSETTINGS=/prepress -dMaxSubsetPct=100
-dSubsetFonts=true -dEmbedAllFonts=true $tempfn.ps
### VIEW THE RESULTS
#xpdf $tempfn.pdf
##################################################################
===========================================================
The preceding is an older one: I use luatex and lualatex instead of
latex these days, but you get the idea. I'm in charge of everything.
With my methodology, the actual LyX/LaTeX compatible graphics files
(pdf for instance), in their actual directories, are hard coded into the
LyX file. All the graphical conversions, such as svg to pdf, are done
in the shellscript, with the converted file going into the directory
expected by the LyX file. This methodology takes a little work up
front, but you're not constantly battling state issues, nor does
everything go up in smoke with minor upgrades.
By the way, I use one directory for each LyX file, for documents of any
importance. This makes things much easier. If for some reason a given
image or component must be used in several of my books, that's what
hard links or symlinks are for. Windows and Mac must have something
similar.
My methodology isn't for everyone, but I find it a huge time saver.
SteveT
Steve Litt
http://444domains.com
Michael Dean Pugh said on Fri, 13 Feb 2026 19:02:42 +0000
>I have spent the better part of two days now trying this and that. I
>do not want to retrace all of my steps here because it would be a
>long, time-consuming, and probably not-very-enlightening endeavor.
>This is what I am certain of: Every time I open this document in lyx
>and compile it, it creates a new temporary directory with a name
>similar to "lyx_tmpdir.jIaRmKTYJRBi" in the "...\AppData\Local\Temp"
>directory. It creates two sub directories called lyx_tmpbuf0 and
>lyx_tmpbuf1 and puts all relevant files (.aux, .bbl, etc) in the first
>of those. It also puts the six .svg files there along with the files
>that they are converted to before insertion in the final .tex
>document: one .pdf (the problem) and five .pngs. Now, I am absolutely
>certain that this is left over from when I first put that file in. I
>put it in as an .svg first. LyX threw a fit, so I re-output all six
>files as .pdfs from Mathematica and inserted the first as a .pdf. LyX
>still did not like it, but this time I was able to determine that it
>was the filename that LyX didn't like. I changed that and it worked.
>So, I thought, maybe it would have worked with the .svgs if I had used
>that filename structure. So I went back to the original plan and
>created six .svgs with new filenames. Put them in document—all six
>this time because by now I knew what size to use. Evidently,
>somewhere in here is where things went wrong. LyX converted that
>first file to a .pdf and the remaining five to .pngs. It is repeating
>this process every time I compile. If I find those files anywhere, I
>delete them, but to no avail: LyX just recreates them again on the
>next run. It is storing this conversion info somewhere, but I cannot
>find it. Under Tools->Preferences->File Handling->Converters, I have
>examined all of the SVG-> type converters. All of them have the
>Enable cache checkbox unchecked (I figure this is a path we do not
>need to investiate). I just need to know either (a) where LyX stores
>this info or (b) how to get LyX to forget it and start fresh. Either
>would work. ________________________________ From: Michael Dean Pugh
><[email protected]> Sent: Thursday, February 12, 2026 12:38 PM To:
>lyx-users <[email protected]> Subject: Fw: Caching of graphics
>files
>
>Okay, here is something weird and definitely related. I regenerated
>the six files to a separate directory and inserted them in the LyX
>document as before. When I recompiled, the same thing happened. But
>in this new directory, .png files appeared for the five correctly
>sized plots with the same name as the .svg file. However, for the one
>oddball, a .pdf under the same name appeared instead of a .png. I
>know this is related to my earlier experiments. I just don't know how
>to start fresh.
>
>________________________________
>From: Michael Dean Pugh <[email protected]>
>Sent: Thursday, February 12, 2026 12:16 PM
>To: lyx-users <[email protected]>
>Subject: Caching of graphics files
>
>This has been an issue for some time and I usually find a workaround,
>but every time I have to remember how I did it. I have output from
>Mathematica six identically sized .svg files which I want to put in a
>2x3 table in LyX. I insert the first graphic and then play with the
>size until it looks to be a little less than 1/3 of the line width of
>the document. Armed with this size, I then insert the other five
>graphs. These five are identically sized but the first one is not--it
>is slightly too large. I've deleted it and added it back. I deleted
>the files in the directory and regenerated them. I even changed the
>name of the file. I deleted everything in the Cache subdirectory. No
>go. I am 100% positive these plots are the same size, having opened
>them in Inkscape to be certain. LyX must be caching something
>somewhere, but I have no idea where. Does anyone know what is going
>on?
mkidx.sh
Description: application/shellscript
-- lyx-users mailing list [email protected] https://lists.lyx.org/mailman/listinfo/lyx-users
