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

Note citations rendered in main text? #33

Closed
denismaier opened this issue Oct 31, 2018 · 10 comments
Closed

Note citations rendered in main text? #33

denismaier opened this issue Oct 31, 2018 · 10 comments

Comments

@denismaier
Copy link

I am just trying out asciidoctor-bibtex, and it looks like a very promising project. I am just wondering why citations in note styles are not rendered in footnotes, but end up in the main text. Is this a bug, a design choice, or am I making something wrong?

@ProgramFan
Copy link
Contributor

Do you mean the bibliography or the reference link? The reference link itself shall appear in footnotes at least if you are using asciidoctor-bib. But the bibliography has the main text as the only way to go, by definition.

@denismaier
Copy link
Author

The bibliography turns out in the main text, which is obviously correct. However, the reference links also appear in the main text.

Example:

We have this bib-file:

@book{test,
author = {Doe, John},
title = {Testbuch},
location = {Bern},
year = {2018},
}

And this example:

= Testdocument
:bibtex-style: chicago-note-bibliography

This will end with a citation.cite:[test]

bibliography::[]

Result with asciidoctor-bibtex:

<body class="article">
<div id="header">
<h1>Testdocument</h1>
</div>
<div id="content">
<div class="paragraph">
<p>This will end with a citation.D<a href="#test">oe&#44; <em>Testbuch</em></a>.</p>
</div>
<div class="paragraph">
<p><a id="test"></a>Doe, John. <em>Testbuch</em>, 2018.</p>
</div>
</div>
<div id="footer">
<div id="footer-text">
Last updated 2018-11-01 08:27:08 +0100
</div>
</div>
</body>

If we have this example that we process with pandoc:

= Testdocument
This will end with a citation.[@test]

Result:

<p>= Testdocument</p>
<p>This will end with a citation.<span class="citation" data-cites="test"><a href="#fn1" class="footnote-ref" id="fnref1"><sup>1</sup></a></span></p>
<div id="refs" class="references">
<div id="ref-test">
<p>Doe, John. <em>Testbuch</em>. Bern, 2018.</p>
</div>
</div>
<section class="footnotes">
<hr />
<ol>
<li id="fn1"><p>Doe, <em>Testbuch</em>.<a href="#fnref1" class="footnote-back">↩</a></p></li>
</ol>
</section>

I would have expected a similar behaviour in both engines. (Also note that it is quite strange that asciidoc-bibtex does not include the first letter in the reference link.)

@ProgramFan
Copy link
Contributor

What is the citation style? I usually use the IEEE style and the reference looks like [1] in the main texts.

@ProgramFan
Copy link
Contributor

ProgramFan commented Nov 1, 2018

There might be something wrong with the reference generated by citeproc-ruby.

@ProgramFan
Copy link
Contributor

I can reproduce this case with the chicago-note-bibliography style. The ieee style works fine. So I think this is defined by the style itself and is not actually a bug. You can use the IEEE style (or other numerical styles) to get a similar result as of pandoc.

@ProgramFan
Copy link
Contributor

The problem of missing first char in link is resolved by feed91e.

@denismaier
Copy link
Author

Well, the problem is that CSL-styles usually fall in two categories: note styles vs. in-text styles. This should be taken into account by CSL processors, but I guess that citeproc-ruby ignores the citation style class.

@denismaier
Copy link
Author

By the way, the same happens with asciidoc-bib and asciidoctor-bibliograpy. I have the impression that they all use citeproc-ruby in the background so this might be the place to fix this, right?

@ProgramFan
Copy link
Contributor

citeproc.process only returns the citation text, and I did't find ways to distinguish this 'footnote' style from other non-numeric styles.

@denismaier
Copy link
Author

Ok. So this really seems to be a citeproc-ruby issue. (There seem to be other footnote related issues also, like missing ibids.)

Would it be possible to introduce a new document attribute, like citation-location: note / citation-location: in-text? (This is, of course, not the best solution since this would mean implementing similar functionality twice.)

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