Difference between revisions of "User:Luigi.scarso/testpage"
Luigi.scarso (talk | contribs) |
Luigi.scarso (talk | contribs) |
||
Line 1: | Line 1: | ||
− | |||
− | |||
− | |||
− | |||
==The database== | ==The database== | ||
Line 164: | Line 160: | ||
</pre> | </pre> | ||
this gives: | this gives: | ||
− | + | {||+| | |
− | {| | ||
− | |||
− | |+ | ||
− | |||
− | | | ||
tag | tag | ||
− | | | + | || |
− | |||
− | | | ||
category | category | ||
− | | | + | || |
− | |||
− | | | ||
fields | fields | ||
− | | | + | ||+| |
− | |||
− | |+ | ||
− | |||
− | | | ||
demo-001 | demo-001 | ||
− | | | + | || |
− | |||
− | | | ||
book | book | ||
− | | | + | || |
− | |||
− | | | ||
author index title year | author index title year | ||
− | | | + | ||+| |
− | |||
− | |+ | ||
− | |||
− | | | ||
demo-002 | demo-002 | ||
− | | | + | || |
− | |||
− | | | ||
book | book | ||
− | | | + | || |
− | |||
− | | | ||
crossref index year | crossref index year | ||
− | | | + | ||+| |
− | |||
− | |+ | ||
− | |||
− | | | ||
demo-003 | demo-003 | ||
− | | | + | || |
− | |||
− | | | ||
book | book | ||
− | | | + | || |
− | |||
− | | | ||
author comment index title year | author comment index title year | ||
− | | | + | ||+| |
− | |||
− | |+ | ||
− | |||
− | | | ||
demo-004 | demo-004 | ||
− | | | + | || |
− | |||
− | | | ||
book | book | ||
− | | | + | || |
− | |||
− | | | ||
author comment index title year | author comment index title year | ||
− | | | + | ||+| |
− | |||
− | |+ | ||
− | |||
− | | | ||
demo-005 | demo-005 | ||
− | | | + | || |
− | |||
− | | | ||
book | book | ||
− | | | + | || |
− | |||
− | | | ||
author doi index pages serial title url year | author doi index pages serial title url year | ||
− | | | + | ||} |
− | |||
− | |} | ||
− | |||
<br/> | <br/> | ||
You can set the current active dataset with | You can set the current active dataset with | ||
Line 293: | Line 237: | ||
<br/> | <br/> | ||
<tt>setupbtxlistvariant : artauthor</tt> | <tt>setupbtxlistvariant : artauthor</tt> | ||
− | + | {||+| | |
− | {| | ||
− | |||
− | |+ | ||
− | |||
− | | | ||
<tt>no specific settings</tt> | <tt>no specific settings</tt> | ||
− | | | + | || |
− | |||
− | | | ||
− | |||
− | |||
− | |||
− | |||
+ | ||} | ||
<br/> | <br/> | ||
<tt>setupbtxlistvariant : author</tt> | <tt>setupbtxlistvariant : author</tt> | ||
− | + | {||+| | |
− | {| | ||
− | |||
− | |+ | ||
− | |||
− | | | ||
<tt>no specific settings</tt> | <tt>no specific settings</tt> | ||
− | | | + | || |
− | |||
− | | | ||
− | |||
− | |||
− | |||
− | |||
+ | ||} | ||
<br/> | <br/> | ||
<tt>setupbtxlistvariant : editor</tt> | <tt>setupbtxlistvariant : editor</tt> | ||
− | + | {||+| | |
− | {| | ||
− | |||
− | |+ | ||
− | |||
− | | | ||
<tt>no specific settings</tt> | <tt>no specific settings</tt> | ||
− | | | + | || |
− | |||
− | | | ||
− | |||
− | |||
− | |||
− | |||
+ | ||} | ||
<br/> | <br/> | ||
The exact rendering of list entries is determined by the <tt>alternative</tt> key and defaults to <tt>apa</tt> which uses definitions from <tt>publ-imp-apa.mkiv</tt>. If you look at that file you will see that each category has its own setup. You may also notice that additional tests are needed to make sure that empty fields don’t trigger separators and such. | The exact rendering of list entries is determined by the <tt>alternative</tt> key and defaults to <tt>apa</tt> which uses definitions from <tt>publ-imp-apa.mkiv</tt>. If you look at that file you will see that each category has its own setup. You may also notice that additional tests are needed to make sure that empty fields don’t trigger separators and such. | ||
Line 364: | Line 278: | ||
<br/> | <br/> | ||
There are three commands to flush data: | There are three commands to flush data: | ||
− | + | {||+| | |
− | {| | ||
− | |||
− | |+ | ||
− | |||
− | | | ||
<tt>\btxfield</tt> | <tt>\btxfield</tt> | ||
− | | | + | || |
− | |||
− | | | ||
fetch a explicit field (e.g. <tt>year</tt>) | fetch a explicit field (e.g. <tt>year</tt>) | ||
− | | | + | ||+| |
− | |||
− | |+ | ||
− | |||
− | | | ||
<tt>\btxdetail</tt> | <tt>\btxdetail</tt> | ||
− | | | + | || |
− | |||
− | | | ||
fetch a derived field (e.g. <tt>short</tt>) | fetch a derived field (e.g. <tt>short</tt>) | ||
− | | | + | ||+| |
− | |||
− | |+ | ||
− | |||
− | | | ||
<tt>\btxflush</tt> | <tt>\btxflush</tt> | ||
− | | | + | || |
− | |||
− | | | ||
fetch a derived or explicit field | fetch a derived or explicit field | ||
− | | | + | ||} |
− | |||
− | |} | ||
− | |||
<br/> | <br/> | ||
Normally you can use <tt>\btxfield</tt> or <tt>\btxflush</tt> as derived fields just like analyzed author fields are flushed in a special way. | Normally you can use <tt>\btxfield</tt> or <tt>\btxflush</tt> as derived fields just like analyzed author fields are flushed in a special way. | ||
Line 411: | Line 303: | ||
<br/> | <br/> | ||
Keep in mind that normally you don’t need to mess with definitions like this because standard rendering styles are provided. These styles use a few helpers that inject symbols but also take care of leading and trailing spaces: | Keep in mind that normally you don’t need to mess with definitions like this because standard rendering styles are provided. These styles use a few helpers that inject symbols but also take care of leading and trailing spaces: | ||
− | + | {||+| | |
− | {| | ||
− | |||
− | |+ | ||
− | |||
− | | | ||
<tt>\btxspace</tt> | <tt>\btxspace</tt> | ||
− | | | + | || |
− | |||
− | | | ||
before after | before after | ||
− | | | + | ||+| |
− | |||
− | |+ | ||
− | |||
− | | | ||
<tt>\btxperiod</tt> | <tt>\btxperiod</tt> | ||
− | | | + | || |
− | |||
− | | | ||
before. after | before. after | ||
− | | | + | ||+| |
− | |||
− | |+ | ||
− | |||
− | | | ||
<tt>\btxcomma</tt> | <tt>\btxcomma</tt> | ||
− | | | + | || |
− | |||
− | | | ||
before, after | before, after | ||
− | | | + | ||+| |
− | |||
− | |+ | ||
− | |||
− | | | ||
<tt>\btxlparent</tt> | <tt>\btxlparent</tt> | ||
− | | | + | || |
− | |||
− | | | ||
before (after | before (after | ||
− | | | + | ||+| |
− | |||
− | |+ | ||
− | |||
− | | | ||
<tt>\btxrparent</tt> | <tt>\btxrparent</tt> | ||
− | | | + | || |
− | |||
− | | | ||
before) after | before) after | ||
− | | | + | ||+| |
− | |||
− | |+ | ||
− | |||
− | | | ||
<tt>\btxlbracket</tt> | <tt>\btxlbracket</tt> | ||
− | | | + | || |
− | |||
− | | | ||
before [after | before [after | ||
− | | | + | ||+| |
− | |||
− | |+ | ||
− | |||
− | | | ||
<tt>\btxrbracket</tt> | <tt>\btxrbracket</tt> | ||
− | | | + | || |
− | |||
− | | | ||
before] after | before] after | ||
− | | | + | ||} |
− | |||
− | |} | ||
− | |||
<br/> | <br/> | ||
So, the previous example setup can be rewritten as: | So, the previous example setup can be rewritten as: | ||
Line 505: | Line 351: | ||
<br/> | <br/> | ||
You can use a (configurable) default or pass directives: Valid directives are | You can use a (configurable) default or pass directives: Valid directives are | ||
− | + | {||+| | |
− | {| | ||
− | |||
− | |+ | ||
− | |||
− | | | ||
conversion | conversion | ||
− | | | + | || |
− | |||
− | | | ||
rendering | rendering | ||
− | | | + | ||+| |
− | |||
− | |+ | ||
− | |||
− | | | ||
<tt>inverted</tt> | <tt>inverted</tt> | ||
− | | | + | || |
− | |||
− | | | ||
the Frog jr, Kermit | the Frog jr, Kermit | ||
− | | | + | ||+| |
− | |||
− | |+ | ||
− | |||
− | | | ||
<tt>invertedshort</tt> | <tt>invertedshort</tt> | ||
− | | | + | || |
− | |||
− | | | ||
the Frog jr, K | the Frog jr, K | ||
− | | | + | ||+| |
− | |||
− | |+ | ||
− | |||
− | | | ||
<tt>normal</tt> | <tt>normal</tt> | ||
− | | | + | || |
− | |||
− | | | ||
Kermit, the Frog, jr | Kermit, the Frog, jr | ||
− | | | + | ||+| |
− | |||
− | |+ | ||
− | |||
− | | | ||
<tt>normalshort</tt> | <tt>normalshort</tt> | ||
− | | | + | || |
− | |||
− | | | ||
K, the Frog, jr | K, the Frog, jr | ||
− | | | + | ||} |
− | |||
− | |} | ||
− | |||
Line 615: | Line 427: | ||
<br/> | <br/> | ||
There is a whole bunch of cite options and more can be easily defined. | There is a whole bunch of cite options and more can be easily defined. | ||
− | + | {||+| | |
− | {| | ||
− | |||
− | |+ | ||
− | |||
− | | | ||
key | key | ||
− | | | + | || |
− | |||
− | | | ||
rendering | rendering | ||
− | | | + | ||+| |
− | |||
− | |+ | ||
− | |||
− | | | ||
<tt>author</tt> | <tt>author</tt> | ||
− | | | + | || |
− | |||
− | | | ||
(author) | (author) | ||
− | | | + | ||+| |
− | |||
− | |+ | ||
− | |||
− | | | ||
<tt>authornum</tt> | <tt>authornum</tt> | ||
− | | | + | || |
− | |||
− | | | ||
[author [btx error 1]] | [author [btx error 1]] | ||
− | | | + | ||+| |
− | |||
− | |+ | ||
− | |||
− | | | ||
<tt>authoryear</tt> | <tt>authoryear</tt> | ||
− | | | + | || |
− | |||
− | | | ||
(author (year)) | (author (year)) | ||
− | | | + | ||+| |
− | |||
− | |+ | ||
− | |||
− | | | ||
<tt>authoryears</tt> | <tt>authoryears</tt> | ||
− | | | + | || |
− | |||
− | | | ||
(author, year) | (author, year) | ||
− | | | + | ||+| |
− | |||
− | |+ | ||
− | |||
− | | | ||
<tt>doi</tt> | <tt>doi</tt> | ||
− | | | + | || |
− | |||
− | | | ||
[todo: doi] | [todo: doi] | ||
− | | | + | ||+| |
− | |||
− | |+ | ||
− | |||
− | | | ||
<tt>key</tt> | <tt>key</tt> | ||
− | | | + | || |
− | |||
− | | | ||
[demo-005] | [demo-005] | ||
− | | | + | ||+| |
− | |||
− | |+ | ||
− | |||
− | | | ||
<tt>none</tt> | <tt>none</tt> | ||
− | | | + | || |
− | | | + | ||+| |
− | |||
− | |||
− | |||
− | |+ | ||
− | |||
− | | | ||
<tt>num</tt> | <tt>num</tt> | ||
− | | | + | || |
− | |||
− | | | ||
[[btx error 1]] | [[btx error 1]] | ||
− | | | + | ||+| |
− | |||
− | |+ | ||
− | |||
− | | | ||
<tt>page</tt> | <tt>page</tt> | ||
− | | | + | || |
− | |||
− | | | ||
pages | pages | ||
− | | | + | ||+| |
− | |||
− | |+ | ||
− | |||
− | | | ||
<tt>serial</tt> | <tt>serial</tt> | ||
− | | | + | || |
− | |||
− | | | ||
[5] | [5] | ||
− | | | + | ||+| |
− | |||
− | |+ | ||
− | |||
− | | | ||
<tt>short</tt> | <tt>short</tt> | ||
− | | | + | || |
− | |||
− | | | ||
[aut00] | [aut00] | ||
− | | | + | ||+| |
− | |||
− | |+ | ||
− | |||
− | | | ||
<tt>type</tt> | <tt>type</tt> | ||
− | | | + | || |
− | |||
− | | | ||
[book] | [book] | ||
− | | | + | ||+| |
− | |||
− | |+ | ||
− | |||
− | | | ||
<tt>url</tt> | <tt>url</tt> | ||
− | | | + | || |
− | |||
− | | | ||
[todo: url] | [todo: url] | ||
− | | | + | ||+| |
− | |||
− | |+ | ||
− | |||
− | | | ||
<tt>year</tt> | <tt>year</tt> | ||
− | | | + | || |
− | |||
− | | | ||
(year) | (year) | ||
− | | | + | ||} |
− | |||
− | |} | ||
− | |||
<br/> | <br/> | ||
Because we are dealing with database input and because we generally need to manipulate entries, much of the work is delegated to Lua. This makes it easier to maintain and extend the code. Of course TEX still does the rendering. The typographic details are controlled by parameters but not all are used in all variants. As with most ConTEXt commands, it starts out with a general setup command: | Because we are dealing with database input and because we generally need to manipulate entries, much of the work is delegated to Lua. This makes it easier to maintain and extend the code. Of course TEX still does the rendering. The typographic details are controlled by parameters but not all are used in all variants. As with most ConTEXt commands, it starts out with a general setup command: | ||
Line 778: | Line 496: | ||
<br/> | <br/> | ||
<tt>setupbtxcitevariant : author</tt> | <tt>setupbtxcitevariant : author</tt> | ||
− | + | {||+| | |
− | {| | ||
− | |||
− | |+ | ||
− | |||
− | | | ||
<tt>right</tt> | <tt>right</tt> | ||
− | | | + | || |
− | |||
− | | | ||
<tt>)</tt> | <tt>)</tt> | ||
− | | | + | ||+| |
− | |||
− | |+ | ||
− | |||
− | | | ||
<tt>middle</tt> | <tt>middle</tt> | ||
− | | | + | || |
− | |||
− | | | ||
<tt>, </tt> | <tt>, </tt> | ||
− | | | + | ||+| |
− | |||
− | |+ | ||
− | |||
− | | | ||
<tt>left</tt> | <tt>left</tt> | ||
− | | | + | || |
− | |||
− | | | ||
<tt>(</tt> | <tt>(</tt> | ||
− | | | + | ||} |
− | |||
− | |} | ||
− | |||
<br/> | <br/> | ||
<tt>setupbtxcitevariant : authornum</tt> | <tt>setupbtxcitevariant : authornum</tt> | ||
− | + | {||+| | |
− | {| | ||
− | |||
− | |+ | ||
− | |||
− | | | ||
<tt>right</tt> | <tt>right</tt> | ||
− | | | + | || |
− | |||
− | | | ||
<tt>]</tt> | <tt>]</tt> | ||
− | | | + | ||+| |
− | |||
− | |+ | ||
− | |||
− | | | ||
<tt>middle</tt> | <tt>middle</tt> | ||
− | | | + | || |
− | |||
− | | | ||
<tt>, </tt> | <tt>, </tt> | ||
− | | | + | ||+| |
− | |||
− | |+ | ||
− | |||
− | | | ||
<tt>left</tt> | <tt>left</tt> | ||
− | | | + | || |
− | |||
− | | | ||
<tt>[</tt> | <tt>[</tt> | ||
− | | | + | ||} |
− | |||
− | |} | ||
− | |||
<br/> | <br/> | ||
<tt>setupbtxcitevariant : authoryear</tt> | <tt>setupbtxcitevariant : authoryear</tt> | ||
− | + | {||+| | |
− | {| | ||
− | |||
− | |+ | ||
− | |||
− | | | ||
<tt>compress</tt> | <tt>compress</tt> | ||
− | | | + | || |
− | |||
− | | | ||
<tt>yes</tt> | <tt>yes</tt> | ||
− | | | + | ||+| |
− | |||
− | |+ | ||
− | |||
− | | | ||
<tt>inbetween</tt> | <tt>inbetween</tt> | ||
− | | | + | || |
− | |||
− | | | ||
<tt>, </tt> | <tt>, </tt> | ||
− | | | + | ||+| |
− | |||
− | |+ | ||
− | |||
− | | | ||
<tt>right</tt> | <tt>right</tt> | ||
− | | | + | || |
− | |||
− | | | ||
<tt>)</tt> | <tt>)</tt> | ||
− | | | + | ||+| |
− | |||
− | |+ | ||
− | |||
− | | | ||
<tt>middle</tt> | <tt>middle</tt> | ||
− | | | + | || |
− | |||
− | | | ||
<tt>, </tt> | <tt>, </tt> | ||
− | | | + | ||+| |
− | |||
− | |+ | ||
− | |||
− | | | ||
<tt>left</tt> | <tt>left</tt> | ||
− | | | + | || |
− | |||
− | | | ||
<tt>(</tt> | <tt>(</tt> | ||
− | | | + | ||} |
− | |||
− | |} | ||
− | |||
<br/> | <br/> | ||
<tt>setupbtxcitevariant : authoryears</tt> | <tt>setupbtxcitevariant : authoryears</tt> | ||
− | + | {||+| | |
− | {| | ||
− | |||
− | |+ | ||
− | |||
− | | | ||
<tt>compress</tt> | <tt>compress</tt> | ||
− | | | + | || |
− | |||
− | | | ||
<tt>yes</tt> | <tt>yes</tt> | ||
− | | | + | ||+| |
− | |||
− | |+ | ||
− | |||
− | | | ||
<tt>inbetween</tt> | <tt>inbetween</tt> | ||
− | | | + | || |
− | |||
− | | | ||
<tt>, </tt> | <tt>, </tt> | ||
− | | | + | ||+| |
− | |||
− | |+ | ||
− | |||
− | | | ||
<tt>right</tt> | <tt>right</tt> | ||
− | | | + | || |
− | |||
− | | | ||
<tt>)</tt> | <tt>)</tt> | ||
− | | | + | ||+| |
− | |||
− | |+ | ||
− | |||
− | | | ||
<tt>middle</tt> | <tt>middle</tt> | ||
− | | | + | || |
− | |||
− | | | ||
<tt>, </tt> | <tt>, </tt> | ||
− | | | + | ||+| |
− | |||
− | |+ | ||
− | |||
− | | | ||
<tt>left</tt> | <tt>left</tt> | ||
− | | | + | || |
− | |||
− | | | ||
<tt>(</tt> | <tt>(</tt> | ||
− | | | + | ||} |
− | |||
− | |} | ||
− | |||
<br/> | <br/> | ||
<tt>setupbtxcitevariant : doi</tt> | <tt>setupbtxcitevariant : doi</tt> | ||
− | + | {||+| | |
− | {| | ||
− | |||
− | |+ | ||
− | |||
− | | | ||
<tt>right</tt> | <tt>right</tt> | ||
− | | | + | || |
− | |||
− | | | ||
<tt>]</tt> | <tt>]</tt> | ||
− | | | + | ||+| |
− | |||
− | |+ | ||
− | |||
− | | | ||
<tt>left</tt> | <tt>left</tt> | ||
− | | | + | || |
− | |||
− | | | ||
<tt>[</tt> | <tt>[</tt> | ||
− | | | + | ||} |
− | |||
− | |} | ||
− | |||
<br/> | <br/> | ||
<tt>setupbtxcitevariant : key</tt> | <tt>setupbtxcitevariant : key</tt> | ||
− | + | {||+| | |
− | {| | ||
− | |||
− | |+ | ||
− | |||
− | | | ||
<tt>right</tt> | <tt>right</tt> | ||
− | | | + | || |
− | |||
− | | | ||
<tt>]</tt> | <tt>]</tt> | ||
− | | | + | ||+| |
− | |||
− | |+ | ||
− | |||
− | | | ||
<tt>left</tt> | <tt>left</tt> | ||
− | | | + | || |
− | |||
− | | | ||
<tt>[</tt> | <tt>[</tt> | ||
− | | | + | ||} |
− | |||
− | |} | ||
− | |||
<br/> | <br/> | ||
<tt>setupbtxcitevariant : none</tt> | <tt>setupbtxcitevariant : none</tt> | ||
− | + | {||+| | |
− | {| | ||
− | |||
− | |+ | ||
− | |||
− | | | ||
<tt>no specific settings</tt> | <tt>no specific settings</tt> | ||
− | | | + | || |
− | |||
− | | | ||
− | |||
− | |||
− | |||
− | |||
+ | ||} | ||
<br/> | <br/> | ||
<tt>setupbtxcitevariant : num</tt> | <tt>setupbtxcitevariant : num</tt> | ||
− | + | {||+| | |
− | {| | ||
− | |||
− | |+ | ||
− | |||
− | | | ||
<tt>compress</tt> | <tt>compress</tt> | ||
− | | | + | || |
− | |||
− | | | ||
<tt>yes</tt> | <tt>yes</tt> | ||
− | | | + | ||+| |
− | |||
− | |+ | ||
− | |||
− | | | ||
<tt>inbetween</tt> | <tt>inbetween</tt> | ||
− | | | + | || |
− | |||
− | | | ||
<tt>--</tt> | <tt>--</tt> | ||
− | | | + | ||+| |
− | |||
− | |+ | ||
− | |||
− | | | ||
<tt>right</tt> | <tt>right</tt> | ||
− | | | + | || |
− | |||
− | | | ||
<tt>]</tt> | <tt>]</tt> | ||
− | | | + | ||+| |
− | |||
− | |+ | ||
− | |||
− | | | ||
<tt>left</tt> | <tt>left</tt> | ||
− | | | + | || |
− | |||
− | | | ||
<tt>[</tt> | <tt>[</tt> | ||
− | | | + | ||} |
− | |||
− | |} | ||
− | |||
<br/> | <br/> | ||
<tt>setupbtxcitevariant : page</tt> | <tt>setupbtxcitevariant : page</tt> | ||
− | + | {||+| | |
− | {| | ||
− | |||
− | |+ | ||
− | |||
− | | | ||
<tt>inbetween</tt> | <tt>inbetween</tt> | ||
− | | | + | || |
− | |||
− | | | ||
<tt>–</tt> | <tt>–</tt> | ||
− | | | + | ||} |
− | |||
− | |} | ||
− | |||
<br/> | <br/> | ||
<tt>setupbtxcitevariant : serial</tt> | <tt>setupbtxcitevariant : serial</tt> | ||
− | + | {||+| | |
− | {| | ||
− | |||
− | |+ | ||
− | |||
− | | | ||
<tt>right</tt> | <tt>right</tt> | ||
− | | | + | || |
− | |||
− | | | ||
<tt>]</tt> | <tt>]</tt> | ||
− | | | + | ||+| |
− | |||
− | |+ | ||
− | |||
− | | | ||
<tt>left</tt> | <tt>left</tt> | ||
− | | | + | || |
− | |||
− | | | ||
<tt>[</tt> | <tt>[</tt> | ||
− | | | + | ||} |
− | |||
− | |} | ||
− | |||
<br/> | <br/> | ||
<tt>setupbtxcitevariant : short</tt> | <tt>setupbtxcitevariant : short</tt> | ||
− | + | {||+| | |
− | {| | ||
− | |||
− | |+ | ||
− | |||
− | | | ||
<tt>right</tt> | <tt>right</tt> | ||
− | | | + | || |
− | |||
− | | | ||
<tt>]</tt> | <tt>]</tt> | ||
− | | | + | ||+| |
− | |||
− | |+ | ||
− | |||
− | | | ||
<tt>left</tt> | <tt>left</tt> | ||
− | | | + | || |
− | |||
− | | | ||
<tt>[</tt> | <tt>[</tt> | ||
− | | | + | ||} |
− | |||
− | |} | ||
− | |||
<br/> | <br/> | ||
<tt>setupbtxcitevariant : type</tt> | <tt>setupbtxcitevariant : type</tt> | ||
− | + | {||+| | |
− | {| | ||
− | |||
− | |+ | ||
− | |||
− | | | ||
<tt>right</tt> | <tt>right</tt> | ||
− | | | + | || |
− | |||
− | | | ||
<tt>]</tt> | <tt>]</tt> | ||
− | | | + | ||+| |
− | |||
− | |+ | ||
− | |||
− | | | ||
<tt>left</tt> | <tt>left</tt> | ||
− | | | + | || |
− | |||
− | | | ||
<tt>[</tt> | <tt>[</tt> | ||
− | | | + | ||} |
− | |||
− | |} | ||
− | |||
<br/> | <br/> | ||
<tt>setupbtxcitevariant : url</tt> | <tt>setupbtxcitevariant : url</tt> | ||
− | + | {||+| | |
− | {| | ||
− | |||
− | |+ | ||
− | |||
− | | | ||
<tt>right</tt> | <tt>right</tt> | ||
− | | | + | || |
− | |||
− | | | ||
<tt>]</tt> | <tt>]</tt> | ||
− | | | + | ||+| |
− | |||
− | |+ | ||
− | |||
− | | | ||
<tt>left</tt> | <tt>left</tt> | ||
− | | | + | || |
− | |||
− | | | ||
<tt>[</tt> | <tt>[</tt> | ||
− | | | + | ||} |
− | |||
− | |} | ||
− | |||
<br/> | <br/> | ||
<tt>setupbtxcitevariant : year</tt> | <tt>setupbtxcitevariant : year</tt> | ||
− | + | {||+| | |
− | {| | ||
− | |||
− | |+ | ||
− | |||
− | | | ||
<tt>right</tt> | <tt>right</tt> | ||
− | | | + | || |
− | |||
− | | | ||
<tt>)</tt> | <tt>)</tt> | ||
− | | | + | ||+| |
− | |||
− | |+ | ||
− | |||
− | | | ||
<tt>left</tt> | <tt>left</tt> | ||
− | | | + | || |
− | |||
− | | | ||
<tt>(</tt> | <tt>(</tt> | ||
− | | | + | ||} |
− | |||
− | |} | ||
− | |||
A citation variant is defined in several steps and if you really want to know the dirty details, you should look into the <tt>publ-imp-*.mkiv</tt> files. Here we stick to the concept. | A citation variant is defined in several steps and if you really want to know the dirty details, you should look into the <tt>publ-imp-*.mkiv</tt> files. Here we stick to the concept. | ||
<pre detail='typing'>\startsetups btx:cite:author | <pre detail='typing'>\startsetups btx:cite:author | ||
Line 1,299: | Line 745: | ||
<br/> | <br/> | ||
This results in: | This results in: | ||
− | + | {||+| | |
− | {| | ||
− | |||
− | |+ | ||
− | |||
− | | | ||
<tt>demo-001</tt> | <tt>demo-001</tt> | ||
− | | | + | || |
− | |||
− | | | ||
Hag13 | Hag13 | ||
− | | | + | || |
− | |||
− | | | ||
bibTEX, the ConTEXt way | bibTEX, the ConTEXt way | ||
− | | | + | ||+| |
− | |||
− | |+ | ||
− | |||
− | | | ||
<tt>demo-002</tt> | <tt>demo-002</tt> | ||
− | | | + | || |
− | |||
− | | | ||
Hag14 | Hag14 | ||
− | | | + | || |
− | |||
− | | | ||
bibTEX, the ConTEXt way | bibTEX, the ConTEXt way | ||
− | | | + | ||+| |
− | |||
− | |+ | ||
− | |||
− | | | ||
<tt>demo-003</tt> | <tt>demo-003</tt> | ||
− | | | + | || |
− | |||
− | | | ||
HO96 | HO96 | ||
− | | | + | || |
− | |||
− | | | ||
Typesetting education documents | Typesetting education documents | ||
− | | | + | ||+| |
− | |||
− | |+ | ||
− | |||
− | | | ||
<tt>demo-004</tt> | <tt>demo-004</tt> | ||
− | | | + | || |
− | |||
− | | | ||
Sca21 | Sca21 | ||
− | | | + | || |
− | |||
− | | | ||
Designing high speed trains | Designing high speed trains | ||
− | | | + | ||+| |
− | |||
− | |+ | ||
− | |||
− | | | ||
<tt>demo-005</tt> | <tt>demo-005</tt> | ||
− | | | + | || |
− | |||
− | | | ||
aut00 | aut00 | ||
− | | | + | || |
− | |||
− | | | ||
title | title | ||
− | | | + | ||} |
− | |||
− | |} | ||
− | |||
Line 1,411: | Line 813: | ||
\stoptabulate | \stoptabulate | ||
</pre> | </pre> | ||
− | + | {||+| | |
− | {| | ||
− | |||
− | |+ | ||
− | |||
− | | | ||
<tt>tag</tt> | <tt>tag</tt> | ||
− | | | + | || |
− | |||
− | | | ||
Hagen:TB17-1-54 | Hagen:TB17-1-54 | ||
− | | | + | ||+| |
− | |||
− | |+ | ||
− | |||
− | | | ||
<tt>title</tt> | <tt>title</tt> | ||
− | | | + | || |
− | |||
− | | | ||
PPCHTEX: typesetting chemical formulas in TEX | PPCHTEX: typesetting chemical formulas in TEX | ||
− | | | + | ||} |
− | |||
− | |} | ||
− | |||
<pre detail='buffer'>\startxmlsetups btx:demo | <pre detail='buffer'>\startxmlsetups btx:demo | ||
\xmlcommand | \xmlcommand | ||
Line 1,451: | Line 837: | ||
\xmlsetup{btx:tugboat}{btx:demo} | \xmlsetup{btx:tugboat}{btx:demo} | ||
− | + | {||+| | |
− | {| | ||
− | |||
− | |+ | ||
− | |||
− | | | ||
<tt>tag</tt> | <tt>tag</tt> | ||
− | | | + | || |
− | |||
− | | | ||
Hagen:TB17-1-54 | Hagen:TB17-1-54 | ||
− | | | + | ||+| |
− | |||
− | |+ | ||
− | |||
− | | | ||
<tt>title</tt> | <tt>title</tt> | ||
− | | | + | || |
− | |||
− | | | ||
PPCHTEX: typesetting chemical formulas in TEX | PPCHTEX: typesetting chemical formulas in TEX | ||
− | | | + | ||} |
− | |||
− | |} | ||
− | |||
<br/> | <br/> | ||
Here is another example: | Here is another example: | ||
Line 1,497: | Line 867: | ||
\stoptabulate | \stoptabulate | ||
− | + | {||+| | |
− | {| | ||
− | |||
− | |+ | ||
− | |||
− | | | ||
Knuth:TB10-1-31 | Knuth:TB10-1-31 | ||
− | | | + | || |
− | |||
− | | | ||
Typesetting Concrete Mathematics | Typesetting Concrete Mathematics | ||
− | | | + | ||+| |
− | |||
− | |+ | ||
− | |||
− | | | ||
Knuth:TB10-1-8 | Knuth:TB10-1-8 | ||
− | | | + | || |
− | |||
− | | | ||
TEX would find it difficult … | TEX would find it difficult … | ||
− | | | + | ||+| |
− | |||
− | |+ | ||
− | |||
− | | | ||
Knuth:TB10-3-325 | Knuth:TB10-3-325 | ||
− | | | + | || |
− | |||
− | | | ||
The new versions of TEX and MF | The new versions of TEX and MF | ||
− | | | + | ||+| |
− | |||
− | |+ | ||
− | |||
− | | | ||
Knuth:TB10-4-529 | Knuth:TB10-4-529 | ||
− | | | + | || |
− | |||
− | | | ||
The errors of TEX | The errors of TEX | ||
− | | | + | ||+| |
− | |||
− | |+ | ||
− | |||
− | | | ||
Knuth:TB11-1-13 | Knuth:TB11-1-13 | ||
− | | | + | || |
− | |||
− | | | ||
Virtual Fonts: More Fun for Grand Wizards | Virtual Fonts: More Fun for Grand Wizards | ||
− | | | + | ||+| |
− | |||
− | |+ | ||
− | |||
− | | | ||
Knuth:TB11-2-165 | Knuth:TB11-2-165 | ||
− | | | + | || |
− | |||
− | | | ||
Exercises for TEX: The Program | Exercises for TEX: The Program | ||
− | | | + | ||+| |
− | |||
− | |+ | ||
− | |||
− | | | ||
Knuth:TB11-4-489 | Knuth:TB11-4-489 | ||
− | | | + | || |
− | |||
− | | | ||
The future of TEX and MF | The future of TEX and MF | ||
− | | | + | ||+| |
− | |||
− | |+ | ||
− | |||
− | | | ||
Knuth:TB11-4-497 | Knuth:TB11-4-497 | ||
− | | | + | || |
− | |||
− | | | ||
Arthur Lee Samuel, 1901--1990 | Arthur Lee Samuel, 1901--1990 | ||
− | | | + | ||+| |
− | |||
− | |+ | ||
− | |||
− | | | ||
Knuth:TB11-4-499 | Knuth:TB11-4-499 | ||
− | | | + | || |
− | |||
− | | | ||
Answers to Exercises for TEX: The Program | Answers to Exercises for TEX: The Program | ||
− | | | + | ||+| |
− | |||
− | |+ | ||
− | |||
− | | | ||
Knuth:TB12-2-313 | Knuth:TB12-2-313 | ||
− | | | + | || |
− | |||
− | | | ||
Fixed-point glue setting: Errata | Fixed-point glue setting: Errata | ||
− | | | + | ||+| |
− | |||
− | |+ | ||
− | |||
− | | | ||
Knuth:TB14-4-387 | Knuth:TB14-4-387 | ||
− | | | + | || |
− | |||
− | | | ||
Icons for TEX and MF | Icons for TEX and MF | ||
− | | | + | ||+| |
− | |||
− | |+ | ||
− | |||
− | | | ||
Knuth:TB17-1-29 | Knuth:TB17-1-29 | ||
− | | | + | || |
− | |||
− | | | ||
Important message regarding CM fonts | Important message regarding CM fonts | ||
− | | | + | ||+| |
− | |||
− | |+ | ||
− | |||
− | | | ||
Knuth:TB2-3-5 | Knuth:TB2-3-5 | ||
− | | | + | || |
− | |||
− | | | ||
The current state of things | The current state of things | ||
− | | | + | ||+| |
− | |||
− | |+ | ||
− | |||
− | | | ||
Knuth:TB3-1-10 | Knuth:TB3-1-10 | ||
− | | | + | || |
− | |||
− | | | ||
Fixed-point glue settingDash an example of WEB | Fixed-point glue settingDash an example of WEB | ||
− | | | + | ||+| |
− | |||
− | |+ | ||
− | |||
− | | | ||
Knuth:TB31-2-121 | Knuth:TB31-2-121 | ||
− | | | + | || |
− | |||
− | | | ||
An Earthshaking Announcement | An Earthshaking Announcement | ||
− | | | + | ||+| |
− | |||
− | |+ | ||
− | |||
− | | | ||
Knuth:TB4-2-64 | Knuth:TB4-2-64 | ||
− | | | + | || |
− | |||
− | | | ||
A note on hyphenation | A note on hyphenation | ||
− | | | + | ||+| |
− | |||
− | |+ | ||
− | |||
− | | | ||
Knuth:TB5-1-4 | Knuth:TB5-1-4 | ||
− | | | + | || |
− | |||
− | | | ||
TEX incunabula | TEX incunabula | ||
− | | | + | ||+| |
− | |||
− | |+ | ||
− | |||
− | | | ||
Knuth:TB5-1-67 | Knuth:TB5-1-67 | ||
− | | | + | || |
− | |||
− | | | ||
Comments on quality in publishing | Comments on quality in publishing | ||
− | | | + | ||+| |
− | |||
− | |+ | ||
− | |||
− | | | ||
Knuth:TB5-2-105 | Knuth:TB5-2-105 | ||
− | | | + | || |
− | |||
− | | | ||
A course on MF programming | A course on MF programming | ||
− | | | + | ||+| |
− | |||
− | |+ | ||
− | |||
− | | | ||
Knuth:TB6-1-36 | Knuth:TB6-1-36 | ||
− | | | + | || |
− | |||
− | | | ||
Recipes and fractions | Recipes and fractions | ||
− | | | + | ||+| |
− | |||
− | |+ | ||
− | |||
− | | | ||
Knuth:TB7-2-101 | Knuth:TB7-2-101 | ||
− | | | + | || |
− | |||
− | | | ||
The TEX logo in various fonts | The TEX logo in various fonts | ||
− | | | + | ||+| |
− | |||
− | |+ | ||
− | |||
− | | | ||
Knuth:TB7-2-95 | Knuth:TB7-2-95 | ||
− | | | + | || |
− | |||
− | | | ||
Remarks to celebrate the publication of Computers & Typesetting | Remarks to celebrate the publication of Computers & Typesetting | ||
− | | | + | ||+| |
− | |||
− | |+ | ||
− | |||
− | | | ||
Knuth:TB8-1-14 | Knuth:TB8-1-14 | ||
− | | | + | || |
− | |||
− | | | ||
Mixing right-to-left texts with left-to-right texts | Mixing right-to-left texts with left-to-right texts | ||
− | | | + | ||+| |
− | |||
− | |+ | ||
− | |||
− | | | ||
Knuth:TB8-1-6 | Knuth:TB8-1-6 | ||
− | | | + | || |
− | |||
− | | | ||
It happened: announcement of TEX 2.1 | It happened: announcement of TEX 2.1 | ||
− | | | + | ||+| |
− | |||
− | |+ | ||
− | |||
− | | | ||
Knuth:TB8-1-73 | Knuth:TB8-1-73 | ||
− | | | + | || |
− | |||
− | | | ||
Problem for a Saturday afternoon | Problem for a Saturday afternoon | ||
− | | | + | ||+| |
− | |||
− | |+ | ||
− | |||
− | | | ||
Knuth:TB8-2-135 | Knuth:TB8-2-135 | ||
− | | | + | || |
− | |||
− | | | ||
Fonts for digital halftones | Fonts for digital halftones | ||
− | | | + | ||+| |
− | |||
− | |+ | ||
− | |||
− | | | ||
Knuth:TB8-2-210 | Knuth:TB8-2-210 | ||
− | | | + | || |
− | |||
− | | | ||
Saturday morning problemDash solution | Saturday morning problemDash solution | ||
− | | | + | ||+| |
− | |||
− | |+ | ||
− | |||
− | | | ||
Knuth:TB8-2-217 | Knuth:TB8-2-217 | ||
− | | | + | || |
− | |||
− | | | ||
Reply: Printing out selected pages | Reply: Printing out selected pages | ||
− | | | + | ||+| |
− | |||
− | |+ | ||
− | |||
− | | | ||
Knuth:TB8-3-309 | Knuth:TB8-3-309 | ||
− | | | + | || |
− | |||
− | | | ||
Macros for Jill | Macros for Jill | ||
− | | | + | ||+| |
− | |||
− | |+ | ||
− | |||
− | | | ||
Knuth:TB9-2-152 | Knuth:TB9-2-152 | ||
− | | | + | || |
− | |||
− | | | ||
A Punk Meta-Font | A Punk Meta-Font | ||
− | | | + | ||} |
− | |||
− | |} | ||
− | |||
<br/> | <br/> | ||
A more extensive example is the following. Of course this assumes that you know what xml support mechanisms and macros are available. | A more extensive example is the following. Of course this assumes that you know what xml support mechanisms and macros are available. | ||
Line 1,833: | Line 1,019: | ||
\xmlsetup{btx:tugboat}{btx:sorter} | \xmlsetup{btx:tugboat}{btx:sorter} | ||
− | + | {||+| | |
− | {| | ||
− | |||
− | |+ | ||
− | |||
− | | | ||
1984 | 1984 | ||
− | | | + | || |
− | |||
− | | | ||
Knuth:TB5-1-67 | Knuth:TB5-1-67 | ||
− | | | + | || |
− | |||
− | | | ||
Don Knuth | Don Knuth | ||
− | | | + | ||+| |
− | |||
− | |+ | ||
− | |||
− | | | ||
1984 | 1984 | ||
− | | | + | || |
− | |||
− | | | ||
Knuth:TB5-1-4 | Knuth:TB5-1-4 | ||
− | | | + | || |
− | |||
− | | | ||
Donald E. Knuth | Donald E. Knuth | ||
− | | | + | ||+| |
− | |||
− | |+ | ||
− | |||
− | | | ||
1984 | 1984 | ||
− | | | + | || |
− | |||
− | | | ||
Knuth:TB5-2-105 | Knuth:TB5-2-105 | ||
− | | | + | || |
− | |||
− | | | ||
Donald E. Knuth | Donald E. Knuth | ||
− | | | + | ||+| |
− | |||
− | |+ | ||
− | |||
− | | | ||
1985 | 1985 | ||
− | | | + | || |
− | |||
− | | | ||
Knuth:TB6-1-36 | Knuth:TB6-1-36 | ||
− | | | + | || |
− | |||
− | | | ||
Donald E. Knuth | Donald E. Knuth | ||
− | | | + | ||+| |
− | |||
− | |+ | ||
− | |||
− | | | ||
1986 | 1986 | ||
− | | | + | || |
− | |||
− | | | ||
Knuth:TB7-2-101 | Knuth:TB7-2-101 | ||
− | | | + | || |
− | |||
− | | | ||
Donald E. Knuth | Donald E. Knuth | ||
− | | | + | ||+| |
− | |||
− | |+ | ||
− | |||
− | | | ||
1987 | 1987 | ||
− | | | + | || |
− | |||
− | | | ||
Knuth:TB8-2-135 | Knuth:TB8-2-135 | ||
− | | | + | || |
− | |||
− | | | ||
Donald E. Knuth | Donald E. Knuth | ||
− | | | + | ||+| |
− | |||
− | |+ | ||
− | |||
− | | | ||
1987 | 1987 | ||
− | | | + | || |
− | |||
− | | | ||
Knuth:TB8-3-309 | Knuth:TB8-3-309 | ||
− | | | + | || |
− | |||
− | | | ||
Donald E. Knuth | Donald E. Knuth | ||
− | | | + | ||+| |
− | |||
− | |+ | ||
− | |||
− | | | ||
1988 | 1988 | ||
− | | | + | || |
− | |||
− | | | ||
Knuth:TB9-2-152 | Knuth:TB9-2-152 | ||
− | | | + | || |
− | |||
− | | | ||
Donald E. Knuth | Donald E. Knuth | ||
− | | | + | ||+| |
− | |||
− | |+ | ||
− | |||
− | | | ||
1989 | 1989 | ||
− | | | + | || |
− | |||
− | | | ||
Knuth:TB10-3-325 | Knuth:TB10-3-325 | ||
− | | | + | || |
− | |||
− | | | ||
Donald E. Knuth | Donald E. Knuth | ||
− | | | + | ||+| |
− | |||
− | |+ | ||
− | |||
− | | | ||
1989 | 1989 | ||
− | | | + | || |
− | |||
− | | | ||
Knuth:TB10-4-529 | Knuth:TB10-4-529 | ||
− | | | + | || |
− | |||
− | | | ||
Donald E. Knuth | Donald E. Knuth | ||
− | | | + | ||+| |
− | |||
− | |+ | ||
− | |||
− | | | ||
1990 | 1990 | ||
− | | | + | || |
− | |||
− | | | ||
Knuth:TB11-4-489 | Knuth:TB11-4-489 | ||
− | | | + | || |
− | |||
− | | | ||
Donald E. Knuth | Donald E. Knuth | ||
− | | | + | ||+| |
− | |||
− | |+ | ||
− | |||
− | | | ||
1993 | 1993 | ||
− | | | + | || |
− | |||
− | | | ||
Knuth:TB14-4-387 | Knuth:TB14-4-387 | ||
− | | | + | || |
− | |||
− | | | ||
Donald E. Knuth | Donald E. Knuth | ||
− | | | + | ||+| |
− | |||
− | |+ | ||
− | |||
− | | | ||
1996 | 1996 | ||
− | | | + | || |
− | |||
− | | | ||
Knuth:TB17-1-29 | Knuth:TB17-1-29 | ||
− | | | + | || |
− | |||
− | | | ||
Donald E. Knuth | Donald E. Knuth | ||
− | | | + | ||+| |
− | |||
− | |+ | ||
− | |||
− | | | ||
1987 | 1987 | ||
− | | | + | || |
− | |||
− | | | ||
Knuth:TB8-1-14 | Knuth:TB8-1-14 | ||
− | | | + | || |
− | |||
− | | | ||
Donald Knuth and Pierre MacKay | Donald Knuth and Pierre MacKay | ||
− | | | + | ||+| |
− | |||
− | |+ | ||
− | |||
− | | | ||
1981 | 1981 | ||
− | | | + | || |
− | |||
− | | | ||
Knuth:TB2-3-5 | Knuth:TB2-3-5 | ||
− | | | + | || |
− | |||
− | | | ||
Donald Knuth | Donald Knuth | ||
− | | | + | ||+| |
− | |||
− | |+ | ||
− | |||
− | | | ||
1982 | 1982 | ||
− | | | + | || |
− | |||
− | | | ||
Knuth:TB3-1-10 | Knuth:TB3-1-10 | ||
− | | | + | || |
− | |||
− | | | ||
Donald Knuth | Donald Knuth | ||
− | | | + | ||+| |
− | |||
− | |+ | ||
− | |||
− | | | ||
1983 | 1983 | ||
− | | | + | || |
− | |||
− | | | ||
Knuth:TB4-2-64 | Knuth:TB4-2-64 | ||
− | | | + | || |
− | |||
− | | | ||
Donald Knuth | Donald Knuth | ||
− | | | + | ||+| |
− | |||
− | |+ | ||
− | |||
− | | | ||
1986 | 1986 | ||
− | | | + | || |
− | |||
− | | | ||
Knuth:TB7-2-95 | Knuth:TB7-2-95 | ||
− | | | + | || |
− | |||
− | | | ||
Donald Knuth | Donald Knuth | ||
− | | | + | ||+| |
− | |||
− | |+ | ||
− | |||
− | | | ||
1987 | 1987 | ||
− | | | + | || |
− | |||
− | | | ||
Knuth:TB8-1-6 | Knuth:TB8-1-6 | ||
− | | | + | || |
− | |||
− | | | ||
Donald Knuth | Donald Knuth | ||
− | | | + | ||+| |
− | |||
− | |+ | ||
− | |||
− | | | ||
1987 | 1987 | ||
− | | | + | || |
− | |||
− | | | ||
Knuth:TB8-1-73 | Knuth:TB8-1-73 | ||
− | | | + | || |
− | |||
− | | | ||
Donald Knuth | Donald Knuth | ||
− | | | + | ||+| |
− | |||
− | |+ | ||
− | |||
− | | | ||
1987 | 1987 | ||
− | | | + | || |
− | |||
− | | | ||
Knuth:TB8-2-210 | Knuth:TB8-2-210 | ||
− | | | + | || |
− | |||
− | | | ||
Donald Knuth | Donald Knuth | ||
− | | | + | ||+| |
− | |||
− | |+ | ||
− | |||
− | | | ||
1987 | 1987 | ||
− | | | + | || |
− | |||
− | | | ||
Knuth:TB8-2-217 | Knuth:TB8-2-217 | ||
− | | | + | || |
− | |||
− | | | ||
Donald Knuth | Donald Knuth | ||
− | | | + | ||+| |
− | |||
− | |+ | ||
− | |||
− | | | ||
1989 | 1989 | ||
− | | | + | || |
− | |||
− | | | ||
Knuth:TB10-1-8 | Knuth:TB10-1-8 | ||
− | | | + | || |
− | |||
− | | | ||
Donald Knuth | Donald Knuth | ||
− | | | + | ||+| |
− | |||
− | |+ | ||
− | |||
− | | | ||
1989 | 1989 | ||
− | | | + | || |
− | |||
− | | | ||
Knuth:TB10-1-31 | Knuth:TB10-1-31 | ||
− | | | + | || |
− | |||
− | | | ||
Donald Knuth | Donald Knuth | ||
− | | | + | ||+| |
− | |||
− | |+ | ||
− | |||
− | | | ||
1990 | 1990 | ||
− | | | + | || |
− | |||
− | | | ||
Knuth:TB11-1-13 | Knuth:TB11-1-13 | ||
− | | | + | || |
− | |||
− | | | ||
Donald Knuth | Donald Knuth | ||
− | | | + | ||+| |
− | |||
− | |+ | ||
− | |||
− | | | ||
1990 | 1990 | ||
− | | | + | || |
− | |||
− | | | ||
Knuth:TB11-2-165 | Knuth:TB11-2-165 | ||
− | | | + | || |
− | |||
− | | | ||
Donald Knuth | Donald Knuth | ||
− | | | + | ||+| |
− | |||
− | |+ | ||
− | |||
− | | | ||
1990 | 1990 | ||
− | | | + | || |
− | |||
− | | | ||
Knuth:TB11-4-497 | Knuth:TB11-4-497 | ||
− | | | + | || |
− | |||
− | | | ||
Donald Knuth | Donald Knuth | ||
− | | | + | ||+| |
− | |||
− | |+ | ||
− | |||
− | | | ||
1990 | 1990 | ||
− | | | + | || |
− | |||
− | | | ||
Knuth:TB11-4-499 | Knuth:TB11-4-499 | ||
− | | | + | || |
− | |||
− | | | ||
Donald Knuth | Donald Knuth | ||
− | | | + | ||+| |
− | |||
− | |+ | ||
− | |||
− | | | ||
1991 | 1991 | ||
− | | | + | || |
− | |||
− | | | ||
Knuth:TB12-2-313 | Knuth:TB12-2-313 | ||
− | | | + | || |
− | |||
− | | | ||
Donald Knuth | Donald Knuth | ||
− | | | + | ||+| |
− | |||
− | |+ | ||
− | |||
− | | | ||
2010 | 2010 | ||
− | | | + | || |
− | |||
− | | | ||
Knuth:TB31-2-121 | Knuth:TB31-2-121 | ||
− | | | + | || |
− | |||
− | | | ||
Donald Knuth | Donald Knuth | ||
− | | | + | ||} |
− | |||
− | |} | ||
− | |||
<br/> | <br/> | ||
The original data is stored in a Lua table, hashed by tag. Starting with Lua 5.2 each run of Lua gets a different ordering of such a hash. In older versions, when you looped over a hash, the order was undefined, but the same as long as you used the same binary. This had the advantage that successive runs, something we often have in document processing gave consistent results. In today’s Lua we need to do much more sorting of hashes before we loop, especially when we save multi--pass data. It is for this reason that the xml tree is sorted by hash key by default. That way lookups (especially the first of a set) give consistent outcomes. | The original data is stored in a Lua table, hashed by tag. Starting with Lua 5.2 each run of Lua gets a different ordering of such a hash. In older versions, when you looped over a hash, the order was undefined, but the same as long as you used the same binary. This had the advantage that successive runs, something we often have in document processing gave consistent results. In today’s Lua we need to do much more sorting of hashes before we loop, especially when we save multi--pass data. It is for this reason that the xml tree is sorted by hash key by default. That way lookups (especially the first of a set) give consistent outcomes. |
Revision as of 19:20, 16 January 2014
Contents
The database
The bibTEX format is rather popular in the TEX community and even with its shortcomings it will stay around for a while. Many publication websites can export and many tools are available to work with this database format. It is rather simple and looks a bit like Lua tables. Unfortunately the content can be polluted with non-standardized TEX commands which complicates pre- or postprocessing outside TEX. In that sense a bibTEX database is often not coded neutrally. Some limitations, like the use of commands to encode accented characters root in the ascii world and can be bypassed by using utf instead (as handled somewhat in LATEX through extensions such as bibtex8).
The normal way to deal with a bibliography is to refer to entries using a unique tag or key. When a list of entries is typeset, this reference can be used for linking purposes. The typeset list can be processed and sorted using the bibtex program that converts the database into something more TEX friendly (a .bbl file). I never used the program myself (nor bibliographies) so I will not go into too much detail here, if only because all I say can be wrong.
In ConTEXt we no longer use the bibtex program: we just use database files and deal with the necessary manipulations directly in ConTEXt. One or more such databases can be used and combined with additional entries defined within the document. We can have several such datasets active at the same time.
A bibTEX file looks like this:
@Article{sometag, author = "An Author and Another One", title = "A hopefully meaningful title", journal = maps, volume = "25", number = "2", pages = "5--9", month = mar, year = "2013", ISSN = "1234-5678", }
Normally a value is given between quotes (or curly brackets) but single words are also OK (there is no real benefit in not using quotes, so we advise to always use them). There can be many more fields and instead of strings one can use predefined shortcuts. The title for example quite often contains TEX macros. Some fields, like pages have funny characters such as the endash (typically as --) so we have a mixture of data and typesetting directives. If you are covering non--english references, you often need characters that are not in the ascii subset but ConTEXt is quite happy with utf. If your database file uses old-fashioned TEX accent commands then these will be internally converted automatically to utf. Commands (macros) are converted to an indirect call, which is quite robust.
The bibTEX files are loaded in memory as Lua table but can be converted to xml so that we can access them in a more flexible way, but that is a subject for specialists.
In the old MkII setup we have two kinds of entries: the ones that come from the bibTEX run and user supplied ones. We no longer rely on bibTEX output but we do still support the user supplied definitions. These were in fact prepared in a way that suits the processing of bibTEX generated entries. The next variant reflects the ConTEXt recoding of the old bibTEX output.
\startpublication[k=Hagen:Second,t=article,a={Hans Hagen},y=2013,s=HH01] \artauthor[]{Hans}[H.]{}{Hagen} \arttitle{Who knows more?} \journal{MyJournal} \pubyear{2013} \month{8} \volume{1} \issue{3} \issn{1234-5678} \pages{123--126} \stoppublication
The split \artauthor fields are collapsed into a single author field as we deal with the splitting later when it gets parsed in Lua. The \artauthor syntax is only kept around for backward compatibility with the previous use of bibTEX.
In the new setup we support these variants as well:
\startpublication[k=Hagen:Third,t=article] \author{Hans Hagen} \title{Who knows who?} ... \stoppublication
and
\startpublication[tag=Hagen:Third,category=article] \author{Hans Hagen} \title{Who knows who?} ... \stoppublication
and
\startpublication \tag{Hagen:Third} \category{article} \author{Hans Hagen} \title{Who knows who?} ... \stoppublication
Because internally the entries are Lua tables, we also support loading of Lua based definitions:
return { ["Hagen:First"] = { author = "Hans Hagen", category = "article", issn = "1234-5678", issue = "3", journal = "MyJournal", month = "8", pages = "123--126", tag = "Hagen:First", title = "Who knows nothing?", volume = "1", year = "2013", }, }
Files set up like this can be loaded too. The following xml input is rather close to this, and is also accepted as input.
<?xml version="2.0" standalone="yes" ?> <bibtex> <entry tag="Hagen:First" category="article"> <field name="author">Hans Hagen</field> <field name="category">article</field> <field name="issn">1234-5678</field> <field name="issue">3</field> <field name="journal">MyJournal</field> <field name="month">8</field> <field name="pages">123--126</field> <field name="tag">Hagen:First</field> <field name="title">Who knows nothing?</field> <field name="volume">1</field> <field name="year">2013</field> </entry> </bibtex>
Todo: Add some remarks about loading EndNote and RIS formats, but first we need to complete the tag mapping (on Alan’s plate).
So the user has a rather wide choice of formatting style for bibliography database files.
You can load more data than you actually need. Only entries that are referred to explicitly through the \cite and \nocite commands will be shown in lists. We will cover these details later.
Commands in entries
One unfortunate aspect commonly found in bibTEX files is that they often contain TEX commands. Even worse is that there is no standard on what these commands can be and what they mean, at least not formally, as bibTEX is a program intended to be used with many variants of TEX style: plain, LATEX, and others. This means that we need to define our use of these typesetting commands. However, in most cases, they are just abbreviations or font switches and these are often known. Therefore, ConTEXt will try to resolve them before reporting an issue. In the log file there is a list of commands that has been seen in the loaded databases. For instance, loading tugboat.bib gives a long list of commands of which we show a small set here:
publications > start used btx commands publications > standard CONTEXT 1 known publications > standard ConTeXt 4 known publications > standard TeXLive 3 KNOWN publications > standard eTeX 1 known publications > standard hbox 6 known publications > standard sltt 1 unknown publications > stop used btxcommands
You can define unknown commands, or overload existing definitions in the following way:
\definebtxcommand\TUB {TUGboat} \definebtxcommand\sltt{\tt} \definebtxcommand\<#1>{\type{#1}}
Unknown commands do not stall processing, but their names are then typeset in a mono- spaced font so they probably stand out for proofreading. You can access the commands with \btxcommand{...}, as in:
commands like \btxcommand{MySpecialCommand} are handled in an indirect way
As this is an undefined command we get: “commands like MySpecialCommand are handled in an indirect way”.
??
Datasets
Normally in a document you will use only one bibliographic database, whether or not distributed over multiple files. Nevertheless we support multiple databases as well which is why we talk of datasets instead. A dataset is loaded with the \usebtxdataset command. Although currently it is not necessary to define a (default) dataset you can best do this because in the future we might provide more options. Here are some examples:
\definebtxdataset[standard] \usebtxdataset[standard][tugboat.bib] \usebtxdataset[standard][mtx-bibtex-output.xml] \usebtxdataset[standard][test-001-btx-standard.lua]
These three suffixes are understood by the loader. Here the dataset has the name standard and the three database files are merged, where later entries having the same tag overload previous ones. Definitions in the document source (coded in TEX speak) are also added, and they are saved for successive runs. This means that if you load and define entries, they will be known at a next run beforehand, so that references to them are independent of when loading and definitions take place.
In this document we use some example databases, so let’s load one of them now:
\definebtxdataset[example]
\usebtxdataset[example][mkiv-publications.bib]
You can ask for an overview of entries in a dataset with:
\showbtxdatasetfields[example]
this gives:
tag
category |
fields |
+|
demo-001 |
book |
author index title year |
+|
demo-002 |
book |
crossref index year |
+|
demo-003 |
book |
author comment index title year |
+|
demo-004 |
book |
author comment index title year |
+|
demo-005 |
book |
author doi index pages serial title url year |
}
\setbtxdataset[standard]
RenderingsA list of publications can be rendered at any place in the document. A database can be much larger than needed for a document. The same is true for the fields that make up an entry. Here is the list of fields that are currently handled, but of course there can be additional ones:
\definebtxrendering [example] [dataset=example, method=local, alternative=apa] \placelistofpublications % \placebtxrendering [example] [criterium=all]
|