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

Issues with Citations and Pandoc #8136

Open
maurerle opened this issue Jun 19, 2022 · 9 comments
Open

Issues with Citations and Pandoc #8136

maurerle opened this issue Jun 19, 2022 · 9 comments

Comments

@maurerle
Copy link
Contributor

Explain the problem.
I am using a markdown file with bibliography and convert to a revealjs presentation:
pandoc -s --bibliography biblio.bib --citeproc CITATIONS -t revealjs -o example24a.html

as taken from the examples (except for revealjs).

This presents some issues:

  1. references are not split across multiple pages if needed
    • of course this is not the case with normal bullet points either, but you can't edit this for references?
    • this should also be fixed for beamer output
  2. links are not clickable, even with link-citations: true
    • this works properly with beamer output, but not with revealjs

I would suggest to create an option of citation-presentation-count to have only 3 references per page?
Any other suggestion? Currently the references are not really usable for presentations (beamer and revealjs) with more than 3 sources listed.
But I'd really love to have this integrated.

Pandoc version?
What version of pandoc are you using, on what OS?

pandoc 2.18 on Debian 11

@maurerle maurerle added the bug label Jun 19, 2022
@maurerle
Copy link
Contributor Author

I solved this issue for my use case by adding the following to my style.css for revealjs:

.references {
  font-size: 0.5em;
  text-align: left;
}

Might be helpful for others.
Yet a more general solution is still needed, as this only fits my 10ish sources and is not very generic

@jgm
Copy link
Owner

jgm commented Jun 19, 2022

The solution for beamer is to put the class allowframebreaks on your references slide:

# References {#refs .allowframebreaks}

@jgm
Copy link
Owner

jgm commented Jun 19, 2022

I don't know if there is anything like allowframebreaks for reveal.js, but if so that could be a solution to 1.

I'm not sure about 2 -- link-citations ought to work in reveal.js. Looks like there's a bug, we're getting links that look like

href="#/ref-foo_1938"

instead of

href="#ref-foo_1938"

@jgm
Copy link
Owner

jgm commented Jun 19, 2022

Hm, looks like that code is there intentionally in the HTML writer:

                        let s' = case T.uncons s of       
                                   Just ('#',xs) -> let prefix = if slideVariant == RevealJsSlides
                                                             then "/"
                                                             else writerIdentifierPrefix opts                                       
                                             in  "#" <> prefix <> xs         
                                   _ -> s                        

Added by a405b81 in response to #835.

@jgm
Copy link
Owner

jgm commented Jun 19, 2022

See https://revealjs.com/links/
However, this doesn't seem to work in my tests. Perhaps it only works if the link is to an identifier on a section?

@jgm
Copy link
Owner

jgm commented Jun 19, 2022

This seems to be an odd limitation in reveal.js -- you can link to a section (slide) but not to something within one. Pandoc uses a generic method when you select link-citations, and this links to the citation itself, not the references slide, so this won't work with reveal.js.

@jgm
Copy link
Owner

jgm commented Jun 19, 2022

A more general CSS solution for the references slide is

#refs {
    height: 800px;
    overflow-y: auto !important;
}

which will give you a scroll bar.

@metaspace
Copy link

@maurerle did you ever find a way to paginate the references?

@maurerle
Copy link
Contributor Author

maurerle commented Sep 1, 2023

No, I either use the scrollbar or make the text on the citation slide smaller.

But at least linking to references now works properly in reveal.js :)

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

No branches or pull requests

4 participants