Closed jtanevski closed 2 years ago
I had the same problem and didn't know how to solve it. Thank you for this solution, @jtanevski.
Perhaps it would be useful to create a GitHub Action for this repo to automatically test the package and fix these small issues.
Hi!
I ran into this same problem. Thanks for posting about this!
Best, Leo
@grimbough I know that you are busy, but well, maybe you could look into this at some point? Thanks!
@aoles any idea what problem the longtable patch was designed to catch? Just wondering if it's still necessary.
I've finally got round to creating a virtual machine with TexLive 2021 and can verify the problem. It looks like the patch does something wrong for longtable v4.17. I'm also pretty sure that the patch has already been applied to the source for at least longtable v4.13 which comes with my TexLive 2019.
I'll try and dig a little deeper into whether it can be removed or selectively applied.
Thanks for looking into this Mike!
Best, Leo
I've added a patch for this to version 2.23.1. If anyone reading this could report back whether it now works on your system that'd be great.
I'll leave it in the devel branch for a while to see if it inadvertently breaks the rendering of some other PDF vignette, and then will probably patch the release branch too once I'm happy.
Hi,
In my case, I ran into another error using the files from https://github.com/LieberInstitute/spatialLIBD/tree/RELEASE_3_14.
Rscript -e 'rmarkdown::render("spatialLIBD/vignettes/TenX_data_download.Rmd", output_format = "BiocStyle::pdf_document", output_file = "AdditionalFile1.pdf")'
output file: TenX_data_download.knit.md
/usr/local/bin/pandoc +RTS -K512m -RTS TenX_data_download.knit.md --to latex --from markdown+autolink_bare_uris+tex_math_single_backslash --output AdditionalFile1.tex --lua-filter /Library/Frameworks/R.framework/Versions/4.1/Resources/library/bookdown/rmarkdown/lua/custom-environment.lua --lua-filter /Library/Frameworks/R.framework/Versions/4.1/Resources/library/rmarkdown/rmarkdown/lua/pagebreak.lua --lua-filter /Library/Frameworks/R.framework/Versions/4.1/Resources/library/rmarkdown/rmarkdown/lua/latex-div.lua --self-contained --table-of-contents --toc-depth 2 --number-sections --highlight-style tango --pdf-engine pdflatex --include-in-header /var/folders/cx/n9s558kx6fb7jf5z_pgszgb80000gn/T//RtmpQsGD98/1954357f612e.tex --variable graphics --wrap preserve --variable subparagraph --template /var/folders/cx/n9s558kx6fb7jf5z_pgszgb80000gn/T//RtmpQsGD98/BiocStyle/template.tex --variable tables=yes --standalone --variable 'compact-title:yes'
! Package soul Error: Reconstruction failed.
Error: LaTeX failed to compile AdditionalFile1.tex. See https://yihui.org/tinytex/r/#debugging for debugging tips. See AdditionalFile1.log for more info.
Execution halted
Failed outputs are at: Archive.zip
I don't get the error with:
rmarkdown::render("spatialLIBD/vignettes/TenX_data_download.Rmd", output_format = "rmarkdown::pdf_document", output_file = "AdditionalFile1.pdf")'
However, with the small test case it does work. I edited the small example above to use sessioninfo::session_info()
instead of sessionInfo()
.
test.Rmd
contents:
```# ---
# title: "Test"
# output: BiocStyle::pdf_document
# ---
#
# ```{r setup, include=FALSE}
# knitr::opts_chunk$set(echo = TRUE)
# ```
#
# ```{r}
# options(width = 120)
# sessioninfo::session_info()
#
> rmarkdown::render("~/Desktop/test.Rmd")
processing file: test.Rmd
|............................ | 25%
ordinary text without R code
|....................................................... | 50%
label: setup (with options)
List of 1
$ include: logi FALSE
|.................................................................................. | 75%
ordinary text without R code
|..............................................................................................................| 100%
label: unnamed-chunk-1
output file: test.knit.md
/usr/local/bin/pandoc +RTS -K512m -RTS test.knit.md --to latex --from markdown+autolink_bare_uris+tex_math_single_backslash --output test.tex --lua-filter /Library/Frameworks/R.framework/Versions/4.1/Resources/library/bookdown/rmarkdown/lua/custom-environment.lua --lua-filter /Library/Frameworks/R.framework/Versions/4.1/Resources/library/rmarkdown/rmarkdown/lua/pagebreak.lua --lua-filter /Library/Frameworks/R.framework/Versions/4.1/Resources/library/rmarkdown/rmarkdown/lua/latex-div.lua --self-contained --table-of-contents --toc-depth 2 --number-sections --highlight-style tango --pdf-engine pdflatex --include-in-header /var/folders/cx/n9s558kx6fb7jf5z_pgszgb80000gn/T//RtmpAcAKad/1b082ec3f17b.tex --variable graphics --wrap preserve --variable subparagraph --template /var/folders/cx/n9s558kx6fb7jf5z_pgszgb80000gn/T//RtmpAcAKad/BiocStyle/template.tex --variable tables=yes --standalone --variable 'compact-title:yes'
Warning: LaTeX Warning: You have requested package `/Library/Frameworks/R.framework/Vers
Warning: ions/4.1/Resources/library/BiocStyle/resources/tex/Bioconductor',
Warning: but the package provides `Bioconductor'.
Warning: Package geometry Warning: Over-specification in `h'-direction.
Warning: `width' (384.1122pt) is ignored.
Warning: Package fancyhdr Warning: \fancyhead's `E' option without twoside option is use
Warning: less on input line 162.
Warning: Package fancyhdr Warning: \headheight is too small (42.67912pt):
Warning: (fancyhdr) Make it at least 46.27916pt, for example:
Warning: (fancyhdr) \setlength{\headheight}{46.27916pt}.
Warning: (fancyhdr) You might also make \topmargin smaller to compensate:
Warning: Package fancyhdr Warning: \headheight is too small (42.67912pt):
Warning: (fancyhdr) Make it at least 46.27916pt, for example:
Warning: (fancyhdr) \setlength{\headheight}{46.27916pt}.
Warning: (fancyhdr) You might also make \topmargin smaller to compensate:
Warning: Package fancyhdr Warning: \headheight is too small (42.67912pt):
Warning: (fancyhdr) Make it at least 46.27916pt, for example:
Warning: (fancyhdr) \setlength{\headheight}{46.27916pt}.
Warning: (fancyhdr) You might also make \topmargin smaller to compensate:
Warning: Package fancyhdr Warning: \headheight is too small (42.67912pt):
Warning: (fancyhdr) Make it at least 46.27916pt, for example:
Warning: (fancyhdr) \setlength{\headheight}{46.27916pt}.
Warning: (fancyhdr) You might also make \topmargin smaller to compensate:
Output created: test.pdf
PDF result:
My ! Package soul Error: Reconstruction failed
error seems to be directly related to #14.
The last lines from the AdditionalFile1.log
are:
! Package soul Error: Reconstruction failed.
See the soul package documentation for explanation.
Type H <return> for immediate help.
...
l.299 ...r} using the \texttt{images\ =\ "lowres"}
and \texttt{load\ =\ TRUE...
Here is how much of TeX's memory you used:
15590 strings out of 480313
256635 string characters out of 5896366
556189 words of memory out of 5000000
33144 multiletter control sequences out of 15000+600000
461318 words of font info for 72 fonts, out of 8000000 for 9000
14 hyphenation exceptions out of 8191
75i,13n,77p,1204b,385s stack positions out of 5000i,500n,10000p,200000b,80000s
! ==> Fatal error occurred, no output PDF file produced!
where you can see that \
pops up. @aoles resolved this in the past with https://github.com/Bioconductor/BiocStyle/commit/0b0ac63aa04101ec034a77d374e36756777bd01a by deleting \setfnsymbol{lamport}
and swapping \hl
and \ttfamily
. However, I don't see \setfnsymbol{lamport}
at https://github.com/Bioconductor/BiocStyle/blob/932ae2eacb8766dc1bb552be0ecfd1a71e6a2723/inst/resources/tex/Bioconductor.sty#L297-L298 and \hl
comes before \ttfamily
in one location I see it https://github.com/Bioconductor/BiocStyle/blob/932ae2eacb8766dc1bb552be0ecfd1a71e6a2723/inst/resources/tex/Bioconductor.sty#L278 and \hl
is not involved at https://github.com/Bioconductor/BiocStyle/blob/932ae2eacb8766dc1bb552be0ecfd1a71e6a2723/inst/resources/tex/Bioconductor.sty#L227.
However, If I add that paragraph (aka, the text that creates line 299 in AdditionalFile1.text
) to my test.Rmd
, it does work... so I'm not sure where to go from here.
# ---
# title: "Test"
# output: BiocStyle::pdf_document
# ---
#
# ```{r setup, include=FALSE}
# knitr::opts_chunk$set(echo = TRUE)
# ```
#
# Now that we have the files that we need, we can import the data into R using `read10xVisium()` from `r Biocpkg("SpatialExperiment")`. We'll import the low resolution histology images produced by `spaceranger` using the `images = "lowres"` and `load = TRUE` arguments. We'll also load the filtered gene expression data using the `data = "filtered"` argument. The count matrix can still be quite large, which is why we'll use the `type = "sparse"` argument to load the data into an R object that is memory-efficient for sparse data.
#
# ```{r}
# options(width = 120)
# sessioninfo::session_info()
# ```
I noticed that my soul
LaTeX package comes from tinytex
and that it looked old
I tried updating it
> tinytex::tlmgr_install("soul")
tlmgr update --all --self
tlmgr install soul
tlmgr: package repository https://ctan.math.illinois.edu/systems/texlive/tlnet (not verified: gpg unavailable)
tlmgr install: package already present: soul
But well, it hasn't been updated in a very long time https://ctan.org/pkg/soul?lang=en.
I then tried finding related issues at tinytex
and rmarkdown
. But https://github.com/yihui/tinytex/issues?q=Reconstruction+failed and https://github.com/rstudio/rmarkdown/issues?q=Reconstruction+failed (or searching for soul
) don't lead to any related issues.
Looking at https://github.com/Bioconductor/BiocStyle/commit/932ae2eacb8766dc1bb552be0ecfd1a71e6a2723 I don't see anything that seems obviously related (like I don't see any mentions of hl
or ttfamily
or fnsymbol
).
Thanks for the investigation @lcolladotor . Since that looks like a different error message I've created a new issue at #93 to track any progress there.
Thanks Mike for creating the new issue! I think we can close this one then, no? Or maybe you are still waiting from feedback from others here.
Knitting Rmd files with BiocStyle:pdf_document output (BiocStyle 2.20.1) fails with error
! LaTeX Error: Missing \begin{document}.
even for the following trivial example when using the latest TeX Live 2021 packages:
The problem seems to be caused by the longtable patch at the end of Bioconductor.sty. The document renders successfully after removing it.