-
Notifications
You must be signed in to change notification settings - Fork 908
Update doc on partials to include new LaTeX and Beamer partials available in 1.7 #1645
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
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is missing file in freezer it seems when I rendered incrementally the page using Quarto pre-release
🚀 Deployed on https://deploy-preview-1645.quarto.org |
I think it should be ok for us to update the blog post. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks good. A few wording edits and re-ordering suggestions in the comments.
Can you draft a paragraph for the highlights (and same for blog) and I can review before we merge this all in?
pandoc.tex | ||
|
||
: This includes configuration for most pandoc feature like text highlighting, tables, graphics, tight lists, citations, and header includes. In general, this partial must always be included within your custom template. In some circumstances, you may know that certain capabilities will not be needed, so you this partial is further composed of the following partials, which could be used if sensible: | ||
|
||
|
||
::: {style="margin-left: 2em;"} | ||
|
||
tables.tex | ||
|
||
: Provides configuration for the output of tables, table captioning, and footnotes within tables. | ||
|
||
graphics.tex | ||
|
||
: Provides image scaling and placement configuration. | ||
|
||
citations.tex | ||
|
||
: When using CSL references, provides configuration and commands for outputting the bibliography. | ||
|
||
babel-lang.tex | ||
|
||
: When `lang` option is used, provides configuration and command for babel support and other language related LaTeX configuration. | ||
|
||
tightlist.tex | ||
|
||
: Provides the tight list command. | ||
|
||
biblio-config.tex | ||
|
||
: Provides natbib or biblatex configurations. Instead of providing an empty partial to opt-out those configurations (e.g. for a custom format where a specific documentclass handles it already), use `biblio-config: false` for your document configuration. | ||
|
||
::: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like the indentation to provide context that these partials are used inside pandoc.tex
.
Should we also nest pandoc.tex
under common.latex
, since that is where it is used?
@@ -0,0 +1,99 @@ | |||
Since Quarto 1.7 providing Pandoc 3.6.3, there are two sets of partials: Quarto's specific partials and Pandoc's partials. The source directory contains both: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since Quarto 1.7 providing Pandoc 3.6.3, there are two sets of partials: Quarto's specific partials and Pandoc's partials. The source directory contains both: | |
Starting with Quarto 1.7, which provides Pandoc 3.6.3, there are two sets of partials: those specific to Quarto and those inherited from Pandoc. The source directory contains: |
@@ -0,0 +1,99 @@ | |||
Since Quarto 1.7 providing Pandoc 3.6.3, there are two sets of partials: Quarto's specific partials and Pandoc's partials. The source directory contains both: | |||
|
|||
- partials with `.latex` extension are the one inherited from Pandoc, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- partials with `.latex` extension are the one inherited from Pandoc, | |
- partials with `.latex` extension that are inherited from Pandoc, |
Since Quarto 1.7 providing Pandoc 3.6.3, there are two sets of partials: Quarto's specific partials and Pandoc's partials. The source directory contains both: | ||
|
||
- partials with `.latex` extension are the one inherited from Pandoc, | ||
- partials with `.tex` extension are the one provided by Quarto directly to offer more granular customization. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- partials with `.tex` extension are the one provided by Quarto directly to offer more granular customization. | |
- partials with `.tex` extension that are provided by Quarto directly for more granular customization. |
- partials with `.latex` extension are the one inherited from Pandoc, | ||
- partials with `.tex` extension are the one provided by Quarto directly to offer more granular customization. | ||
|
||
Quarto's partials and main template are based upon original template and partials from Pandoc - a copy of the file is kept in our source as reference when it was modified to fit Quarto's organization. Those files are: `latex.template` for the main template used as `template.tex` containing all the partials, and `latex.common` for the original version of `common.latex` as the original partial from Pandoc is tweaked to support Quarto's more specific partials. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perhaps this paragraph should move to after the list of all the partials. I.e. it's about some files you might see in the source code, but aren't available for replacement.
Quarto's partials and main template are based upon original template and partials from Pandoc - a copy of the file is kept in our source as reference when it was modified to fit Quarto's organization. Those files are: `latex.template` for the main template used as `template.tex` containing all the partials, and `latex.common` for the original version of `common.latex` as the original partial from Pandoc is tweaked to support Quarto's more specific partials. | |
A copy of some of Pandoc's original files are also kept in Quarto's source as a reference. These files are: `latex.template`, the main template used as `template.tex` containing all the partials; and `latex.common` the original version of `common.latex`, which is tweaked to support Quarto's more specific partials. |
|
||
hypersetup.latex | ||
|
||
: Contains `\hypersetup` command configuration. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
: Contains `\hypersetup` command configuration. | |
: Contains the `\hypersetup` command configuration. |
@@ -64,7 +64,9 @@ format: | |||
|
|||
When Quarto renders a document with a partial, it will use the built in template but replace a portion of the template with the provided partial. In the above case, the LaTeX title will be replaced with the implementation provided as the partial, while the rest of the built in template will be used. | |||
|
|||
Note that the name of the partial files is important. You choose which portion of the template to replace by providing a partial with that name. You can see the list of partials available in [HTML Partials] and [LaTeX Partials] below. | |||
Note that the name of the partial files is important. You choose which portion of the template to replace by providing a partial with that name. Providing an empty file as a partial is a way to opt out some insertion without modifying the whole main template. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note that the name of the partial files is important. You choose which portion of the template to replace by providing a partial with that name. Providing an empty file as a partial is a way to opt out some insertion without modifying the whole main template. | |
The name of the partial file is important. You choose which portion of the template to replace by providing a partial with that name. Providing an empty file as a partial is a way to opt out of some features without modifying the whole main template. |
Note that the name of the partial files is important. You choose which portion of the template to replace by providing a partial with that name. You can see the list of partials available in [HTML Partials] and [LaTeX Partials] below. | ||
Note that the name of the partial files is important. You choose which portion of the template to replace by providing a partial with that name. Providing an empty file as a partial is a way to opt out some insertion without modifying the whole main template. | ||
|
||
You can see the list of partials available for each format below: [LaTeX Partials], [Typst Partials], [HTML Partials] and [Revealjs Partials]. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we agreed we'd use explicit links in the docs. Also, add Beamer here.
|
||
: Provides the tight list command. | ||
See the [full source code](https://github.com/quarto-dev/quarto-cli/blob/main/src/resources/formats/pdf/pandoc/template.tex) for the Quarto LaTeX template to see how these partials are invoked by default. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe this belongs near the top of the list of partials. We might also mention that the partials are listed in the order in which they are included in template.tex
.
|
||
See the [full source code](https://github.com/quarto-dev/quarto-cli/blob/main/src/resources/formats/pdf/pandoc/template.tex) for the Quarto LaTeX template to see how these partials are invoked by default. | ||
See the [full source code](https://github.com/quarto-dev/quarto-cli/blob/main/src/resources/formats/beamer/pandoc/template.tex) for the Quarto Beamer template to see how these partials are invoked by default. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same comment applies here. Move this up.
This is the documentation update I needed to ship for 1.7
Do we want to add to the highlight ? I know the blog post is up but maybe we can still add to it.
Otherwise, I was thinking about doing a dedicated blog post.
https://deploy-preview-1645.quarto.org/docs/journals/templates.html#latex-partials