Thursday, 3 January 2013

Lyx 2.0 (LaTeX): Using the angewandte style with BibLaTeX, or how to make grouped citations.

I tried for a long time to generate a proper angew. chem. citation style with good old BibTeX. Currently there is no style-file for bibtex available, which will result in a 100% correct output. Especially the problem with grouped citations in one entry, i. e. multiple references should be cited as a single one and listed as a single block in the bibliography. That's crucial for the citation of articles published in the german angew. chem and english angew. chem. Int. Ed., respectively. Grouped citations are impossible, or at least, very hard to make with bibtex.

Luckily the BibLaTeX package provides the possibility to make grouped citations. The grouped citations are called ‘entry sets’ or ‘reference sets’ in the biblatex documentation. To use biblatex, angew. chem citation style AND grouped citations with Lyx 2.0, you first have to write the following commands in the latex preamble:



\usepackage[natbib=true, citestyle=numeric-comp, style=chem-angew, backend=biber, hyperref]{biblatex}
\usepackage{hyperref}

%you can change the bibliography title by:

\defbibheading{head}{\chapter{my title}}

%the bibliography is loaded by:

\bibliography{
mybib1,
mybib2,
%....and so on
}

I get biblatex to work only with absolute paths of my .bib files like "C:/folder/mybib1".

The bibliography processor has to be set to "biber" and "natbib" with "author-year" format.

Include the bibliography by typeing in a TeX command box

\printbibliography[] 

% if you changed the bibliography title you have to define [heading=head]

You may also include the bibliography in your document as a Lyx-note if you wish to use the Lyx internal citation function  ("plain" format).

For generating grouped citations you have to define them at the very beginning of your text body:

\defbibentryset{key1}{entry1,entry2}

The entrys are, let's say, Miller2008 and Miller2008b or as whatever the references are named in your .bib file.* So if you want to cite both of them as a grouped citation, you write in a TeX box:

\defbibentryset{Miller}{Miller.2008,Miller.2008b}

The key {Miller} is used to cite the whole entry  (i.e. Miller.2008 AND Miller.2008b). You have to cite the entry within the text by a TeX command:

\autocite{Miller} 

%or \supercite{Miller} which will give the same result

Within the compiled text {Miller} appears as [1] and in your bibliography as
[1] (a) ...... ; (b) ......

If you wish to cite only Miller.2008b, you simply write:

\autocite{Miller.2008b}

In the compiled text it appears as [1b]


That's how the references are cited within the text...
and the bibliography itself.

*I'm using Citavi with the BibLaTeX export option to generate my bib files.





No comments:

Post a Comment