r-devel / outreachy

Manage the R Project participation in Outreachy
0 stars 1 forks source link

Create R functions to convert a LaTeX article to HTML via R markdown #3

Open hturner opened 2 years ago

hturner commented 2 years ago

In this task you will use pandoc to convert the .tex file to .md, then programatically edit the markdown file before rendering to PDF in the R Journal style.

Write an R function, or set of R functions to do the following:

  1. Convert RJwrapper.tex to markdown using rmarkdown::pandoc_convert().
  2. Programmatically edit the .md file to add a YAML header, with the following fields
    • title: specified via an argument to your function
    • bibliography: specified via an argument to your function
    • output: set to rjtools::rjournal_web_article
  3. Save the updated file as an .Rmd file in a new outputs directory.
  4. Copy files required for rendering the new .Rmd (any images and .bib files) to the new outputs directory.
  5. Compile the updated .Rmd file to produce an HTML output.

Show how to use your R code to create an HTML output in the R Journal style from the source files of one of the example articles. Put your code and your example script in a public GitHub repository and put a link to the repository in a comment on this issue.

You'll see the edits made in your function will only fix some of the conversion issues - improving on this result will be a focus of the internship.

Athene-ai commented 2 years ago

I am interested