I have a .tex file containing a table. In my master Lyx document I went to Insert > File > Child Document and entered the file. It compiles fine, but I'd love it if I could see a preview of the table in the master Lyx file, without having to compile to view it.

It looks like this functionality is supposed to exist, because in the Child Document window there is a checkbox for Show Preview. However, checking the box and clicking OK doesn't seem to do anything (I even tried restarting Lyx). I've verified that Instant Preview is turned on under Preferences > Look & Feel > Display.

According to this discussion, if I'm using version 2.0.6 or higher I should be able to see a preview. I'm working in Lyx 2.1.4. Any ideas? Does preview only work if the child document is a Lyx file, not a LaTex file?


Select the inset (the box that says "Input: yourFile.tex") and go to Insert > Preview.

That works for me on Ubuntu. If that doesn't work for you, please post a minimal example.

| improve this answer | |
  • Thanks! Unfortunately it appears not to work when the LaTex code includes a table, but it does work when the code is something simple, so I guess it's just not possible to get a preview of some stuff. Oh well! – kclarke Oct 15 '15 at 16:45
  • @kclarke sure it's possible! But we can't fix something if we don't know it is broken. Tables preview just fine for me. Can you please make a bug report at lyx.org/trac with a minimal example? I know it is annoying to spend the time to do this but if you do it we can fix it so that you and others don't have this problem in the future. – scottkosty Oct 16 '15 at 0:44
  • I was able to fix the preview, however this solution may be very specific. Anyway, in my case the latex table is generated by an R function (psych::df2latex). After removing everything except \begin{tabular} [latex code of the table] \end{tabular} from the code (that is \begin{table} ect.) the preview was generated by LyX. – Will Mar 29 '19 at 6:21
  • Moreover, I found a way to automatically generate the latex code needed for the preview here – Will Mar 29 '19 at 8:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.