Changes

Jump to navigation Jump to search
1,525 bytes added ,  13:19, 9 August 2020
m
Text replacement - "</cmd>" to "}}"
< Please note that this information is relevant to mkii. If you are using mkiv, see [[ModulesBibliography]] | [[User:Taco/Bib]] >.
The '''bib''' module provides the<{{cmd>|cite</cmd>}} and <{{cmd>|placepublications</cmd>}} commands, in addition to some setup commands, for collecting and referencing bibliography. Single references can be supplied by special commands, or by using BibTeX databases.
As of [[Context 2005.01.13]], this module is part of the standard distribution. The current version is also on the
[[modules:bib]] page (Hans picks up the zip from that location as well, so the current version will always be in the modules part of the ConTeXt distribution).
The PDF manual can be found on the [[modules:bibbibman| bib modulemanual]] page or in your ConTeXt installation. For me (ConTeXt installed in my home directory), it's in <tt>~/texmf/doc/context/bib/bibmod-doc.pdf</tt>. <b>Read this manual, it is much more complete than this page!</b>
== Example of use with bibtex ==
\usemodule[bibltx]
\setupbibtex[database=xampl]
\setuppublications[numbering=yes] % Show reference numbers in the generated list.
\starttext
As \cite[article-full] already indicated, bibtex is a \LaTeX-centric program.
The <code>\usemodule[bibltx]</code> line is needed because <tt>xampl.bib</tt> uses LaTeX commands and defines them using LaTeX syntax. The <tt>bibltx</tt> module allows ConTeXt to understand some such constructions (which is enough for it to work with <tt>xampl.bib</tt>).
 
Note: Since Bibtex is added to the context core, no external module is necessary. It is sufficient to type for example (minimal):
 
<texcode>
\setupbibtex[database=bib]
 
\starttext
\completepublications
\stoptext
</texcode>
== Changing the way you show the publication list ==
If you use bibtex and you want to change the way you show the publication list you might want to lookat the following example, it will change the publication list showing the surname in uppercase.
(Credits go to Taco Hoekwater)
When running 'texexec', check the terminal output (or logfile) to ensure that texexec finds the modified t-bib.tex (which I have been keeping in the current directory) rather than the system-supplied t-bib.tex. Once the patched t-bib.tex becomes the official release (Taco says sometime in May 2007), that step won't be necessary.
 
== Superscript Citations ==
 
Cross-referenced citations can be raised in the text using the {{cmd|raisebox}} command:
 
% Superscript citation cross-references.
\setupcite[num][
left=\raisebox{1ex}\hbox\bgroup\tfxx,
right=\egroup,
]
== Other tips ==
* <{{cmd>|placepublications</cmd> }} and <{{cmd>|completepublications</cmd> }} default to producing a publication list for the citations that are local to the current sectioning level. If you find that your reference list is empty even though the citations look fine, you will probably need to add an option to the list command, like so:
<texcode>
\placepublications[criterium=all]
</texcode>
* Even though Bibtex is not encoding-aware at all, it does allows special (8-bit) characters. So there is no need for ugly constructs like \"a (for ä) or \'e (for é). The one exception is within author family names, because those are handled especiallyspecially, both for sorting and for generating so-called 'short tags'. For the same reasons, one must also avoid using non-ascii characters in the bibtex citation reference labels.
[[Category:Modules]]
 
* Bibliography items whose title ends in a ‘?’ (question mark, interrogation mark) can cause problems. See [[Question marks in bibliography entries]] for details of how to work around this.
 
==What can I do, if entries are not shown?==
 
Check if a <code>jobname.bbl</code> - file is generated. If it is empty, try manually running
 
bibtex <filename>
 
In case of an error message like <code>I couldn't open style file cont-no.bst</code>, you can try
 
mktexlsr
 
in root terminal. Bibtex uses LS-R to find these files.
 
== Other tips and links ==
 
* [[Simple Bibliography]] or "simplebib": A simple bibliography module without any database (2012)
* [[Sample_bib| sample bib file]] (2010, Old Content)
 
 
 
[[Category:Old_Content]]

Navigation menu