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

incompatibility with pandoc citations #53

Open
stevepowell99 opened this issue Jun 23, 2014 · 9 comments
Open

incompatibility with pandoc citations #53

stevepowell99 opened this issue Jun 23, 2014 · 9 comments

Comments

@stevepowell99
Copy link

With the minimal .Rmd file below, the div in which the references are placed floats off below the final knitrBookstrap credit at the bottom. (Note that to reproduce the problem, you have to actually have @kellogg_logic_2004 in the .bib file for the reference to be produced.)


---
output:
  knitrBootstrap::bootstrap_document

bibliography: "mybib.bib"

---

# a heading
# Bibliography

[@kellogg_logic_2004]

The bottom of the resulting html file looks like this:

<div class="references">
<p>Kellogg, W. K. 2004. “Logic Model Development Guide.”</p>
</div>
</body>
</html>
@jimhester
Copy link
Owner

Yes this will be an issue due to the way that knirBootstrap adds the wrapping divs. I know a way to fix this by using a rmarkdown template, just haven't had the time to actually do so. Thanks for reporting the bug!

@TanyaMurphy
Copy link

I would also really appreciate this fix. Thanks for starting it!

@srvanderplas
Copy link

I've managed to bypass this issue by injecting a bit of javascript into the document using the custom.header option as a temporary fix.

<script> window.onload = function() { x = document.getElementsByClassName('references') document.getElementById('References').parentNode.insertBefore(x[x.length-1], document.getElementById('References').nextSibling); } </script>

@jimhester
Copy link
Owner

Note this should be fixed in pull request #68 if you wanted to try it out with that. (Note it is not quite ready for release)

@srvanderplas
Copy link

Thank you very much!

That version actually fixed the problem I was originally searching for in
the issues; knitrBootstrap didn't work with the latest RStudio preview
release (I'm guessing the actual issue was pandoc/rmarkdown, but I didn't
get all that far in tracking it down).

It seems as if the TOC is gone, though - is that something that's been
removed for the time being?

On Thu, Oct 9, 2014 at 11:51 AM, Jim Hester [email protected]
wrote:

Note this should be fixed in pull request #68
#68 if you wanted to
try it out with that. (Note it is not quite ready for release)


Reply to this email directly or view it on GitHub
#53 (comment)
.

@jimhester
Copy link
Owner

Ah no it's not gone, it is just not on by default (just like the default
html_document). You can put it back with toc: true in your YAML block

On Thu, Oct 9, 2014 at 12:56 PM, Susan VanderPlas [email protected]
wrote:

Thank you very much!

That version actually fixed the problem I was originally searching for in
the issues; knitrBootstrap didn't work with the latest RStudio preview
release (I'm guessing the actual issue was pandoc/rmarkdown, but I didn't
get all that far in tracking it down).

It seems as if the TOC is gone, though - is that something that's been
removed for the time being?

On Thu, Oct 9, 2014 at 11:51 AM, Jim Hester [email protected]
wrote:

Note this should be fixed in pull request #68
#68 if you wanted to
try it out with that. (Note it is not quite ready for release)


Reply to this email directly or view it on GitHub
<
https://github.com/jimhester/knitrBootstrap/issues/53#issuecomment-58540044>

.


Reply to this email directly or view it on GitHub
#53 (comment)
.

@srvanderplas
Copy link

Ok, I figured that part out. Twas a bit harder to find the documentation
when not creating something from scratch.

It does seem like some of the previous highlighting has disappeared,
though. I've attached pictures to demonstrate; I'm totally fine with the
depth of the TOC changing, but I'm curious as to what's messing with the
css styling of the TOC panel.

Thanks for the help, btw. knitrBootstrap is awesome.

On Thu, Oct 9, 2014 at 12:06 PM, Jim Hester [email protected]
wrote:

Ah no it's not gone, it is just not on by default (just like the default
html_document). You can put it back with toc: true in your YAML block

On Thu, Oct 9, 2014 at 12:56 PM, Susan VanderPlas <
[email protected]>
wrote:

Thank you very much!

That version actually fixed the problem I was originally searching for
in
the issues; knitrBootstrap didn't work with the latest RStudio preview
release (I'm guessing the actual issue was pandoc/rmarkdown, but I
didn't
get all that far in tracking it down).

It seems as if the TOC is gone, though - is that something that's been
removed for the time being?

On Thu, Oct 9, 2014 at 11:51 AM, Jim Hester [email protected]
wrote:

Note this should be fixed in pull request #68
#68 if you wanted
to
try it out with that. (Note it is not quite ready for release)


Reply to this email directly or view it on GitHub
<

https://github.com/jimhester/knitrBootstrap/issues/53#issuecomment-58540044>

.


Reply to this email directly or view it on GitHub
<
https://github.com/jimhester/knitrBootstrap/issues/53#issuecomment-58540936>

.


Reply to this email directly or view it on GitHub
#53 (comment)
.

@jimhester
Copy link
Owner

@srvanderplas There were two bugs with the bootstrap_document. The TOC as you noted was not working as planned, and the highlighting was commented out. Please try installing from the latest version of #68. Also if you could please try out the simple_document format, as I am aiming to replace bootstrap_document with that by default.

@HenrikEckermann
Copy link

has this issue been fixed maybe? I just tried out knitr bootstrap. Very nice! But I won't write citations by hand from now again. Would be cool if citations will be supported!

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

5 participants