Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions news/changelog-1.6.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ All changes included in 1.6:
- Remove wrong `sourceMappingUrl` entry in SASS built css.
- ([#7715](https://github.com/quarto-dev/quarto-cli/issues/7715)): Revealjs don't support anymore special Pandoc syntax making BulletList in Blockquotes become incremental list. This was confusing and unexpected behavior. Supported syntax for incremental list is documented at <https://quarto.org/docs/presentations/revealjs/#incremental-lists>.
- ([#9742](https://github.com/quarto-dev/quarto-cli/issues/9742)): Links to cross-referenced images correctly works.
- ([#8012](https://github.com/quarto-dev/quarto-cli/issues/8012)): Don't perform notebook title fixup with `format: revealjs` as this would create a new undesired title slide.

## `typst` Format

Expand Down
10 changes: 8 additions & 2 deletions src/core/jupyter/jupyter-fixups.ts
Original file line number Diff line number Diff line change
Expand Up @@ -164,9 +164,15 @@ export function fixupFrontMatter(nb: JupyterNotebook): JupyterNotebook {
}
});

// if we have front matter and a title then we are done
const yaml = partitioned ? readYamlFromMarkdown(partitioned.yaml) : undefined;
if (yaml?.title) {
if (
// if we have front matter and a title then we are done
yaml?.title ||
// if we have front matter and it has revealjs as a format then we are done too
(yaml?.format !== null &&
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the idea of this is that a python user with existing notebooks may want to render them using quarto render foo.ipynb --to html or similar commands and get a reasonable experience. Since it is common to place a heading as the 'title' of the notebook in a markdown cell at the top of the notebook, we're trying to find the best way to promote that to the document title in Quarto.

It's pretty tempting to just that if the user creates front matter at all, they should place a title there (not just for revealJS - just that once they're making front matter we expect them to handle the title)...

We could start with this if you're feeling conservative.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The revealjs specific case is that

  • Using title will trigger the use of a specific title-slide sectionf from the revealjs template
  • To opt out this title slide from the template, no providing title in YAML is for now the way to go.

Currently it seems you can't do that with engine: jupyter, or at least that we promote headers like ## without considering the slide-level, meaning that a non section slide could be promoted to section slide.

This is something quite specific to revealjs here related to this heading promoting feature. 🤔

(yaml?.format === "revealjs" ||
(typeof yaml?.format === "object" && "revealjs" in yaml?.format)))
) {
return nb;
}

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
---
format: revealjs
_quarto:
tests:
revealjs:
ensureHtmlElements:
- ['div.slides > section#custom:first-child']
- []
ensureFileRegexMatches:
- []
- []
---

## My Title slide {#custom .center}

Some content


## Python slide

```{python}
print(2+2)
```

Loading