A Little kableExtra Problem and its Fix

Doug Martin martinrd3d at gmail.com
Wed Apr 14 22:53:29 UTC 2021


On Wed, Apr 14, 2021 at 10:52 AM Scott Kostyshak <skostysh at lyx.org> wrote:

> On Tue, Apr 13, 2021 at 03:54:43PM -0600, Doug Martin wrote:
> > See the two attached LYX files, and first run "outerparErrorExample.lyx",
> > and then
> > run the other one.  The first one compiles the pdf ok, but gives an
> > annoying error message.
> >
> > Scott is a guy on the lyx-devel at lists.lyx.org list who responded the
> same
> > day I posted the
> > first file problem.  He made the good suggestion that I ask the
> kableExtra
> > guy (Hao Zhu)
> > to fix this little problem in kableExtra, which I will do since Hao has
> > been very responsive
> > to Tom and I (and there is something else that I think he needs to fix).
>
> In case it helps, here is a description of the issue:
>
> 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:
>
>   kable_styling(table.env = "@empty")
>

*That works, but then the table is left-justified.  But your other
suggestion table.env = "centering" works*
*with the table centered, which I always want to do anyway.  So it is a
nice hack, that replaces 3 lines of*
*LaTeX code to begin  and one LaTeX line to end, which the Springer tech
support suggested.*

>
> 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.
>

I tried table.env = NULL and NA, and both result in an error message
"unexpected symbol".
But I am happy with "centering", and will ask the kableExtra creator and
maintainer Hao Zhu
if he can make a fix in kableExtra.

Doug

>
> 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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lyx.org/pipermail/lyx-devel/attachments/20210414/907d823a/attachment.html>


More information about the lyx-devel mailing list