GithubHelp home page GithubHelp logo

binb's People

Contributors

eddelbuettel avatar izahn avatar jolars avatar jsta avatar mvkorpel avatar robjhyndman avatar selbosh avatar svraka avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

binb's Issues

Possible IQSS theme improvements

In no particular order, and in comparison to the demo.tex-based demo.pdf of the LaTeX variant:

  • Libertinus font requirement currently a hard constraint, might be nicer to make it soft ie warn but proceed rather than fail
  • Title changed to not be on dark background, could make that a toggle in YAML header
  • Table of content line and paragraph breaks look different
  • Need to find a trick to do the \item[] placement in one of the examples
  • Make the header.png file an option for the YAML header

presento theme failing with knitr::kable

Hi.

I noticed a problem with presento theme when printing a data.frame with knitr::kable.

I have just added this code to the presento theme template:

# Print data frame

```{r}
data(mtcars, "ggplot2")
knitr::kable(mtcars)
```

Error message:

! File ended while scanning use of \@tempa.
<inserted text> 
                \par 
l.75 ...e{footnote}\makesavenoteenv{long table}}{}

presento output rendering error: Cannot find NotoSans-Regular.mf

I find your package very useful. Thank you very much.

However, it seems like there is an issue with presento output.

Please address it. I am sharing reproducible code below:

library(rmarkdown)
test <- draft("myslides.Rmd", template="presento", package="binb", edit=FALSE)

render(test)
#> processing file: myslides.Rmd
#> output file: myslides.knit.md
#> "C:/PROGRA~3/CHOCOL~1/bin/pandoc" +RTS -K512m -RTS myslides.utf8.md --to beamer --from markdown+autolink_bare_uris+tex_math_single_backslash --output myslides.tex --template "C:\PROGRA~1\R\R-36~1.1\library\binb\RMARKD~1\TEMPLA~1\presento\RESOUR~1\template.tex" --slide-level 2 --variable theme=iqss --highlight-style haddock --pdf-engine xelatex --self-contained
#> tlmgr search --file --global "/NotoSans-Regular[.](tfm|afm|mf|otf)"
#> Warning in parse_packages(logfile, quiet = c(TRUE, FALSE, FALSE)): Failed to
#> find a package that contains NotoSans-Regular[.](tfm|afm|mf|otf)
#> tlmgr search --file --global "/tikzlibrarytopaths.code.tex"
#> Trying to automatically install missing LaTeX packages...
#> tlmgr install pgf
#> tlmgr search --file --global "/NotoSans-Regular[.](tfm|afm|mf|otf)"
#> Warning in parse_packages(logfile, quiet = c(TRUE, FALSE, FALSE)): Failed to
#> find a package that contains NotoSans-Regular[.](tfm|afm|mf|otf)
#> tlmgr search --file --global "/tikzlibrarytopaths.code.tex"
#> ! Package fontspec Error: The font "NotoSans-Regular" cannot be found.
#> 
#> ! name = NotoSans-Regular, rootname = NotoSans-Regular, pointsize = 
#> ! mktexmf: empty or non-existent rootfile!
#> 
#> ! mktexmf: empty or non-existent rootfile!
#> 
#> ! kpathsea: Running mktexmf NotoSans-Regular.mf
#> 
#> ! The command name is C:\Users\JooYoung\AppData\Roaming\TinyTeX\bin\win32\mktexmf
#> ! Cannot find NotoSans-Regular.mf.
#> 
#> ! Cannot find NotoSans-Regular.mf.
#> 
#> ! kpathsea: Running mktextfm NotoSans-Regular
#> 
#> ! The command name is C:\Users\JooYoung\AppData\Roaming\TinyTeX\bin\win32\mktextfm
#> 
#> ! kpathsea: Appending font creation commands to missfont.log.
#> Error: Failed to compile myslides.tex. See https://yihui.org/tinytex/r/#debugging for debugging tips. See myslides.log for more info.

