diff --git a/LICENSE b/LICENSE
--- a/LICENSE
+++ b/LICENSE
@@ -1,4 +1,4 @@
-Copyright (c) 2009, Henning Thielemann
+Copyright (c) 2009-2011, Henning Thielemann
 
 All rights reserved.
 
diff --git a/Makefile b/Makefile
--- a/Makefile
+++ b/Makefile
@@ -1,4 +1,4 @@
-.PHONY:	ghci pubs hackbib remotehackbib
+.PHONY:	ghci test testbuild pubs hackbib remotehackbib
 
 # problem: bibtex refuses to generate empty bbl files
 # thus you must have at least one entry per publication type
@@ -8,25 +8,32 @@
 ghci:
 	ghci -Wall -i:src src/Publications.hs
 
-pubs:	tex/publications.pdf
+test:	testbuild pubs
 
-%.pdf:	%.tex %-cite.tex $(patsubst %, tex/%.bbl, $(TYPES))
+testbuild:
+	runhaskell Setup configure --user -fbuildExamples
+	runhaskell Setup build
+	runhaskell Setup haddock
+
+pubs:	publications/publications.pdf
+
+%.pdf:	%.tex %-cite.tex $(patsubst %, publications/%.bbl, $(TYPES))
 	(cd $(dir $<); pdflatex $(notdir $<); pdflatex $(notdir $<))
 
 %-cite.tex:	%.bib
 	./dist/build/publication-overview/publication-overview < $< >$@
 #	ghc -e main src/Publications.hs < $< >$@
 
-%.bbl:	%.aux tex/publications.bib
+%.bbl:	%.aux publications/publications.bib
 	(cd $(dir $<); bibtex $(notdir $*))
 
-tex/%.aux: tex/publications.tex
+publications/%.aux: publications/publications.tex
 	(cd $(dir $<); pdflatex $(notdir $<))
 
 
-hackbib:	hackage.bib
+hackbib:	hackage/hackage.bib
 
-hackage.bib:	$(HOME)/.cabal/packages/hackage.haskell.org/00-index.tar.gz src/Hackage.hs
+hackage/hackage.bib:	$(HOME)/.cabal/packages/hackage.haskell.org/00-index.tar.gz src/Hackage.hs
 	gunzip --stdout $< | ./dist/build/hackage-bibtex/hackage-bibtex >$@
 #	gunzip --stdout $< | ghc -e main src/Hackage.hs >$@
 
diff --git a/bibtex.cabal b/bibtex.cabal
--- a/bibtex.cabal
+++ b/bibtex.cabal
@@ -1,5 +1,5 @@
 Name:             bibtex
-Version:          0.0.6.1
+Version:          0.1
 License:          BSD3
 License-File:     LICENSE
 Author:           Henning Thielemann <haskell@henning-thielemann.de>
@@ -26,7 +26,7 @@
   .
   > cabal install -fbuildExamples bibtex
   .
-  For the first example see the "tex" directory of this package.
+  For the first example see the @publications@ directory of this package.
   You can start the program and build an example document by running
   .
   > make pubs
@@ -35,14 +35,15 @@
   for the LaTeX package @multibib@.
   You can add the custom bibtex field @subtype@ to BibTeX entries
   for more detailed categorization of an entry.
-  See "tex/publications.bib" for examples.
+  See "publications/publications.bib" for examples.
   .
   The second example can be executed using
   .
   > make hackbib
   .
-  The file @hackage.bib@ is written to the current directory.
-  The program reads an uncompressed tar archive from standard input
+  The file @hackage.bib@ is written to the @hackage@ subdirectory.
+  The @hackage-bibtex@ program
+  reads an uncompressed tar archive from standard input
   and writes the result bibliography file to standard output.
   .
   Note that @hackage.bib@ exceeds some limits of standard BibTeX and LaTeX:
@@ -60,17 +61,25 @@
   then @pdflatex@ hits its limits:
   .
   > TeX capacity exceeded, sorry [save size=5000]
-Tested-With:      GHC==6.10.4
+Tested-With:      GHC==6.12.3
 Cabal-Version:    >=1.6
 Build-Type:       Simple
 Extra-Source-Files:
   Makefile
-  tex/publications.tex
-  tex/publications.bib
+  publications/publications.tex
+  publications/publications.bib
+  hackage/hackage.tex
+  hackage/thielemann.tex
+
 Source-Repository head
   type:     darcs
   location: http://code.haskell.org/~thielema/bibtex/
 
+Source-Repository this
+  tag:      0.1
+  type:     darcs
+  location: http://code.haskell.org/~thielema/bibtex/
+
 Flag base2
   description: Choose the new smaller, split-up base package.
 
@@ -80,8 +89,8 @@
 
 Library
   Build-Depends:
+    latex >=0.1 && <0.2,
     parsec >=2.1 && <3.2,
-    containers >= 0.1 && <0.4,
     utility-ht >=0.0.5 && <0.1
   If flag(base2)
     Build-Depends:
@@ -97,7 +106,6 @@
     Text.BibTeX.Entry
     Text.BibTeX.Format
     Text.BibTeX.Parse
-    Text.LaTeX.Character
 
 
 Executable       publication-overview
@@ -111,9 +119,9 @@
 Executable       hackage-bibtex
   If flag(buildExamples)
     Build-Depends:
-      old-time >=1.0 && <1.1,
-      Cabal >=1.6 && <1.10,
-      tar >=0.3 && <0.4,
+      old-time >=1.0 && <1.2,
+      Cabal >=1.6 && <1.16,
+      tar >=0.3 && <0.5,
       utf8-string >=0.3.4 && <0.4,
       bytestring >=0.9 && <0.10
   Else
