Questions tagged [longtable]
74 questions
2
votes
0 answers
How to combine 'longtable' + 'tabularX' (2-page table with long headings)
'tabularx' solves the problem of long headers (does not fit otherwise in width). 'longtable' solves the problem of table length (does not fit in length). But how to solve both problems?
\begin{tabularx}{\textwidth}{|X|X|X|X|X|}
\hline
Район…

Романов Андрей
- 73
- 4
2
votes
0 answers
Change font size caption or title in xtable in markdown
I want to change the font size for my title/caption in the table made using xtable. The following code changes the size of the text in the table, but not the caption/title.
Tab <- xtable::xtable(myTable, caption="\\tt Title")
print(Tab,…

milan
- 4,782
- 2
- 21
- 39
2
votes
1 answer
Environment inside a longtable with LaTeX
I would like to create a new environment to print a header and a footer between sections of a table.
I did this:
\documentclass{article}
\usepackage{longtable}
\newenvironment{env}{Heading&&& \\}{\hline…

Klaus
- 1,241
- 4
- 14
- 31
2
votes
0 answers
How to make last row of each table's part unfinished in latex longtable?
I have a table that automatically stretched over several pages by longtable package.
\begin{longtable}{| l | l |}
\hline
A & B \\ \hline
\endfirsthead
\multicolumn{3}{l}{Table \thetable{} -- finishing} \\ \hline
\endhead
a1 & b1 \\ \hline
a1…

diver_ru
- 41
- 5
2
votes
1 answer
Right-align LaTeX longtables through R's print.xtable
Say I have the following program in R to generate a LaTeX longtable:
library(xtable)
tabela <- xtabs(Temp ~ Month, airquality)
xtabela <- xtable(tabela)
print.xtable(xtabela, tabular.environment = 'longtable', floating = FALSE)
Which…

Waldir Leoncio
- 10,853
- 19
- 77
- 107
2
votes
0 answers
Align longtable header in landscape mode
I have a really long and wide table in my latex document. I'm using the landscape with the longtable environment, but the header is not aligned with the columns in the tables.
\begin{landscape}
\begin{longtable}{|l|c|c|c|c|c|c|c|c|c|}
…

wiseveri
- 191
- 1
- 9
1
vote
2 answers
convert wide table to long in R
I have a dataset that look something like this:
groupA <- rbinom(n=50,size=1,prob=0.5)
groupB <- rbinom(n=50,size=1,prob=0.5)
groupC <- rbinom(n=50,size=1,prob=0.5)
groupD <- rbinom(n=50,size=1,prob=0.5)
dtTest <- cbind(groupA, groupB, groupC,…

Nneka
- 1,764
- 2
- 15
- 39
1
vote
1 answer
why my table goes beyond the page border?
I am out of any ideas. My piece of code for a very long table goes beyond the page border. I spent 4 hours reading through and testing all possible solutions but no success:
Here is the example screenshot from the word:
below is a snippet of my…

Mani Mosh
- 13
- 5
1
vote
0 answers
longtable in RMarkdown pdf: No pagebreak for only one line
I am creating serial reportings.
I have a long table, created with kable. In some reports the pagebreak in the table unfortunately happens in a way that only one row of the table ends up on the next page. Can I prevent this? E.g. saying, that on…

hnnh
- 21
- 3
1
vote
1 answer
how to convert json into long format table in postgresql/plpgsql?
first of all apology for using image. however I can't seem to post my question as it seems I have issue in the formatting so I can't post my question, but I can't figure out whats wrong..
I have table like this
table source
I would like to convert…

Muhammad Ikhwan
- 13
- 3
1
vote
1 answer
How to display wide table with specific order (month year) even when data points are missing?
> df_1
# A tibble: 47 x 3
# Groups: therapy_class [9]
therapy_class Year_month count
1 ALK Inhibitors Dec 2019 16
2 ALK Inhibitors …

sutsabs
- 431
- 2
- 11
1
vote
3 answers
R format the wide table to long table
cutoff KM KM_lo KM_hi rstm rstm_lo rstm_hi
1 2017-01-01 2.1 1.4 4.9 7.2 3.9 10.2
2 2017-04-01 3.5 2.1 4.7 8.9 6.6 10.8
3…

sutsabs
- 431
- 2
- 11
1
vote
0 answers
long tables manipulating - latex
I am writing LaTeX code to generate a long table using longtable package and I want the first column color to be gray
Here is my code:
\documentclass[a4paper,11pt,english]{report}
\usepackage{longtable}
\usepackage{multirow}
…

Nour
- 147
- 2
1
vote
1 answer
Outputting two stargazer tables instead of one
I found this nifty code on github (https://github.com/labreumaia/longtable.stargazer/blob/master/longtable.stargazer.R) that combines stargazer and longtable:
longtable.stargazer = function(..., float = T, longtable.float = F,
longtable.head = T,…

hy9fesh
- 589
- 2
- 15
1
vote
1 answer
How to have only one longtable per page (starting at top of page) in latex?
In my latex file I have some long tables that need to be split across two pages and I use the package longtable. Since I always want the tables to start at the top of the page, I also use the command "\afterpage" but it does not work. In fact, my…

Esperanta
- 83
- 7