diff --git a/doc/source/conf.py b/doc/source/conf.py
index d44ee11482922f46386e179704ebb06e96e4b1d3..87a93c1c5e011279cb665889b049cb8a8598c346 100644
--- a/doc/source/conf.py
+++ b/doc/source/conf.py
@@ -46,7 +46,7 @@ copyright = u'2011-2013, C. W. Groth, M. Wimmer, A. R. Akhmerov, X. Waintal, and
 # built documents.
 #
 # The full version, including alpha/beta/rc tags.
-release = kwant.version.version[:]
+release = kwant.__version__
 
 for i, s in enumerate(release):
     if s not in '0123456790.':
@@ -175,17 +175,29 @@ htmlhelp_basename = 'kwantdoc'
 
 # -- Options for LaTeX output --------------------------------------------------
 
-# The paper size ('letter' or 'a4').
-latex_paper_size = 'a4'
-
-# The font size ('10pt', '11pt' or '12pt').
-#latex_font_size = '10pt'
+# http://thread.gmane.org/gmane.comp.python.sphinx.devel/4220/focus=4238
+latex_elements = {'papersize': 'a4paper',
+                  'release': '',
+                  'releasename': '',
+                  'preamble':
+r"""\makeatletter
+  \fancypagestyle{normal}{
+    \fancyhf{}
+    \fancyfoot[LE,RO]{{\py@HeaderFamily\thepage}}
+    \fancyfoot[LO]{{\py@HeaderFamily\nouppercase{\rightmark}}}
+    \fancyfoot[RE]{{\py@HeaderFamily\nouppercase{\leftmark}}}
+    \fancyhead[LE,RO]{{\py@HeaderFamily \@title}}
+    \renewcommand{\headrulewidth}{0.4pt}
+    \renewcommand{\footrulewidth}{0.4pt}
+  }
+\makeatother
+"""}
 
 # Grouping the document tree into LaTeX files. List of tuples
 # (source start file, target name, title, author, documentclass [howto/manual]).
 # We use "et al." as it is shorter and there's not much space left horizontally.
 latex_documents = [
-  ('index', 'kwant.tex', u'Kwant Documentation',
+  ('index', 'kwant.tex', 'Kwant {0} documentation'.format(release),
    u'C. W. Groth, M. Wimmer, A. R. Akhmerov, X. Waintal, et al.',
    'manual'),
 ]
@@ -198,9 +210,6 @@ latex_documents = [
 # not chapters.
 #latex_use_parts = False
 
-# Additional stuff for the LaTeX preamble.
-#latex_preamble = ''
-
 # Documents to append as an appendix to all manuals.
 #latex_appendices = []
 
diff --git a/doc/source/index.rst b/doc/source/index.rst
index 40a4e1b4c084d48a7005f81769f749f5daba9e81..861dbfb374b600b98dc60c168bbfede1de9543bb 100644
--- a/doc/source/index.rst
+++ b/doc/source/index.rst
@@ -1,6 +1,6 @@
-===================
-Kwant documentation
-===================
+=============================
+Kwant |release| documentation
+=============================
 
 .. toctree::
    :maxdepth: 2