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?
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It only takes a minute to sign up.
Sign up to join this communityI have two files:
Is there a way to generate plain text citations from these files using command line tools?
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).
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
\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