2

I have two files:

  • entries.bib - file with bibtex formatted entries,
  • nature.bst - file with bibliography style

Is there a way to generate plain text citations from these files using command line tools?

  • To create citations, you could use either the basic LaTeX \cite command or load a citation management package such as natbib, harvard, or cite and use the citation-related command commands provided by these packages. – Mico Feb 3 '14 at 12:11
1

You could run latex2rtf or tex4ht on a tex file like this:

\documentclass{minimal}
\bibliographystyle{nature}
\begin{document}
\nocite{*}
\bibliography{entries}
\end{document}

There’re also BibHTML, BibTeX2HTML, bib2ML, bib2html.sh, bib2XHTML and probably more direct convertors that I have no experience with.

You will hardly find a script that converts to plain text directly, because most bibliography style include italic formatting, some also small caps or bold face, which are not available in plain text, but need rich text (RTF), HTML or something similar. You can easily copy and paste the results into a plain text editor, though, or adapt the scripts (since some are reasonably simple or flexible).

0

A simple method is to use bibtex2html and w3m for the final conversion to plain text. An example which produces compact formatting is given below:

bibtex2html -labelname -a -nodoi -nokeywords -noheader -nofooter -s ./custom.bst -o - ./bibliography.bib | w3m -T text/html -dump > output.txt

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.