A Small Question

Doug Martin martinrd3d at gmail.com
Sun Apr 11 15:12:15 UTC 2021

Tom Philips and I create tables in LYX using the knitr package function
kable (with the package kableExtra) in the
following way:

   1. Insert > Float > Table
   2. In the float, enter a name and header for the table in the space
   3. Just below the name, *but still inside the float*, press Ctrl-L to
   create a box for Latex code
   4. Enter all the code for the table including the kable code that
   actually generates it into the box for Latex code

This causes a “Not in outer par mode” error (see below), but creates a
table that we are quite fine with.  Our Tech
Support person at Springer told us that the reason is due to embedding the
Rnw file for Table output in the LYX file,
so that there is a table code inside another table in LaTeX as highlighted


\caption{Equity Returns in Twenty--One Countries: 12/31/1899--12/31/2019}












and he suggested to solve the problem by adding the yellow highlighted
lines below.


\caption{Global Annualized Real Returns For Stocks, Bonds and Bills}






*And the second insertion will be: *





This actually works fine.  Except that for every table we have to do that
insertion, and Tom and I are just
wondering if there some capability of LYX to accomplish the same thing
without us having to do those insertions
for every table?

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lyx.org/pipermail/lyx-devel/attachments/20210411/ea734bf4/attachment.html>

More information about the lyx-devel mailing list