Reputation: 2279
I have written a document in markdown, and I am having problem referencing a fenced code block. When I write the block as
```sql
SELECT Name
FROM STUDENT
WHERE Id = 987654321
```
and compile to pdf format with pandoc. The output looks like the image below
I want to be able to reference it, so reading the docs I changed the code block like this:
```{#query1, .sql}
SELECT Name
FROM STUDENT
WHERE Id = 987654321
```
Now compiling again gives the following: (I have tried compiling with and without --listing option)
which does not look good and also does not help in referencing to the code block.
I am using pandoc 2.5, and vim-pandoc, vim-pandoc-syntax plugins with vim 8.2 on Focal Fossa.
Upvotes: 1
Views: 1142
Reputation: 22609
There must be no comma between the id and the class:
```{#query1 .sql}
SELECT Name
FROM STUDENT
WHERE Id = 987654321
```
Upvotes: 1