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

Wrong title in revealjs when including a code block #6411

Closed
m-guggenmos opened this issue Aug 2, 2023 · 4 comments
Closed

Wrong title in revealjs when including a code block #6411

m-guggenmos opened this issue Aug 2, 2023 · 4 comments
Assignees
Labels
bug Something isn't working jupyter
Milestone

Comments

@m-guggenmos
Copy link

Bug description

If the following two conditions are met, the title of a revealjs presentation is erroneously set to the heading of the first slide:

  1. Using _quarto.yml to define the title
  2. Including a block of code in one of the slides

Steps to reproduce

_quarto.yml

project:
  output-dir: _slides
  render:
    - test.qmd

title: "My title"
author: "John Doe"

format: revealjs

test.qmd

## First slide heading

```{python}

```

Expected behavior

The title on the title slide is "My title".

Actual behavior

The title on the title slide is "First slide heading".

Your environment

  • VSCode version 1.80.1
  • Quarto Extension v1.90.0
  • OS: Ubuntu Linux

Quarto check output

[✓] Checking versions of quarto binary dependencies...
      Pandoc version 3.1.6: OK
      Dart Sass version 1.55.0: OK
      Deno version 1.33.4: OK
[✓] Checking versions of quarto dependencies......OK
[✓] Checking Quarto installation......OK
      Version: 1.4.251
      Path: /opt/quarto/bin

[✓] Checking basic markdown render....OK

[✓] Checking Python 3 installation....OK
      Version: 3.10.12
      Path: /usr/bin/python3
      Jupyter: 5.3.1
      Kernels: python3

[✓] Checking Jupyter engine render....OK

[✓] Checking R installation...........OK
      Version: 4.2.3
      Path: /usr/lib/R
      LibPaths:
        - ~/R
        - /usr/local/lib/R/site-library
        - /usr/lib/R/site-library
        - /usr/lib/R/library
      knitr: 1.42
      rmarkdown: 2.20

[✓] Checking Knitr engine render......OK
@m-guggenmos m-guggenmos added the bug Something isn't working label Aug 2, 2023
@mcanouil mcanouil added revealjs Issues with the revealjs format triaged-to Issues that were not self-assigned, signals that an issue was assigned to someone. labels Aug 2, 2023
@cderv cderv removed revealjs Issues with the revealjs format triaged-to Issues that were not self-assigned, signals that an issue was assigned to someone. labels Aug 22, 2023
@cderv
Copy link
Collaborator

cderv commented Aug 22, 2023

Thanks for the report. I can reproduce in a specific situation.

  • It happens with Jupyter engine and not knitr engine

  • It is not link to revealjs and it will also happen with format: html

  • _quarto.yml

title: "My title"
author: "John Doe"

format: html
  • index.qmd
## First slide heading

Some content

```{python}
1 + 1
```

title is correctly identified in the metadata

Starting python3 kernel...Done

Executing 'index.ipynb'
  Cell 1/1: ''...Done

pandoc 
  to: html
  output-file: index.html
  standalone: true
  section-divs: true
  html-math-method: mathjax
  wrap: none
  default-image-extension: png
  
metadata
  document-css: false
  link-citations: true
  date-format: long
  lang: en
  title: My title
  author: John Doe
  
Output created: index.html

but indeed the document move the ## as title, and overwrite it.

To me, this is a duplicated (or at least a variation) of

@dragonstyle I am assigning you on this as this is probably website related.
@cscheid I remember some discussion (but can't find it) about .qmd document for Jupyter with no title, and first header being used. So maybe you know where to look...

It seems here, we should at least consider the global title meta before using the ## as the title of the document.

@cderv cderv assigned dragonstyle and unassigned cderv Aug 22, 2023
@cderv cderv added the triaged-to Issues that were not self-assigned, signals that an issue was assigned to someone. label Aug 22, 2023
@dragonstyle dragonstyle added this to the v1.4 milestone Sep 20, 2023
@knuesel
Copy link
Contributor

knuesel commented Oct 5, 2023

I think I have a fix for this but it requires a bit more work (just a note to avoid duplicating efforts).

@mcanouil
Copy link
Collaborator

mcanouil commented Oct 5, 2023

Thank you @knuesel for letting us know and your future contribution!

@cderv cderv removed the triaged-to Issues that were not self-assigned, signals that an issue was assigned to someone. label Dec 14, 2023
@dragonstyle dragonstyle reopened this Dec 14, 2023
@dragonstyle
Copy link
Collaborator

This is actually not fixed in the referenced commit (it is more specifically a project title being present and should be dealt with separately).

dragonstyle added a commit that referenced this issue Feb 21, 2024
Improve the handling of notebook titles to prevent duplicate titles while still respecting project title.

Fixes #8798

Should be a more complete fix of:
9736af7

and a more proper fix for #6411
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working jupyter
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants