omit the index in the HTML version, and the extra "References" TOC entry
authorSimon Marlow <marlowsd@gmail.com>
Tue, 6 Jul 2010 09:42:19 +0000 (09:42 +0000)
committerSimon Marlow <marlowsd@gmail.com>
Tue, 6 Jul 2010 09:42:19 +0000 (09:42 +0000)
report/haskell.verb

index 2ecfa04..88055d8 100644 (file)
 \makeatother
 %---------------------------------------------------------------------
 
+% conditional compilation for HTML/typeset
+\newcommand{\ifhtml}[2]{%
+\ifx \HCode\Undef
+#2
+\else
+#1
+\fi
+}
+
 % the major sections have \cleardoublepages between them
 % if you want those between EVERY section, change the
 % following defn:
@@ -484,12 +493,12 @@ that it does not claim to be a definition of the language Haskell 2010.
 \input{index-extra}
 
 % Add a contents line for the References -- may be off by one page
-\addcontentsline{toc}{part}{References}
+\ifhtml{}{\addcontentsline{toc}{part}{References}}
 \bibliographystyle{plain}
 \bibliography{haskell}
 %
 \startnewstuff
-\printindex
+\ifhtml{}{\printindex}
 
 \end{document}