Created on 2019-12-18 by the reprex package (v0.3.0.9001)

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-12-18                  
#> 
#> - Packages -------------------------------------------------------------------
#>  package     * version    date       lib source                            
#>  assertthat    0.2.1      2019-03-21 [1] CRAN (R 3.6.1)                    
#>  backports     1.1.5      2019-10-02 [1] CRAN (R 3.6.1)                    
#>  binb          0.0.5      2019-12-18 [1] Github (eddelbuettel/binb@74ff84e)
#>  cli           2.0.0      2019-12-09 [1] CRAN (R 3.6.1)                    
#>  crayon        1.3.4      2017-09-16 [1] CRAN (R 3.6.1)                    
#>  digest        0.6.23     2019-11-23 [1] CRAN (R 3.6.1)                    
#>  evaluate      0.14       2019-05-28 [1] CRAN (R 3.6.1)                    
#>  fansi         0.4.0      2018-10-05 [1] CRAN (R 3.6.1)                    
#>  fs            1.3.1      2019-05-06 [1] CRAN (R 3.6.1)                    
#>  glue          1.3.1.9000 2019-11-14 [1] Github (tidyverse/glue@c02d7d4)   
#>  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.26.1     2019-12-05 [1] Github (yihui/knitr@33d69c3)      
#>  magrittr      1.5        2014-11-22 [1] CRAN (R 3.6.1)                    
#>  pillar        1.4.2      2019-06-29 [1] CRAN (R 3.6.1)                    
#>  pkgconfig     2.0.3      2019-09-22 [1] CRAN (R 3.6.1)                    
#>  purrr         0.3.3      2019-10-18 [1] CRAN (R 3.6.1)                    
#>  Rcpp          1.0.3      2019-11-08 [1] CRAN (R 3.6.1)                    
#>  reprex        0.3.0.9001 2019-11-13 [1] Github (tidyverse/reprex@27aa69a) 
#>  rlang         0.4.2.9000 2019-12-12 [1] Github (r-lib/rlang@ec7c1ed)      
#>  rmarkdown   * 2.0.3      2019-12-17 [1] Github (rstudio/rmarkdown@26cc3b1)
#>  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-11-11 [1] Github (hadley/stringr@80aaaac)   
#>  styler        1.2.0.9000 2019-11-13 [1] Github (r-lib/styler@a8acde5)     
#>  tibble        2.1.3      2019-06-06 [1] CRAN (R 3.6.1)                    
#>  tinytex       0.18.1     2019-12-18 [1] Github (yihui/tinytex@f9130fb)    
#>  withr         2.1.2      2018-03-15 [1] CRAN (R 3.6.1)                    
#>  xfun          0.11.3     2019-11-22 [1] Github (yihui/xfun@4fcd6ff)       
#>  yaml          2.2.0      2018-07-25 [1] CRAN (R 3.6.0)                    
#> 
#> [1] C:/Program Files/R/R-3.6.1/library

Possible Presento theme improvements

