Skip to content

Lint: warn users about headers in divs in revealjs (was: Odd behavior in Print View) #5978

Open

Description

@baarthur

Bug description

Hello there,

I am trying to print my revealjs presentation, but when I press E to enter Print View mode, two slide titles appear above my first slide and I can't print it.

My current workaround is to print only slides 3-21. Any idea on what is happening?

image

Steps to reproduce

Presentation: https://baarthur.github.io/29iioa_slides/src/iioa_slide.html#/title-slide
Code: https://github.com/baarthur/29iioa_slides/blob/main/src/iioa_slide.qmd

Expected behavior

No response

Actual behavior

No response

Your environment

No response

Quarto check output

[✓] Checking versions of quarto binary dependencies...
Pandoc version 3.1.2: OK
Dart Sass version 1.55.0: OK
NOTE: Deno version 1.33.2 is too old. Please upgrade to 1.33.1 or later.
[✓] Checking versions of quarto dependencies......OK
[✓] Checking Quarto installation......OK
Version: 1.4.60
Path: /Applications/quarto/bin

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

[✓] Checking Python 3 installation....OK
Version: 3.9.6
Path: /Library/Developer/CommandLineTools/usr/bin/python3
Jupyter: (None)

  Jupyter is not available in this Python installation.
  Install with python3 -m pip install jupyter

[✓] Checking R installation...........OK
Version: 4.3.0
Path: /Library/Frameworks/R.framework/Resources
LibPaths:
- /Library/Frameworks/R.framework/Versions/4.3-arm64/Resources/library
knitr: 1.43
rmarkdown: 2.22

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

Activity

  1. added
    bug
    on Jun 19, 2023
  2. mcanouil commented on Jun 19, 2023

    @mcanouil
    Collaborator

    Did you follow https://quarto.org/docs/presentations/revealjs/presenting.html#print-to-pdf and/or https://revealjs.com/pdf-export/?

    You probably have a syntax error somewhere after "Methodology".

    Also, execute key does not have the following sub-keys:

    dev: png
    fig-format: retina
    fig-dpi: 700

    While fig-format and fig-dpi can be top-level options, dev: png is a knitr specific option, see https://quarto.org/docs/computations/r.html#knitr-options:

    knitr:
      opts_chunk:
        dev: png
  3. added
    revealjs
    on Jun 19, 2023
  4. mcanouil commented on Jun 19, 2023

    @mcanouil
    Collaborator

    As I thought, you can't embed h1/h2/h3 inside a div with slide content:

    WrongGood
    ## Methodology
    
    ::: {style="font-size: 0.7em"}
    
    ### First challenge: lack of regional data
    
    * Framework: Interregional Input-Output Setting (IIOAS)
      + @haddad2017a
      + Homogenous production and utility functions across regions
      + Consistent with national aggregates
      + 15 regions, 20 sectors
    * Trade matrices between regions
      + Supply: $TOTSUP := DOMSUP + EXP$
      + Exports data ($EXP$) known for each region and sector
      + Domestic supply ($DOMSUP$): labor microdata as proxy
    
    :::
    ## Methodology
    
    ### First challenge: lack of regional data
    
    ::: {style="font-size: 0.7em"}
    
    * Framework: Interregional Input-Output Setting (IIOAS)
      + @haddad2017a
      + Homogenous production and utility functions across regions
      + Consistent with national aggregates
      + 15 regions, 20 sectors
    * Trade matrices between regions
      + Supply: $TOTSUP := DOMSUP + EXP$
      + Exports data ($EXP$) known for each region and sector
      + Domestic supply ($DOMSUP$): labor microdata as proxy
    
    :::
    
    WrongGood
    ## Methodology
    
    ::: {style="font-size: 0.7em"}
    
    ### Second challenge: tourism is a cross-sector industry
    
    * Common approach: tourism satellite account (TSA)
      + Not available for the state
    
    * Our approach:
      + Estimate tourism shares in each sector and region
      + Tourism Characteristic Activities (TCA)s, classified by the state government
      + Sensitivity analysis + state survey
      + Apply shares as extraction coefficient
    
    Example: if 10% of a sector's output in a city is tourism-related, then 10% of the sector is extracted.
    :::
    ## Methodology
    
    ### Second challenge: tourism is a cross-sector industry
    
    ::: {style="font-size: 0.7em"}
    
    * Common approach: tourism satellite account (TSA)
      + Not available for the state
    
    * Our approach:
      + Estimate tourism shares in each sector and region
      + Tourism Characteristic Activities (TCA)s, classified by the state government
      + Sensitivity analysis + state survey
      + Apply shares as extraction coefficient
    
    Example: if 10% of a sector's output in a city is tourism-related, then 10% of the sector is extracted.
    :::
  5. removed
    bug
    on Jun 19, 2023
  6. added
    lint
    enhancement
    on Jun 20, 2023
  7. added this to the Future milestone on Jun 20, 2023
  8. changed the title [-]Odd behavior in Print View[/-] [+]Lint: warn users about headers in divs in revealjs (was: Odd behavior in Print View)[/+] on Jun 20, 2023
  9. cscheid commented on Jun 20, 2023

    @cscheid
    Member

    (Reopening this one as a good target for our future linting work. Ideally, we'd be able to tell users that this syntax isn't allowed.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementlintrevealjs

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions