texor
Converting 'LaTeX' 'R Journal' Articles into 'RJ-web-articles'
Science Score: 26.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
○CITATION.cff file
-
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
○DOI references
-
○Academic publication links
-
○Academic email domains
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (18.9%) to scientific vocabulary
Last synced: 10 months ago
·
JSON representation
Repository
Converting 'LaTeX' 'R Journal' Articles into 'RJ-web-articles'
Basic Info
- Host: GitHub
- Owner: Abhi-1U
- License: other
- Language: R
- Default Branch: main
- Homepage: https://abhi-1u.github.io/texor/
- Size: 12.4 MB
Statistics
- Stars: 8
- Watchers: 2
- Forks: 4
- Open Issues: 12
- Releases: 13
Created about 4 years ago
· Last pushed 10 months ago
Metadata Files
Readme
Changelog
License
readme.Rmd
---
output: github_document
editor_options:
markdown:
mode: gfm
---
```{r setup, include = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "man/figures/",
out.width = "100%"
)
```
# texor
[](https://cran.r-project.org/package=texor)
[](https://github.com/Abhi-1U/texor/actions/workflows/pkg_down.yaml)
[](https://github.com/Abhi-1U/texor/actions/workflows/cmdcheck.yaml)
[](https://github.com/Abhi-1U/texor/blob/master/DESCRIPTION)

[](https://codecov.io/gh/Abhi-1U/texor)
The R package texor will ease your LaTeX R Journal / Sweave article migration to web format by providing tools and utilities.
## Installation
Install pandoc v3.1 or greater, ideally latest version.
If you are using Rstudio, it should be pre-installed.
```r
# To check the version of pandoc
rmarkdown::pandoc_version()
# or to simply check if you are good to go in terms of pandoc
texor::pandoc_version_check()
# TRUE if pandoc is good to go, else FALSE
```
For included PDF conversions also install poppler-utils (used with pdftools package)
Ideally install the latest version of poppler-utils.
Install the mainline version from CRAN with:
```r
install.packages('texor')
```
Install the development version from GitHub with:
``` r
# install.packages("remotes")
remotes::install_github("Abhi-1U/texor")
# install.packages("pak")
pak::pak("Abhi-1U/texor")
```
## General Usage
#### R Journal articles
here is a quick example to use texor package with a sample RJournal article
(included with the package [inst/article](https://github.com/Abhi-1U/texor/tree/master/inst/examples/article))
``` r
# for a single LaTeX article
texor::latex_to_web(article_dir)
```
```r
# A running example
article_dir <- system.file("examples/article", package = "texor")
dir.create(your_article_folder <- file.path(tempdir(), "tempdir"))
x <- file.copy(from = article_dir, to = your_article_folder,recursive = TRUE,)
your_article_path <- paste(your_article_folder,"article",sep="/")
# view your original article at
your_article_path
texor::latex_to_web(your_article_path,..)
# view your converted and original article at
paste0(your_article_path,"/web")
```
#### Sweave articles
Similar to the conversion of R journal articles, pass the file path(instead of the folder path) to the function.
```r
texor::rnw_to_rmd(file_path,..)
# Additionally you can set the options to modify the end result as per your needs.
```
## Using texor over multiple files
```
# for multiple articles in RJ folder structure
#base dir
article_dir <- "C:/Users/abhis/path/to/base"
# list of journal number directories
journal_dirs <- list.dirs(article_dir,recursive = FALSE)
# list of individual slug directories
slug_dirs <- lapply(journal_dirs,function(journal_dir) {
list.dirs(journal_dir,recursive = FALSE)
})
# creating a single list of all slug directories
slug_dirs <- unlist(slug_dirs)
# Calling
for (dir in slug_dirs) {
#print(dir)
getwd()
# below function will create a log file of success/error in current
# working directory while running the texor::latex_to_web() function
texor:::convert_to_html(dir)
}
```
Owner
- Name: Abhishek Ulayil
- Login: Abhi-1U
- Kind: user
- Repositories: 5
- Profile: https://github.com/Abhi-1U
GitHub Events
Total
- Create event: 2
- Release event: 1
- Issues event: 5
- Watch event: 2
- Issue comment event: 2
- Push event: 33
- Pull request event: 1
- Gollum event: 1
- Fork event: 1
Last Year
- Create event: 2
- Release event: 1
- Issues event: 5
- Watch event: 2
- Issue comment event: 2
- Push event: 33
- Pull request event: 1
- Gollum event: 1
- Fork event: 1
Packages
- Total packages: 1
-
Total downloads:
- cran 507 last-month
- Total dependent packages: 0
- Total dependent repositories: 0
- Total versions: 7
- Total maintainers: 1
cran.r-project.org: texor
Converting 'LaTeX' 'R Journal' Articles into 'RJ-web-articles'
- Homepage: https://github.com/Abhi-1U/texor
- Documentation: http://cran.r-project.org/web/packages/texor/texor.pdf
- License: MIT + file LICENSE
-
Latest release: 1.5.6
published about 1 year ago
Rankings
Downloads: 19.4%
Forks count: 21.5%
Stargazers count: 26.0%
Average: 26.4%
Dependent packages count: 28.3%
Dependent repos count: 36.9%
Maintainers (1)
Last synced:
10 months ago
Dependencies
.github/workflows/cmdcheck.yaml
actions
- actions/checkout v2 composite
- r-lib/actions/check-r-package v2 composite
- r-lib/actions/setup-pandoc v2 composite
- r-lib/actions/setup-r v2 composite
- r-lib/actions/setup-r-dependencies v2 composite
.github/workflows/pkg_down.yaml
actions
- actions/cache v2 composite
- actions/checkout v2 composite
- r-lib/actions/setup-pandoc v2 composite
- r-lib/actions/setup-r v2 composite
DESCRIPTION
cran
- logger * imports
- pdftools * imports
- rmarkdown * imports
- stringr * imports
- tinytex * imports
- tools * imports
- xfun * imports
- yaml * imports
- knitr * suggests
- testthat >= 3.0.0 suggests