{"id":23509362,"url":"https://github.com/paulnorthrop/accessr","last_synced_at":"2026-02-25T21:04:17.410Z","repository":{"id":50520682,"uuid":"409950642","full_name":"paulnorthrop/accessr","owner":"paulnorthrop","description":"Command Line Tools to Produce Accessible Documents using R markdown","archived":false,"fork":false,"pushed_at":"2025-12-28T20:23:59.000Z","size":5218,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-12-29T18:24:37.124Z","etag":null,"topics":["accessibility","command-line","digital-accessibility","rmarkdown","rmarkdown-document","rmarkdown-slide"],"latest_commit_sha":null,"homepage":"https://paulnorthrop.github.io/accessr/","language":"R","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/paulnorthrop.png","metadata":{"files":{"readme":"README.Rmd","changelog":"NEWS.md","contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2021-09-24T12:11:14.000Z","updated_at":"2025-12-28T20:24:02.000Z","dependencies_parsed_at":"2023-09-24T23:06:36.122Z","dependency_job_id":"c3124a21-d47c-43d0-8508-3b5dc9b9c562","html_url":"https://github.com/paulnorthrop/accessr","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/paulnorthrop/accessr","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/paulnorthrop%2Faccessr","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/paulnorthrop%2Faccessr/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/paulnorthrop%2Faccessr/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/paulnorthrop%2Faccessr/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/paulnorthrop","download_url":"https://codeload.github.com/paulnorthrop/accessr/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/paulnorthrop%2Faccessr/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29839964,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-25T20:42:33.054Z","status":"ssl_error","status_checked_at":"2026-02-25T20:42:21.322Z","response_time":61,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["accessibility","command-line","digital-accessibility","rmarkdown","rmarkdown-document","rmarkdown-slide"],"created_at":"2024-12-25T11:40:31.036Z","updated_at":"2026-02-25T21:04:17.404Z","avatar_url":"https://github.com/paulnorthrop.png","language":"R","funding_links":[],"categories":[],"sub_categories":[],"readme":"---\noutput: github_document\n---\n\n\u003c!-- README.md is generated from README.Rmd. Please edit that file --\u003e\n\n```{r, echo = FALSE}\nknitr::opts_chunk$set(\n  collapse = TRUE,\n  comment = \"#\u003e\",\n  fig.path = \"README-\"\n)\n```\n\n# accessr \u003ca href=\"https://paulnorthrop.github.io/accessr/\"\u003e\u003cimg src=\"man/figures/accessr_logo.png\" align=\"right\" style=\"float:right; height:150px;\" alt=\"accessr logo\"/\u003e\u003c/a\u003e\n\n[![R-CMD-check](https://github.com/paulnorthrop/accessr/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/paulnorthrop/accessr/actions/workflows/R-CMD-check.yaml)\n[![Coverage Status](https://codecov.io/github/paulnorthrop/accessr/coverage.svg?branch=master)](https://app.codecov.io/github/paulnorthrop/accessr?branch=master)\n[![CRAN_Status_Badge](https://www.r-pkg.org/badges/version/accessr)](https://cran.r-project.org/package=accessr)\n[![Downloads (monthly)](https://cranlogs.r-pkg.org/badges/accessr?color=brightgreen)](https://cran.r-project.org/package=accessr)\n[![Downloads (total)](https://cranlogs.r-pkg.org/badges/grand-total/accessr?color=brightgreen)](https://cran.r-project.org/package=accessr)\n\n## Command Line Tools to Produce Accessible Documents using R Markdown\n\nThis package provides functions to produce accessible html slides, html, Word and PDF documents from input R markdown files. Accessible PDF files are produced only on a Windows Operating System. One aspect of accessibility is providing headings that are recognised by a screen reader, providing a navigational tool for a blind or partially-sighted person. A main aim is to enable documents of different formats to be produced from a **single** R markdown source file using one function call.  The `render()` function from the [rmarkdown package](https://cran.r-project.org/package=rmarkdown) is used to render R markdown files. A zip file containing multiple files can be produced from one function call.  A user-supplied template Word document can be used to determine the formatting of the output Word document.  Accessible PDF files are produced from Word documents using [OfficeToPDF](https://github.com/cognidox/OfficeToPDF).  A convenience function, `install_otp()` is provided to install this software. The option to print html output to (non-accessible) PDF files is also available.  \n\n**Additional features**. When the output format is a Word document the function `ext_img()` enables the knitr chunk options `out.width` and/or `out.height` to be used to set the dimensions of a figure (R-generated or external image). Passing (the default) `slide_level = 1` to `rmd2ioslides()` enables the use of the level one header # to separate slides in an ioslides presentation without producing grey segue slides.\n\n## The main functions\n\nThe main functions are:\n\n* `rmd2word()`: create word documents and accessible PDF files.\n* `rmd2ioslides()`, `rmd2slidy()`: create ioslides/slidy presentations and perhaps print to (non-accessible) PDF documents.\n* `rmd2html()`: create html documents and perhaps print to (non-accessible) PDF documents.\n* `rmd2many()`: create HTML slides, PDF slides, Word and PDF documents from a single R markdown file.\n\n### Rmd to Word to PDF\n\nSuppose that in your current working directory you have the R markdown files `file1.Rmd` and `file2.Rmd`, a template Word file `your_template.docx` and that the file `OfficeToPDF.exe` downloaded from [OfficeToPDF releases](https://github.com/cognidox/OfficeToPDF/releases) can be accessed. The following code creates files `file1.docx`, `file2.docx`, `file1.pdf` and `file2.pdf` in your working directory and, unless you supply `zip = FALSE`, a zip file `accessr_word.zip` containing the two PDF files will also be created.\n\n```{r, eval = FALSE}\nrmd2word(c(\"file1\", \"file2\"), doc = \"your_template.docx\")\n```\n\nA path to the Word template document can be provided using the `doc` argument.  If `doc` is not provided then a default template is used. See `?rmd2word` for details. If you include figures then the `knitr` chunk option `fig.alt` can be used to set the alternative text. You may find you need to enclose LaTeX maths environments in \\$\\$ ... \\$\\$ when typesetting mathematics. \n\nA path to `OfficeToPDF.exe` can be provided using an argument `dir`. If `dir` is missing then `rmd2word` will look for OfficeToPDF.exe in the default installation directory `dir` of `install_otp`. \n\n### Rmd to ioslides \n\nSimilarly, the function `rmd2ioslides` produces HTML [ioslides](https://bookdown.org/yihui/rmarkdown/ioslides-presentation.html) presentations.\n\n```{r, eval = FALSE}\nrmd2ioslides(c(\"file1\", \"file2\"))\n```\n\nIf the argument `pdf = TRUE` is supplied then the `chrome_print` function in the `pagedown` package is used to produce (non-accessible) PDF files from these slides.  This requires a secure internet connection. See `?rmd2ioslides`.\n\n`rmd2slidy` (see [slidy](https://bookdown.org/yihui/rmarkdown/slidy-presentation.html) presentations) and `rmd2html` work in a similar way.\n\n## A basic example Rmd file\n\nExecuting the following code will copy the file `example.Rmd` to the working directory and create from it output as a Word document, an html document and ioslides and slidy presentations. In the working directory there will also be the files `example.docx`, `example.pdf` and `example.html`. The latter contains the slidy presentation because the final three calls each create `example.html`, which is overwritten.\n\n```{r exampleRmd, eval = FALSE}\nrmd_file \u003c- system.file(package = \"accessr\", \"examples\", \"example.Rmd\")\nfile.copy(from = rmd_file, to = getwd())\nrmd2word(\"example\")\nrmd2html(\"example\")\nrmd2ioslides(\"example\")\nrmd2slidy(\"example\")\n```\n\nThis example file includes examples of creating figures and tables and notes potential issues with typesetting mathematics when creating Word output.  In particular, the `knitr` chunk options `fig.alt` and `fig.cap` can be used to create a separate alternative text and caption for a figure. It also features the use of an input list `params` of named parameters, with a component `hide` that can be used to hide selected parts of the output.\n\n## Suggested workflow\n\nI have used `rmd2ioslides` to create HTML lecture presentations and `rmd2word` to create accessible PDF document versions of these presentations for upload, pre- and post- lecture, to a Virtual Learning Environment (Moodle). The default setting of `rmd2many` produces these files and Word document with 18pt bold text. The latter may be particularly useful for some students. I use `params$hide` (see above) to hide selected content from the file that I share with the students prior to the lecture.\n\n## Installation\n\nTo get the current released version from CRAN:\n\n```{r installation, eval = FALSE}\ninstall.packages(\"accessr\")\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpaulnorthrop%2Faccessr","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpaulnorthrop%2Faccessr","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpaulnorthrop%2Faccessr/lists"}