![]() |
The bibliographic database | ![]() |
Instead of keeping your references in .bib files, you may keep them in a database of TeXmacs, common to all your documents. Enable it with Tools\(\rightarrow\)Database tool: a menu Data then appears, and View\(\rightarrow\)Database toolbar shows its icons.
Data\(\rightarrow\)Open bibliography opens your bibliographic database, which is edited like a .bib file (see Compiling a bibliography): Data\(\rightarrow\)New entry adds an entry, and Data\(\rightarrow\)Confirm entry (or ⌥↩) stores the changes of the entry at the cursor; Data\(\rightarrow\)Remove entry removes it. The database keeps the former versions of its entries.
References enter the database in several ways:
Data\(\rightarrow\)Import reads a .bib file into the database;
in a .bib file or a document, Data\(\rightarrow\)Import selected entries, Data\(\rightarrow\)Import entries in buffer and Data\(\rightarrow\)Import entry (at the cursor) copy entries into it;
when you open a document whose bibliography was made with the database, its references are imported (unless Automatically import bibliographies when opening files is turned off in Data\(\rightarrow\)Preferences);
the references of Zotero may be imported too, and then follow the changes made in Zotero (see Citations from Zotero).
Data\(\rightarrow\)Export writes entries of the database into a .bib file. Data\(\rightarrow\)Storage chooses the file which holds the database.
With the database tool, Insert\(\rightarrow\)Automatic\(\rightarrow\)Bibliography inserts a bibliography without file. Document\(\rightarrow\)Update\(\rightarrow\)Bibliography looks for the reference of each citation, in this order:
the entries of the document itself (see below);
the .bib file of the bibliography, when it has one;
your database;
the files exported from Zotero, then Zotero itself;
the references kept in the document.
The completion of keys (⇥) and the search window of references (⌃⇥) use the database too.
The references of the bibliography are kept in the document: a document sent to someone else, without your database, still has its bibliography. Document\(\rightarrow\)Bibliography\(\rightarrow\)Local entries opens them, so that they can be changed for this document only (the changes are kept with the document, and take precedence). Data\(\rightarrow\)Export entries in buffer writes the references of a document into a .bib file.
With a style of BibTEX (whose name does not start with tm-), the references found are gathered into one file and given to the bibtex program.