-
-
Notifications
You must be signed in to change notification settings - Fork 878
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Rendering R code blocks in Typst #2283
Comments
@aksigkvgithub could you share a full example of how you tried to use knitr for a typst document ? For now we have no specific support and I am curious of how you tried to use it. Especially an example related to
This would help be sure we understand correctly what you are trying to do. Also, just so you are aware, there is a tool called Quarto which uses knitr under the hook for R users, and it supports producing a typst output from a markdown syntax document (called a Within this Just sharing in case you don't know about it. We are still interested into your use case with (I suppose) |
Ok. I shall submit below the files created and obtained in the process, sequentially to make example workflow clrear:
If package "knitr" is successfully installed, it will simply load that library and show the R prompt. Otherwise it will throw some error message.
knitr::knit("2. ANCOVA in CRD.r.typ","2. ANCOVA in CRD.typ")
typst compile "2. ANCOVA in CRD.typ"
Thanks and regards, Dr. A.K. Singh |
Hi Dr. A.K. Singh @aksigkvgithub
I only passed caption and width, but possibilities are there, you can try your own things. The workflow I used is:
all files mentioned are packaged into this zip: |
Dear Sir,
You might be already aware of a new Typst markup language. It has very good math support and a good pdf rendering.
Fortunately, it has Markdown type source code block type. So, I tried to render R code block embedded into such an R code block in a Typst file, through knitr::knit() function , and then compiled this rendered file through Typst compiler.
Everything was rendered well into pdf of Typst except the image rendered by knitr in the/figure subdirectory, probably because knitr rendered Markdown type referencing and Typst has a different image referencing syntax.
So, I wish to know if the image referencing as per Typst syntax can be added into knitr for Typst file types.
Thanks and regards,
Dr. A. K. Singh
By filing an issue to this repo, I promise that
xfun::session_info('knitr')
. I have upgraded all my packages to their latest versions (e.g., R, RStudio, and R packages), and also tried the development version:remotes::install_github('yihui/knitr')
.I understand that my issue may be closed if I don't fulfill my promises.
The text was updated successfully, but these errors were encountered: