LaurentRDC / pandoc-plot

Render and include figures in Pandoc documents using your plotting toolkit of choice
https://laurentrdc.github.io/pandoc-plot/
GNU General Public License v2.0
216 stars 8 forks source link

pandoc-plot does not work properly with new pandoc citeproc version #21

Closed VolkovIlia closed 3 years ago

VolkovIlia commented 3 years ago

Modern pandoc has relapsed pandoc-crossref filter by-C pandoc parameter. So if I use command pandoc -t ms --highlight-style=kate -F pandoc-plot -s -C -o "$base".pdf "$file" and try to refer plot:

```{#plot .matplotlib caption='Some awesome caption' }
import numpy as np
import matplotlib.pyplot as plt

np.random.seed(23)

# Compute areas and colors
N = 150
r = 2 * np.random.rand(N)
theta = 2 * np.pi * np.random.rand(N)
area = 200 * r**2
colors = theta

fig = plt.figure()
ax = fig.add_subplot(111, projection='polar')
c = ax.scatter(theta, r, c=colors, s=area, cmap='hsv', alpha=0.75)

And refer to [@plot], I got error citeproc: citation plot not found

But -C is after -F pandoc-plot

How to fix it?

LaurentRDC commented 3 years ago

Hi Ilia,

Thank you for your report. It also doesn't work for me. In my testing I've only ever used pandoc-crossref.

I will figure out how to get citeproc to work and release a new version in the next few days.

LaurentRDC commented 3 years ago

Actually as I am reading the documentation, it doesn't seem like you can use citeproc to reference objects like code blocks and images.

Are you sure that citeproc can be used instead of pandoc-crossref?

VolkovIlia commented 3 years ago

Sry my fault( Thought its the same filters >.< Spaghetti Brain)) trying to adapt pandoc for my thesis propose. Sry again!)

LaurentRDC commented 3 years ago

No problem! :)