feels like a bug in rendering gitbook, can somebody chec/help?

Hi there,

I was gonna post this on gitissue, but little text blob suggested I try here first.

I've created github repo that documents everything here

Basically when I boodown::render('.', 'bookdown::gitbook') sometime, some of the code falls output the "main section" (I'm referring to the <section> html tag. Or a blob of text will be missing appropriate html tags. It's a bit hard to explain, hence why I made a repo.

version 0.7 will render the example book ok, but my actual book is still a bit buggy, whereas 0.11 breaks example code completely.

If somebody can take a look at the example code in the repo and try to reproduce the error and let me know if I'm doing something wrong..

Cheers

1 Like

Hi,

I cloned your repo and build the book.
I got this :

Seems ok to me.

This is the packages versions I have

sessioninfo::package_info("bookdown")
#>  package   * version date       lib source        
#>  base64enc   0.1-3   2015-07-28 [1] CRAN (R 3.5.0)
#>  bookdown    0.11    2019-05-28 [1] CRAN (R 3.5.3)
#>  digest      0.6.19  2019-05-20 [1] CRAN (R 3.5.3)
#>  evaluate    0.14    2019-05-28 [1] CRAN (R 3.5.3)
#>  glue        1.3.1   2019-03-12 [1] CRAN (R 3.5.3)
#>  highr       0.8     2019-03-20 [1] CRAN (R 3.5.3)
#>  htmltools   0.3.6   2017-04-28 [1] CRAN (R 3.5.1)
#>  jsonlite    1.6     2018-12-07 [1] CRAN (R 3.5.1)
#>  knitr       1.23    2019-05-18 [1] CRAN (R 3.5.3)
#>  magrittr    1.5     2014-11-22 [1] CRAN (R 3.5.1)
#>  markdown    1.0     2019-06-07 [1] CRAN (R 3.5.3)
#>  mime        0.7     2019-06-11 [1] CRAN (R 3.5.3)
#>  Rcpp        1.0.1   2019-03-17 [1] CRAN (R 3.5.3)
#>  rmarkdown   1.13    2019-05-22 [1] CRAN (R 3.5.3)
#>  stringi     1.4.3   2019-03-12 [1] CRAN (R 3.5.3)
#>  stringr     1.4.0   2019-02-10 [1] CRAN (R 3.5.3)
#>  tinytex     0.13    2019-05-14 [1] CRAN (R 3.5.3)
#>  xfun        0.7     2019-05-14 [1] CRAN (R 3.5.3)
#>  yaml        2.2.0   2018-07-25 [1] CRAN (R 3.5.1)
#> 
#> [1] C:/Users/chris/Documents/R/win-library/3.5
#> [2] C:/Program Files/R/R-3.5.3/library

You can check you have last knitr and rmarkdown also.

It seems I use pandoc 2.6 included with RStudio. Did not try pandoc 2.7.3...

2 Likes

@cderv thanks for checking. I can confirm that rolling down to pandoc version 2.6 fixes the test example, which makes me think that there is a problem with pandoc 2.7.3. However my actual document still renders a bit funny, basically one of the html tags missing <pre><code> for some random reason. I can't rule out a typo, but had several people looking over the source..

pandoc 2.6
Compiled with pandoc-types 1.17.5.4, texmath 0.11.2, skylighting 0.7.5
Default user data directory: /home/kirill/.pandoc
Copyright (C) 2006-2019 John MacFarlane
Web:  http://pandoc.org
This is free software; see the source for copying conditions.
There is no warranty, not even for merchantability or fitness
for a particular purpose.
1 Like

I tested with last RStudio preview version that is bundled with 2.7.2 and it is working fine.
Something must have changed in last pandoc version 2.7.3
https://pandoc.org/releases.html

Did not have time to look into it yet. I'll try later.

1 Like

@here (not sure if this at thing works here, but it does on slack)

I think is issue is more serious gitissue had been raised as well with exactly the same problem https://github.com/rstudio/bookdown/issues/733

I think pandoc and bookdown had lost sync..

Looking forward for a fix

A fix was pushed by @yihui in bookdown.
Please try with the development version.

1 Like

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.