diff --git a/Makefile b/Makefile
index fa14a9bd2..3906c693e 100644
--- a/Makefile
+++ b/Makefile
@@ -131,10 +131,28 @@ haskell-mode.info: haskell-mode.texi
@rm haskell-mode-menu-order.txt haskell-mode-content-order.txt
# Processing proper
- $(MAKEINFO) $(MAKEINFO_FLAGS) -o $@ $<
+ LANG=en_US.UTF-8 $(MAKEINFO) $(MAKEINFO_FLAGS) -o $@ $<
+
+haskell-mode.html: haskell-mode.texi haskell-mode.css
+ LANG=en_US.UTF-8 $(MAKEINFO) $(MAKEINFO_FLAGS) --html --css-include=haskell-mode.css --no-split -o $@ $<
+
+html/index.html : haskell-mode.texi
+ if [ -e html ]; then rm -r html; fi
+ LANG=en_US.UTF-8 $(MAKEINFO) $(MAKEINFO_FLAGS) --html \
+ --css-ref=haskell-mode.css \
+ -c AFTER_BODY_OPEN="
" \
+ -c SHOW_TITLE=0 \
+ -o html $<
+
+html/haskell-mode.css : haskell-mode.css html/index.html
+ cp $< $@
+
+html/images/haskell-mode.svg : images/haskell-mode.svg html/index.html
+ mkdir -p html/images
+ cp $< $@
+
+html : html/index.html html/haskell-mode.css html/images/haskell-mode.svg
-haskell-mode.html: haskell-mode.texi
- $(MAKEINFO) $(MAKEINFO_FLAGS) --html --no-split -o $@ $<
$(AUTOLOADS): $(ELFILES) haskell-mode.elc
$(BATCH) \
diff --git a/haskell-mode.css b/haskell-mode.css
new file mode 100644
index 000000000..0d575dd55
--- /dev/null
+++ b/haskell-mode.css
@@ -0,0 +1,33 @@
+@charset "UTF-8";
+@import url("http://fonts.googleapis.com/css?family=Lato:400,400italic,700,700italic&subset=latin,latin-ext");
+@import url("http://fonts.googleapis.com/css?family=Source Code Pro");
+
+body {font-family: Lato, Arial, sans-serif; font-feature-settings: "kern", "liga", "clig", "calt"; font-size: 14pt; line-height: 1.35; }
+body {width: 800px; margin: 0 auto;}
+table.menu {width: 700px; margin-left: 50px; }
+/* makeinfo 5.2 */
+div.header p {margin: 0; text-align: right;}
+div.header {background-color: #9a98bd; background: linear-gradient(#CDCCDE,#A9A7CD);}
+/* makeinfo 4.8 */
+div.node {background-color: #9a98bd; background: linear-gradient(#CDCCDE,#A9A7CD);}
+div.node p {margin: 0; text-align: right;}
+div.node hr {margin: 0;}
+
+div.footnote h3 {display: inline; font-size: normal;}
+/* makeinfo up to 5.2 cannot pass on unicode characters without messing them up */
+a[rel="up"]:before {content: " \2191 "; /* ↑ */}
+a[rel="prev"]:before {content: " \2190 "; /* ← */}
+a[rel="next"]:before {content: " \2192 "; /* → */}
+code, kbd, samp, pre { font-family: "Source Code Pro", Menlo, Inconsolata, monospace;}
+kbd {font-style:normal}
+div.background {
+ position: fixed;
+ right: 30px;
+ bottom: 0px;
+ width: 256px;
+ height: 256px;
+ opacity: 0.3;
+ background-image: url("images/haskell-mode.svg");
+ background-repeat: no-repeat;
+ background-size: 256px 256px;
+}
diff --git a/haskell-mode.texi b/haskell-mode.texi
index 0355e8e64..68a25d8b7 100644
--- a/haskell-mode.texi
+++ b/haskell-mode.texi
@@ -37,15 +37,6 @@ Front-Cover Texts and no Back-Cover Texts.
@contents
@end iftex
-@ifhtml
-@titlepage
-@title Haskell Mode
-@subtitle Haskell Development Environment for Emacs
-
-@end titlepage
-@insertcopying
-@end ifhtml
-
@ifnottex
@node Top
@top Haskell Mode
@@ -74,6 +65,11 @@ interpreter (e.g. GHCi).
* Variable index::
@end menu
+@ifhtml
+@insertcopying
+@end ifhtml
+
+
@node Introduction
@chapter Introduction