quarto-dev / quarto-cli

Open-source scientific and technical publishing system built on Pandoc.
https://quarto.org
Other
3.92k stars 324 forks source link

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

Open baarthur opened 1 year ago

baarthur commented 1 year ago

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:

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

mcanouil commented 1 year ago

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
mcanouil commented 1 year ago

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

WrongGood
````qmd ## 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 ::: ```` ````qmd ## 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
```qmd ## 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. ::: ``` ````qmd ## 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. ::: ````
cscheid commented 1 year ago

(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.)