GAMS [ Home | Downloads | Documentation | Solvers | APIs | Tools | Model Libraries | Resources | Sales | Support | Contact Us | Search ]


Table of Contents

Analyses BibTeX files with file extension .bib and writes GAMS source files that can be used to create various author, reference and cross reference reports.


bib2gms bibinput [ option referencemap [key=value] ]

'Reads' BIB files and writes GAMS source files that can be used to create various author, reference and cross reference reports. The BibInput file usually contains many more entries then are needed for the specific GAMS application and the BIB document names need to be mapped into GAMS set elements. This mapping is specified in the ReferenceMap file.

Bib2gms will produce a number of gams include files and a GAMS main program that demonstrates the use of the include files.


bib2gms myfile.bib
bib2gms "my" R=mymap GmsFile="my gams.gms"
bib2gms bibin i = stem

The file RefrecnceMap (R) contains the name of the BIB entries to be extracted from the BIB input file. If no (R) file names is given, all entries will be selected and the original BIB record names will be used. Each line contains the reference name of the entry to be included. You can enter a single name or the pair <gams> <bib> to rename the <bib> reference name to the new <gams> name.

Example of RefrenceMap file:

* lines staring with * or # are ignored
* empty lines are ignore as well
* spaces are ignored
* tabs , and . are all whitespace
r1 mybibref2
* a single ref entry assumes the BIB record name is the same as the
* gams name, r4 r4
* The GAMS maintained master BIB file has refernces named g00001, g00002,..
* A referenece name consisting of digits only will be renamed
* to form one of those g0000x names. For example:
r5 12

Output Files:

bib2gms.gms gams program that reads all include files shown below

Include FileDescription
bib2gms.a Authors Credit Authors
bib2gms.r References Overflow References Author Cross reference
bib2gms.far First Author Cross Reference
bib2gms.crr Cross Referenced References

Quick guide to parameters:

Key Symbol Abbrv. Description
BibInput B Bib BIB input file
ReferenceMap R Ref BIB reference or extraction file
GmsFile G Gms GAMS main program name
IncFiles I Inc GAMS include file name stem
DoiStyle D Doi Style of handling DOI entries (ignore, text, html)