Re: [R] adding "Page X of XX" to PDFs

2023-12-02 Thread Duncan Murdoch
On 02/12/2023 5:37 p.m., CALUM POLWART wrote: You could easily omit the Page X of xX, but leave the timestamp Then add Page X of XX programmatically using pdftools or some similar pdf command line tools. You don't need to use command line tools -- I showed how to do it by creating an R Markdo

Re: [R] adding "Page X of XX" to PDFs

2023-12-02 Thread CALUM POLWART
You could easily omit the Page X of xX, but leave the timestamp Then add Page X of XX programmatically using pdftools or some similar pdf command line tools. On Sat, 2 Dec 2023, 22:35 , wrote: > Having read all of the replies, it seems there are solutions for the > question and the OP points ou

Re: [R] adding "Page X of XX" to PDFs

2023-12-02 Thread avi.e.gross
Having read all of the replies, it seems there are solutions for the question and the OP points out that some solutions such as making the document twice will affect the creation date. I suspect the additional time to do so is seconds or at most minutes so it may not be a big deal. But what about

Re: [R] adding "Page X of XX" to PDFs

2023-12-02 Thread Duncan Murdoch
On 02/12/2023 2:07 p.m., Ben Bolker wrote: Sorry, jumped into the thread too late. (On the other hand, once the document gets complicated enough, it may be worth it in the long run to convert to something that actually has a document-generating back-end, rather than reinventing everything fr

Re: [R] adding "Page X of XX" to PDFs

2023-12-02 Thread Ben Bolker
Sorry, jumped into the thread too late. (On the other hand, once the document gets complicated enough, it may be worth it in the long run to convert to something that actually has a document-generating back-end, rather than reinventing everything from scratch ...) On 2023-12-02 2:03 p.m., J

Re: [R] adding "Page X of XX" to PDFs

2023-12-02 Thread Jeff Newmiller via R-help
He clearly stated he was using the pdf() graphics device. On December 2, 2023 10:36:44 AM PST, Ben Bolker wrote: > It's still not entirely clear to me what framework you're using to generate > the PDF, but if it's rmarkdown/Rnw (Sweave)/Quarto-based, then as far as I > know all of those framew

Re: [R] adding "Page X of XX" to PDFs

2023-12-02 Thread Ben Bolker
It's still not entirely clear to me what framework you're using to generate the PDF, but if it's rmarkdown/Rnw (Sweave)/Quarto-based, then as far as I know all of those frameworks use LaTeX as the last step in the script-to-PDF pipeline, and allow the inclusion of arbitrary LaTeX code, so the

Re: [R] adding "Page X of XX" to PDFs

2023-12-02 Thread Ebert,Timothy Aaron
Would this work in general? Say I have a document with figures, special equations, text, and tables. The text and tables are relatively easy. The figures would need a conversion from pixels to lines, and the equations maybe printed out, counted as a figure, and then added to the line count. It w

Re: [R] adding "Page X of XX" to PDFs

2023-12-02 Thread John Kane
https://community.rstudio.com/t/total-number-of-pages-in-quarto-pdf/177316/2 On Sat, 2 Dec 2023 at 09:39, Dennis Fisher wrote: > OS X > R 4.3.1 > > Colleagues > > I often create multipage PDFs [pdf()] in which the text "Page X" appears > in the margin. These PDFs are created automatically using

Re: [R] adding "Page X of XX" to PDFs

2023-12-02 Thread Jeff Newmiller via R-help
One of the most fundamental characteristics of R programming is the use of data frames of column vectors, and one of the very first challenges I had as a then-Perl-programmer was coming to grips with the fact that unknown-length CSV files would be read completely into memory as rows and once the

[R] Try reproduce glmm by hand

2023-12-02 Thread Marc Girondot via R-help
Dear all, In order to be sure I understand glmm correctly, I try to reproduce by hand a simple result. Here is a reproducible code. The questions are in _ Of course I have tried to find the solution using internet but I was not able to find a solution. I have also tried to fo

Re: [R] adding "Page X of XX" to PDFs

2023-12-02 Thread CALUM POLWART
Can you provide a very simplified version of how the PDF is created? On Sat, 2 Dec 2023, 14:39 Dennis Fisher, wrote: > OS X > R 4.3.1 > > Colleagues > > I often create multipage PDFs [pdf()] in which the text "Page X" appears > in the margin. These PDFs are created automatically using a massi

Re: [R] adding "Page X of XX" to PDFs

2023-12-02 Thread Erich Subscriptions
You need to use raw LaTeX See section 4 here Von meinem iPad gesendet > Am 02.12.2023 um 15:39 schrieb Dennis Fisher : > > OS X > R 4.3.1 > > Colleagues > > I often create multipage PDFs [pdf()] in which the text "Page X" appears in > the margin. These PDFs are created automatically using

[R] adding "Page X of XX" to PDFs

2023-12-02 Thread Dennis Fisher
OS X R 4.3.1 Colleagues I often create multipage PDFs [pdf()] in which the text "Page X" appears in the margin. These PDFs are created automatically using a massive R script. One of my clients requested that I change this to: Page X of XX where XX is the total number of pages. I do