<?xml version="1.0"?>
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd"
[
<!-- Fill in your name for FIRSTNAME and SURNAME. -->
<!ENTITY dhfirstname "<firstname>David</firstname>">
<!ENTITY dhsurname "<surname>Bremner</surname>">
<!-- Please adjust the date whenever revising the manpage. -->
<!ENTITY dhdate "<date>November 8, 2016</date>">
<!-- SECTION should be 1-8, maybe w/ subsection other parameters are
allowed: see man(7), man(1). -->
<!ENTITY dhsection "<manvolnum>1</manvolnum>">
<!ENTITY dhemail "<email>bremner@debian.org</email>">
<!ENTITY dhusername "David Bremner">
<!ENTITY dhucpackage "<refentrytitle>BIBUTILS</refentrytitle>">
<!ENTITY dhpackage "bibutils">
<!ENTITY debian "<productname>Debian</productname>">
<!ENTITY gnu "<acronym>GNU</acronym>">
<!ENTITY gpl "&gnu; <acronym>GPL</acronym>">
<!ENTITY version "6.5">
]>
<refentry>
<refentryinfo>
<address>&dhemail;</address>
<copyright>
<year>2017</year>
<holder>&dhusername; (Manual)</holder>
</copyright>
<copyright>
<year>2008</year>
<holder>Christopher Putnam (Software and Manual)</holder>
</copyright>
<legalnotice>
<para>
This manual page is distributed under the terms of version 2 of
the GNU General Public License.
</para>
</legalnotice>
&dhdate;
</refentryinfo>
<refmeta>&dhucpackage; &dhsection;
<refmiscinfo class='source'> &dhpackage; </refmiscinfo>
<refmiscinfo class='version'> &version; </refmiscinfo>
<refmiscinfo class='manual'> User Commands </refmiscinfo>
</refmeta>
<!-- Uncomment this division to have .so manpages generated for all
commands
<refnamediv>
<refname>bibutils</refname>
<refname>bib2xml</refname>
<refname>copac2xml</refname>
<refname>end2xml</refname>
<refname>endx2xml</refname>
<refname>isi2xml</refname>
<refname>med2xml</refname>
<refname>modsclean</refname>
<refname>nbib2xml</refname>
<refname>ris2xml</refname>
<refname>xml2ads</refname>
<refname>xml2bib</refname>
<refname>xml2end</refname>
<refname>xml2isi</refname>
<refname>xml2ris</refname>
<refname>xml2wordbib</refname>
<refpurpose>bibliography conversion utilities</refpurpose>
</refnamediv>
-->
<refnamediv>
<refname>bibutils</refname>
<refpurpose>bibliography conversion utilities</refpurpose>
</refnamediv>
<refsynopsisdiv>
<cmdsynopsis>
<command><replaceable>format</replaceable>2xml</command>
<arg><replaceable>OPTIONS</replaceable></arg>
<arg><replaceable>file.format</replaceable></arg>
</cmdsynopsis>
<cmdsynopsis>
<command>xml2<replaceable>format</replaceable></command>
<arg><replaceable>OPTIONS</replaceable></arg>
<arg><replaceable>file.xml</replaceable></arg>
</cmdsynopsis>
</refsynopsisdiv>
<refsect1>
<title>DESCRIPTION</title>
<para>
The bibutils program set inter-converts between various
bibliography formats using
<ulink url="http://www.loc.gov">Library of Congress</ulink>'s
<ulink url="http://www.loc.gov/standards/mods/">Metadata Object
Description Schema (MODS)</ulink>version 3.1. For example,
one can convert RIS-format files to Bibtex by doing two
transformations: RIS->MODS->Bibtex.
</para>
</refsect1>
<refsect1>
<title>Converting to MODS</title>
<refsect2>
<title>Overview</title>
<segmentedlist>
<segtitle>Command</segtitle>
<segtitle>Description</segtitle>
<seglistitem>
<seg>
<xref linkend="bib2xml" />
</seg>
<seg>convert bibtex to MODS</seg>
</seglistitem>
<seglistitem>
<seg>
<xref linkend="biblatex2xml" />
</seg>
<seg>convert biblatex to MODS</seg>
</seglistitem>
<seglistitem>
<seg>
<xref linkend="copac2xml" />
</seg>
<seg>convert
<ulink url="http://copac.ac.uk/">COPAC</ulink>format
references to MODS</seg>
</seglistitem>
<seglistitem>
<seg>
<xref linkend="ebi2xml" />
</seg>
<seg>convert EBI XML to MODS</seg>
</seglistitem>
<seglistitem>
<seg>
<xref linkend="end2xml" />
</seg>
<seg>convert EndNote (Refer format) to MODS</seg>
</seglistitem>
<seglistitem>
<seg>
<xref linkend="endx2xml" />
</seg>
<seg>convert EndNote XML to MODS</seg>
</seglistitem>
<seglistitem>
<seg>
<xref linkend="isi2xml" />
</seg>
<seg>convert ISI web of science to MODS</seg>
</seglistitem>
<seglistitem>
<seg>med2xml</seg>
<seg>convert Pubmed XML references to MODS</seg>
</seglistitem>
<seglistitem>
<seg>nbib2xml</seg>
<seg>convert Pubmed nbib format references to MODS</seg>
</seglistitem>
<seglistitem>
<seg>modsclean</seg><seg>a MODS to MODS converter</seg>
</seglistitem>
<seglistitem>
<seg>
<xref linkend="ris2xml" />
</seg>
<seg>convert RIS format to MODS</seg>
</seglistitem>
<seglistitem>
<seg>
<xref linkend="wordbib2xml" />
</seg>
<seg>convert Word2007 bibliography XML to MODS</seg>
</seglistitem>
</segmentedlist>
</refsect2>
<refsect2>
<title>Common Options Converting to MODS</title>
<para>Several flags available for the end2xml, endx2xml,
bib2xml, ris2xml, med2xml, and copac2xml programs. Most options have both
a short and a long version.
</para>
<segmentedlist>
<segtitle></segtitle>
<segtitle></segtitle>
<segtitle></segtitle>
<seglistitem>
<seg>-h</seg>
<seg>--help</seg>
<seg> display help</seg>
</seglistitem>
<seglistitem>
<seg>-v</seg><seg>--version</seg><seg> display version </seg>
</seglistitem>
<seglistitem>
<seg>-a</seg><seg>--add-refcount</seg><seg> add "_#", where # is reference count to reference id </seg>
</seglistitem>
<seglistitem>
<seg>-s</seg><seg>--single-refperfile</seg><seg> put one reference per file name by the reference number</seg>
</seglistitem>
<seglistitem>
<seg>-i</seg>
<seg>--input-encoding</seg>
<seg> interpret the input file as using the requested character set
(use w/o argument for current list derived from character sets
at
<ulink url="http://www.kostis.net/">www.kostis.net</ulink>)
unicode is now a character set option
</seg>
</seglistitem>
<seglistitem>
<seg>-u</seg>
<seg>--unicode-characters</seg>
<seg>
encode unicode characters directly in the file rather than as
XML entities
</seg>
</seglistitem>
<seglistitem>
<seg>-un</seg>
<seg>--unicode-no-bom</seg>
<seg>
as -u, but don't include a
byte order mark
</seg>
</seglistitem>
<seglistitem>
<seg>-x</seg>
<seg>--xml-entities</seg>
<seg>
encode unicode characters as XML entities (opposite of -u)
</seg>
</seglistitem>
<seglistitem>
<seg>-nl</seg>
<seg>--no-latex</seg>
<seg>
do not convert latex-style character combinations
</seg>
</seglistitem>
<seglistitem>
<seg>-s</seg>
<seg>--single-refperfile</seg>
<seg>
one reference per output file
</seg>
</seglistitem>
<seglistitem>
<seg>-d</seg>
<seg>--drop-key</seg><seg> don't put citation key in the
mods id field
</seg>
</seglistitem>
<seglistitem>
<seg>-c</seg>
<seg>--corporation-file</seg><seg> with argument specifying a
file containing a list of corporation names to be placed in
<name type="corporate"></name> instead of
type="personal" and eliminate name mangling
</seg>
</seglistitem>
<seglistitem>
<seg>-a</seg>
<seg>--asis</seg><seg> with argument specifying a
file containing a list of names to be treated verbatim
</seg>
</seglistitem>
<seglistitem>
<seg>-nt</seg>
<seg>--nosplit-title</seg><seg>
don't split titles into TITLE/SUBTITLE pairs
</seg>
</seglistitem>
<seglistitem>
<seg></seg><seg>--verbose</seg>
<seg> verbose output </seg>
</seglistitem>
<seglistitem>
<seg></seg><seg>--debug</seg><seg> very verbose output (mostly for
debugging)</seg>
</seglistitem>
</segmentedlist>
</refsect2>
<refsect2 id="bib2xml" xreflabel="bib2xml">
<title>bib2xml</title>
<para>
<emphasis role="bold">bib2xml</emphasis> converts a
bibtex-formatted reference file to an XML-intermediate
bibliography file. Specify file(s) to be converted on the
command line. Files containing bibtex substitutions strings
should be specified before the files where substitutions are
specified (or in the same file before their use). If no files
are specified, then bibtex information will be read from
standard input.</para>
<programlisting>bib2xml bibtex_file.bib > output_file.xml</programlisting>
</refsect2>
<refsect2 id="biblatex2xml" xreflabel="biblatex2xml">
<title>biblatex2xml</title>
<para>
<emphasis role="bold">biblatex2xml</emphasis> converts a biblatex
(not to be confused with bibtex) formatted reference file to an
MODS XML-intermediate bibliography file.
</para>
<programlisting>biblatex2xml biblatex_file.bib > outputfile.xml</programlisting>
</refsect2>
<refsect2 id="copac2xml" xreflabel="copac2xml">
<title>copac2xml</title>
<para>
<emphasis role="bold">copac2xml</emphasis>converts a COPAC
formatted reference file to a MODS XML-intermediate
bibliography file.</para>
</refsect2>
<refsect2 id="end2xml" xreflabel="end2xml">
<title>end2xml</title>
<para>
<emphasis role="bold">end2xml</emphasis>
converts a text endnote-formatted reference file to an
XML-intermediate bibliography file. This program will not
work on the binary library; the file needs to be exported
first. Endnote tagged formats ("Refer" format export) look like
<xref linkend="referexample"/>.
There are very nice instructions for making sure that
you are properly exporting this at
<ulink url="http://www.sonnysoftware.com/endnoteimport.html">
http://www.sonnysoftware.com/endnoteimport.html</ulink></para>
<para>Usage for
<emphasis role="bold">end2xml</emphasis> is the same as
<emphasis role="bold">bib2xml</emphasis>.</para>
<programlisting>end2xml endnote_file.end > output_file.xml</programlisting>
</refsect2>
<refsect2 id="ebi2xml" xreflabel="ebi2xml">
<title>ebi2xml</title>
<para>
<emphasis role="bold">ebi2xml</emphasis> converts a EBI XML
file to a MODS XML-intermediate bibliography file.</para>
</refsect2>
<refsect2 id="endx2xml" xreflabel="endx2xml">
<title>endx2xml</title>
<para>
<emphasis role="bold">endx2xml</emphasis> converts a
EndNote-XML exported reference file to a MODS
XML-intermediate bibliography file. This program will not
work on the binary library; the file needs to be exported
first.</para>
</refsect2>
<refsect2 id="isi2xml" xreflabel="isi2xml">
<title>isi2xml</title>
<para>
<emphasis role="bold">isi2xml</emphasis> converts an
ISI-web-of-science-formatted reference file to an
XML-intermediate bibliography file.</para>
<para>Usage for
<emphasis role="bold">isi2xml</emphasis> is the same as
<emphasis role="bold">bib2xml</emphasis>.
</para>
<programlisting>isi2xml input_file.isi > output_file.xml</programlisting>
</refsect2>
<refsect2 id="ris2xml" xreflabel="ris2xml">
<title>ris2xml</title>
<para>
<emphasis role="bold">ris2xml</emphasis> converts a
RIS-formatted reference file to an XML-intermediate
bibliography file.
<emphasis role="bold">ris2xml</emphasis> usage is as
<emphasis role="bold">end2xml</emphasis> and
<emphasis role="bold">bib2xml</emphasis></para>
<programlisting>ris2xml ris_file.ris > output_file.xml</programlisting>
</refsect2>
<refsect2 id="wordbib2xml" xreflabel="wordbib2xml">
<title>wordbib2xml</title>
<para>
<emphasis role="bold">wordbib2xml</emphasis> convert a
Word2007-formatted reference file to an XML-intermediate
bibliogrpahy file.</para>
</refsect2>
</refsect1>
<refsect1>
<title>Converting from MODS</title>
<refsect2>
<title>Overview</title>
<segmentedlist>
<segtitle>Command</segtitle>
<segtitle>Description</segtitle>
<seglistitem>
<seg>
<xref linkend="xml2ads" />
</seg>
<seg>convert MODS into the SAO/NASA ADS format</seg>
</seglistitem>
<seglistitem>
<seg>
<xref linkend="xml2bib" />
</seg>
<seg>convert MODS into bibtex</seg>
</seglistitem>
<seglistitem>
<seg>
<xref linkend="xml2end" />
</seg>
<seg>convert MODS into format for EndNote</seg>
</seglistitem>
<seglistitem>
<seg>xml2isi</seg>
<seg>convert MODS to ISI format</seg>
</seglistitem>
<seglistitem>
<seg>
<xref linkend="xml2ris" />
</seg>
<seg>convert MODS into RIS format</seg>
</seglistitem>
<seglistitem>
<seg>
<xref linkend="xml2wordbib" />
</seg>
<seg>convert MODS into Word 2007 bibliography format</seg>
</seglistitem>
</segmentedlist>
</refsect2>
<refsect2>
<title>Common Options Converting from MODS</title>
<para>Note that <emphasis>--output-encoding</emphasis> refers to the input file</para>
<segmentedlist>
<segtitle></segtitle>
<segtitle></segtitle>
<segtitle></segtitle>
<seglistitem>
<seg>-h</seg>
<seg>--help</seg>
<seg> display help</seg>
</seglistitem>
<seglistitem>
<seg>-v</seg><seg>--version</seg><seg> display version </seg>
</seglistitem>
<seglistitem>
<seg>-o</seg><seg>--output-encoding</seg><seg>interpret the input file as
using the requested character set (use w/o argument for
current list derived from character sets at
<ulink url="http://www.kostis.net/">
www.kostis.net</ulink>) unicode is now a character set
option</seg>
</seglistitem>
<seglistitem>
<seg>-s</seg><seg>--single-refperfile</seg><seg>
put one reference per file
name by the reference number</seg>
</seglistitem>
<seglistitem>
<seg>-nb</seg><seg>--no-bom</seg><seg>
do not write Byte Order Mark if writing UTF8</seg>
</seglistitem>
</segmentedlist>
</refsect2>
<refsect2 id="xml2bib" xreflabel="xml2bib">
<title>xml2bib</title>
<para>
<emphasis role="bold">xml2bib</emphasis> converts the MODS XML
bibliography into a bibtex-formatted reference file.
<emphasis role="bold">xml2bib</emphasis> usage is as for other
tools</para>
<programlisting>xml2bib xml_file.xml > output_file.bib</programlisting>
<para>Since the BibTeX reference format is fairly flexible and
seems to have the greatest number of personal preferences, it
has also accumulated a number of specific options that are not
available for other formats.</para>
<para>Starting with 3.24, xml2bib output uses lowercase tags
and mixed case reference types for better interaction with other
software.
The older behavior with all uppercase tags/reference types
can still be generated using the command-line switch
-U/--uppercase.</para>
<refsect3>
<title>xml2bib-specific Options:</title>
<segmentedlist>
<segtitle></segtitle>
<segtitle></segtitle>
<segtitle></segtitle>
<seglistitem>
<seg>-fc</seg>
<seg>--finalcomma</seg>
<seg>add final comma in the bibtex
output for those that want it
</seg>
</seglistitem>
<seglistitem>
<seg>-sd</seg>
<seg>--singledash</seg>
<seg>use one dash instead of two
(longer dash in latex) between numbers in page
output
</seg>
</seglistitem>
<seglistitem>
<seg>-b</seg>
<seg>--brackets</seg>
<seg>use brackets instead of quotation
marks around field data</seg>
</seglistitem>
<seglistitem>
<seg>-w</seg>
<seg>--whitespace</seg>
<seg>add beautifying whitespace to output</seg>
</seglistitem>
<seglistitem>
<seg>-U</seg>
<seg>--uppercase</seg>
<seg>use all uppercase for tags (field
names) and reference types (pre-3.24 behavior)</seg>
</seglistitem>
<seglistitem>
<seg>-sk</seg>
<seg>--strictkey</seg>
<seg>only use alphanumeric characters for bibtex citation keys</seg>
</seglistitem>
</segmentedlist>
</refsect3>
</refsect2>
<refsect2 id="xml2ads" xreflabel="xml2ads">
<title>xml2ads</title>
<para>
<emphasis role="bold">xml2ads</emphasis> converts the MODS XML
bibliography to the Smithsonian Astrophysical Observatory (SAO)/National
Aeronautics and Space Administration (NASA) Astrophyics Data System or
<ulink url="http://doc.adsabs.harvard.edu/abs_doc/help_pages/taggedformat.html" >ADS reference format</ulink>
(which is very similar to the tagged Endnote style).
<emphasis role="bold">xml2ads</emphasis > usage is as for other
tools</para>
<programlisting>xml2ads xml_file.xml > output_file.ads</programlisting>
</refsect2>
<refsect2 id="xml2ris" xreflabel="xml2ris">
<title>xml2ris</title>
<para>
<emphasis role="bold">xml2ris</emphasis> converts the MODS XML
bibliography to RIS-formatted bibliography file.
<emphasis role="bold">xml2ris</emphasis > usage is as for other
tools</para>
<programlisting>xml2ris xml_file.xml > output_file.ris</programlisting>
</refsect2>
<refsect2 id="xml2end" xreflabel="xml2end">
<title>xml2end</title>
<para>
<emphasis role="bold">xml2end</emphasis> converts the MODS XML
bibliography to tagged Endnote (refer-format) bibliography
file.
<emphasis role="bold">xml2end</emphasis> usage is as for other
tools</para>
<programlisting>xml2end xml_file.xml > output_file.end</programlisting>
</refsect2>
<refsect2 id="xml2wordbib" xreflabel="xml2wordbib">
<title>xml2wordbib</title>
<para>
<emphasis role="bold">xml2wordbib</emphasis> converts the MODS XML
bibliography to Word 2007-formatted XML bibliography file.
<emphasis role="bold">xml2wordbib</emphasis> usage is as for other
tools</para>
<programlisting>xml2wordbib xml_file.xml > output_file.word.xml</programlisting>
<para>
<emphasis role="bold">xml2wordbib</emphasis> was called xml2word in
versions of bibutils prior to 3.40. It was renamed to avoid confusion
with other tools. Hopefully this will not break too many scripts
already in use.</para>
</refsect2>
</refsect1>
<refsect1>
<title>Examples</title>
<example id="referexample">
<title>Example <command>refer</command> format file</title>
<programlisting>
%0 Journal Article
%A C. D. Putnam
%A C. S. Pikaard
%D 1992
%T Cooperative binding of the Xenopus RNA polymerase I
transcription factor xUBF to repetitive ribosomal gene enhancers
%J Mol Cell Biol
%V 12
%P 4970-4980
%F Putnam1992
</programlisting>
</example>
<refsect2>
<title><command>xml2bib</command> Output Variations</title>
<example>
<title>Default</title>
<programlisting>
@Article{Putnam1992,
author="C. D. Putnam
and C. S. Pikaard",
year="1992",
month="Nov",
title="Cooperative binding of the
Xenopus RNA polymerase I transcription
factor xUBF to repetitive ribosomal
gene enhancers",
journal="Mol Cell Biol",
volume="12",
pages="4970--4980",
number="11"}
</programlisting>
</example>
<example>
<title>Final Comma</title>
<programlisting>
@Article{Putnam1992,
author="C. D. Putnam
and C. S. Pikaard",
year="1992",
month="Nov",
title="Cooperative binding of the
Xenopus RNA polymerase I transcription
factor xUBF to repetitive ribosomal
gene enhancers",
journal="Mol Cell Biol",
volume="12",
pages="4970--4980",
number="11",}
</programlisting>
</example>
<example>
<title>Single Dash</title>
<programlisting>
@Article{Putnam1992,
author="C. D. Putnam
and C. S. Pikaard",
year="1992",
month="Nov",
title="Cooperative binding of the
Xenopus RNA polymerase I transcription
factor xUBF to repetitive ribosomal
gene enhancers",
journal="Mol Cell Biol",
volume="12",
pages="4970-4980",
number="11"}
</programlisting>
</example>
<example>
<title>Whitespace</title>
<programlisting>
@Article{Putnam1992,
author = "C. D. Putnam
and C. S. Pikaard",
year = "1992",
month = "Jan",
title = "Cooperative binding of
the Xenopus RNA polymerase I transcription
factor xUBF to repetitive ribosomal gene
enhancers",
journal = "Mol Cell Biol",
volume = "12",
pages = "4970--4980"
}
</programlisting>
</example>
<example>
<title>Brackets</title>
<programlisting>
@Article{Putnam1992,
author={Putnam, C. D.
and Pikaard, C. S.},
title={Cooperative binding of the Xenopus
RNA polymerase I transcription factor xUBF
to repetitive ribosomal gene enhancers},
journal={Mol Cell Biol},
year={1992},
month={Nov},
volume={12},
number={11},
pages={4970--4980}
}
</programlisting>
</example>
<example>
<title>Uppercase</title>
<programlisting>
@ARTICLE{Putnam1992,
AUTHOR="Putnam, C. D.
and Pikaard, C. S.",
TITLE="Cooperative binding of the Xenopus
RNA polymerase I transcription factor xUBF
to repetitive ribosomal gene enhancers",
JOURNAL="Mol Cell Biol",
YEAR="1992",
MONTH="Nov",
VOLUME="12",
NUMBER="11",
PAGES="4970--4980"
}
</programlisting>
</example>
</refsect2>
</refsect1>
<refsect1>
<title>License</title>
<para>All versions of bibutils are relased under the GNU Public
License (GPL). In a nutshell, feel free to download, run, and
modify these programs as required. If you re-release these, you
need to release the modified version of the source. (And I'd
appreciate patches as well...if you care enough to make the
change, then I'd like to see what you're adding or
fixing.)</para>
<para>
<ulink url="http://www.sourceforge.net/p/bibutils/home/Bibutils">
Chris Putnam, Ludwig Institute for Cancer Research
</ulink>
</para>
</refsect1>
</refentry>