[Home]

RubybTeX

“Haste makes waste.”
--- a proverb

What is this?

RubybTeX is software for formatting bibliographies. It is designed to be a replacement of BibTeX, and it uses .aux files and .bib files as BibTeX does. Therefore, you can use RubybTeX as

% latex main
% rubybtex main
% latex main
% latex main

with your .bib files. RubybTeX is not fully compatible with BibTeX.

The reason I am writing this software is that I want a formatting system that is easy to adjust the formatting style for a specific journal. BibTeX's style files (.bst files) are written as programs for a stack machine, which are hard to customize. (I wonder how much effort has been / is being spent to create a new .bst file by every editorial staff or conference committee...)

RubybTeX (including the style files) is written in Ruby, an object-oriented language, so it is easy to modify an existing style if you are familiar with the language. I hope this tool will help somebody besides me.

This software will be always a prototype, so everything including the style file format is subject to change. Also, it might not work well. (I have been using it to actually process my papers, specifically for ALJ; so far it is satisfactory to me.) It is of beta-version quality. Please use at your own risk. This is "as-is" software (see comments in the files). If you worry about what the software does, please look at the code.

The software might produce typographically inappropriate output, since I'm neither an expert of typesetting, nor an expert of (La)TeX. Comments and suggestions are welcome.

Requirement

Files

rubybtex
Main program.
rubybsup.rb
Supporting subroutines.
plain_bst.rb
A bibliographics style file, works like BibTeX's "plain" style. (But a bit differently.)
mitalife_bst.rb
Another style file. This style file is (intended to be) designed for the Artificial Life Journal, published by MIT Press. (But there are still some differences.)

Install

  1. Download the files.
  2. Edit the first line of rubybtex, which specifies the path for ruby. (First, it is set as /usr/bin/ruby.) Try "which ruby" and put the shown path to the line.
  3. Place all the files in the directory where your .tex and .bib files are.
  4. Make rubybtex executable (i.e., do "chmod +x rubybtex").

If you are familiar with using Ruby, an alternative installation is as follows. Instead of (3) placing everything in the current directory,

(rubybtex uses Ruby's require feature to search them.)

Note: The current version of RubybTeX does no sophisticated searching of necessary files, so .bib files must be in the current directory, that is, the same directory where your .tex file resides.

Usage

Specify \bibliographystyle{plain} to use the style file above. (If you want to use "mitalife", replace plain with mitalife.)

  1. Run LaTeX on your document. Suppose the main .tex file is main.tex. The main.aux file is generated.
  2. Type the following command.

    ./rubybtex main

    If you have "." in your PATH, just typing "rubybtex main" should work. The main.bbl file is generated if everything has worked nicely.

  3. Run LaTeX twice, as usual.

If you feel something has got wrong, remove main.aux and main.bbl, and try from the first step. If this doesn't work either, it may be a bug.

To see how it works

To see safely how RubybTeX and its style file work, it is convenient to use the sample files of BibTeX. In my environment, the sample files test.bib and xampl.bib are in /usr/local/share/texmf/bibtex/bib/base. To use, say, xampl.bib, create a .tex file like:

\documentclass{article}
\begin{document}
\nocite{*}
\bibliographystyle{plain}
\bibliography{xampl}
\end{document}

Then all the references in xampl.bib are listed. You can see some erroneously formatted entries because RubybTeX is not perfectly compatible with BibTeX.

Main differences of features from BibTeX

Please don't expect as good results as those BibTeX produces.

Small differences cannot be listed since there are quite many.

How to create a new style

It will be easy to modify plain_bst.rb to create a new style file. See the comments in the file. (A better document should be provided.)

Comments and suggestions

Comments and suggestions are welcome. Please let me know by email. (My email address is at the end of this page.)

Links

Recent changes


tominaga at i tomilab net

$Date: 2007/09/05 16:38:21 $