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鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improve title snipping in notebooks for revealjs #8016
base: main
Are you sure you want to change the base?
Conversation
// 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 && |
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 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.
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.
The revealjs specific case is that
- Using
title
will trigger the use of a specifictitle-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. 馃
BY the way the |
OK so it seems this is more complex that it seems. This I am even not sure that the new addition in 24672a4 about not stripping header if content before heading ( I'll leave this as draft for further work together on this, and open smaller PR for immediate issues found |
Don't perform notebook title fixup with `format: revealjs` as this would create a new undesired title slide. Follow up on 24672a4
9f0c42f
to
42cd1a8
Compare
fixes #8012
Doing a title snipping when
engine: jupyter
is a bit too much forrevealjs
format because this will create a new title slide whereas when notitle
is provided, it should be considered custom first slide per our doc: https://quarto.org/docs/presentations/revealjs/index.html#title-slideSo I suggest we do not strip in Revealjs format.
Just asking for review because I don't fully understand why we do this stripping.
Does it sounds good ?
We also use the function for stripping at
quarto-cli/src/core/pandoc/pandoc-partition.ts
Lines 49 to 58 in 9f0c42f
So I need to check if we need also some support there... 馃
it seems used for special cases like embed feature and some unused function