I would like to input the body of a lyx file into a tex file.
Currently I convert the .lyx file (say child.lyx) to child.tex in Lyx with File > Export > Latex, and use \input{child.tex} in the main .tex document, also using the standalone package to only copy the body, which works.
Somehow, if I have my main document in LyX and use \input{} in Lyx (Insert > File > Child Document ...), it works as well, but directly using \input{child.lyx} in LaTeX doesn't work.
Is there a way to avoid the conversion step, so that I could simply write in child.lyx and compile main.tex file, without having to convert the lyx file first each time?

\input{}inside LaTeX. Only the other way round is possible. – user187802 Jul 06 '23 at 17:46