question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Bibtex citations don't render properly inside of admonition/code blocks

See original GitHub issue

Building a jupyterbook page with a citation embedded in a admonition (possibly other notes too) prevents sphinxbibtex-contrib from correctly formatting the inline citations. This is not limited to the in-admonition citation, but extends to all citations throughout the book.

Scenarios tested: Build book without citation in admonition; then add citation command to admonition and build again: renders fine//works Build book with citation in admonition; does not work Build book with citation in admonition; remove citation command from admonition and build again: does not work Build book with citation in admonition; remove citation command from admonition; clean project and then build again: renders fine//works Build book with citation in admonition; remove citation command from admonition; clean project; build again; add citation command to admonition and build again: renders fine//works

Example code:

```{admonition} Coordinate reference systems
:class: note

{cite}`internatonalassociationofoilandgasproducersGeomaticsGuidanceNote2019`.
```

Bibtex file contents:

@misc{internatonalassociationofoilandgasproducersGeomaticsGuidanceNote2019,
  title = {Geomatics {{Guidance Note}} 7, Part 2 - {{Coordinate Conversions}} and {{Transformations}} Including {{Formulas}}},
  author = {{Internatonal Association of Oil and Gas Producers}},
  year = {2019},
  publisher = {{Internatonal Association of Oil and Gas Producers}}
}

Issue Analytics

  • State:open
  • Created 3 years ago
  • Comments:8 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
chrisjsewellcommented, Jan 6, 2021

Thanks, Do you mean you have tried with the latest sphinxcontrib-bibtex version? (>=2.1)

0reactions
emduprecommented, Oct 5, 2021

~Just to bump this as I think I’m seeing the same behavior with citations in figure captions~

EDIT: User error, sorry for the noise !

Read more comments on GitHub >

github_iconTop Results From Across the Web

Using BibTeX: a short guide - Toronto: Economics
BibTeX automates most of the work involved in managing references for use in LaTeX files. You need to type each reference only once,...
Read more >
Code blocks/fences within Admonitions render multiple times
Using code blocks within an admonition renders three copies of the block, weirdly enough twice before the description and once after.
Read more >
Changelog for pandoc-2.11 | Hackage - Haskell.org
This allows pandoc to convert between BibLaTeX and BibTeX and other bibliography formats, ... If a line of ms code block output starts...
Read more >
Special content blocks - Jupyter Book
Special content blocks#. A common use of directives and roles is to designate “special blocks” of your content. This allows you to include...
Read more >
mkdocs-gallery
Note: the folder can be located inside the usual mkdocs source folder: ... requires that you use the material theme from mkdocs-material to...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found