Skip to content
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

blog/making-pdf-with-quarto-typst-latex/ #23

Open
utterances-bot opened this issue Feb 20, 2024 · 5 comments
Open

blog/making-pdf-with-quarto-typst-latex/ #23

utterances-bot opened this issue Feb 20, 2024 · 5 comments
Labels
utterances Automated issue from utterances comment

Comments

@utterances-bot
Copy link

Making Pretty PDFs with Typst (and Quarto) | Nicola Rennie

With the latest 1.4 release of Quarto, it's now possible to create PDF documents with Quarto using Typst. How does it compare to LaTeX, and is it actually easier to learn and use?

https://nrennie.rbind.io/blog/making-pdf-with-quarto-typst-latex/

Copy link

Hi Nicola, thanks that was a useful resource. I am currently looking into using Typst/Quarto for reporting at work. One of the style "requirements" is to have a line separating the header and footer. Would you have an idea how this is done/can be done? I somehow fail to find the answer in the typst documentation.

Copy link
Owner

nrennie commented Feb 20, 2024

I don't think there's a built-in option to do it, but as long as you know the height of the header/footer, you can use the line function to draw a line: https://typst.app/docs/reference/visualize/line/

@nrennie nrennie added the utterances Automated issue from utterances comment label Feb 27, 2024
@nrennie nrennie transferred this issue from nrennie/nrennie.rbind.io Feb 27, 2024
Copy link

butames commented Mar 22, 2024

Thank you for introducing me to this resource. I used LaTeX sometime ago when I was in graduate school After doing my data analysis, writing out my work using LaTeX felt like an additional chore. I will look into Typst, it certainly looks more accessible. Thank you again.

Copy link

castedo commented Apr 28, 2024

A third approach is to not use LaTeX nor Typst at all and instead output HTML that can be rendered into a PDF using WeasyPrint. I can email you more details if you are interested. Quarto 1.4 by default outputs HTML with CSS that does not work (quarto-dev/quarto-cli#9510), but custom CSS that is print-reponsive could work similar to what is described here: quarto-dev/quarto-cli#9505

An interesting blog post might be contrasting the pros and cons of generating PDFs from print-responsive HTML vs using LaTeX/Typst.

@nrennie
Copy link
Owner

nrennie commented Apr 28, 2024

Thanks for the suggestion - I'm aware that you can convert from HTML to PDF (this post was focusing on PDF as a primary output rather than secondary). Personall, I normally use pagedjs rather than WeasyPrint (paged.js works out of the box with R Markdown via pagedown so I can use the code I already have from that).

See also this GitHub issue: quarto-dev/quarto-cli#6401

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
utterances Automated issue from utterances comment
Projects
None yet
Development

No branches or pull requests

5 participants