Open stefjoosten opened 2 years ago
Xreferences are broken loooooooong time. We are still waiting for this PR to hit the road.
@lierdakil, Nikolay, are there any plans to make Pandoc references work in the near future?
There are some issues with "that PR", and I doubt I'll find the time to whip it into shape particularly soon (it's been like this for a while). That said, @hanjoosten, if you explain what the issue is, perhaps we'll be able to just hack something into the stable branch?
In short, a user of Ampersand compiles a specification written in our DSL. The user can generate a document based on his specification. We programatically generate a Pandoc data structure, representing that document.
The document can contain several things, that we want to have a cross references to. These things have types, such as definition
, expression
, image
etc. So in the document we want to be able to generate:
It has been some time ago that I wrote the code for this. Each of the above types has its own datatype in the Haskell code. So I think I need something like
class Xreferenceble a where
anchor :: a -> Inline
referTo :: a -> Inline
In writing the instances for each of the types, I hope to use definitions from pandoc-crosref. Our current implementation doesn't give the required results, as @stefjoosten pointed out. @lierdakil , I would very much appreciate if you could hack something into the stable branch of pandoc-crosref.
Oops
What happened
I generated a Word document from an Ampersand script. It documents a rule as follows:
What I expected
I expected to see a readable name. I used Ampersand-v4.6.1
Observations
The file 'SharedAmongChapters.hs' shows this piece of code:![afbeelding](https://user-images.githubusercontent.com/275768/144418284-987ef983-15b6-4422-8604-18c27af6aae9.png)