The class Structures_BibTex provides some methods to export the data stored in the class. Currently the class exports the data in the following formats:
BibTeX - The whole data in BibTeX
RTF - The data with enough matching data as a short list in RTF format
HTML - The data with enough matching data as a short list in HTML format
One of the basic features is of course the export in BibTeX format. This is simply done by invoking the bibTex() method.
Example 55-1. Exporting in BibTeX format
|
This feature was introduced to enable some kind of import into Word. Word (of course also Open Office or kword) understands the RTF format. It is simply possible to save the output as 'somefile.rtf' and be opened in Word. This will satisfy the Windows users. To use it simply call the method rtf().
Example 55-2. Exporting in RTF format
|
The default format for every entry is first the authors, then the title bold and in double quotes, then the journal italic and finally the year. To change the default format you should override the class variable rtfstring. The default rtfstring looks like this: 'AUTHORS, "{\b TITLE}", {\i JOURNAL}, YEAR'. The string AUTHORS, TITLE, JOURNAL and YEAR are substituted with the corresponding values.
Example 55-3. Exporting in RTF format with different RTF string
|
This feature is just a simple HTML generation. The default formatting is the same as in rtf. To use it call the method html().
Example 55-4. Exporting in HTML format
|
As with the RTF export it is possible to override the default HTML string.The default string is stored in the class variable htmlstring and looks like this: AUTHORS, "<strong>TITLE</strong>", <em>JOURNAL</em>, YEAR<br />.
Example 55-5. Exporting in HTML format with different HTML string
|