diff --git a/hackage/hackage.tex b/hackage/hackage.tex
new file mode 100644
--- /dev/null
+++ b/hackage/hackage.tex
@@ -0,0 +1,20 @@
+\documentclass[a4paper]{article}
+
+\usepackage{natbib}
+\usepackage[colorlinks=true]{hyperref}
+
+\begin{document}
+
+% \nocite{*}
+
+\input{thielemann}
+
+\bibliographystyle{plain}
+\bibliography{hackage}
+
+% with alpha style, BibTeX generates identifiers like Ant09{ that cannot be handled by LaTeX
+% \bibliographystyle{alpha}
+% \bibliographystyle{plain}
+% \bibliography{hackage-b}
+
+\end{document}
diff --git a/hackage/thielemann.tex b/hackage/thielemann.tex
new file mode 100644
--- /dev/null
+++ b/hackage/thielemann.tex
@@ -0,0 +1,258 @@
+\cite{thielemann2009data-accessor-transformers-0.2.1},
+\cite{thielemann2009data-accessor-transformers-0.2},
+\cite{thielemann2009non-negative-0.0.5},
+\cite{thielemann2008non-negative-0.0.2},
+\cite{thielemann2008non-negative-0.0.1},
+\cite{thielemann2008non-negative-0.0.3},
+\cite{thielemann2010non-negative-0.0.5.1},
+\cite{thielemann2009non-negative-0.0.4},
+\cite{thielemann2010event-list-0.0.10.1},
+\cite{thielemann2008event-list-0.0.7},
+\cite{thielemann2008event-list-0.0.5},
+\cite{thielemann2008event-list-0.0.6},
+\cite{thielemann2009event-list-0.0.10},
+\cite{thielemann2009event-list-0.0.9.1},
+\cite{thielemann2009event-list-0.0.8},
+\cite{thielemann2009event-list-0.0.9},
+\cite{thielemann2009synthesizer-alsa-0.0.2.1},
+\cite{thielemann2009synthesizer-alsa-0.0.2},
+\cite{thielemann2009synthesizer-alsa-0.0.3},
+\cite{thielemann2009synthesizer-alsa-0.1},
+\cite{thielemann2009tagsoup-ht-0.3},
+\cite{thielemann2008tagsoup-ht-0.2},
+\cite{thielemann2008haskore-supercollider-0.0.2},
+\cite{thielemann2009haskore-supercollider-0.1.1},
+\cite{thielemann2009haskore-supercollider-0.1},
+\cite{thielemann2009monoid-transformer-0.0.2},
+\cite{thielemann2009monoid-transformer-0.0.1},
+\cite{thielemann2009sample-frame-0.0.1},
+\cite{thielemann2009synthesizer-core-0.3},
+\cite{thielemann2009synthesizer-core-0.2.1},
+\cite{thielemann2009synthesizer-core-0.2},
+\cite{thielemann2008data-accessor-0.1.2},
+\cite{thielemann2009data-accessor-0.2.0.1},
+\cite{thielemann2009data-accessor-0.2.1},
+\cite{thielemann2009data-accessor-0.2.1.2},
+\cite{thielemann2008data-accessor-0.1.3},
+\cite{thielemann2009data-accessor-0.2.0.2},
+\cite{thielemann2008data-accessor-0.1.4},
+\cite{thielemann2008data-accessor-0.1.1},
+\cite{thielemann2009data-accessor-0.2},
+\cite{thielemann2009xml-basic-0.0.1},
+\cite{thielemann2009xml-basic-0.1.1},
+\cite{thielemann2009xml-basic-0.1},
+\cite{thielemann2008iff-0.0.1},
+\cite{thielemann2009synthesizer-0.2.0.1},
+\cite{thielemann2008synthesizer-0.0.3},
+\cite{thielemann2009synthesizer-0.2},
+\cite{thielemann2008markov-chain-0.0.2},
+\cite{thielemann2007markov-chain-0.0.1},
+\cite{thielemann2009markov-chain-0.0.3},
+\cite{thielemann2009utility-ht-0.0.5},
+\cite{thielemann2009utility-ht-0.0.2},
+\cite{thielemann2009utility-ht-0.0.1},
+\cite{thielemann2009utility-ht-0.0.3},
+\cite{thielemann2009utility-ht-0.0.5.1},
+\cite{thielemann2009utility-ht-0.0.4},
+\cite{thielemann2010database-study-0.0.1},
+\cite{thielemann2008midi-0.1.2},
+\cite{thielemann2008midi-0.0.7},
+\cite{thielemann2008midi-0.0.5},
+\cite{thielemann2009midi-0.1.3.1},
+\cite{thielemann2010midi-0.1.5},
+\cite{thielemann2009midi-0.1.3.2},
+\cite{thielemann2008midi-0.0.6},
+\cite{thielemann2009midi-0.1.3},
+\cite{thielemann2009midi-0.1.4},
+\cite{thielemann2008midi-0.1.1},
+\cite{thielemann2008midi-0.0.4},
+\cite{thielemann2009gnuplot-0.3},
+\cite{thielemann2009gnuplot-0.3.3},
+\cite{thielemann2010gnuplot-0.3.3.1},
+\cite{thielemann2009gnuplot-0.3.2},
+\cite{thielemann2008gnuplot-0.1},
+\cite{thielemann2008gnuplot-0.2},
+\cite{thielemann2008haskore-synthesizer-0.0.2},
+\cite{thielemann2009haskore-synthesizer-0.0.3},
+\cite{thielemann2008haskore-realtime-0.0.2},
+\cite{thielemann2009haskore-realtime-0.1},
+\cite{thielemann2009data-accessor-mtl-0.2},
+\cite{thielemann2008data-accessor-template-0.1.2},
+\cite{thielemann2008data-accessor-template-0.1.3},
+\cite{thielemann2008data-accessor-template-0.1.4},
+\cite{thielemann2008data-accessor-template-0.1.1},
+\cite{thielemann2009storablevector-streamfusion-0.0},
+\cite{thielemann2009supercollider-ht-0.1.0.1},
+\cite{thielemann2008supercollider-ht-0.0.1},
+\cite{thielemann2009supercollider-ht-0.1},
+\cite{thielemann2009sample-frame-np-0.0.1},
+\cite{thielemann2009bibtex-0.0.1},
+\cite{thielemann2009toilet-0.0.1},
+\cite{thielemann2009opensoundcontrol-ht-0.1},
+\cite{thielemann2009http-monad-0.0.1},
+\cite{thielemann2009sox-0.0.1},
+\cite{thielemann2009sox-0.1},
+\cite{thielemann2009storable-record-0.0.1},
+\cite{thielemann2009lazyio-0.0.2},
+\cite{thielemann2009lazyio-0.0.1},
+\cite{thielemann2009synthesizer-dimensional-0.3},
+\cite{thielemann2009synthesizer-dimensional-0.4},
+\cite{thielemann2009synthesizer-dimensional-0.2},
+\cite{thielemann2009hgl-example-0.0.1},
+\cite{thielemann2009tagchup-0.4},
+\cite{thielemann2009tagchup-0.3.1},
+\cite{thielemann2008equal-files-0.0.2.1},
+\cite{thielemann2008equal-files-0.0.2},
+\cite{thielemann2008equal-files-0.0.1},
+\cite{thielemann2008equal-files-0.0.3},
+\cite{thielemann2009spreadsheet-0.1},
+\cite{thielemann2008supercollider-midi-0.1.1},
+\cite{thielemann2008supercollider-midi-0.1},
+\cite{thielemann2009data-accessor-monads-fd-0.2},
+\cite{thielemann2009storable-tuple-0.0.2},
+\cite{thielemann2009storable-tuple-0.0.1},
+\cite{thielemann2009wraxml-0.3},
+\cite{thielemann2009wraxml-0.4},
+\cite{thielemann2009wraxml-0.4.3},
+\cite{thielemann2009wraxml-0.4.0.1},
+\cite{thielemann2009wraxml-0.4.2},
+\cite{thielemann2009synthesizer-inference-0.2},
+\cite{thielemann2008internetmarke-0.0.2},
+\cite{thielemann2008internetmarke-0.0.1},
+\cite{thielemann2009explicit-exception-0.1.2},
+\cite{thielemann2008explicit-exception-0.0.2},
+\cite{thielemann2009explicit-exception-0.1.3},
+\cite{thielemann2009explicit-exception-0.1.4},
+\cite{thielemann2009explicit-exception-0.1.0.1},
+\cite{thielemann2008explicit-exception-0.0.1},
+\cite{thielemann2009explicit-exception-0.1.1},
+\cite{thielemann2009explicit-exception-0.1},
+\cite{thielemann2009data-accessor-transformers-0.2.1},
+\cite{thielemann2009data-accessor-transformers-0.2},
+\cite{thielemann2009non-negative-0.0.5},
+\cite{thielemann2008non-negative-0.0.2},
+\cite{thielemann2008non-negative-0.0.1},
+\cite{thielemann2008non-negative-0.0.3},
+\cite{thielemann2010non-negative-0.0.5.1},
+\cite{thielemann2009non-negative-0.0.4},
+\cite{thielemann2010event-list-0.0.10.1},
+\cite{thielemann2008event-list-0.0.7},
+\cite{thielemann2008event-list-0.0.5},
+\cite{thielemann2008event-list-0.0.6},
+\cite{thielemann2009event-list-0.0.10},
+\cite{thielemann2009event-list-0.0.9.1},
+\cite{thielemann2009event-list-0.0.8},
+\cite{thielemann2009event-list-0.0.9},
+\cite{thielemann2009synthesizer-alsa-0.0.2.1},
+\cite{thielemann2009synthesizer-alsa-0.0.2},
+\cite{thielemann2009synthesizer-alsa-0.0.3},
+\cite{thielemann2009synthesizer-alsa-0.1},
+\cite{thielemann2009tagsoup-ht-0.3},
+\cite{thielemann2008tagsoup-ht-0.2},
+\cite{thielemann2008haskore-supercollider-0.0.2},
+\cite{thielemann2009haskore-supercollider-0.1.1},
+\cite{thielemann2009haskore-supercollider-0.1},
+\cite{thielemann2009monoid-transformer-0.0.2},
+\cite{thielemann2009monoid-transformer-0.0.1},
+\cite{thielemann2009sample-frame-0.0.1},
+\cite{thielemann2009synthesizer-core-0.3},
+\cite{thielemann2009synthesizer-core-0.2.1},
+\cite{thielemann2009synthesizer-core-0.2},
+\cite{thielemann2008data-accessor-0.1.2},
+\cite{thielemann2009data-accessor-0.2.0.1},
+\cite{thielemann2009data-accessor-0.2.1},
+\cite{thielemann2009data-accessor-0.2.1.2},
+\cite{thielemann2008data-accessor-0.1.3},
+\cite{thielemann2009data-accessor-0.2.0.2},
+\cite{thielemann2008data-accessor-0.1.4},
+\cite{thielemann2008data-accessor-0.1.1},
+\cite{thielemann2009data-accessor-0.2},
+\cite{thielemann2009xml-basic-0.0.1},
+\cite{thielemann2009xml-basic-0.1.1},
+\cite{thielemann2009xml-basic-0.1},
+\cite{thielemann2008iff-0.0.1},
+\cite{thielemann2009synthesizer-0.2.0.1},
+\cite{thielemann2008synthesizer-0.0.3},
+\cite{thielemann2009synthesizer-0.2},
+\cite{thielemann2008markov-chain-0.0.2},
+\cite{thielemann2007markov-chain-0.0.1},
+\cite{thielemann2009markov-chain-0.0.3},
+\cite{thielemann2009utility-ht-0.0.5},
+\cite{thielemann2009utility-ht-0.0.2},
+\cite{thielemann2009utility-ht-0.0.1},
+\cite{thielemann2009utility-ht-0.0.3},
+\cite{thielemann2009utility-ht-0.0.5.1},
+\cite{thielemann2009utility-ht-0.0.4},
+\cite{thielemann2010database-study-0.0.1},
+\cite{thielemann2008midi-0.1.2},
+\cite{thielemann2008midi-0.0.7},
+\cite{thielemann2008midi-0.0.5},
+\cite{thielemann2009midi-0.1.3.1},
+\cite{thielemann2010midi-0.1.5},
+\cite{thielemann2009midi-0.1.3.2},
+\cite{thielemann2008midi-0.0.6},
+\cite{thielemann2009midi-0.1.3},
+\cite{thielemann2009midi-0.1.4},
+\cite{thielemann2008midi-0.1.1},
+\cite{thielemann2008midi-0.0.4},
+\cite{thielemann2009gnuplot-0.3},
+\cite{thielemann2009gnuplot-0.3.3},
+\cite{thielemann2010gnuplot-0.3.3.1},
+\cite{thielemann2009gnuplot-0.3.2},
+\cite{thielemann2008gnuplot-0.1},
+\cite{thielemann2008gnuplot-0.2},
+\cite{thielemann2008haskore-synthesizer-0.0.2},
+\cite{thielemann2009haskore-synthesizer-0.0.3},
+\cite{thielemann2008haskore-realtime-0.0.2},
+\cite{thielemann2009haskore-realtime-0.1},
+\cite{thielemann2009data-accessor-mtl-0.2},
+\cite{thielemann2008data-accessor-template-0.1.2},
+\cite{thielemann2008data-accessor-template-0.1.3},
+\cite{thielemann2008data-accessor-template-0.1.4},
+\cite{thielemann2008data-accessor-template-0.1.1},
+\cite{thielemann2009storablevector-streamfusion-0.0},
+\cite{thielemann2009supercollider-ht-0.1.0.1},
+\cite{thielemann2008supercollider-ht-0.0.1},
+\cite{thielemann2009supercollider-ht-0.1},
+\cite{thielemann2009sample-frame-np-0.0.1},
+\cite{thielemann2009bibtex-0.0.1},
+\cite{thielemann2009toilet-0.0.1},
+\cite{thielemann2009opensoundcontrol-ht-0.1},
+\cite{thielemann2009http-monad-0.0.1},
+\cite{thielemann2009sox-0.0.1},
+\cite{thielemann2009sox-0.1},
+\cite{thielemann2009storable-record-0.0.1},
+\cite{thielemann2009lazyio-0.0.2},
+\cite{thielemann2009lazyio-0.0.1},
+\cite{thielemann2009synthesizer-dimensional-0.3},
+\cite{thielemann2009synthesizer-dimensional-0.4},
+\cite{thielemann2009synthesizer-dimensional-0.2},
+\cite{thielemann2009hgl-example-0.0.1},
+\cite{thielemann2009tagchup-0.4},
+\cite{thielemann2009tagchup-0.3.1},
+\cite{thielemann2008equal-files-0.0.2.1},
+\cite{thielemann2008equal-files-0.0.2},
+\cite{thielemann2008equal-files-0.0.1},
+\cite{thielemann2008equal-files-0.0.3},
+\cite{thielemann2009spreadsheet-0.1},
+\cite{thielemann2008supercollider-midi-0.1.1},
+\cite{thielemann2008supercollider-midi-0.1},
+\cite{thielemann2009data-accessor-monads-fd-0.2},
+\cite{thielemann2009storable-tuple-0.0.2},
+\cite{thielemann2009storable-tuple-0.0.1},
+\cite{thielemann2009wraxml-0.3},
+\cite{thielemann2009wraxml-0.4},
+\cite{thielemann2009wraxml-0.4.3},
+\cite{thielemann2009wraxml-0.4.0.1},
+\cite{thielemann2009wraxml-0.4.2},
+\cite{thielemann2009synthesizer-inference-0.2},
+\cite{thielemann2008internetmarke-0.0.2},
+\cite{thielemann2008internetmarke-0.0.1},
+\cite{thielemann2009explicit-exception-0.1.2},
+\cite{thielemann2008explicit-exception-0.0.2},
+\cite{thielemann2009explicit-exception-0.1.3},
+\cite{thielemann2009explicit-exception-0.1.4},
+\cite{thielemann2009explicit-exception-0.1.0.1},
+\cite{thielemann2008explicit-exception-0.0.1},
+\cite{thielemann2009explicit-exception-0.1.1},
+\cite{thielemann2009explicit-exception-0.1},
diff --git a/publications/publications.bib b/publications/publications.bib
new file mode 100644
--- /dev/null
+++ b/publications/publications.bib
@@ -0,0 +1,74 @@
+@InProceedings{alfer2002beginning,
+  author =	 {Alfer, Ralf and Thielemann, Henning},
+  title =	 {The beginning of everything},
+  booktitle =	 {42 articles about everything},
+  subtype =	 {reviewed},
+  year =	 2002,
+  month =	 {June},
+},
+
+This is a comment between to BibTeX entries.@Article{thielemann2000foobar,
+  author =	 {Thielemann, Henning},
+  title =	 {Foo Bar},
+  journal =	 {Journal of Irrelevant Applications},
+  subtype =	 {popular},
+  month =	 {December},
+  year =	 2000,
+  pages =	 {123--321},
+  volume =	 88,
+  number =	 7,
+}
+,
+@TechReport{thielemann2000prefoobar,
+  author =	 {Thielemann, Henning},
+  title =	 {Before Foo becomes Bar},
+  institution =	 {University of Applied Irrelevance},
+  year =	 2000
+}
+
+@Article{thielemann2001nonexistence,
+  author =	 {Curry, Haskell Brooks and Thielemann, Henning},
+  title =	 {Non-existence proof of certain articles},
+  journal =	 {Journal of Logical Consequences},
+  subtype =	 {reviewed},
+  year =	 2001,
+  volume =	 21,
+  number =	 4,
+  pages =	 {219--226},
+  month =	 {August},
+}
+
+@InProceedings{thielemann2002mass,
+  author =	 {Thielemann, Henning},
+  title =	 {Mess for the Masses},
+  booktitle =	 {Annual conference of the Society of Measurement},
+  year =	 2002,
+  month =	 {September},
+}
+
+@Article{thielemann2002other,
+  author =	 {Thielemann, Henning and others},
+  title =	 {Make things different},
+  journal =	 {The Other Journal},
+  year =	 2002,
+  volume =	 42,
+  number =	 7,
+  pages =	 {271--314},
+  month =	 {January},
+}
+
+@PhdThesis{thielemann2006diss,
+  author =	 {Thielemann, Henning},
+  title =	 {Equivalence of Foo and Bar},
+  school =	 {University of Applied Irrelevance},
+  year =	 2006,
+  month =	 {March}
+}
+
+@Misc{thielemann2010bibtex,
+  key =		 {haskell, bibtex, natbib},
+  author =	 {Thielemann, Henning},
+  title =	 {BibTeX parsing and generation},
+  howpublished = {\url{http://hackage.haskell.org/package/bibtex}},
+  subtype =	 {program},
+}
diff --git a/publications/publications.tex b/publications/publications.tex
new file mode 100644
--- /dev/null
+++ b/publications/publications.tex
@@ -0,0 +1,65 @@
+\documentclass[a4paper]{article}
+
+\usepackage{times}
+
+\usepackage{color}
+\definecolor{dark-green}{rgb}{0.0,0.5,0.0}
+
+\usepackage[colorlinks,citecolor=dark-green]{hyperref}
+
+
+\renewcommand{\familydefault}{\sfdefault}
+
+
+\usepackage{multibib}
+
+\newcites{reviewedjournal}{Reviewed Journals}
+\newcites{reviewedconference}{Reviewed Conferences}
+\newcites{techreport}{Technical Reports}
+\newcites{journal}{Other Journals}
+\newcites{conference}{Other Conferences}
+\newcites{thesis}{Theses}
+\newcites{program}{Programming Projects}
+\newcites{popular}{Popular Scientific Articles}
+
+
+\sloppy
+
+
+\begin{document}
+
+\input{publications-cite}
+
+\bibliographystylereviewedjournal{plain}
+\bibliographyreviewedjournal{publications}
+
+
+\bibliographystylereviewedconference{plain}
+\bibliographyreviewedconference{publications}
+
+
+\bibliographystyletechreport{plain}
+\bibliographytechreport{publications}
+
+
+\bibliographystylejournal{plain}
+\bibliographyjournal{publications}
+
+
+\bibliographystyleconference{plain}
+\bibliographyconference{publications}
+
+
+\bibliographystylethesis{plain}
+\bibliographythesis{publications}
+
+
+\bibliographystyleprogram{plain}
+\bibliographyprogram{publications}
+
+
+\bibliographystylepopular{plain}
+\bibliographypopular{publications}
+
+
+\end{document}
diff --git a/src/Hackage.hs b/src/Hackage.hs
--- a/src/Hackage.hs
+++ b/src/Hackage.hs
@@ -141,28 +141,24 @@
            else (c,rest))
 
 
-fromTarEntry :: Tar.Entry -> B.ByteString
+fromTarEntry :: Tar.Entry -> String
 fromTarEntry ent =
-   if List.isSuffixOf ".cabal" (TarEnt.entryPath ent)
-     then
-       case TarEnt.entryContent ent of
-          TarEnt.NormalFile txt _size ->
-             UTF8.fromString $
-             case parsePackageDescription (decodeUTF8orLatin txt) of
-                PkgP.ParseOk _ pkg ->
-                   Format.entry $
-                   fromPackage
-                      (toUTCTime (TOD (fromIntegral $ TarEnt.entryTime ent) 0))
-                      (PkgD.packageDescription pkg)
-                PkgP.ParseFailed msg -> show msg
-          _ -> B.empty
-     else B.empty
+   case (List.isSuffixOf ".cabal" $ TarEnt.entryPath ent,
+         TarEnt.entryContent ent) of
+      (True, TarEnt.NormalFile txt _size) ->
+         case parsePackageDescription (decodeUTF8orLatin txt) of
+            PkgP.ParseOk _ pkg ->
+               Format.entry $
+               fromPackage
+                  (toUTCTime (TOD (fromIntegral $ TarEnt.entryTime ent) 0))
+                  (PkgD.packageDescription pkg)
+            PkgP.ParseFailed msg -> show msg
+      _ -> ""
 
 main :: IO ()
 main =
    Tar.foldEntries
-      (\entry cont ->
-         B.putStrLn (fromTarEntry entry) >> cont)
-      (return ()) (IO.hPutStr IO.stderr) .
+      (\entry cont -> putStrLn (fromTarEntry entry) >> cont)
+      (return ()) (IO.hPutStr IO.stderr . show) .
    Tar.read =<<
    B.getContents
diff --git a/src/Text/BibTeX/Parse.hs b/src/Text/BibTeX/Parse.hs
--- a/src/Text/BibTeX/Parse.hs
+++ b/src/Text/BibTeX/Parse.hs
@@ -1,18 +1,59 @@
-module Text.BibTeX.Parse where
+{- |
+The parsers in this module also skip trailing spaces.
+-}
+module Text.BibTeX.Parse (
+   file,
+   comment,
+   entry,
+   assignment,
+   value,
+   texSequence,
+   texBlock,
+   identifier,
+   bibIdentifier,
 
+   -- utility functions
+   skippingSpace,
+   skippingLeadingSpace,
+
+   splitCommaSepList,
+   splitAuthorList,
+   splitSepList,
+   ) where
+
 import qualified Text.BibTeX.Entry as Entry
 
-import Text.ParserCombinators.Parsec (Parser, (<|>), )
+import qualified Text.ParserCombinators.Parsec.Token as T
+import qualified Text.ParserCombinators.Parsec.Language as L
 import qualified Text.ParserCombinators.Parsec as Parsec
+import Text.ParserCombinators.Parsec
+   (CharParser, Parser,
+    (<|>), alphaNum, digit, letter, char, noneOf, oneOf,
+    between, many, many1, sepEndBy, )
 
 import Control.Monad (liftM, liftM2, liftM3, )
--- import Control.Applicative ((<*), )
 
-import Data.Maybe (catMaybes, )
 import Data.List.HT (chop, )
-import Data.String.HT (trim, )
 
 
+lexer :: T.TokenParser st
+lexer =
+   T.makeTokenParser $ L.emptyDef {
+      L.commentLine = "%",
+      L.identStart = alphaNum,
+      L.identLetter = alphaNum
+   }
+
+
+identifier, comma, equals :: CharParser st String
+identifier = T.identifier lexer
+comma = T.comma lexer
+equals = T.symbol lexer "="
+
+braces, lexeme :: CharParser st a -> CharParser st a
+braces = T.braces lexer
+lexeme = T.lexeme lexer
+
 {- |
 Beware that this and all other parsers do not accept leading spaces,
 cf. 'skippingSpace'.
@@ -25,27 +66,13 @@
 or it can be used for automated filetype checking.
 -}
 file :: Parser [Entry.T]
-file =
-   fmap catMaybes $
-   Parsec.many
-      (skippingSpace
---         ((fmap Just entry <* Parsec.optional (Parsec.char ',')))
-         ((do e <- entry; Parsec.optional (Parsec.char ','); return (Just e))
-          <|>
-          fmap (const Nothing) comment))
+file = comment >> sepEndBy entry comment
 
-{- |
-Parse a line that starts with a hash like
 
-> # this is a comment
-
-.
--}
 comment :: Parser String
-comment =
-   do Parsec.char '#'
-      fmap trim $ Parsec.manyTill Parsec.anyChar Parsec.newline
+comment = many $ noneOf "@"
 
+
 {- |
 Parse a BibTeX entry like
 
@@ -60,14 +87,11 @@
 -}
 entry :: Parser Entry.T
 entry =
-   do Parsec.char '@'
-      entryType <- skippingSpace identifier
-      skippingSpace (Parsec.char '{')
-      bibId <- skippingSpace (bibIdentifier <|> return "")
-      skippingSpace (Parsec.char ',')
-      assigns <- assignment `Parsec.sepEndBy` skippingSpace (Parsec.char ',')
-      skippingSpace (Parsec.char '}')
-      return (Entry.Cons entryType bibId assigns)
+   do entryType <- char '@' >> identifier
+      braces $
+         liftM2 (Entry.Cons entryType)
+            (Parsec.try bibIdentifier)
+            (comma >> sepEndBy assignment comma)
 
 {- |
 Parse an assignment like
@@ -78,10 +102,9 @@
 -}
 assignment :: Parser (String, String)
 assignment =
-   do field <- skippingSpace bibIdentifier
-      skippingSpace (Parsec.char '=')
-      val <- skippingSpace value
-      return (field, trim val)
+   liftM2 (,)
+      bibIdentifier
+      (equals >> value)
 
 {- |
 Parse a value like
@@ -104,10 +127,10 @@
 -}
 value :: Parser String
 value =
-   Parsec.many1 Parsec.letter <|> -- for fields like: month = jul
-   Parsec.many1 Parsec.digit <|>  -- for fields like: year = 2010
-   Parsec.between (Parsec.char '{') (Parsec.char '}') (texSequence '}') <|>
-   Parsec.between (Parsec.char '"') (Parsec.char '"') (texSequence '"')
+   lexeme (many1 letter) <|> -- for fields like: month = jul
+   lexeme (many1 digit)  <|> -- for fields like: year = 2010
+   braces (texSequence '}') <|>
+   lexeme (between (char '"') (char '"') (texSequence '"'))
 
 {- |
 Parse a sequence of 'texBlock's until the occurrence of a closing character.
@@ -115,7 +138,7 @@
 -}
 texSequence :: Char -> Parser String
 texSequence closeChar =
-   liftM concat (Parsec.many (texBlock closeChar))
+   liftM concat (many (texBlock closeChar))
 
 {- |
 Parse a single character like @a@,
@@ -125,36 +148,32 @@
 texBlock :: Char -> Parser String
 texBlock closeChar =
    liftM3 (\open body close -> open : body ++ close : [])
-      (Parsec.char '{') (texSequence '}') (Parsec.char '}') <|>
+      (char '{') (texSequence '}') (char '}') <|>
    sequence
-      [Parsec.char '\\',
-       Parsec.oneOf "_{}'`^&%\".,~# " <|> Parsec.letter] <|>
-   fmap (:[]) (Parsec.noneOf [closeChar])
+      [char '\\',
+       oneOf "_{}'`^&%\".,~# " <|> letter] <|>
+   fmap (:[]) (noneOf [closeChar])
 
-{- |
-Parse a type of a BibTeX entry like @article@.
--}
-identifier :: Parser String
-identifier =
-   liftM2 (:)
-      Parsec.letter
-      (Parsec.many Parsec.alphaNum)
 
 {- |
 Parse a name of a BibTeX entry like @author2010title@.
 -}
 bibIdentifier :: Parser String
 bibIdentifier =
-   Parsec.many1 (Parsec.alphaNum <|> Parsec.oneOf "&;:-_.?+/")
+   lexeme $
+   liftM2 (:) (letter <|> char '_') (many (alphaNum <|> oneOf "&;:-_.?+/"))
 
+
 {- |
 Extends a parser, such that all trailing spaces are skipped.
-It might be more comfortable to skip all leading zeros,
+It might be more comfortable to skip all leading spaces,
 but parser written that way are hard to combine.
 This is so, since if you run two parsers in parallel
 and both of them expect leading spaces,
 then the parser combinator does not know
 which one of the parallel parsers to choose.
+
+See also: 'lexeme'.
 -}
 skippingSpace :: Parser a -> Parser a
 skippingSpace p =
@@ -165,7 +184,6 @@
 skippingLeadingSpace :: Parser a -> Parser a
 skippingLeadingSpace p =
    Parsec.skipMany Parsec.space >> p
-
 
 
 -- * Convert contents of BibTeX fields into lists
diff --git a/src/Text/LaTeX/Character.hs b/src/Text/LaTeX/Character.hs
deleted file mode 100644
--- a/src/Text/LaTeX/Character.hs
+++ /dev/null
@@ -1,251 +0,0 @@
-module Text.LaTeX.Character (
-   toUnicodeString,
-   fromUnicodeString,
-   table,
-   ) where
-
--- import Data.List.HT (multiReplace, )
-import Data.Tuple.HT (mapSnd, )
-import Data.Char (isLetter, chr, ord, )
-import qualified Data.Map as Map
-
-
-{- |
-Replace LaTeX macros for special characters
-by Unicode characters in a lazy way.
--}
-toUnicodeString :: String -> String
-toUnicodeString =
-   filter (not . flip elem "{}") .
-   toUnicodeStringCore
-{-
-toUnicodeString =
-   multiReplace table
--}
-
-toUnicodeStringCore :: String -> String
-toUnicodeStringCore "" = ""
-toUnicodeStringCore (c:cs) =
-   case c of
-     '\\' ->
-       let getArgument "" = ("", "")
-           getArgument (a:argsuffix) =
-              if a/='{'
-                then ([a], argsuffix)
-                else
-                  {-
-                  this does not support nested curly braces,
-                  however, I have no argument with braces in my dictionary
-                  -}
-                  let (argstr, suffix) = break ('}'==) argsuffix
-                  in  (argstr, drop 1 suffix)
-           translateInvocation = do
-              (macro,(arg,rest)) <-
-                 case cs of
-                    [] -> Nothing
-                    b:bs -> Just $
-                       if elem b "'`^\"~"
-                         then ([b], getArgument bs)
-                         else mapSnd getArgument $
-                              span isLetter cs
-              code <- Map.lookup (macro,arg) toMap
-              return (code, rest)
-       in  case translateInvocation of
-              Just (code,rest) -> code : toUnicodeStringCore rest
-              Nothing -> c : toUnicodeStringCore cs
-     '$' ->
-        let (math, rest) = break ('$'==) cs
-        in  parseMathString math ++ toUnicodeStringCore (drop 1 rest)
-     _ -> c : toUnicodeStringCore cs
-
-parseMathString :: String -> String
-parseMathString "" = ""
-parseMathString (c:cs) =
-   if c/='\\'
-     then c : parseMathString cs
-     else let (ident,rest) = span isLetter cs
-          in  maybe ('\\':ident) (:[])
-                 (Map.lookup ident mathMap) ++
-              parseMathString rest
-
-fromUnicodeString :: String -> String
-fromUnicodeString =
-   concatMap (\c -> Map.findWithDefault [c] c fromMap)
---   multiReplace (map swap table)
-
-{-# DEPRECATED table "use toUnicodeString or fromUnicodeString" #-}
-table :: [(String, String)]
-table =
-   ("\\&",    "&") :
-   ("\\~{}",  "~") :
-   ("\\\"a",  "ä") :
-   ("\\\"o",  "ö") :
-   ("\\\"u",  "ü") :
-   ("\\\"A",  "Ä") :
-   ("\\\"O",  "Ö") :
-   ("\\\"U",  "Ü") :
-   ("\\ss{}", "ß") :
-   ("\\`e",   "è") :
-   ("\\'e",   "é") :
-   ("\\'a",   "á") :
-   ("\\'{\\i}", "í") :
-   ("\\'u",   "ú") :
-   ("\\'U",   "Ú") :
-   ("\\o{}", "ø") :
-   ("\\O{}", "Ø") :
-   ("\\oe{}", "œ") :
-   ("\\OE{}", "Œ") :
-   ("\\ae{}", "æ") :
-   ("\\AE{}", "Æ") :
-   ("\\l{}", "ł") :
-   ("\\L{}", "Ł") :
-   ("\\c{c}", "ç") :
-   ("\\c{C}", "Ç") :
-   ("\\~a", "ã") :
-   ("\\~A", "Ã") :
-   []
-
-
-fromMap :: Map.Map Char String
-fromMap =
-   Map.fromList
-      (do (base, variants) <- accents
-          (accent, code) <- variants
-          return (chr code, '\\':accent:'{':base:'}':""))
-   `Map.union`
-   Map.fromList
-      (map (\(ident, code) -> (chr code, "\\"++ident++"{}")) specialChars)
-   `Map.union`
-   Map.fromList
-      -- curly braces around dollars assert that no $$ can occur in the output
-      (map (\(ident, code) -> (chr code, "{$\\"++ident++"$}")) mathChars)
-   `Map.union`
-   Map.fromList
-      (map (\c -> (c, '\\':c:[])) escapedChars)
-
-
-toMap :: Map.Map (String, String) Char
-toMap =
-   Map.fromList
-      (do (base, variants) <- accents
-          (accent, code) <- variants
-          return (([accent], [base]), chr code))
-   `Map.union`
-   Map.fromList
-      (map (\(ident, code) -> ((ident, ""), chr code)) specialChars)
-   `Map.union`
-   Map.fromList
-      (map (\c -> (('\\':c:[], ""), c)) escapedChars)
-
-
-accents :: [(Char, [(Char, Int)])]
-accents =
-   ('A', ('`', 192) : ('\'', 193) : ('^', 194) : ('~', 195) : ('"', 196) : []) :
-   ('E', ('`', 200) : ('\'', 201) : ('^', 202) : ('"', 203) : []) :
-   ('I', ('`', 204) : ('\'', 205) : ('^', 206) : ('"', 207) : []) :
-   ('N', ('~', 209) : []) :
-   ('O', ('`', 210) : ('\'', 211) : ('^', 212) : ('~', 213) : ('"', 214) : []) :
-   ('U', ('`', 217) : ('\'', 218) : ('^', 219) : ('"', 220) : []) :
-   ('Y', ('"', 223) : ('\'', 221) : []) :
-   ('C', ('c', 199) : ('\'', 262) : ('^', 264) : ('.', 266) : ('v', 268) : []) :
-   ('S', ('c', 350) : ('\'', 346) : ('^', 348) : ('v', 352) : []) :
-   ('a', ('`', 224) : ('\'', 225) : ('^', 227) : ('"', 228) : []) :
-   ('e', ('`', 232) : ('\'', 233) : ('^', 234) : ('"', 235) : []) :
-   ('i', ('`', 236) : ('\'', 237) : ('^', 238) : ('"', 239) : []) :
-   ('n', ('~', 241) : []) :
-   ('o', ('`', 242) : ('\'', 243) : ('^', 244) : ('~', 245) : ('"', 246) : []) :
-   ('u', ('`', 249) : ('\'', 250) : ('^', 251) : ('"', 252) : []) :
-   ('y', ('"', 255) : ('\'', 253) : []) :
-   ('c', ('c', 231) : ('\'', 263) : ('^', 265) : ('.', 267) : ('v', 269) : []) :
-   ('s', ('c', 351) : ('\'', 347) : ('^', 349) : ('"', 223) : ('v', 353) : []) :
-   []
-
-specialChars :: [(String, Int)]
-specialChars =
-   ("cc", 231) :
-   ("cC", 199) :
-   ("aa", 229) :
-   ("AA", 197) :
-   ("i",  239) :
-   ("l",  321) :
-   ("L",  322) :
-   ("ss", 223) :
-   ("3",  223) :
-   ("o",  248) :
-   ("O",  216) :
-   ("ae", 230) :
-   ("AE", 198) :
-   ("S", 167) :
-   ("pounds", 163) :
-   ("euro", 8364) :
-   ("copyright", 169) :
-
-   ("textbackslash", ord '\\') :
-   ("textasciitilde", ord '~') :
-   ("textasciicircum", ord '^') :
-   ("textless", ord '<') :
-   ("textgreater", ord '>') :
-   ("textdollar", ord '$') :
-   ("textexclamdown", 161) :
-   ("textquestiondown", 191) :
-   ("textquotedblleft", ord '"') :
-   []
-
-mathMap :: Map.Map String Char
-mathMap =
-   Map.fromList (map (\(name,code) -> (name, chr code)) mathChars)
-
-mathChars :: [(String, Int)]
-mathChars =
-   ("Alpha",      913) :
-   ("Beta",       914) :
-   ("Gamma",      915) :
-   ("Delta",      916) :
-   ("Epsilon",    917) :
-   ("Zeta",       918) :
-   ("Eta",        919) :
-   ("Theta",      920) :
-   ("Iota",       921) :
-   ("Kappa",      922) :
-   ("Lambda",     923) :
-   ("Mu",         924) :
-   ("Nu",         925) :
-   ("Xi",         926) :
-   ("Omikron",    927) :
-   ("Pi",         928) :
-   ("Rho",        929) :
-   ("Sigma",      931) :
-   ("Tau",        932) :
-   ("Upsilon",    933) :
-   ("Phi",        934) :
-   ("Chi",        935) :
-   ("Psi",        936) :
-   ("Omega",      937) :
-   ("alpha",      945) :
-   ("beta",       946) :
-   ("gamma",      947) :
-   ("delta",      948) :
-   ("epsilon",    949) :
-   ("zeta",       950) :
-   ("eta",        951) :
-   ("theta",      952) :
-   ("iota",       953) :
-   ("kappa",      954) :
-   ("lambda",     955) :
-   ("mu",         956) :
-   ("nu",         957) :
-   ("xi",         958) :
-   ("omikron",    959) :
-   ("pi",         960) :
-   ("rho",        961) :
-   ("sigma",      963) :
-   ("tau",        964) :
-   ("upsilon",    965) :
-   ("phi",        966) :
-   ("chi",        967) :
-   ("psi",        968) :
-   ("omega",      969) :
-   []
-
-escapedChars :: [Char]
-escapedChars = "$%&_#{}"
diff --git a/tex/publications.bib b/tex/publications.bib
deleted file mode 100644
--- a/tex/publications.bib
+++ /dev/null
@@ -1,74 +0,0 @@
-@InProceedings{alfer2002beginning,
-  author =	 {Alfer, Ralf and Thielemann, Henning},
-  title =	 {The beginning of everything},
-  booktitle =	 {42 articles about everything},
-  subtype =	 {reviewed},
-  year =	 2002,
-  month =	 {June},
-},
-
-@Article{thielemann2000foobar,
-  author =	 {Thielemann, Henning},
-  title =	 {Foo Bar},
-  journal =	 {Journal of Irrelevant Applications},
-  subtype =	 {popular},
-  month =	 {December},
-  year =	 2000,
-  pages =	 {123--321},
-  volume =	 88,
-  number =	 7,
-}
-,
-@TechReport{thielemann2000prefoobar,
-  author =	 {Thielemann, Henning},
-  title =	 {Before Foo becomes Bar},
-  institution =	 {University of Applied Irrelevance},
-  year =	 2000
-}
-
-@Article{thielemann2001nonexistence,
-  author =	 {Curry, Haskell Brooks and Thielemann, Henning},
-  title =	 {Non-existence proof of certain articles},
-  journal =	 {Journal of Logical Consequences},
-  subtype =	 {reviewed},
-  year =	 2001,
-  volume =	 21,
-  number =	 4,
-  pages =	 {219--226},
-  month =	 {August},
-}
-
-@InProceedings{thielemann2002mass,
-  author =	 {Thielemann, Henning},
-  title =	 {Mess for the Masses},
-  booktitle =	 {Annual conference of the Society of Measurement},
-  year =	 2002,
-  month =	 {September},
-}
-
-@Article{thielemann2002other,
-  author =	 {Thielemann, Henning and others},
-  title =	 {Make things different},
-  journal =	 {The Other Journal},
-  year =	 2002,
-  volume =	 42,
-  number =	 7,
-  pages =	 {271--314},
-  month =	 {January},
-}
-
-@PhdThesis{thielemann2006diss,
-  author =	 {Thielemann, Henning},
-  title =	 {Equivalence of Foo and Bar},
-  school =	 {University of Applied Irrelevance},
-  year =	 2006,
-  month =	 {March}
-}
-
-@Misc{thielemann2010bibtex,
-  key =		 {haskell, bibtex, natbib},
-  author =	 {Thielemann, Henning},
-  title =	 {BibTeX parsing and generation},
-  howpublished = {\url{http://hackage.haskell.org/package/bibtex}},
-  subtype =	 {program},
-}
diff --git a/tex/publications.tex b/tex/publications.tex
deleted file mode 100644
--- a/tex/publications.tex
+++ /dev/null
@@ -1,65 +0,0 @@
-\documentclass[a4paper]{article}
-
-\usepackage{times}
-
-\usepackage{color}
-\definecolor{dark-green}{rgb}{0.0,0.5,0.0}
-
-\usepackage[colorlinks,citecolor=dark-green]{hyperref}
-
-
-\renewcommand{\familydefault}{\sfdefault}
-
-
-\usepackage{multibib}
-
-\newcites{reviewedjournal}{Reviewed Journals}
-\newcites{reviewedconference}{Reviewed Conferences}
-\newcites{techreport}{Technical Reports}
-\newcites{journal}{Other Journals}
-\newcites{conference}{Other Conferences}
-\newcites{thesis}{Theses}
-\newcites{program}{Programming Projects}
-\newcites{popular}{Popular Scientific Articles}
-
-
-\sloppy
-
-
-\begin{document}
-
-\input{publications-cite}
-
-\bibliographystylereviewedjournal{plain}
-\bibliographyreviewedjournal{publications}
-
-
-\bibliographystylereviewedconference{plain}
-\bibliographyreviewedconference{publications}
-
-
-\bibliographystyletechreport{plain}
-\bibliographytechreport{publications}
-
-
-\bibliographystylejournal{plain}
-\bibliographyjournal{publications}
-
-
-\bibliographystyleconference{plain}
-\bibliographyconference{publications}
-
-
-\bibliographystylethesis{plain}
-\bibliographythesis{publications}
-
-
-\bibliographystyleprogram{plain}
-\bibliographyprogram{publications}
-
-
-\bibliographystylepopular{plain}
-\bibliographypopular{publications}
-
-
-\end{document}
