2009-07-29

BibTeX cheat sheet and entry templates

See the most up-to-date version of the cheat sheet at http://www.inf.bme.hu/~pts/bibtex-cheat-sheet.txt . A quick copy:
* Based on information form http://en.wikipedia.org/wiki/BibTeX
* See also: http://amath.colorado.edu/documentation/LaTeX/reference/faq/bibstyles.html
* Nonstandard entries: url=, annote=, crossref=,
* No url= field in standard types, should be put to note={URL \url{...}}.
* There are no comments in BibTeX .bib files, not even %
* ?NAME= describes an optional field.
* BibTeX silently ignores ignores a field whose name it doesn't know.

.bib file entry templates
"""""""""""""""""""""""""
@article{NAME,
author={},
title={},
journal={},
year=,
?volume={},
?number={},
?pages={},
?month=,
?note={},
?key={},
}

@book{NAME,
author/editor={},
title={},
publisher={},
year=,
?volume={},
?series={},
?address={},
?edition={},
?month=,
?note={},
?key={},
?pages={},
}

@booklet{NAME,
title={},
?author={},
?howpublished={},
?address={},
?month=,
?year=,
?note={},
?key={},
}

@conference{NAME,
author={},
title={},
booktitle={},
year=,
?editor={},
?pages={},
?organization={},
?publisher={},
?address={},
?month=,
?note={},
?key={},
}

@inbook{NAME,
author/editor={},
title={},
chapter/pages={},
publisher={},
year=,
?volume={},
?series={},
?address={},
?edition={},
?month=,
?note={},
?key={},
}

@incollection{NAME,
author={},
title={},
booktitle={},
year=,
?editor={},
?pages={},
?organization={},
?publisher={},
?address={},
?month=,
?note={},
?key={},
}

@inproceedings{NAME,
author={},
title={},
booktitle={},
year=,
?editor={},
?pages={},
?organization={},
?publisher={},
?address={},
?month=,
?note={},
?key={},
}

@manual{NAME,
title={},
?author={},
?organization={},
?address={},
?edition={},
?month=,
?year=,
?note={},
?key={},
}

@mastersthesis{NAME,
author={},
title={},
school={},
year=,
?address={},
?month=,
?note={},
?key={},
}

@misc{NAME,
?author={},
?title={},
?howpublished={},
?month=,
?year=,
?note={},
?key={},
}

@phdthesis{NAME,
author={},
title={},
school={},
year=,
?address={},
?month=,
?note={},
?key={},
}

@proceedings{NAME,
title={},
year=,
?editor={},
?publisher={},
?organization={},
?address={},
?month=,
?note={},
?key={},
}

@techreport{NAME,
author={},
title={},
institution={},
year=={},
?type={},
?number={},
?address={},
?month=,
?note={},
?key={},
}

@unpublished{NAME,
author={},
title={},
note={},
?month=,
?year=,
?key={},
}

