# Inline Bibliography Latex

Posted on by Nak

## Inline bibliography style

I want to have by BiBTeX generated references inlined in footnotes rather than the very terse references BiBTeX generates by default, so I hacked together a BiBTeX style to do that. These macros are not polished or in the form of a proper distribution, but I have used them with succes myself.

The following discription have been made in haste. I will document it better when I have the time (RSN :-).

There are two files: inlinebib.sty and indexing.bst.

## The idea

This works just like any other BiBTeX style. It will still generate the bibliography at the end of the document, but it will also store all the entries in the files, so they can be inlined in the following run.

The first time a citation is made using the complete bibliography entry is inserted. The following citations to the same entry will generate a short form, with only authors last name and a shortened title, followed by a "cit.". If the same bibliography entry is cited several times in a row, the text will only be "ibid.".

Citations of this form are designed to be used in footnotes.

A little example migth be appropriate (don't we all love screenshots!).

 Footnotes from page one: Footnotes from page two:

It is not possible to avoid having the complete bibliography at the end of the document. The macros simply won't work without it. If you don't need it, just don't print it.

## Usage

### Formalities

To use these macros put the file in your LaTeX search path and in your BiBTeX style search path and then put the line:

\usepackage{inlinebib}

in the preamble of your document.

Other commands have to be added at the point where you want the bibliography to appear, usually at the end of the document. To tell BiBTeX to use the inlinebib style, you have to use :

\bibliographystyle{inlinebib}

Often I add a leading explanation to the bibliography with the macro. That is:

\bibliographycomment{This bibliography ...}

The actual index is produced by the macro. Here you have to specify which BiBTeX databases you want to use.

\bibliography{file ...}

These were all the formalities.

### Doing citations

When writing, just make citations as usual. Remember that these macros can produce very verbose references, and they are intended for footnotes.

The default implementation of allows several bibliography entries to be cited. This version allows only one at a time. It still supports the optional argument, which should be a page reference within the cited text.

There are a few additional macros available. forces a reference in the long form, forces the short form, and disables the generation "ibid." references for the next citation (this can for example be used at the end of each chapter).

To force later citations for certain entries to be either long or short, the macros and can be used. The single argument is a comma separated list of BiBTeX labels that should be either long or short the next time they are cited. E.g., the code \fullcitenext{book1, book2} will cause LaTeX to forget that the two references might have been seen earlier and they will be handled as if they haven't be cited yet.

### The BiBTeX databases

This style does not require special changes to the BiBTeX databases.

Sometimes the BiBTeX style doesn't manage to calculate the proper short forms of the author and the title. In that case the BiBTeX entries in question can be extended with and .

## Tips and tricks

I have some macros to format page ranges, that I use with this BiBTeX style. They should be usable with other styles as well.

The macros are here: pageranges.sty

This file defined one user visible macro: , which will do the following transformations of the single argument:

becomes:
becomes:
becomes:
becomes:

The last version is for cases like which will become .

I often have this little definition in a LaTeX style file. It makes do page ranges automatically and also puts the author in the index (see the indexing macros).

%% Automatically fix page ranges in citations and index author \let\RS@citex\@citex \def\@citex[#1]#2{\I@indexonly-{#2}\RS@citex[\pages{#1}]{#2}}

If you have comments, please write me.

I think we have to clear up the terminology here. If you refer to bibtex, you refer to the executable, e.g. bibtex.exe on a windows system. The bib-file on the other hand is your database of entries.

If you want to create a bibliography without using the bibtex executable, you can use the classic

in your document which you can cite with in the text.

If your question is if you can use a bib-file without bibtex. The answer is - no. Technically the answer is yes because you could use the biber executable with the bibaltex package but because biber and bibtex are kind of the same I still say no.

If your question is if you can include the content of your bib file in you main document the answer is - yes.

Use the filecontents environment and paste the content of your bib file in it. LaTeX will then automatically generate a bib file during the compilation. That way you can send a single tex file to a friend and he can compile the document including the bibliography. You still have to use bibtex though.

answered Oct 24 '13 at 0:12

Categories: 1