In no particular order, and in comparison to the upstream repo:

  • Full color pages :-( (as also noted in #1); this may need some pandoc and or beamer changes
  • Examples are pretty heavy on LaTeX; Markdown has e.g. no centering feature
  • Maybe offer default fonts? OTOH Presento is pretty tied to its set

use bookdown rmarkdown rather than just rmarkdown

Hi!
I'm right now creating my slides with

output: 
  bookdown::beamer_presentation2:
    keep_tex: yes
    theme: metropolis
    latex_engine: xelatex
    slide_level: 2
    incremental: no
    includes: 
      in_header: top-matter.tex
classoption: aspectratio=169
fontsize: 12pt

in my YAML, it would be nice to automatize this, but I binb doesn't use bookdown, right?
There are many advantages in the bookdown flavor of rmarkdown including numbering and cross-referencing figures/tables/sections/equations

I'm also including some hacks in the tex files that could be included in binb, see https://bookdown.org/yihui/rmarkdown-cookbook/multi-column.html

What do you think? Should I do pull request with all these changes?

Get rid of one nagging NOTE

Possibly brandnew and/or temporary, but all of a sudden one of the CRAN check machines now whines about missing cross refrences:

Version: 0.0.5
Check: Rd cross-references
Result: NOTE
Undeclared packages ‘tint’, ‘pinp’, ‘linl’ in Rd xrefs
Flavor: r-devel-linux-x86_64-fedora-clang

As a result the 0.0.6 currently being processed enters a 'is pending a manual inspection'. We should free ourselves and CRAN from this. It is simply due a block in the Rd file from

##'
##' @seealso Three other packages also offer RMarkdown interfaces to LaTeX
##' (or HTML) content: \code{\link[tint]{tint}} for Tufte-style pdf and html,
##' \code{\link[pinp]{pinp}} for two-column pdf vignettes, and
##' \code{\link[linl]{linl}} for LaTeX letters.
##'

and I suggest we just nix it and remove it. Screw See also. Or maybe change \code{\link[xxx]{xxx}} to just \code{xxx} for the three packages?

Thoughts? Preferences?

Possible Monash theme improvements

In no particular order:

  • add a vignette / demo i.e. something longer than the skeleton
  • document the options
  • make monashwhite the default?
  • make the defaults more sensible, i.e. currently several of the options in the yaml header in skeleton.Rmd (e.g. fontsize, titlefontsize, compress) are more or less mandatory
  • add skeleton.Rmd based demo to README.md, expand README.md
  • possible make titlepage.png the value of variable set in YAML to override default
  • more flexible font setup, maybe bera as fallback for carlito ?

Add more items as needed.

metropolis(citation_package) argument appears to have no default

Receiving an error on previously working code when calling binb::metropolis in RMarkdown or directly in R:

metropolis()
Error in match.arg(citation_package) : 'arg' must be of length 1

I'm unable to figure out how to pass an argument for citation_package="none" in the RMarkdown YAML header. Suspect it may be the default value for citation_package

The MWE in the readme for binb::metropolis does not work for me (R 4.02; binb_0.0.6)

Presento ignores date set in YAML

I am not entirely sure where the bug is, but it seems like no matter what we set as the date in the YAML header, Presento always prints the date as if it were \today. Even if we set it to NULL or an empty string "".

I had a quick look at the pandoc template but didn't spot anything obvious.

Possible Metropolis theme improvements

In no particular order, and in comparison to the demo.tex-based demo.pdf of the LaTeX variant:

  • No standout pages :-( which is a bummer and possibly hard to adjust due to how we get from new Markdown slide entry to \begin{frame} ... \end{frame}
  • Table of contents page has no header
  • References page has no header (but we changed things anyway with natbib use)
  • Metropolis has a bazillion (nice) options which we should support from YAML metadata where useful and sensible

New theme Monash (or MonashEBS) ?

@robjhyndman has some snazzy Beamer theming here: https://github.com/robjhyndman/MonashEBSTemplates

Recent example: https://github.com/robjhyndman/Writing-seminar/blob/master/Writing.pdf

When I glanced at the source it revealed itself as another Metropolis variant so it would fit here. Style file looks small and clean. Have not checked if it needs additional fonts, but that would be a bridge we have crossed before :)

@izahn Thoughts?

@robjhyndman Any thoughts or concerns from your end? Here in binb we mostly care about the Beamer side of things.

Example binb fails on Windows

Using example code provided in package

library(rmarkdown)
draft("myslides.Rmd", template="metropolis", package="binb", edit=FALSE)
setwd("myslides")       ## template creates a new subdir
render("myslides.Rmd")

produces this message to console

output file: myslides.knit.md

"C:/Program Files/RStudio/bin/pandoc/pandoc" +RTS -K512m -RTS myslides.utf8.md --to beamer --from markdown+autolink_bare_uris+ascii_identifiers+tex_math_single_backslash --output myslides.tex --template "C:\Users\eric\Documents\R\win-library\3.5\binb\rmarkdown\templates\metropolis\resources\template.tex" --slide-level 2 --variable theme=metropolis --highlight-style tango --pdf-engine xelatex --self-contained 

Output created: myslides.pdf
Error in tools::file_path_as_absolute(output_file) : 
  file 'myslides.pdf' does not exist

Same result when performing demo of tint

> sessionInfo()
R version 3.5.1 (2018-07-02)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 7 x64 (build 7601) Service Pack 1

Matrix products: default

locale:
[1] LC_COLLATE=English_United Kingdom.1252  LC_CTYPE=English_United Kingdom.1252   
[3] LC_MONETARY=English_United Kingdom.1252 LC_NUMERIC=C                           
[5] LC_TIME=English_United Kingdom.1252    

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

other attached packages:
[1] rmarkdown_1.10

loaded via a namespace (and not attached):
 [1] Rcpp_0.12.18     codetools_0.2-15 digest_0.6.17    rprojroot_1.3-2  backports_1.1.2 
 [6] magrittr_1.5     evaluate_0.11    highr_0.7        stringi_1.1.7    tint_0.1.0      
[11] binb_0.0.1       tools_3.5.1      stringr_1.3.1    tinytex_0.8      xfun_0.3        
[16] yaml_2.2.0       compiler_3.5.1   htmltools_0.3.6  knitr_1.20    

Sorry if I'm missing something obvious

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.