quarto-dev / quarto-cli

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

Footnote in figure caption crashes PDF render #1141

Open fuhrmanator opened 2 years ago

fuhrmanator commented 2 years ago

Bug description

When using a footnote inside a figure caption, Quarto crashes.

I'm converting a pandoc book to Quarto, and I was previously able to use a footnote inside a caption in Pandoc:

![Here's a caption[^1].](images/example.jpg)

[^1]: Here's a footnote.

But it crashes when I try this in quarto, because (I suspect) the footnote is inside the caption (and maybe something's not being escaped properly?):

Latexmk: If appropriate, the -f option can be used to get latexmk
  to try to force complete processing.
Reverting Windows console CPs to (in,out) = (437,65001)
Error producing PDF.
! Argument of \caption@ydblarg has an extra }.
<inserted text>
                \par
l.794   footnote.}.}

I'm running quarto on Windows 10.

quarto check

[>] Checking Quarto installation......OK
      Version: 0.9.577
      Path: C:\Users\fuhrm\AppData\Local\Programs\Quarto\bin\
      CodePage: unknown

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

[>] Checking Python 3 installation....OK
      Version: 3.10.2
      Path: C:/Python310/python.exe
      Jupyter: (None)

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

[>] Checking R installation...........(None)

      Unable to locate an installed version of R.
      Install R from https://cloud.r-project.org/

Checklist

dragonstyle commented 2 years ago

Some notes as I looked into this a little: