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?

1 Answer 1


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.

  • 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
    Commented Oct 15, 2015 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
    Commented Oct 16, 2015 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
    Commented Mar 29, 2019 at 6:21
  • Moreover, I found a way to automatically generate the latex code needed for the preview here
    – Will
    Commented Mar 29, 2019 at 8:17

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .