huxtable icon indicating copy to clipboard operation
huxtable copied to clipboard

Longtable huxtable

Open Nicktz opened this issue 6 years ago • 8 comments

Hi, great package.

Would just like to know if there is a way of specifying a long-table in huxtable from rmarkdown without having to hack the tex file for pdf output?

Nico

Nicktz avatar Oct 17 '17 14:10 Nicktz

?tabular_environment but be aware that nothing is guaranteed to work!

On Tue, 17 Oct 2017 at 15:40, Nico Katzke [email protected] wrote:

Hi, great package.

Would just like to know if there is a way of specifying a long-table in huxtable from rmarkdown without having to hack the tex file for pdf output?

Nico

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/hughjonesd/huxtable/issues/29, or mute the thread https://github.com/notifications/unsubscribe-auth/AFjJ96NmWO0OBz57J7sew8XSUbry-NtQks5stLxUgaJpZM4P8Q6Q .

hughjonesd avatar Oct 17 '17 20:10 hughjonesd

Hi, really like this package!

The set_tabular_environment works to include 'longtable' in the Latex but unfortunately the \begin{longtable} is below the caption now thus the caption is not being generated.

No caption:

 \providecommand{\huxb}[2]{\arrayrulecolor[RGB]{#1}\global\arrayrulewidth=#2pt}
  \providecommand{\huxvb}[2]{\color[RGB]{#1}\vrule width #2pt}
  \providecommand{\huxtpad}[1]{\rule{0pt}{\baselineskip+#1}}
  \providecommand{\huxbpad}[1]{\rule[-#1]{0pt}{#1}}

\begin{table}[H]
\begin{raggedright}
\begin{threeparttable}
\captionsetup{justification=raggedright,singlelinecheck=off}
\caption{Summary Table}
\begin{longtable}{p{0.25\textwidth} p{0.75\textwidth}

Caption generated:

\providecommand{\huxb}[2]{\arrayrulecolor[RGB]{#1}\global\arrayrulewidth=#2pt}
  \providecommand{\huxvb}[2]{\color[RGB]{#1}\vrule width #2pt}
  \providecommand{\huxtpad}[1]{\rule{0pt}{\baselineskip+#1}}
  \providecommand{\huxbpad}[1]{\rule[-#1]{0pt}{#1}}

\begin{table}[H]
\begin{raggedright}
\begin{threeparttable}
\captionsetup{justification=raggedright,singlelinecheck=off}
\begin{longtable}{p{0.25\textwidth} p{0.75\textwidth}}
\caption{Summary Table}

Any suggestions on how to ensure the caption comes after the \begin{longtable}?

matton2 avatar Sep 12 '19 14:09 matton2

It’s a bug but not a priority. See ?tabular_environment for why not. Also NB: this is a new issue, not the same as the existing one.

Sent from Gmail Mobile

hughjonesd avatar Sep 12 '19 17:09 hughjonesd

It looks like @hughjonesd fixed this issue by adding table_environment() in https://github.com/hughjonesd/huxtable/commit/0773fed305ec8a764ff814bfa709d9040c1d9e93.

mikebader avatar Jul 16 '21 14:07 mikebader

Comments welcome on whether this actually works!

hughjonesd avatar Jul 16 '21 16:07 hughjonesd

Any interest in using my tabularray package for LaTeX long (and short) table output? This package is much more powerful than traditional table packages, and it is able to separate contents and styles of tables like html and css.

lvjr avatar Jun 22 '22 10:06 lvjr

Possibly. It looks quite good.

  • Can it cope with horizontal/vertical borders that don't span the whole table?
  • Is there a way to specify padding within cells?
  • Does it have "longtable" facilities?

Most importantly, are you interested in working on it? That will definitely improve its changes of happening.

hughjonesd avatar Jun 22 '22 16:06 hughjonesd

Possibly. It looks quite good.

  • Can it cope with horizontal/vertical borders that don't span the whole table?

Yes, see the documentation.

  • Is there a way to specify padding within cells?

Paddings are only for rows and columns in LaTeX tables.

  • Does it have "longtable" facilities?

Yes, see the documentation.

Most importantly, are you interested in working on it? That will definitely improve its changes of happening.

Sorry, I am not an R user (never use it before). I know only LaTeX.

lvjr avatar Jun 22 '22 16:06 lvjr