![]() ![]() ![]() ![]() |
BibTool Manual![]() ![]() |
Strings in BibTeX files play an important role when managing large bibliographic data bases. Thus the deserve special treatment. If the resource macro.file is defined then the macros are written to this file. The argument is a file name as in
macro.file = {macro/file/name}
Note that the reverse operation to string export namely the import of strings does not deserve special treatment. You can simply give the macro file as one of the input files---preferably before any input file that makes use of one of the macros contained therein.
The boolean resource print.all.strings indicates if all macros defined in the BibTeX file should be printed or only those macros actually used.
print.all.strings = ON
The appearance of string names is controlled by the resource symbol.type (see Parsing and Pretty Printing).
Strings can be expanded when printing entries. This feature of BibTool is controlled by the resource expand.macros as in
expand.macros = ON
The effect is that all known strings in normal entries are replaced by their values. If the values are not defined at the time of expansion then the macro name remains untouched. As a side effect strings concatenations are simplified. Imagine the following BibTeX file.
@string{ WGA = " World Gnus Almanac" }If BibTool is applied with expand.macros turned on this results in the following output --- if the default settings are used for every other resource.@Book{ almanac-66, title = 1967 # WGA, month = "1 " # jan }
@STRING{wga = " World Gnus Almanac" }The macro WGA has been expanded and merged with@Book{ almanac-66, title = {1967 World Gnus Almanac}, month = {1 } # jan }
1967
. Note that
the string jan
has not been expanded since the value should be defined
in a BibTeX style file (.bst).
When macros are expanded the delimiters of entries are normalized, i.e. only one style is used. In this example braces have been used. The alternative would be to use double quotes. This behavior is controlled by the resource print.braces. If this resource is on then braces are used otherwise double quotes are taken. It can be changed like in
print.braces = OFF
![]() ![]() ![]() ![]() |
BibTool Manual![]() ![]() |