bibtex in-text citations

I’ve been using the Paperpile for Word with Chicago style citations. I now need to convert the cites to bibtex and copy the text into overleaf. however, when I change the citation style from chicago to bibtex, where i have mulitple references for example (Smith 2022, Aronson 2023), it makes it one big bibtex like smith_2022_aronson_2023_. Also, it doesnt wrap the cites in the command \cite{}. Please help, any advice would be appreciated!!

Welcome to the forum, @Emily_Doherty! To convert citations made with the Paperpile for Word to LaTeX and BibTeX format for Overleaf, you’ll need to follow quite a few steps:

  1. Export references to BibTeX format from the Word plugin:

    • Open your Word document. In the Paperpile menu in Word, go to Settings and Tools > Document Settings and click the Export button. Choose the BibTeX format option. It will save the references to a file with a .bib extension.
    • Alternatively, if you already have all of the references in a folder in your library, you can export the folder to BibTeX format. In the sidebar, find the folder, click the 3 dots menu, and select Export in the dropdown menu.
  2. Upload the .bib file to Overleaf:

    • In Overleaf, upload your .bib file by going to the files section of your project and clicking Upload. This file will hold all your references.
    • For example, the format for the BibTeX entry of a journal article may look something like this:
      @article{AuthorYear-xy,
      author = {Author Name},
      title = {Title of the paper},
      journal = {Journal Name},
      year = {Year},
      volume = {Volume},
      pages = {Pages}
      }

    The AuthorYear-xy of the BibTeX entry is the citation key, and you will put each of these placeholders into your LaTeX document in place of the Word citations, see the next step.

  3. Replace Word citations with LaTeX citations:

    • The next step is the tricky bit. Copy and paste your Word document into Overleaf (but don’t include the reference list at the end; Overleaf will make that for you when you compile the document). Bear in mind you will need to change things into formatting compatible with LaTeX, e.g., Introduction becomes \section{Introduction} etc., see Overleaf LaTeX help for more information on LaTeX formatting. Find where you’ve inserted the citations and replace them with the LaTeX \cite{} command, referencing the corresponding BibTeX entry, e.g., as \cite{AuthorYear-xy}.
    • Alternatively, you can copy each LaTeX citation directly from Paperpile by selecting the reference in your library, clicking the Copy citation button in the toolbar, clicking Copy LaTeX citation and paste into the Overleaf document.
  4. Use BibTeX in your LaTeX document:

    • In your Overleaf document, include the bibliography by adding the following lines near the end of your document, making sure to replace your_bib_file with the actual name of your .bib file (without the .bib extension).

      \bibliographystyle{plain}
      \bibliography{your_bib_file}
      
      
  5. Compile the document:

    • When you compile your document in Overleaf, LaTeX will automatically pull the citations from your .bib file and format them according to the chosen style.

Let me know if you have further questions.

Hi Suzanne, thanks for this explanation. Step 3 seems very cumbersome. If I have 100 citations, step 3 has 100 repeated steps.
Is there some style that I can use in word to make an in-line citation that looks like latex, and paste-as-text? for example, Ref [3] would be reformatted as “\cite{AuthorYear-xy}” in word. Does someone have a CSL file for this?

Thanks for giving it a go, @Jeremy_Levy. In Word, you can select the “BibTeX generic citation style” (bibtex.csl). In place of a bibliography, it will create the BibTeX entries that can be copied to a BibTeX file in Overleaf. It also changes the in-line citations to citation keys with underscores, but it doesn’t add the LaTeX citations \cite{citekey}. You would still need to do a Find and Replace in your document to include those.

Note that the citekeys in the BibTeX CSL file may not match the BibTeX citation key pattern in your Paperpile library, so you might also want to change the BibTeX citation key pattern in your Paperpile library to match that of the bibtex.csl file. But if you just want to do this one time for one document, perhaps you don’t need that additional step.

Thanks for getting back so quickly. I’m still a bit confused about the formatting of the key. I have >5000 citations and many documents with the LastnameYYYY-xx key. The generic bibtex is giving me something htat looks like this:
Koonin_Wolf_2006_Hasan_Moon_Song_Keles_Manzur_Mikkilineni_Hong_Nagatomi_Haeggstrom_Khademhosseini_et al._2009_Morris_2008
That’s first off a very long key, and second it breaks my documents. I was hoping to be able to use the LastnameYYYY-xx which is already embedded in the bibtex file.

Unfortunately there are no straightforward solutions here, at least to my knowledge, @Jeremy_Levy. If you’d like to retain the same BibTeX keys as in your Paperpile library and which would be exported by our Word plugin to BibTeX, then the solution offered in my first post may be useful.

If you are just trying to format a single Word file as a LaTeX document and you don’t need the same citation keys as in your Paperpile library, then you could use the solution offered in my second post, but modify the keys and the BibTeX entries to your liking, e.g., change every instance of Koonin_Wolf_2006_Hasan_Moon_Song_Keles_Manzur_Mikkilineni_Hong_Nagatomi_Haeggstrom_Khademhosseini_et al._2009_Morris_2008 to something shorter like Koonin2006. But remember you will need to change its BibTeX entry too.

One last alternative is to consider using a document converter like pandoc, but I can’t guide you with that.

Thanks again for your suggestions. The closest I got was to use jabref to import the .bib file and copy the key to another field. I think to make use of paperpile I would need to copy that back into my library. I haven’t tried it yet but re-importing and then merging changes (but keeping the original key) might work. I’m balancing this against trying to get my team to just use overleaf. Having a convenient bridge between overleaf and gdoc would be super useful. The content that I create is a one-way street if I have to navigate both platforms.

I can offer one more potential solution, @Jeremy_Levy. You can convert your Word document into a Google Doc (in the Paperpile menu in Word, go to Settings and Tools > Convert to Google Doc), then use the Export options in our optional sidebar add-on to generate LaTeX citations and a BibTeX file.

Open the sidebar add on in Google Docs by going to Extensions > Paperpile > Manage Citations. Then click on the Gear button and select Export:

Then select the “BibTeX citation codes” option to create LaTeX citations \cite{bibtexkey} where the BibTeX keys match those in your Paperpile library. It will replace all Paperpile citations with LaTeX citations in the Google Doc. You can then copy and paste the text into Overleaf. From there, you can also export a BibTeX file that you can upload to Overleaf.