This is a LyX specific question. I would like to work with a main document and insert different parts (e.g. chapters) into the main document as child documents. One can do this in LyX using
Insert > File > Child Document
and then in the pop up window choose the document to insert either using the LaTeX command include or input. The functionality of both in principle works in the sense that if I export the document to pdf using pdflatex I get the document that I'd expect. However, the Show preview option of input does not seem to work: I do not see a preview in the main document, only the text Input: child.lyx with a gray background appears. One can click on this text to get back to the pop up window with insert options.
I couldn't find much on this topic to resolve the issue myself, a similar question was asked here on TeX stack exchange a long time ago (2015) but there it seems a table was causing the issue (in the version of LyX used at the time). For me the Show preview option never works.
A guess of mine is that it might have to do with a known issue of LyX using Python on recent versions of MacOS (I'm using MacOS Ventura (version 13.2.1) and LyX Version 2.3.7) and someone in the mailing list of LyX said that that probably is the case. However, the page seems to say that the problem is that recent versions of MacOS don't come with Python 2.7 anymore but as possible solutions describes ways to install Python 3. It is therefore not clear to me if LyX requires Python 2 or Python 3 to function properly. I have Python 3 installed and it is on my path so it should have access to that. I have never received any of the pop ups / warnings concrning Python issues on recent MacOS versions that are described on that page. So if LyX not being able to use Python correctly is the issue, it doesn't seem to encounter the specific issues corresponding to those warnings.
Now this is for the input option to insert child documents. When choosing the include option LyX would take the contents of the child document and include them in the main document as if you had typed everything in there yourself (if I remember correctly). However, it doesn't do this either. This is probably caused by the same underlying issue, that's why I mention it.
I can also ask my question on the LyX mailing list, but I thought I'd try my luck here first. I suspect stack exchange has a greater reach. Both in terms of people who might be able to help as in people that have the same issue might more easily find this post here than they'd find a mailing list question. Any help would be appreciated.
\usepackage{hyperref}. After removing that the child document preview reappeared. I assume preview should work also when using the hyperref package, so there still seems to be an issue. Also, ticking Use Hyperref Support from document PDF options instead of including hyperref in the preamble reproduces the problem. Additionally the preview function doesn't work for nestedinputdocuments. – Alwin Mar 16 '23 at 14:24