Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hyperlink reference in Conceptual Analysis #1264

Open
stefjoosten opened this issue Dec 2, 2021 · 5 comments
Open

Hyperlink reference in Conceptual Analysis #1264

stefjoosten opened this issue Dec 2, 2021 · 5 comments
Assignees
Labels
bug Indicates an unexpected problem or unintended behavior component:generating functional designs priority:normal

Comments

@stefjoosten
Copy link
Contributor

What happened

I generated a Word document from an Ampersand script. It documents a rule as follows:
afbeelding

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

@stefjoosten stefjoosten added priority:normal bug Indicates an unexpected problem or unintended behavior component:generating functional designs labels Dec 2, 2021
@hanjoosten
Copy link
Member

Xreferences are broken loooooooong time. We are still waiting for this PR to hit the road.

@stefjoosten
Copy link
Contributor Author

stefjoosten commented Dec 3, 2021

@lierdakil, Nikolay, are there any plans to make Pandoc references work in the near future?

@lierdakil
Copy link

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?

@hanjoosten
Copy link
Member

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:

  • Some anchor for each of these things. Per type, we want them to be numberd.
  • A reference to such an anchor, containing the type and number of the referenced thing.

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.

@stefjoosten
Copy link
Contributor Author

Oops

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Indicates an unexpected problem or unintended behavior component:generating functional designs priority:normal
Projects
None yet
Development

No branches or pull requests

3 participants