Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot make beamer_presentation using pdf_book #790

Closed
jooyoungseo opened this issue Oct 16, 2019 · 5 comments · Fixed by #823
Closed

Cannot make beamer_presentation using pdf_book #790

jooyoungseo opened this issue Oct 16, 2019 · 5 comments · Fixed by #823
Labels
question general questions - not an issue

Comments

@jooyoungseo
Copy link

I was attempting to make beamer_presentation based on bookdown::pdf_book(base_format = rmarkdown::beamer_presentation); however, it fails due to number_sections argument.

Please refer to the following reproducible code below.

Making a "slide.Rmd" for testing purpose:

---
output:
  bookdown::pdf_book:
    base_format: rmarkdown::beamer_presentation
---

# Table Test

See Table\ \@ref(tab:test-table).

```{r test-table}
knitr::kable(head(airquality), caption = "Test table.")
```

---

# Figure Test

See Figure \@ref(fig:test-figure).

```{r test-figure, fig.cap="Figure test."}
hist(airquality$Ozone, col="blue")
```

Rendering Results

rmarkdown::render('../slide.Rmd')
#> Error in base_format(toc = toc, number_sections = number_sections, fig_caption = fig_caption, : unused argument (number_sections = number_sections)

Created on 2019-10-16 by the reprex package (v0.3.0.9000)

Session info
sessioninfo::session_info()
#> - Session info ---------------------------------------------------------------
#>  setting  value                       
#>  version  R version 3.6.1 (2019-07-05)
#>  os       Windows 10 x64              
#>  system   x86_64, mingw32             
#>  ui       RTerm                       
#>  language (EN)                        
#>  collate  English_United States.1252  
#>  ctype    English_United States.1252  
#>  tz       America/New_York            
#>  date     2019-10-16                  
#> 
#> - Packages -------------------------------------------------------------------
#>  package     * version    date       lib source                            
#>  assertthat    0.2.1      2019-03-21 [1] CRAN (R 3.6.1)                    
#>  bookdown      0.14.1     2019-10-15 [1] Github (rstudio/bookdown@8d16e2a) 
#>  cli           1.1.0      2019-03-19 [1] CRAN (R 3.6.1)                    
#>  crayon        1.3.4      2017-09-16 [1] CRAN (R 3.6.1)                    
#>  digest        0.6.21     2019-09-20 [1] CRAN (R 3.6.1)                    
#>  evaluate      0.14       2019-05-28 [1] CRAN (R 3.6.1)                    
#>  highr         0.8        2019-03-20 [1] CRAN (R 3.6.1)                    
#>  htmltools     0.4.0      2019-10-04 [1] CRAN (R 3.6.1)                    
#>  knitr         1.25.2     2019-10-15 [1] Github (yihui/knitr@779f610)      
#>  magrittr      1.5        2014-11-22 [1] CRAN (R 3.6.1)                    
#>  Rcpp          1.0.2.2    2019-10-14 [1] Github (RcppCore/Rcpp@7a6aa01)    
#>  rlang         0.4.0.9005 2019-10-16 [1] Github (r-lib/rlang@bdeb7f6)      
#>  rmarkdown     1.16.2     2019-10-16 [1] Github (rstudio/rmarkdown@5b0df0e)
#>  sessioninfo   1.1.1      2018-11-05 [1] CRAN (R 3.6.1)                    
#>  stringi       1.4.3      2019-03-12 [1] CRAN (R 3.6.0)                    
#>  stringr       1.4.0.9000 2019-10-12 [1] Github (hadley/stringr@03a7ebe)   
#>  withr         2.1.2      2018-03-15 [1] CRAN (R 3.6.1)                    
#>  xfun          0.10.1     2019-10-15 [1] Github (yihui/xfun@ec87701)       
#>  yaml          2.2.0      2018-07-25 [1] CRAN (R 3.6.0)                    
#> 
#> [1] C:/Program Files/R/R-3.6.1/library
@yihui
Copy link
Member

yihui commented Nov 19, 2019

The question has been asked and answered before on Stack Overflow: https://stackoverflow.com/a/52431382/559676

If you want to submit a PR like #789 to add beamer_presentation2 to bookdown, I'll be happy to merge it. Thanks!

@yihui yihui added the question general questions - not an issue label Nov 19, 2019
@jooyoungseo
Copy link
Author

Thank you very much for pinpointing how to resolve this issue.

I have created a PR #823 for review.

yihui pushed a commit that referenced this issue Nov 20, 2019
yihui added a commit to rstudio/rmarkdown that referenced this issue Nov 20, 2019
…rstudio/bookdown#790), in case it is supported in the future in Pandoc (for now, it doesn't work, and you have to use LaTeX commands; cf https://stackoverflow.com/a/41698751/559676)
yihui added a commit that referenced this issue Nov 26, 2019
@yihui
Copy link
Member

yihui commented Nov 26, 2019

FYI, I have also fixed the original issue now.

@jooyoungseo
Copy link
Author

That's awesome! Thank you very much for your hard work!!

clrpackages pushed a commit to clearlinux-pkgs/R-rmarkdown that referenced this issue Dec 3, 2019
…file is NULL and dir is set (#1703)

Andrew Dunning (1):
      Patch the Pandoc LaTeX template instead of providing our own, which is too hard to maintain (#1563)

Carson Sievert (1):
      Fix rendering of .tabset-dropdown in Firefox (#1702)

Jens Preußner (1):
      fix #1700: prevent rmarkdown::run from failing when file is NULL and dir is set (#1703)

Yihui Xie (22):
      start the next version
      yihui.name -> yihui.org
      fix #1677: should unlist() the files before looping into them
      cosmetic
      fix #1696: reference_doc[x] in output formats can also be possible external resources (e.g. in word_document or powerpoint_presentation)
      unnecessary @inheritParams
      add the --number-sections argument to beamer (to avoid confusions like rstudio/bookdown#790), in case it is supported in the future in Pandoc (for now, it doesn't work, and you have to use LaTeX commands; cf https://stackoverflow.com/a/41698751/559676)
      roxygenize
      Revert "fix #1691: use the grffile package only if it exists (it has become a legacy package, and won't be available in future versions of TeX Live)"
      cosmetic
      no need to read the input file to test the existence of certain metadata fields
      fix #1359: write out the header-includes field to a temp file, and include it via --include-in-header so this field will never be overwritten by other --include-in-header options
      typo
      reuse append_in_header() in one more place
      rename rmarkdown_system_file() to pkg_file()
      rename system_file_arg() to pkg_file_arg()
      use append_in_header() one more time
      bump version
      fix #1640 and #995: remove the `xmlns` attribute in the `<html>` tag in the default HTML template
      remove the second <meta> because the w3c validator said:
      Revert "Avoid pagetitle warning from pandoc2.0 when title is missing. (#1355)" and revert "fix #1434: use --metadata:pagetitle only if both title and pagetitle in YAML are empty"
      CRAN release v1.18
@github-actions
Copy link

github-actions bot commented Nov 6, 2020

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.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 6, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
question general questions - not an issue
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants