[R-pkg-devel] handling documentation build tools

Vladimir Dergachev vo|ody@ @end|ng |rom m|nd@pr|ng@com
Wed May 22 05:16:01 CEST 2024



On Tue, 21 May 2024, Boylan, Ross via R-package-devel wrote:

> Thanks for the pointer.  You may have been thrown off by some goofs I made in the intro, which said
>> I would like to build the automatically, with requiring either users or repositories to have the tools.
>
> The intended meaning, with corrections in **, was
>> I would like to build the  *custom documentation* automatically, with*out* requiring either users or repositories to have the tools.
>
> So I want to build the document only locally, as you suggest, but am not sure how to accomplish that.

I usually just create a Makefile.

It can be something like this:


all: documentation.pdf

documentation.pdf: documentation.lyx
 	lyx --export pdf4 documentation.lyx

Then every time before you do R build, must run make in the directory with 
the Makefile.

best

Vladimir Dergachev

>
> Regarding the trick, I'm puzzled by what it gains.  It seems like a complicated way to get the core pdf copied to inst/doc.
>
> Also, my main concern was how to automate production of the "core" pdf, using the language of the blog post.
>
> Ross
>
>
> ________________________________________
> From: Dirk Eddelbuettel <edd using debian.org>
> Sent: Tuesday, May 21, 2024 2:15 PM
> To: Boylan, Ross
> Cc: r-package-devel using r-project.org
> Subject: Re: [R-pkg-devel] handling documentation build tools
>
> !-------------------------------------------------------------------|
>  This Message Is From an External Sender
>  This message came from outside your organization.
> |-------------------------------------------------------------------!
>
>
> As lyx is not listed in 'Writing R Extensions', the one (authorative) manual
> describing how to build packages for R, I would not assume it to be present
> on every CRAN machine building packages. Also note that several user recently
> had to ask here how to deal with less common fonts for style files for
> (pdf)latex.
>
> So I would recommend 'localising' the pdf creation to your own machine, and
> to ship the resulting pdf. You can have pre-made pdfs as core of a vignette,
> I trick I quite like to make package building simpler and more robust.  See
> https://urldefense.com/v3/__https://www.r-bloggers.com/2019/01/add-a-static-pdf-vignette-to-an-r-package/__;!!LQC6Cpwp!vcNeLBuZJDE3hWqjhjwi0NVVeEkEHhrSe847H98Eqj9ZEEBspCetgb6g-F7a518JPRd35jL-7xkOlj0$
> for details.
>
> Cheers, Dirk
>
> --
> dirk.eddelbuettel.com | @eddelbuettel | edd using debian.org
>
> ______________________________________________
> R-package-devel using r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-package-devel
>



More information about the R-package-devel mailing list