Open caocloud opened 2 months ago
Could you format your code correctly and with full reproducible example to have an example I can look at ?
See https://quarto.org/bug-reports.html#formatting-make-githubs-markdown-work-for-us
Thanks.
Hi, I have updated my question. Thanks
Just to understand correctly: Are you calling quarto render
on your qarto3.qmd
file and this file is calling also quarto render
itself ?
Just asking because there could be some side effect of having quarto render nested calls like that.
Hi Christophe,
I test my code on the quarto3.qmd by clicking the "render" button. After everything looks fine.
I then run quarto render in a different Rmd file, which uses quarto::quarto_render function.
Chloe.
On Thu, 5 Sept 2024 at 23:54, Christophe Dervieux @.***> wrote:
Just to understand correctly: Are you calling quarto render on your qarto3.qmd file and this file is calling also quarto render itself ?
Just asking because there could be some side effect of having quarto render nested calls like that.
— Reply to this email directly, view it on GitHub https://github.com/quarto-dev/quarto-r/issues/210#issuecomment-2331748355, or unsubscribe https://github.com/notifications/unsubscribe-auth/AC7VIPCFPJHS65IYQMFF23DZVBPBBAVCNFSM6AAAAABNVWCZV2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGMZRG42DQMZVGU . You are receiving this because you authored the thread.Message ID: @.***>
Sorry for all my questions. I am just trying to understand everything correctly so that I can reproduce.
Is this the content of quarto3.qmd
?
---
format:
titlepage-pdf:
titlepage-bg-image: "logo4.png"
titlepage-theme:
bg-image-size: "1.8\\textwidth"
bg-image-left: "0\\paperwidth"
documentclass: article
---
```{r}
for ( i in 1: 100){
quarto_render(
input= "quarto3.qmd",
output_format = "pdf",execute = TRUE,
output_file = stringr::str_glue("{Filename[i]}.pdf"),
execute_params = list(ID = ID[i],RegionID=2))
}
Which means your are calling `quarto_render()` from within a .qmd file, right ?
So you do `quarto render quarto3.qmd` (or call the render button), and then you expect the same document to also be rendered by knitr by calling `quarto_render()` in the cell ?
Do I get it right ?
HI Christopher,
Sorry for not making it clear enough.
The Yaml is for the quarto3.qmd. I am not calling quarto_render within this (I use "render" button to run this file only). The quarto_render function is coded in a separate .RMD.
On Fri, 6 Sept 2024 at 18:13, Christophe Dervieux @.***> wrote:
Sorry for all my questions. I am just trying to understand everything correctly so that I can reproduce.
Is this the content of quarto3.qmd ?
---format: titlepage-pdf: titlepage-bg-image: "logo4.png" titlepage-theme: bg-image-size: "1.8\textwidth" bg-image-left: "0\paperwidth" documentclass: article---
{r}for ( i in 1: 100){quarto_render( input= "quarto3.qmd", output_format = "pdf",execute = TRUE, output_file = stringr::str_glue("{Filename[i]}.pdf"), execute_params = list(ID = ID[i],RegionID=2))}
Which means your are calling quarto_render() from within a .qmd file, right ? So you do quarto render quarto3.qmd (or call the render button), and then you expect the same document to also be rendered by knitr by calling quarto_render() in the cell ?
Do I get it right ?
— Reply to this email directly, view it on GitHub https://github.com/quarto-dev/quarto-r/issues/210#issuecomment-2333498088, or unsubscribe https://github.com/notifications/unsubscribe-auth/AC7VIPEXR3UI6WVML2GXPSTZVFP2RAVCNFSM6AAAAABNVWCZV2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGMZTGQ4TQMBYHA . You are receiving this because you authored the thread.Message ID: @.***>
Hi,
I have attached my code in here as an example.
I have a title_page-test.qmd to generate pdf with title page. Using "render" button, I have the pdf file with title page.
In another .rmd file, I use quarto_render to render the document. It no longer provides me the title page.
Hope this is clear to you.
On Fri, 6 Sept 2024 at 18:13, Christophe Dervieux @.***> wrote:
Sorry for all my questions. I am just trying to understand everything correctly so that I can reproduce.
Is this the content of quarto3.qmd ?
---format: titlepage-pdf: titlepage-bg-image: "logo4.png" titlepage-theme: bg-image-size: "1.8\textwidth" bg-image-left: "0\paperwidth" documentclass: article---
{r}for ( i in 1: 100){quarto_render( input= "quarto3.qmd", output_format = "pdf",execute = TRUE, output_file = stringr::str_glue("{Filename[i]}.pdf"), execute_params = list(ID = ID[i],RegionID=2))}
Which means your are calling quarto_render() from within a .qmd file, right ? So you do quarto render quarto3.qmd (or call the render button), and then you expect the same document to also be rendered by knitr by calling quarto_render() in the cell ?
Do I get it right ?
— Reply to this email directly, view it on GitHub https://github.com/quarto-dev/quarto-r/issues/210#issuecomment-2333498088, or unsubscribe https://github.com/notifications/unsubscribe-auth/AC7VIPEXR3UI6WVML2GXPSTZVFP2RAVCNFSM6AAAAABNVWCZV2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGMZTGQ4TQMBYHA . You are receiving this because you authored the thread.Message ID: @.***>
The Yaml is for the quarto3.qmd. I am not calling quarto_render within this (I use "render" button to run this file only). The quarto_render function is coded in a separate .RMD.
Ok it makes sense. So in your first post above, the code block is not a single block. It is first a YAML which is the only content of the .qmd Then the R code of a cell in a Rmd file.
You could probably edit again to make this more clear.
In another .rmd file, I use quarto_render to render the document. It no longer provides me the title page.
Is there a reason to use .Rmd and not .qmd ? Just trying to get the all use case.
I'll try to reproduce based on the information provided
In fact you are also using an extension right ? where is titlepage-pdf
coming from ?
If so, did you open an issue in the extension repo already ?
We ask you to provide reproducible example to save time and avoid all this back and forth. Please provide all the necessary information, that will really help us !
I used the extension from this link: https://nmfs-opensci.github.io/quarto_titlepages/
I have not opened an issue in the extension repo. I thought it might have something to do with the metadata that the quarto-render does not recognise the YAML input of an image.
for why using knirt instead of a quarto, I have tried it by putting the same code from RMD to Quarto. It behaves the same way since both use knirt engine.
On Fri, 6 Sept 2024 at 19:05, Christophe Dervieux @.***> wrote:
In fact you are also using an extension right ? where is titlepage-pdf coming from ?
If so, did you open an issue in the extension repo already ?
We ask you to provide reproducible example to save time and avoid all this back and forth. Please provide all the necessary information, that will really help us !
— Reply to this email directly, view it on GitHub https://github.com/quarto-dev/quarto-r/issues/210#issuecomment-2333599372, or unsubscribe https://github.com/notifications/unsubscribe-auth/AC7VIPGIMTS7GNYBGIQVJT3ZVFV43AVCNFSM6AAAAABNVWCZV2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGMZTGU4TSMZXGI . You are receiving this because you authored the thread.Message ID: @.***>
Thank for the clarification.
To be honest, it would really help me (and save time) if you can provide a github repo with an example of what you are trying to do, or share a bundle zip you upload in this issue. This way, I'll be sure to try the same thing as you and understand you problem correctly;
Right now, I feel I need to try a few things and guess with my best knownledge - which honestly is not efficient and not the best way to help.
Thank you very much !
Hi,
I am writing a code to generate a document to pdf using Qarto- R with the set up of title page image.
YAML format is below: