Scott, Thanks for the quick response and suggested solutions. I will check it out later today or first thing tomorrow, and get back to you.
Doug On Sun, Apr 11, 2021 at 2:55 PM Scott Kostyshak <skost...@lyx.org> wrote: > On Sun, Apr 11, 2021 at 02:07:51PM -0600, Doug Martin wrote: > > Scott and all, > > > > Here you go. As you will see, the Table is fine, but we get the "knitr > > errors" message: > > LaTeX Error: Not in outer par mode. > > > > Doug > > > > P.S. We like various capabilities that the kableExtra package provides us > > with, e.g., > > in this simple example the add_header_above via kable_styling. > > Of course if we ever find out how to directly import a data frame into > the > > LYX table > > capability, we will probably use it a lot. > > Can you try replacing the line > > kable_styling %>% > > in your .lyx file with > > kable_styling(table.env = "centering") %>% > > or perhaps instead the following: > > kable_styling(table.env = "@empty") %>% > > When I do that, the .lyx file compiles. This is a hack. Ideally, the > table.env argument would treat the value NA to mean "don't output any > table environment", but it does not behave that way. Perhaps worth an > enhancement request to the kableExtra authors? Note that with xtable you > can achieve this with the argument "floating = FALSE". Perhaps > kable_styling has a way to do it but I couldn't find it. > > In any case, does that "hack" work for you? In case my instructions > above are not clear, I attach the .lyx file with the change. I went with > the first suggested change (using "centering"), but the second one > (using "@empty") might be better. If one doesn't work, try the other. > > Scott > -- R. Douglas Martin Professor Emeritus in Applied Mathematics and Statistics Founder and Former Director of MS-CFRM Program depts.washington.edu/compfin/ University of Washington
-- lyx-devel mailing list lyx-devel@lists.lyx.org http://lists.lyx.org/mailman/listinfo/lyx-devel