Git Product home page Git Product logo

unilur's People

Contributors

ginolhac avatar koncina 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

Watchers

 avatar  avatar  avatar  avatar

unilur's Issues

Including Tables

Hi! I am using this package for a class that I'm teaching (it's great), but I can't seem to find a way to get tables from R to print in the PDF/LaTeX document.

The following runs fine:

print(xtable::xtable(data))

The following fails:

print(xtable::xtable(data))

! LaTeX Error: Not in outer par mode.

See the LaTeX manual or LaTeX Companion for explanation.
Type H for immediate help.
...
pandoc fails with error 43.
Any thoughts would be greatly appreciated!

customize color and icons

Thank you for this very nice package that I used following the advice of @ginolhac
This package would be even better if it provided some customization features for the users such as

  • customizing the colors of the defined block types (solution block in blue or green or any other color)
  • allowing the addition of an icon before the title of the block (in the same logic as the advice and warning blocks).
    I don’t know if these are some improvements that you would have in mind but you would make a person happy!
    … But that will not stop me from testing it anyway.
    Thank you for this work!

R code chunks not working for unilur:examen

Writing R code chunks perfectly worked using unilur:tutorial. But, with unilur:examen, I have an error. See below:

`output:
unilur::examen_pdf_solution:
mcq: oneparcheckboxes
unilur::examen_pdf:
mcq: oneparcheckboxes

mean(cars$speed)

! LaTeX Error: Command \framed already defined.
Or name \end... illegal, see p.192 of the manual
Error: Failed to compile 2_Central_Tendency_Exercises.tex. See 2_Central_Tendency_Exercises.log for more info.
Execution halted

The thing is that I would like to use the mcq options from unilur:examen AND r chunks. As mcq options are not working for unilur:tutorial, I decided to use unilur:examen instead. But still, I have issues. Is it an issue with the unilur? Or a mistake from my side?

unilur does install in R 3.6.0

Hi, I love unilur and have been using it for a while. Thank you for creating this package. However, I recently updated my RStudio and R and I am getting the following error for unilur installation. Can you please help?

R version 3.6.0 (2019-04-26) -- "Planting of a Tree"
Copyright (C) 2019 The R Foundation for Statistical Computing
Platform: x86_64-w64-mingw32/x64 (64-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.

devtools::install_github("koncina/unilur")
Downloading GitHub repo koncina/unilur@master
cygwin warning:
MS-DOS style path detected: C:\Users\sab2028\AppData\Local\Temp\RtmpWcjlJq\filed2864e0608b.tar.gz
Preferred POSIX equivalent is: /cygdrive/c/Users/sab2028/AppData/Local/Temp/RtmpWcjlJq/filed2864e0608b.tar.gz
CYGWIN environment variable option "nodosfilewarning" turns off this warning.
Consult the user's guide for more details about POSIX paths:
http://cygwin.com/cygwin-ug-net/using.html#using-pathnames
Error: Does not appear to be an R package (no DESCRIPTION)

Latex code in Markdown not interpreted

Let's say I have some Latex code in my markdown doc, such as

$$
\begin{tabular}{|c|c|c|}
\hline 
 & Blue eyes & Brown eyes\tabularnewline
\hline 
Light hair & 38 & 11\tabularnewline
\hline 
Dark hair & 14 & 51\tabularnewline
\hline 
\end{tabular}
$$

The knitting returns an error

! FancyVerb Error:
  Extraneous input `\begin {Verbatim}[commandchars=\\\{\}]\end {}' between \end
{Verbatim} and line end
.
\FV@Error ... {FancyVerb Error:
\space \space #1
}

l.543 ...tim}\begin{Verbatim}[commandchars=\\\{\}]

pandoc: Error producing PDF from TeX source
Error: pandoc document conversion failed with error 43
Execution halted

should I include those code lines in a r asis = TRUE chunk?

Is unilur working with html widgets ?

Hello, it's me again.

I'm working on a cartography tutorial with unilur and I'm having problems with displaying interactive maps with the leaflet package.
I wonder if there is a way to solve the problem easily? Do you think this issue concerns all html widgets? Thanks a lot for your help!

Working with html_document output

 ---
 title: "html_output"
 author: "antuki"
 output: html_document
 ---
 
 ```{r setup, include=FALSE}
 knitr::opts_chunk$set(echo = TRUE)
 ```
 
 ```{r}
 library(leaflet)
 leaflet() %>% addTiles()
 ```

Not working with unilur tutorial_html_solution output... :

 ---
 title: "unilur_output"
 author: "antuki"
 output: 
   unilur::tutorial_html_solution
 ---
 
 ```{r setup, include=FALSE}
 knitr::opts_chunk$set(echo = TRUE)
 ```
 
 ```{r}
 library(leaflet)
 leaflet() %>% addTiles()
 ```

knitr CACHE prevent solution to be display in html output

If a global knitr CACHE option is to TRUE like this:

knitr::opts_chunk$set(cache = TRUE)

no solution are displayed for the html output. Works fine with the pdf output.
Setting knitr::opts_chunk$set(cache = FALSE) solves the issue

block chunk doesn't support inline r code?

Hi Eric,

Thank you so much for this interesting package.

I am wondering whether one can incorporate inline r code within the block chunk?

From my testing, block chunk seems to be using a markdown/asis engine or equivalent.

Thanks!

kind regards,
Thomas

custom css for pdf output

for html output this is great:

```{css, echo = FALSE}
.bonus {
  border-left: 10px solid rgba(188, 143, 143, 1);
  padding: 1em 0 1em 1em;
}
```

#### bonus question {.bonus}

would be awesome to have it working for pdf output

solution option interferes with echo option

When I have a setup chunk that sets echo=FALSE, this seems to override the solution=TRUE option, unless I define echo=TRUE in each solution chunk. In the example test.txt file below (actually an .Rmd file but I could only upload txt), the first solution does not show. The second does. If nothing else, maybe just let folks know that this is an issue..

test.txt

image

feature proposal: add marking

would be nice to have marks add numbers specified in each chunk solution = TRUE.
Would be even greater if those numbers are sum up for each section

Inline R within block

Thanks for an amazing tool!
I was wondering if it is possible to run inline r within a block chunk. My solutions often require interpretation of coefficients, and it would be nice to do "The coefficient is 'r mod$coef '. "

Custom Class and Header

Hello!

I was wondering if it was possible to make two slight modifications to the package.

  1. To allow a user to specify the custom document class. As it stands now, this would accept a custom class, but I can't see how to manually specify it from RStudio's Rmarkdown directly.

tutorial_pdf_base <- function(solution = FALSE,
solution_suffix = "_solution",
question_suffix = "_question",
credit = FALSE, # Show a link to the unilur homepage
latex_class = "article",
pandoc_args = NULL, ...

  1. Similarly, is it possible to specify the path to a custom header? (I.e. given a different filepath to header_examen)

    header_examen <- system.file("rmarkdown", "templates", "tutorial", "resources", "header_examen.tex",
    package = "unilur")

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.