Bioconductor / BiocStyle

Issues and pull requests for BiocStyle should go here.
12 stars 20 forks source link

Undefined control sequence \bioctitle #68

Closed hpages closed 4 years ago

hpages commented 4 years ago

We have a bunch of packages (30+, see list below) that are currently failing on all platforms in release and devel with the following error:

! Undefined control sequence.
l.53 \bioctitle
               []{PRAM: Pooling RNA-seq and Assembling Models} 

Not sure when the error appeared.

This error can actually be reproduced on the BiocStyle package itself by requesting PDF output for the AuthoringRmdVignettes.Rmd vignette which can be done by removing the 2 following lines

  BiocStyle::html_document:
    toc_float: true

from the vignette and running R CMD build BiocStyle:

hpages@spectre:~$ bdevbuild BiocStyle
* checking for file ‘BiocStyle/DESCRIPTION’ ... OK
* preparing ‘BiocStyle’:
* checking DESCRIPTION meta-information ... OK
* installing the package to build vignettes
* creating vignettes ... ERROR
--- re-building ‘AuthoringRmdVignettes.Rmd’ using rmarkdown
! Undefined control sequence.
l.53 \bioctitle
               []{Authoring R Markdown vignettes} 

Error: processing vignette 'AuthoringRmdVignettes.Rmd' failed with diagnostics:
Failed to compile AuthoringRmdVignettes.tex. See https://yihui.org/tinytex/r/#debugging for debugging tips. See AuthoringRmdVignettes.log for more info.
--- failed re-building ‘AuthoringRmdVignettes.Rmd’

--- re-building ‘LatexStyle2.Rnw’ using Sweave
--- finished re-building ‘LatexStyle2.Rnw’

SUMMARY: processing the following file failed:
  ‘AuthoringRmdVignettes.Rmd’

Error: Vignette re-building failed.
Execution halted

Thanks!

sessionInfo:

> library(BiocStyle)
> sessionInfo()
R Under development (unstable) (2019-10-30 r77336)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 16.04.5 LTS

Matrix products: default
BLAS:   /home/hpages/R/R-4.0.r77336/lib/libRblas.so
LAPACK: /home/hpages/R/R-4.0.r77336/lib/libRlapack.so

locale:
 [1] LC_CTYPE=en_US.UTF-8       LC_NUMERIC=C              
 [3] LC_TIME=en_US.UTF-8        LC_COLLATE=en_US.UTF-8    
 [5] LC_MONETARY=en_US.UTF-8    LC_MESSAGES=en_US.UTF-8   
 [7] LC_PAPER=en_US.UTF-8       LC_NAME=C                 
 [9] LC_ADDRESS=C               LC_TELEPHONE=C            
