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

Make sure ids go on the elements they actually belong on #285

Open
vincerubinetti opened this issue Dec 12, 2019 · 1 comment
Open

Make sure ids go on the elements they actually belong on #285

vincerubinetti opened this issue Dec 12, 2019 · 1 comment

Comments

@vincerubinetti
Copy link
Collaborator

In response to #284, I think it's very important that the ids of things go on the actual element they should be on, and nothing else.

The HTML for figures looks like this:

image

There is no reason for the extra <div>. All of its attributes -- including the id -- should go on the <figure> element.

The HTML for references looks like this:

image

The id should go on the <p> and the containing <div> is not necessary.

This would get rid of the modifications and checks I have to do in the plugins, as mentioned in #284, and would lead to much simpler, cleaner, more intuitive, and more predictable output.

I don't know what changed, whether it was pandoc, fignos, or something we did. But I really think we need to do everything we can to enforce this behavior, even if it means maintaining our own fork of fignos that puts the id in a sensible place.

@dhimmel
Copy link
Member

dhimmel commented Dec 13, 2019

Regarding the ids for figures and tables, see jgm/pandoc#684 (comment), tomduck/pandoc-fignos#65, and tomduck/pandoc-tablenos#11. I think the issue is that pandoc doesn't support setting ids for all attributes. Therefore, pandoc-fignos is forced to adopt the div workaround (there is no way to put the id on the figure element).

Regarding the references and putting the id on the paragraph, I'm guessing that is a pandoc decision. You could open an issue on Pandoc, although I'm not sure what considerations went into using the div.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants