Skip to content
This repository has been archived by the owner on Apr 30, 2021. It is now read-only.

References div conflicts with --section-divs #176

Closed
adunning opened this issue Sep 29, 2015 · 2 comments
Closed

References div conflicts with --section-divs #176

adunning opened this issue Sep 29, 2015 · 2 comments

Comments

@adunning
Copy link
Contributor

With pandoc 1.15.0.6 and pandoc-citeproc 0.7.4, entitling the references section 'References' now results in a duplicated ID, and it is no longer structured as a section in HTML5:

pandoc -F pandoc-citeproc -t html5 --section-divs << EOT

---
references:
- id: test
...

# Test

@test

# References

EOT

Result:

<section id="test" class="level1">
<h1>Test</h1>
<p><span class="citation" data-cites="test">(n.d.)</span></p>
<div id="references" class="references">
<h1 id="references" class="unnumbered">References</h1>
<div id="ref-test">
<p>n.d.</p>
</div>
</div>
</section>

Result with pandoc-citeproc 0.7.3 (expected):

<section id="test" class="level1">
<h1>Test</h1>
<p><span class="citation" data-cites="test">(n.d.)</span></p>
</section>
<section id="references" class="level1 references unnumbered">
<h1>References</h1>
<div id="ref-test">
<p>n.d.</p>
</div>
</section>
@adunning
Copy link
Contributor Author

One can get around the sectioning issue for now by adding a comment after the References heading, but the heading will not be marked as unnumbered:

---
references:
- id: test
...

# Test

@test

# References

<!-- This is the references section. -->

Result:

<section id="test" class="level1">
<h1>Test</h1>
<p><span class="citation" data-cites="test">(n.d.)</span></p>
</section>
<section id="references" class="level1">
<h1>References</h1>
<!-- This is the references section. -->
<div id="references" class="references">
<div id="ref-test">
<p>n.d.</p>
</div>
</div>
</section>

Similarly, the section appears if the position of the references div is specified, but it will not be given a class:

---
references:
- id: test
...

# Test

@test

# References

<div id="references"></div>

Result:

<section id="test" class="level1">
<h1>Test</h1>
<p><span class="citation" data-cites="test">(n.d.)</span></p>
</section>
<section id="references" class="level1">
<h1>References</h1>
<div id="references">
<div id="ref-test">
<p>n.d.</p>
</div>
</div>
</section>

jgm added a commit that referenced this issue Oct 12, 2015
This interacts better with pandoc's `--section-divs` feature.

Partially addresses #176.

The issue of the duplicate ID is still not addressed.
@jgm jgm closed this as completed in a433c09 Oct 12, 2015
@adunning
Copy link
Contributor Author

Thank you!

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

No branches or pull requests

1 participant