Description of entries and fields
"""""""""""""""""""""""""""""""""
* @article: An article from a journal or magazine.
* @book: A book with an explicit publisher.
* @booklet: A work that is printed and bound, but without a named publisher or
sponsoring institution.
* @conference: The same as inproceedings, included for Scribe compatibility.
* @inbook: A part of a book, usually untitled. May be a chapter (or section or
whatever) and/or a range of pages.
* @incollection: A part of a book having its own title.
* @inproceedings: An article in a conference proceedings.
* @manual: Technical documentation.
* @mastersthesis: A Master's thesis.
* @misc: For use when nothing else fits.
* @phdthesis: A Ph.D. thesis.
* @proceedings: The proceedings of a conference.
* @techreport: A report published by a school or other institution, usually
numbered within a series.
* @unpublished: A document having an author and title, but not formally
published.
* address=: Publisher's address (usually just the city, but can be the full
address for lesser-known publishers)
* annote=: An annotation for annotated bibliography styles (not typical)
* author=: The name(s) of the author(s) (in the case of more than one author,
separated by and)
* booktitle=: The title of the book, if only part of it is being cited
* chapter=: The chapter number
* crossref=: The key of the cross-referenced entry
* edition=: The edition of a book, long form (such as "first" or "second")
* editor=: The name(s) of the editor(s)
* eprint=: A specification of an electronic publication, often a preprint or a
technical report
* howpublished=: How it was published, if the publishing method is nonstandard
* institution=: The institution that was involved in the publishing, but not
necessarily the publisher
* journal=: The journal or magazine the work was published in
* key=: A hidden field used for specifying or overriding the alphabetical order
of entries (when the "author" and "editor" fields are missing). Note that
this is very different from the key (mentioned just after this list) that is
used to cite or cross-reference the entry.
* month=: The month of publication (or, if unpublished, the month of creation).
Example 1=: month=jan. Example 2=: month="17~" # feb.
* note=: Miscellaneous extra information
* number=: The "number" of a journal, magazine, or tech-report, if applicable.
(Most publications have a "volume", but no "number" field.)
* organization=: The conference sponsor
* pages=: Page numbers, separated either by commas or double-hyphens. For books,
the total number of pages.
* publisher=: The publisher's name
* school=: The school where the thesis was written
* series=: The series of books the book was published in (e.g. "The Hardy Boys"
or "Lecture Notes in Computer Science")
* title=: The title of the work
* type=: The type of tech-report, for example, "Research Note"
* url=: The WWW address
* volume=: The volume of a journal or multi-volume book
* year=: The year of publication (or, if unpublished, the year of creation)

2009-07-11

How to create a bootable CD running GRUB4DOS on Linux (Ubuntu Hardy)

GRUB4DOS is a flexible, feature-extended version of the GRUB boot manager. This blog post explains how to create a bootable CD which boots GRUB4DOS, from which you can boot almost anything. To create a bootable floppy instead, see http://ptspts.blogspot.com/2009/07/how-to-create-bootable-floppy-running.html.

Run this shell script to create the CD image grldr.iso:
#! /bin/bash
# by pts@fazekas.hu at Sat Jul 11 16:24:31 CEST 2009
GRUB4DOS_ZIP=grub4dos-0.4.4-2009-06-20.zip
GRUB4DOS_DIR=grub4dos-0.4.4 # as extracted from $GRUB4DOS_ZIP
set -ex
TO_INSTALL=''
type -p mkisofs || TO_INSTALL="$TO_INSTALL mkisofs"
type -p wget || TO_INSTALL="$TO_INSTALL wget"
type -p unzip || TO_INSTALL="$TO_INSTALL unzip"
test "$TO_INSTALL" && sudo apt-get install $TO_INSTALL
wget -O "$GRUB4DOS_ZIP" http://download.gna.org/grub4dos/"$GRUB4DOS_ZIP"
unzip -o "$GRUB4DOS_ZIP"
test "$GRUB4DOS_DIR"/grldr
rm -rf grldr.iso.dir
mkdir grldr.iso.dir
cp "$GRUB4DOS_DIR"/{grldr,menu.lst} grldr.iso.dir
mkisofs -R -b grldr -no-emul-boot -boot-load-size 4 -o grldr.iso grldr.iso.dir
: All OK, CD image grldr.iso created.
Please note that you may want to adjust the GRUB4DOS_ZIP variable above in order to download a more recent version of GRUB4DOS, when its available. you can get the list of versions from http://download.gna.org/grub4dos/.

You may use the CD image grldr.iso in your virtualization software (such as VirtualBox), or you may burn it to a CD with:
$ sudo apt-get install growisofs
$ growisofs -dvd-compat -Z /dev/cdrom=grldr.iso

How to create a bootable floppy running GRUB4DOS on Linux (Ubuntu Hardy)

GRUB4DOS is a flexible, feature-extended version of the GRUB boot manager. This blog post explains how to create a bootable floppy which boots GRUB4DOS, from which you can boot almost anything. To create bootable CD instead, see http://ptspts.blogspot.com/2009/07/how-to-create-bootable-cd-running.html.

Run this shell script to create the 1.44MB floppy image grldr.img:
#! /bin/bash
# by pts@fazekas.hu at Sat Jul 11 11:02:14 CEST 2009
GRUB4DOS_ZIP=grub4dos-0.4.4-2009-06-20.zip
GRUB4DOS_DIR=grub4dos-0.4.4 # as extracted from $GRUB4DOS_ZIP
set -ex
TO_INSTALL=''
type -p wget || TO_INSTALL="$TO_INSTALL wget"
type -p mformat || TO_INSTALL="$TO_INSTALL mtools"
type -p unzip || TO_INSTALL="$TO_INSTALL unzip"
test "$TO_INSTALL" && sudo apt-get install $TO_INSTALL
wget -O "$GRUB4DOS_ZIP" http://download.gna.org/grub4dos/"$GRUB4DOS_ZIP"
unzip -o "$GRUB4DOS_ZIP"
dd if=/dev/zero of=grldr.img bs=1474560 count=1
mformat -i grldr.img -f1440 ::
"$GRUB4DOS_DIR"/bootlace.com --floppy --chs grldr.img
mcopy -i grldr.img "$GRUB4DOS_DIR/grldr" ::GRLDR
mcopy -i grldr.img "$GRUB4DOS_DIR/menu.lst" ::menu.lst
: All OK, 1.44MB floppy image grldr.img created.
Please note that you may want to adjust the GRUB4DOS_ZIP variable above in order to download a more recent version of GRUB4DOS, when its available. you can get the list of versions from http://download.gna.org/grub4dos/.

You may use the floppy image grldr.img in your virtualization software (such as VirtualBox), or you may write it to a floppy disk with:
$ cat grldr.img >/dev/fd0