File: NEWSRd2txt.R

package info (click to toggle)
r-cran-erm 1.0-6-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 1,952 kB
  • sloc: f90: 401; ansic: 103; makefile: 8
file content (20 lines) | stat: -rwxr-xr-x 666 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
library("tools")
Rd2txt_options(
  width            = 80L,
  minIndent        = 2L,
  extraIndent      = 2L,
  sectionIndent    = 2L,
  sectionExtra     = 2L,
  underline_titles = FALSE
)

Rd2txt("NEWS.Rd", out="../NEWS")


system("R CMD Rd2pdf --no-preview --encoding=UTF-8 --force  NEWS.Rd")

system("gswin64c -q -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -dEmbedAllFonts=true -dPDFSETTINGS=/screen -sColorConversionStrategy=/RGB -sOutputICCProfile=srgb.icc -dCompatibilityLevel=1.5 -dAutoRotatePages=/None -sOutputFile=NEWSx.pdf NEWS.pdf")

system("qpdf --stream-data=compress --object-streams=generate NEWSx.pdf NEWS.pdf")

file.remove("NEWSx.pdf")