Changes

Jump to navigation Jump to search
8 bytes added ,  19:20, 6 June 2020
m
minor adjustments, nothing new
   {{TwoColumnsUnderLevel1|'''ConTeXt mkiv and LMTX''' has have support for bibliographies integrated into its their core (for the curious: , the files are named [https://source.contextgarden.net/?&#63;search=&#61;bibl-tra<tt>bibl-tra...</tt>]. '''This is the page for mkiv and LMTX support'''. Two other important sources of informations are :
* [http://pragma-ade.nl/general/manuals/mkiv-publications.pdf Bibliographies manual]
* [http://meeting.contextgarden.net/2014/talks/2014-09-09-alan-bibtex/From_BibTeX_to_ConTeXt_MKVI.pdf From BibTEX to ConTEXt mkiv], a 2014 presentation about BibTeX and the state of Bibliography in MkIV.
 |
For traditional ConTeXt mkii, support for bibliographies was added by Taco. The [[Bibliography_mkii|Bibliography mkii]] page explains a few basic facts and points you to the manual of the module.
<br><br>
TeX offers excellent ways to handle bibliographic references. bibTeX allows you to use a database to manage your references and to insert citations and a list of references into your document. If you're completely new to this subject, you should probably begin to read some basic hints about bibTeX databases. You will find a good selection of resources (most of them are free and available on-line) at the section "Bibliographies and Citations" of the [[http://texfaq.net/index.html#Bibliographiesandcitations TeX faq]]. A good place for beginners is Nicolas Markey’s [[http://mirror.ctan.org/info/bibtex/tamethebeast/ttb_en.pdf Tame the Beast]]. If you have TeXLive installed, it may already be on your hard disk.
}}
 
</texcode>
==Database Formats==
ConTeXt MkIV Bibliography can read several different formats of bibliographic databases:
===BibTeX .bib format===
ConTeXt is independent from the BibTeX program, but can read .bib databases, if it’s not polluted with non-standarddized (LaTeX) commands.
ConTeXt understands UTF-8 encoded bib files as well as old fashioned TeX accent combinations.
====Fields====
Some known fields of {{code|@Article}} are (see manual p.14):
There’s a (complete?) overview of categories and their fields in the manual on page 18 (Table 3.2).
====Commands in entries====
You can define unknown commands like this:
btx commands use a separate namespace.
===MkII .bbl format===
This intermediate format is still supported, but obsolete. Just an example to let you know what it means:
</texcode>
===Lua tables===
Since internally everything anyway are Lua tables, you can use them directly as a database format:
}
===XML===
<xmlcode>
</xmlcode>
==Setup==
<texcode>
</texcode>
===sorttypes===
* default, none, cite, list: don’t sort, use original order
* authoryear: sort by author(s) and publication year
===bib list rendering===
See manual, p.24ff.
Note: Only apa and aps styles are currently provided as a showcase.
===Language===
Bibliography lists and citations are rendered in the language of the document (`\mainlanguage`). If an entry includes a language field, this can be used, depending on the rendering specification.
You can define and use translated titles with language modifiers, e.g. `title:de` or `booktitle:fr`.
===Complex example===
To see how the concepts play together, here a relatively complete example:
</texcode>
==Citations==
See p.31ff. of the manual.
The first argument defaults to the default citation rendering, as defined by `\setupbtx[default:cite][alternative=num]`.
==Custom bibliographical styles==
Users who wish to develop their own custom styles could start with the files in the distribution, copy them to different names and then modify them (e.g., the files `publ-imp-apa.lua` and `publ-imp-apa.mkvi`). However, these files contain a number of advanced code to deal with the numerous exceptions and rules. Hence, in some cases, it may be easier to write your own custom style. Here, I will provide you with an example what a minimal setup will be to get you started. Once you have a style in place and understand what's needed, it is easy to experiment further.
===Files===
For every style, you will need two files: one with the TeX setups and one with the Lua definitions. They have to follow the naming conventions that the bibliographic subsystem expects so they can be found. If your style is called `mycustom`, these two files should be `publ-imp-mycustom.mkiv` and `publ-imp-mycustom.lua`.
===The Lua code===
A minimal Lua file can be very brief. It has to contain a little bit of boiler plate with the required tables and the "categories" (i.e. publication types) that your bibliography will process. A minimal example will look like this:
For every type `publicationtype` you want processed, you need an entry `categories.publicationtype`. This entry needs to have a list of fields that will be processed, divided into "required" fields (that every entry needs to have) and "optional" fields (that they may or may not have). Every book needs to have a title, but not necessarily an author. Remember: only types that have a category will be processed. Only fields that are listed in the category will be processed.
===The TeX code===
The TeX file is where the formatting is done. Again, you need to start with a few lines that make the `publ-imp-mycustom.mkiv` file work:

Navigation menu