-
Notifications
You must be signed in to change notification settings - Fork 2
/
README.Rmd
104 lines (86 loc) · 3.66 KB
/
README.Rmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
---
output: github_document
editor_options:
markdown:
wrap: 72
---
<!-- README.md is generated from README.Rmd. Please edit that file -->
```{r, include = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "man/figures/README-",
out.width = "100%"
)
```
# pandoc
<!-- badges: start -->
[![Lifecycle:
experimental](https://img.shields.io/badge/lifecycle-experimental-orange.svg)](https://lifecycle.r-lib.org/articles/stages.html#experimental)
[![CRAN
status](https://www.r-pkg.org/badges/version/pandoc)](https://github.com/cderv/pandoc)
[![R-CMD-check](https://github.com/cderv/pandoc/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/cderv/pandoc/actions/workflows/R-CMD-check.yaml)
[![Codecov test
coverage](https://codecov.io/gh/cderv/pandoc/branch/main/graph/badge.svg)](https://app.codecov.io/gh/cderv/pandoc?branch=main)
<!-- badges: end -->
```{r child = "vignettes/articles/_about.Rmd"}
```
## Usage
All functions are prefixed with `pandoc_` and you will find below their
main usage. See [Get
started](https://cderv.github.io/pandoc/articles/pandoc.html) for usage
examples and
[Reference](https://cderv.github.io/pandoc/reference/index.html) page
for full details of functions.
Most functions follows these following rules:
- They are prefixed with `pandoc_` .
- They can be used with any installed Pandoc version using `version`
argument.
- Versions to use are passed as a string, either the version number
(e.g `"2.14.2"` ), or one special alias (`default`, `nightly` ,
`rstudio` , `system`) .
Available functions allows:
- Installing / Uninstalling specific Pandoc version from
`r knitr::combine_words(range(as.numeric_version(pandoc::pandoc_available_releases())), sep = ", ", and = " to ", before = "'")`
, including development version of Pandoc.
- `pandoc_install()`, `pandoc_install_nightly()`,
`pandoc_uninstall()`, ...
- Switching Pandoc version by activating a specific one or running any
function with a specific Pandoc version using `version=` argument.
- `pandoc_activate()` , `with_pandoc()` , ....
- Managing locally installed version of Pandoc as versions installed
by this package are located within one folder per version in a
user's data directory.
- `pandoc_installed_versions()` , `pandoc_installed_latest` ,
`pandoc::pandoc_is_installed()` , `pandoc_locate()`,
`pandoc_available()`, ...
- Using easily one of the installed version with **rmarkdown** (i.e
`rmarkdown::render()` will use the version activated by this pandoc)
- See `pandoc::pandoc_activate(rmarkdown = TRUE)`
- Running a Pandoc binary from R, including a version installed
system-wise (`pandoc_bin("system")`), or the version shipped with
RStudio (`pandoc_bin("rstudio")`).
- Calling binary at low-level from R with any version installed.
- `pandoc_run()`
- to easily access information in R usually requiring command line
execution
- `pandoc_version()`, `pandoc_list_extensions()` ,
`pandoc_export_template()` , and all other wrappers...
- opening Pandoc's resources from R
- `pandoc::pandoc_browse_manual()`,
`pandoc::pandoc_browse_extension()` , ....
## Example
```{r}
library(pandoc)
# Install version
pandoc_install("2.7.3")
pandoc_install("2.11.4")
# Highest install is used
pandoc_version()
```
See detailed examples in [Get
started](https://cderv.github.io/pandoc/articles/pandoc.html).
## Code of Conduct
Please note that the **pandoc** project is released with a [Contributor
Code of Conduct](https://cderv.github.io/pandoc/CODE_OF_CONDUCT.html).
By contributing to this project, you agree to abide by its terms.