[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C       

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
[1] BiocStyle_2.15.2

loaded via a namespace (and not attached):
 [1] BiocManager_1.30.10 compiler_4.0.0      htmltools_0.4.0    
 [4] tools_4.0.0         yaml_2.2.0          Rcpp_1.0.3         
 [7] rmarkdown_2.0       knitr_1.26          digest_0.6.23      
[10] xfun_0.11           rlang_0.4.2         evaluate_0.14      

List of Bioconductor software packages currently affected:

abseqR
AllelicImbalance
AssessORF
BEARscc
CellBench
ChIPSeqSpike
CrispRVariants
DMRScan
epiNEM
FastqCleaner
FELLA
hipathia
Linnorm
MACPET
mdgsa
mnem
NormalyzerDE
nucleR
pram
profileScoreDist
projectR
pwrEWAS
restfulSE
RGMQL
rnaseqcomp
rScudo
SPLINTER
swfdr
transcriptR
TVTB (not supported on Windows)
universalmotif
hpages commented 4 years ago

FWIW this issue was also reported on the Bioc-devel mailing list a couple of days ago: https://stat.ethz.ch/pipermail/bioc-devel/2019-December/015938.html

hpages commented 4 years ago

@aoles Do you think you can take a look at this?

aoles commented 4 years ago

Thanks, I can confirm the issue. It seems that the recent rmarkdown v2.0 release has broken BiocStyle yet again - at least I do not observe it with v1.18. I will give you an update once I know more.

hpages commented 4 years ago

Great! Thanks Andrzej

mtmorgan commented 4 years ago

It seems like the code here https://github.com/Bioconductor/BiocStyle/blob/0c3a2af3b603c53f1bb12fd996224e8eb98c0871/R/pdf_document.R#L254-L256 takes this template https://github.com/Bioconductor/BiocStyle/blob/master/inst/rmd/latex/default-1.17.0.2.tex and then modifies https://github.com/Bioconductor/BiocStyle/blob/0c3a2af3b603c53f1bb12fd996224e8eb98c0871/inst/rmd/latex/default-1.17.0.2.tex#L197-L212 after line 200 to inject Bioconductor.sty. But the line is in a conditional ($if(compact-title)$) so the injection is not always present. It seems really one would like to insert code at line 211.

aoles commented 4 years ago

Thanks @mtmorgan for sharing your findings! rmarkdown 2.0 does not support the option compact-title anymore so the referenced block is indeed not included causing Bioconductor.sty not being injected. I will look into fixing this.

Cheers, Andrzej

stefangraw commented 4 years ago

Hey bioc team,

My package (pwrEWAS) is one of the affected packages (vignette build is causing error). Is there anything I should do at this moment to fix the issue, or should I just wait?

Thanks, Stefan

mtmorgan commented 4 years ago

wait @aoles

aoles commented 4 years ago

Thank you for your patience! I have just committed a bugfix addressing the issue. The release and devel builds should clear up with the latest version of BiocStyle.

hpages commented 4 years ago

Thanks @aoles. We're going to keep a close eye on the daily reports for the release and devel builds in the next couple of days. Just want to make sure that the issue clears for all packages before closing the issue.

vjcitn commented 4 years ago

I used the latest git image of BiocStyle (2.15.4) and was able to build restfulSE, which is on the list above, and had a successful build and check. Is there a specific way of setting up the title in the yaml/latex that leads to this vulnerability for a minority of packages?

hpages commented 4 years ago

Heads-up: the devel builds picked up the latest BiocStyle (2.15.4) and are about to complete. The build report will be updated in the next hour or so with the new results. I can already confirm that the "Undefined control sequence \bioctitle" error is gone for all packages on all platforms. However, some other "Undefined control sequence" errors remain:

Note that except for mCSEA which is new, all these packages were in the original list above.

@aoles Let me know if you'd prefer me to open a new issue for this. Thanks!

aoles commented 4 years ago

I'm glad to hear that most of the errors cleared up. I've just committed a yet another fix addressing the \subtitle error.

Regarding the remaining issues, I'm not entirely sure what the root cause could be. At least I was unable to reproduce it locally, for me all of these package build just fine. It might be something specific to the LaTeX setup though. Maybe try checking whether these vignettes build with plain rmarkdown. You could do so by switching the output format from BiocStyle::pdf_document to rmarkdown::pdf_document and by loading BiocStyle right after the YAML header (in order to retain some of the BiocStyle macros) :

```{r}
library(BiocStyle)
```

Cheers, Andrzej

hpages commented 4 years ago

Thanks Andrzej.

Regarding the remaining issue (\definecolor error):

Thanks again, H.

aoles commented 4 years ago

Thanks! I have tested with the most recent MacTeX-2019 and haven't encountered any problems with building any of these packages.

hpages commented 4 years ago

The SPLINTER vignette now builds on all platforms even though the package has not been touched since October. Not clear what's causing the remaining "Undefined control sequence" errors on tokay2 (for mCSEA, mnem, nucleR, and transcriptR).

Anyway the original issue ("Undefined control sequence \bioctitle") is gone so I'm closing this. Thanks again!