Index: doc/update_manual.bat
===================================================================
--- doc/update_manual.bat	(revision 0)
+++ doc/update_manual.bat	(revision 0)
@@ -0,0 +1 @@
+ipython update_manual.py
Index: doc/build_doc_instruction.txt
===================================================================
--- doc/build_doc_instruction.txt	(revision 0)
+++ doc/build_doc_instruction.txt	(revision 0)
@@ -0,0 +1,13 @@
+The doc is written using lyx http://www.lyx.org, which is a gui for latex documents.
+LyX also requires a latex installation.
+
+The file manual_base.lyx is the template file that should be edited if you want to do changes to the docs.
+
+A final version is generated by running the script:
+	* update_manual.bat on windows
+	* update_manual.sh  on unix
+This script will insert the current version number into the template and also generate magic.tex
+A file containing documentation for the doc strings of the magic commands.
+
+The script creates manual.lyx which can be opened by lyx to generate pdf or postscript versions of the docs.
+
Index: doc/update_manual.py
===================================================================
--- doc/update_manual.py	(revision 0)
+++ doc/update_manual.py	(revision 0)
@@ -0,0 +1,22 @@
+#must be launched via ipython not normal python
+import sys,IPython,re
+
+
+fil=open("magic.tex","w")
+oldout=sys.stdout
+sys.stdout=fil
+__IP.magic_magic("-latex")
+sys.stdout=oldout
+fil.close()
+
+fil=open("manual_base.lyx")
+txt=fil.read()
+fil.close()
+
+manualtext=re.sub("__version__",IPython.__version__,txt)
+fil=open("manual.lyx","w")
+fil.write(manualtext)
+fil.close()
+
+##How do you exit ipython automatically
+
