<div dir="ltr"><div dir="ltr"><div class="gmail_default" style="font-size:small"><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Apr 14, 2021 at 10:52 AM Scott Kostyshak <<a href="mailto:skostysh@lyx.org">skostysh@lyx.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On Tue, Apr 13, 2021 at 03:54:43PM -0600, Doug Martin wrote:<br>
> See the two attached LYX files, and first run "outerparErrorExample.lyx",<br>
> and then<br>
> run the other one.  The first one compiles the pdf ok, but gives an<br>
> annoying error message.<br>
> <br>
> Scott is a guy on the <a href="mailto:lyx-devel@lists.lyx.org" target="_blank">lyx-devel@lists.lyx.org</a> list who responded the same<br>
> day I posted the<br>
> first file problem.  He made the good suggestion that I ask the kableExtra<br>
> guy (Hao Zhu)<br>
> to fix this little problem in kableExtra, which I will do since Hao has<br>
> been very responsive<br>
> to Tom and I (and there is something else that I think he needs to fix).<br>
<br>
In case it helps, here is a description of the issue:<br>
<br>
I could not figure out how to ask kable_styling() to omit producing a table environment. The reason this is desired is because LyX already produces a table environment and it's nice to have LyX control this table environment for various reasons. Thus, ideally LyX would control the table environment and kable would output only the tabular code. This can be achieved by changing the table environment generated by kable_styling as follows:<br>
<br>
  kable_styling(table.env = "@empty")<br></blockquote><div><br></div><div style="font-size:small" class="gmail_default"><b>That works, but then the table is left-justified.  But your other suggestion table.env = "centering" works</b></div><div style="font-size:small" class="gmail_default"><b>with the table centered, which I always want to do anyway.  So it is a nice hack, that replaces 3 lines of</b></div><div style="font-size:small" class="gmail_default"><b>LaTeX code to begin  and one LaTeX line to end, which the Springer tech support suggested.</b></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><b>
</b><br>
However, that is a hack. I wonder if it would make sense if table.env is set to NULL or NA for no table environment to be output.<br></blockquote><div><br></div><div style="font-size:small" class="gmail_default">I tried table.env = NULL and NA, and both result in an error message "unexpected symbol".</div><div style="font-size:small" class="gmail_default">But I am happy with "centering", and will ask the kableExtra creator and maintainer Hao Zhu</div><div style="font-size:small" class="gmail_default">if he can make a fix in kableExtra.</div><div style="font-size:small" class="gmail_default"><br></div><div style="font-size:small" class="gmail_default">Doug<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>
Scott<br>
</blockquote></div><br clear="all"><br>-- <br><div dir="ltr" class="gmail_signature"><div dir="ltr">R. Douglas Martin<div>Professor Emeritus in Applied Mathematics and Statistics</div><div>Founder and Former Director of MS-CFRM Program</div><div><a href="http://depts.washington.edu/compfin/" target="_blank">depts.washington.edu/compfin/</a></div><div>University of Washington</div></div></div></div>