The patch below has two objectives:
For intro.html:
Almost same as my previous patch. Use conditional ".if \n[HTML]"
so that the same ms file can be used for both pdf and html.
I don't know why we need different macros for html and pdf.
For intro.pdf:
Use -mspdf instead of -ms, and .XN instead of .XS/.XE. This adds an
Index to the pdf that can be accessed via the side panel (side bar)
of PDF viewers (evince, Preview.app, etc.).
-no-kill-null-pages is to retain blank pages after the cover page
and before the TOC; these are useful only for those who actually
print the pdf to double-sided papers.
I will push this if no one has found a better ms->html converter than
groff -ms -Thtml.
# Manpage of grohtml(1) (groff's html driver) says, in the Bugs section,
# "grohtml is still beta code." It may improve in the future, hopefully.