You can use CSS (Cascading Style Sheets) to designate custom fonts and attributes for H1-H6 headings within a Quarto PDF.
Here is an example CSS code snippet to change the font family and font size for H1-H6 headings:
h1 {
font-family: Arial, sans-serif;
font-size: 36px;
}
h2 {
font-family: Times New Roman, serif;
font-size: 24px;
}
h3 {
font-family: Verdana, sans-serif;
font-size: 18px;
}
h4 {
font-family: Georgia, serif;
font-size: 16px;
}
h5 {
font-family: Trebuchet MS, sans-serif;
font-size: 14px;
}
h6 {
font-family: Comic Sans MS, sans-serif;
font-size: 12px;
}
To use this CSS code, you can create a new file named "styles.css" (or any other name you prefer), and add this code to it. Then, save the file in the same directory as your Quarto project.
Next, you need to specify the path to the CSS file in your Quarto project configuration file (quarto.yml or quarto.json). Here is an example configuration setting for using the styles.css file:
assets:
css:
- styles.css
With this configuration, Quarto will include the styles.css file in the generated PDF, and the custom fonts and attributes will be applied to your H1-H6 headings.
Please start posting anonymously - your entry will be published after you log in or create a new account. This space is reserved only for answers. If you would like to engage in a discussion, please instead post a comment under the question or an answer that you would like to discuss
Asked: 2022-04-22 11:00:00 +0000
Seen: 11 times
Last updated: Oct 13 '21
What are the best Ways to compress a PDF?
What is the method to exhibit a complete pdf embedded in an iframe?
How can an image watermark be added over the text using jsPDF?
Why is the React Native PDF in the WebView displaying only its initial page?
How can a spreadsheet sheet be exported in csv and pdf formats?
What steps should I follow to produce a PDF file in my NestJS application using object or JSON data?
How can OpenXML SDK .docx files be transformed into PDF?
How can I use PdfSharp to retrieve the textual content from a PDF document in C#?