I'm having some trouble including a LaTeX figure following the documentation at https://quarto.org/docs/authoring/figures.html#pgftikz-graphics.

When using the latest version of Quarto,

```
$ quarto --version
0.9.133
```

it seems that including a LaTeX figure without a caption crashes when rendering:

```
![](fig.tex)
```

However, it doesn't crash if there is a figure caption:

```
![With a caption](fig.tex)
```

I created this test package [texfigtest.zip](https://github.com/quarto-dev/quarto-cli/files/8347624/texfigtest.zip) to reproduce the issue. Running

```
$ quarto render texfigtest.md --to pdf
```

crashes with the following stack trace:

```
Error running filter /Applications/quarto/share/filters/quarto-post/quarto-post.lua:
...cations/quarto/share/filters/quarto-post/quarto-post.lua:640: attempt to call a nil value (global 'asLatexSize')
stack traceback:
	...cations/quarto/share/filters/quarto-post/quarto-post.lua:778: in function <...cations/quarto/share/filters/quarto-post/quarto-post.lua:772>
```

Thanks so much! I appreciate any help you can provide!
2022-03-25T05:29:13Z
bechang
closed
Including a LaTeX figure without a caption crashes when rendering
https://github.com/quarto-dev/quarto-cli/issues/461