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

Display of the citations in the markdown doc. #14

Open
oolonek opened this issue Sep 21, 2020 · 11 comments
Open

Display of the citations in the markdown doc. #14

oolonek opened this issue Sep 21, 2020 · 11 comments

Comments

@oolonek
Copy link

oolonek commented Sep 21, 2020

Hi @notZaki !

Thanks for this nice plugin !
Would it be possible to dispaly citation as a footer after the .bib fetching ?
Just like with this Sublime plugin https://github.com/renerocksai/sublime_zk#location-of-your-bib-file (also uses Pandoc)

Thanks a lot !

PM

@notZaki
Copy link
Owner

notZaki commented Sep 23, 2020

Thanks for the suggestion.

Since I'm not familiar with multimarkdown, I will list what I think would have to be changed to support mmd, and you can correct me where I'm wrong:

  1. Show suggested citations after # instead of @
  2. Print a formatted bibliography as footnotes at some location (the end?) of the document
  3. There is no third thing

@oolonek
Copy link
Author

oolonek commented Oct 3, 2020

Hi @notZaki ! Yes actually I guess the point n. 2 is the most important !
I dont think point 1. is really useful.

Hope you can have a look sometime ! This would be an amazing add on.

How do you deal with bibliography display at the moment ?
I mean you developed a plugin to cite reference but do you display them at the end by an alternative way I might not have followed or you just don't care ?

@notZaki
Copy link
Owner

notZaki commented Oct 3, 2020

The current method to display bibliographies is through pandoc-citeproc. Some examples are also mentioned in demo 24 here.

The advantages of pandoc-citeproc is that it can format the citations, e.g. displaying it as [1] vs (Author et al. 2019), as well as formatting the bibliography to suit different standards/journals.

If you think point n.2 is still a useful feature, then I can try forking a separate extension for printing the bibliography at the end of the file.

@oolonek
Copy link
Author

oolonek commented Jan 12, 2021

@notZaki Hi yes still very much interested by feature n.2. :)

@SR--
Copy link

SR-- commented Jun 4, 2021

Thank for your efforts...

  1. What about showing all references in a file in a panel? No need to put them at the end of the document.
  2. What about rendering all formatted references in the Preview.

@aiva005
Copy link

aiva005 commented Aug 23, 2021

I have the same issue, and maybe it's a silly question... @notZaki thank you for the add-on, the "@" citation recognition works well, but I have the same series of questions as above./

How would I use pandoc-citeproc currently to render citations in VSCode? I'm using dendron + pandoc-citer in VSCode and I have the following dummy note "I like this article @bazerman_want_nodate". When I type @ it correctly recognises the citation library, but it still shows "I like this article @bazerman_want_nodate" in the preview. What am I doing wrong?

I think, I would love the n.2 as per the above list—but failing that, what obvious part am I missing to have a functional work-around now?

Thanks!
ai

@notZaki
Copy link
Owner

notZaki commented Aug 26, 2021

@aiva005
Citeproc can convert/format the citations, but I don't think dendron currently supports citeproc, although there is an open issue # 547 on dendron's github repo so maybe it'll eventually be supported.

Although I don't use it, I believe markdown preview enhanced has a use pandoc configuration (or something similar). However, this might require a workaround (described here) to work with newer versions of pandoc.
There is this helpful video that describes a workflow where citations show up in the preview.

There might be other extensions that also support citeproc in their previews that I just don't know about.

@SR--
Those are both nice options, but I don't think I'd have the skill to implement that, or the time to maintain it, so it would be better if a separate package supported those features.

@aiva005
Copy link

aiva005 commented Aug 26, 2021

Thanks!

I have followed the threads as far as I could've taken them: this is the latest: shd101wyy/vscode-markdown-preview-enhanced#432 (comment)

I only get a partial positive result: at least I don't get any weird warnings anymore, but (!) it does NOT seem to recognise the --- header sign NOR my bibliography.

Interestingly enough, your citation look-up extension recognises the library correctly, but pandoc-citer does NOT, haha!

I'm stumped...

@notZaki question: how do you make it work? Or, do you?

@notZaki
Copy link
Owner

notZaki commented Aug 28, 2021

@aiva005
Not sure why the preview extension doesn't recognize the bibliography. Does running pandoc through the terminal produce a similar error?

I don't use vscode for previews in my workflow. For smaller projects, I just run pandoc directly and review the html/pdf/docx output. Larger projects require better support for equations and cross-references, so I use bookdown for previewing and final output(s). This requires more work to set up since R has to be installed, but it suits me because I usually have to install R anyways for other reasons.

@flashlab
Copy link

flashlab commented Sep 1, 2021

Hi, @notZaki I also eager for such function to be realized. Just like markdown preview enhanced does. Furthermore, if we can define a setting or a hotkey, like shift. Once shiftKey being pressed while inserting the inline citation, footnote style mark([^1]) will be insert instead, and corresponding formatted bibliography will be attached to the end.
I'm not sure if such implementation is very hard.

@ME-Msc
Copy link

ME-Msc commented Mar 7, 2023

This video really helps a lot.
Here are the steps:

  1. install pandoc
  2. check pandoc in terminal: pandoc -v
  3. install vscode extension: vscode-pandoc
  4. install vscode extension: markdown preview enhanced
  5. change vscode setting of Pandoc Citer: Show Log to true
  6. change vscode setting of Pandoc Citer: Forget Unused Bib to false
  7. look at view-output-PandocCiter in top menu list of vscode, check whether PandocCiter is now activated and Found .bib file are shown after step 8
  8. write a new markdown file with text below, notice there is a blank space between ":" and "[":
    --- bibliography: [./myRefe.bib] ---
  9. change vscode setting of Markdown-preview-enhanced: Use Pandoc Parser to true
  10. text citation like [@xxxx]

After the steps above, you will get reference list at the bottom of the preview.

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

6 participants