From b2fa6a232a061505b185a4dca0b7aab88efffc3e Mon Sep 17 00:00:00 2001 From: Dirk Eddelbuettel Date: Sun, 15 Oct 2017 17:15:29 -0500 Subject: [PATCH] added README.md, two dot files, Rproj --- .Rbuildignore | 2 ++ .gitignore | 4 +++ README.md | 68 +++++++++++++++++++++++++++++++++++++++++++++++++++ linl.Rproj | 16 ++++++++++++ 4 files changed, 90 insertions(+) create mode 100644 .Rbuildignore create mode 100644 .gitignore create mode 100644 README.md create mode 100644 linl.Rproj diff --git a/.Rbuildignore b/.Rbuildignore new file mode 100644 index 0000000..91114bf --- /dev/null +++ b/.Rbuildignore @@ -0,0 +1,2 @@ +^.*\.Rproj$ +^\.Rproj\.user$ diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..5b6a065 --- /dev/null +++ b/.gitignore @@ -0,0 +1,4 @@ +.Rproj.user +.Rhistory +.RData +.Ruserdata diff --git a/README.md b/README.md new file mode 100644 index 0000000..7b3b4c4 --- /dev/null +++ b/README.md @@ -0,0 +1,68 @@ +## linl [![Build Status](https://travis-ci.org/eddelbuettel/linl.svg)](https://travis-ci.org/eddelbuettel/linl) [![Package-License](http://img.shields.io/badge/license-GPL--3-brightgreen.svg?style=flat)](http://www.gnu.org/licenses/gpl-3.0.html) [![CRAN](http://www.r-pkg.org/badges/version/linl)](https://cran.r-project.org/package=linl) [![Downloads](http://cranlogs.r-pkg.org/badges/linl?color=brightgreen)](http://www.r-pkg.org/pkg/linl) + +Linl in not Letter + +### Motivation + +The LaTeX Letter class is very useful for simple letters. As such +letters are also somewhat standardized, they make for excellent +candidates for use by Markdown. + +This package leans on earlier work by [Aaron Woolen](http://aaronwolen.com/) in his +[pandoc-letter](https://github.com/aaronwolen/pandoc-letter) repository, and extends it for use from +R via the [rmarkdown](https://cran.r-project.org/package=rmarkdown) package. + +### Example + +#### Skeleton + +The skelecon creates a very simple letter. This shows the (complete) source on the left and the +rendered pdf on the right: + +![](https://eddelbuettel.github.io/linl/skeleton.png) + +#### Vignette + +The vignette example is a little more featureful and shows how to included a letterhead on-demand, +as well as a signature. Both of these are driven by simple YAML headers as seen on the left: + +![](https://eddelbuettel.github.io/linl/vignette.png) + +### Status + +The package is working, but not yet on [CRAN](https://cran.r-project.org/). + +### Usage + +Use the standard + +```r +install.packages("linl") +``` + +to install it from CRAN, and then use as a Markdown template via RStudio, or use code such as + +```r +library(rmarkdown) +draft("myletter.Rmd", template="pdf", package="linl", edit=FALSE) +render("myletter.Rmd") +``` + +to create a first draft of a new `myletter.Rmd`. + +### Requirements + +Beyond the R package dependencies, a working `pandoc` binary is needed. RStudio installs +its own copy, otherwise do what is needed on your OS (_i.e._, something like `sudo apt-get +install pandoc pandoc-citeproc`). + +The pdf mode should only require a basic LaTeX installation. + +### Authors + +Dirk Eddelbuettel, leaning on the earlier work by Aaron Woolen. + +### License + +GPL-3 for this package, the work in [pandoc-letter](https://github.com/aaronwolen/pandoc-letter), +as well as underlying Pandoc template. diff --git a/linl.Rproj b/linl.Rproj new file mode 100644 index 0000000..aca895a --- /dev/null +++ b/linl.Rproj @@ -0,0 +1,16 @@ +Version: 1.0 + +RestoreWorkspace: Default +SaveWorkspace: Default +AlwaysSaveHistory: Default + +EnableCodeIndexing: Yes +UseSpacesForTab: Yes +NumSpacesForTab: 4 +Encoding: UTF-8 + +RnwWeave: Sweave +LaTeX: pdfLaTeX + +BuildType: Package +PackageInstallArgs: --no-multiarch --with-keep.source