Closed tbradley1013 closed 7 years ago
Update Not sure if this warrants closing the issue because other people may still face the same thing, but I was able to fix this problem by using xtable()
rather than pander and kable.
I doubt if this MRE is really minimal, e.g. you can probably delete
documentclass: article
bibliography: bib1.bib
in YAML, replace ggplot2 with any base R plots, and so on. Anyway, this issue seems to be the same as I discovered in 2015: https://tex.stackexchange.com/q/276699/9128
If you want to use knitr::kable()
, you can set knitr::opts_knit$set(kable.force.latex = TRUE)
to force LaTeX output from kable()
.
This old thread has been automatically locked. If you think you have found something related to this, please open a new issue by following the issue guide (https://yihui.org/issue/), and link to this old issue if necessary.
Good Morning,
I am working on creating a report in Rmarkdown and have stumbled across a problem that I can't find anyone else having faced before. I am incorporating text, tables, and figures into my document and for some reason on several occasions throughout my pdf output, when there is a table on the page, the text following the table extends past the bottom page margin and then full paragraphs are just missing and the next page with text picks up almost 20 lines of text past where the previous page stops.
I have managed to create an MRE. I realize it is probably longer than most examples, but if it is any shorter than the problem doesn't exist. I have replaced all of my text with randomly generated paragraphs so don't read into any of the text in the document. I have, however, modelled the text after my document down to the number of spaces at the end of every line and th enumber of lines between different blocks. Here is the code for the MRE:
Here is what the issue in the output pdf looks like:
As you can see, the final paragraph on page 3 (which should probably be on the next page to begin with) is cut off and then when the text picks back up on page 5 (page 4 is two floating figures) 16 lines of text have just vanished.
The problem randomly doesn't effect other tables, as I demonstrate in the following image:
However, I must say, this seems to be the exception not the rule in my actual report.
I can't figure out what I am doing wrong and I have looked everywhere I can think of for a solution.
My
sessionInfo()
is as follows:The logo.tex file in the YAML header has the following code:
and the bib1.bib file is: (I have actual sources in mine, but since I don't think that is the problem, I haven't included them)
I greatly appreciate any help I can get with this as the report is expected in the next week or so!
Thanks, Tyler