Hi, I seem to be experiencing a related issue. I have created a table using gt, and am trying to include it in a PDF created via a template from the rticles package.
The .Rmd file knits successfully to .md, but fails to compile to .tex.
Based on the error message and Inspecting the .tex file, I can see the error is happening in TeX formatting at the beginning of the gt table.
Specifically the error is:
! Undefined control sequence.
l.219 \captionsetup
[table]{labelformat=empty,skip=1pt}
and indeed when you look at the .tex file the place where the table would be begins with \captionsetup [table]{labelformat=empty,skip=1pt}.
Here is a link to a branch of a repo where I documented a minimal example reproducing this error.
The included PDF compiles with the gt table commented out, and creates the included .tex and .log file with errors when the gt table is included.
Any suggestions are much appreciated, since it'd be great to update this template to take advantage of the new capabilities of gt 