I've posted in the tex stack exchange <https://tex.stackexchange.com/questions/729904/combinations-of-preview-environment-and-ert-environment-doesnt-work-in-lyx-2-4> some time ago about the same problem since then I've reached out to the LyX mailing list and got some more help and debugging but the problem turned out to be more complicated than what seemed initially, I'll detail here all the steps and debugging that was suggested to me in the mailing list, hopefully, someone here might be able to help.
first of all, I noticed the problem when putting an ERT environment inside the preview environment, it doesn't render the output (but the compiled PDF file renders it so the problem is with the preview most likely) even after downloading all the required packages (like bigfoot.sty and cprotect.sty), then with the help of the mailing list i inspected the temp files of the documents and we found errors related to some "forbidden" characters in the ERT environment - which there weren't any so we thought it might be an issue with the font i used ("David") so i updated the font to "David CLM" which worked for the person helping me with the file I gave them which had this problem (just to be clear all of my files have this problem, i just shared with him a testing file) this didn't work for me, afterwards we checked the message pane and I got the following messages: >"13:10:20.874: (dialog-toggle progress) > >13:10:58.853: Opening document ~\Documents\lyx documents\Misc\testing.lyx... > >13:10:58.959: Document ~\Documents\lyx documents\Misc\testing.lyx opened. > >13:10:58.960: (file-open C:/Users/Matan/Documents/lyx >documents/Misc/testing.lyx)support/lyxmagic.h (67): Magic: libmagic support not configured > >Format.cpp (372): Recognised Fileformat: latex > >Format.cpp (473): will guess format from file extension: lyx -> lyx " which the person helping me said meant that "LyX does not even attempt to generate a preview and libmagic.h is missing" and that he has no idea why it happens and if it's related to "libmagic.h". then another guy tried a completely new approach and asked me about my OS and installation process because (and I quote): "It looks like as if imagemagick libraries were not present when your lyx binary was compiled", and I answered the following (he hasn't responded yet). I'm on Windows 10 I installed texlive and then lyx and installed the relevant packages, (I followed a manual to download it with Hebrew configuration which it does automatically, I'll explain here the steps the manual explains) In the texlive I downloaded the "medium scheme", In "N of collection" option I removed "context and packages" and instead marked "other languages", then when it finished installation in the texlive shell I downloaded the packages "zref", "bidi","titlesec","relsize","esint","doublestroke", "bigfoot", and some more dedicated ones for my use. this is everything I've done in the installation of texlive (followed the Hebrew guide to lyx) the lyx installation was the default one (I just marked Hebrew as a language as well) I'll add that I don't attach here an example file since with the miling list help we figured out it must be some configuration issue in my PC. this is everything so far, looking forward to some suggesions on how to solve this issue.
-- lyx-devel mailing list lyx-devel@lists.lyx.org https://lists.lyx.org/mailman/listinfo/lyx-devel