cpbibart - Copy articles in files referenced in a latex file.
cpbibart [options] sourcefile targetdir
cpbibart --help
cpbibart is used to make a bundle of a LaTeX document and the documents it cites.
Note that at the moment only files with filenames similar to the cite key used in the latex document and an extension can be found. If you don't practice this behaivour this program is of no use to you. Sorry :(
cpbibart reads the .bbl or .aux file from a latex run and copies files with filenames similar to cite keys in the latex file from a set of directories to a target directory, creating the target directory if it doesn't exist. The set of directories to search for articles may be set by the -d option.
As the .bbl file is used bibtex must be run before cpbibart
Optionally the typeset file and/or the source code for it may also be copied to the target directory by providing the -a or -f options. In that case links to the copied references may optionally be put in the bibliography by the -l or -L option. This is done by manipulation of the bbl file and a rerun of latex (with -L) in the source directory thus overwriting the existent typeset file and .bbl file before copying to the target directory. For the links to work the href package must be loaded in the latex document.
If the the -l or -L switches that overwrites .bbl and .dvi or .pdf files the originals is received again by a rerun of bibtex and latex.
A bibtex .bib file including the cited references may also be generated with the aux2bib program if present, and added to the target directory with the -b option.
cpbibart is usually running silently with only error messages to STDERR. However some helpful progress output can be achieved by the -v option. A list of citations in the text to which no corresponding files have been found can be generated by the -r option. The debug option --debug is probably not of any use.
A usage message can is written to STDOUT by the -h option.
cpbibart -a -dpapers -f -Lpdflatex -r foo.bbl mytargetdir
will
pdflatex foo.
Probably
Only files with names similar to the citekeys are found.
Only for UN*X-like systems.
Johan Arvelius, johan.arvelius@irf.se
Code from Dr Nicola Talbot included.
Copyright (C) 2008, 2009 Johan Arvelius, some parts copyright Nicola Talbot as indicated in the code.
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.