I created my first R package using roxygen2
.
I generated the manual with a .pdf extension using the code
pack <- "name_of_your_package"
path <- find.package(pack)
system(paste(shQuote(file.path(R.home("bin"), "R")),"CMD", "Rd2pdf", shQuote(path)))
as suggested here.
My problem is that some lines in the text needs to be cut off in order to fit within the margins of the page.
I am aware that one solution is to use \cr
in the documentation. However, this impacts also the formatting of the R Studio help. By contrast, my goal is to cut off some lines in the .pdf, while keeping unchanged the format of the help pages in R studio.
The best solution I could come up with is to generate a .tex file, rather than a .pdf, and manually cut off the lines, but I cannot find a way to do it.
My question is: Are you aware of a way to generate the R manual of a package in latex, or alternatively do you have any better solution?