Giter VIP home page Giter VIP logo

Comments (6)

crsh avatar crsh commented on September 24, 2024

Hi Robin, have you looked at citr::md_cite()? If this is what you are looking for, I admit the function name could be more descriptive. I could add insert_citation_cli() or insert_citation_console() as an alias.

from citr.

Robinlovelace avatar Robinlovelace commented on September 24, 2024

I have but that still doesn't help if you're in a shell on a remote server.

from citr.

crsh avatar crsh commented on September 24, 2024

Hmm, I'm not sure I understand your setup and/or the problem. That function does not rely on either Zotero or shiny. It returns the citation key to the R console. Is this where you are looking for a solution? An automatic insertion into an R Markdown file?

from citr.

Robinlovelace avatar Robinlovelace commented on September 24, 2024

Aha I see this:

citr::md_cite(x = "geocomp", bib_file = "vignettes/references.bib")
	 Lovelace, Nowosad, & Muenchow (2019). Geocomputation with R.  

[1] "[@lovelace_geocomputation_2019]"

That is news to me. Great job, and resolves this issue. My only additional comment would be that it could be useful to output the citation in alternative formats, e.g. as a RefManageR::as.BibEntry() object, or character strings representing .bib files. I could imagine a format_out argument could do that but that may be mission creep. I'm thinking about the situation where you want to search for a citation in a big .bib file and then append the result to a smaller one manually.

from citr.

crsh avatar crsh commented on September 24, 2024

Great. Indeed, this seems a little beyond the scope of the package. However, a simple way to achieve the same goal would be to simply work off of a copy of the complete bibliography file and, once all desired citations have been inserted, use tidy_bib_file() to remove everything that's not needed.

from citr.

Robinlovelace avatar Robinlovelace commented on September 24, 2024

Thanks for quick-fire follow up on this, definitely answers the question.

from citr.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.