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

[BUG] Citations not rendered #2031

Open
leoauri opened this issue Jul 29, 2024 · 2 comments
Open

[BUG] Citations not rendered #2031

leoauri opened this issue Jul 29, 2024 · 2 comments
Assignees
Labels

Comments

@leoauri
Copy link

leoauri commented Jul 29, 2024

Describe the bug
I preview a markdown document with citations. The citations are not rendered.

Environment

  • OS: macOS Version 14.2.1
  • VSCode: Version: 1.91.0 (Universal)
  • Markdown Preview Enhanced: v0.8.13

To Reproduce
Steps to reproduce the behavior:

  1. Create a .md file such as:
---
title: test
bibliography: bib.bib
---

Hello @heBagTricksImage2018

[@heBagTricksImage2018] doesn't work either
  1. Create a bib.bib file in the same directory such as:
@misc{heBagTricksImage2018,
  title = {Bag of {{Tricks}} for {{Image Classification}} with {{Convolutional Neural Networks}}},
  author = {He, Tong and Zhang, Zhi and Zhang, Hang and Zhang, Zhongyue and Xie, Junyuan and Li, Mu},
  year = {2018},
  month = dec,
  number = {arXiv:1812.01187},
  eprint = {1812.01187},
  primaryclass = {cs},
  publisher = {arXiv},
  urldate = {2023-11-02},
  abstract = {Much of the recent progress made in image classification research can be credited to training procedure refinements, such as changes in data augmentations and optimization methods. In the literature, however, most refinements are either briefly mentioned as implementation details or only visible in source code. In this paper, we will examine a collection of such refinements and empirically evaluate their impact on the final model accuracy through ablation study. We will show that, by combining these refinements together, we are able to improve various CNN models significantly. For example, we raise ResNet-50's top-1 validation accuracy from 75.3\% to 79.29\% on ImageNet. We will also demonstrate that improvement on image classification accuracy leads to better transfer learning performance in other application domains such as object detection and semantic segmentation.},
  archiveprefix = {arXiv},
  langid = {english},
  keywords = {Computer Science - Computer Vision and Pattern Recognition},
  file = {/Users/leoauri/Zotero/storage/NGFUMQ32/He et al. - 2018 - Bag of Tricks for Image Classification with Convol.pdf}
}
  1. (optional) add
    "markdown-preview-enhanced.pandocArguments": [
       "--citeproc", 
    ]

to settings.json (don't know if this is supposed to be done).

  1. click "Markdown Preview Enhanced: Open Preview to the Side"

Expected behavior
See a preview with the citations rendered.

Actual behaviour
See a preview with citations in @thisFormat2024 (unrendered) and no references at the end.

Help?

@leoauri
Copy link
Author

leoauri commented Jul 30, 2024

# pandoc --version
pandoc 3.2.1
Features: +server +lua
Scripting engine: Lua 5.4
User data directory: /Users/leoauri/.local/share/pandoc
Copyright (C) 2006-2024 John MacFarlane. Web: https://pandoc.org
This is free software; see the source for copying conditions. There is no
warranty, not even for merchantability or fitness for a particular purpose.
# man pandoc
...
       -C, --citeproc
              Process the citations in the file, replacing them with rendered
              citations and adding a bibliography.  Citation processing will
...

@leoauri
Copy link
Author

leoauri commented Jul 30, 2024

Solution: setting markdown-preview-enhanced.usePandocParser made it work. This isn't mentioned on the docs citations page, and for people unfamiliar with the plugin, I think it needs to be.

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

No branches or pull requests

2 participants